diff --git a/CHANGELOG.md b/CHANGELOG.md index c47296da2..ebaca98da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,35 +1,5299 @@ -# CHANGE LOG (1.3.11-beta.7) - v1.8.7-prerelease-v7 +# CHANGE LOG (1.3.11-beta.8) - v1.9.0-prerelease-v8 -## Platform Client +## Application Client -### Order +### Cart + + + +#### getCart + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + + +#### addItems + +- ##### What's New + - [Added] property `items[].seller_identifier` of schema `AddProductCart` in request body + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `cart.breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + + +#### updateCart + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `cart.breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + + +#### getCoupons + +- ##### What's New + - [Added] `query` parameter `slug` (type: `string`) + + - [Added] `query` parameter `storeId` (type: `string`) + + - [Added] property `available_coupon_list[].coupon_amount` of schema `Coupon` in response with status code 200 + - [Added] property `available_coupon_list[].start_date` of schema `Coupon` in response with status code 200 + - [Added] property `available_coupon_list[].end_date` of schema `Coupon` in response with status code 200 + - [Added] property `available_coupon_list[].coupon_applicable_message` of schema `Coupon` in response with status code 200 + + +#### applyCoupon + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 201 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `items[].charges` of schema `CartProductInfo` in response with status code 201 + - [Added] property `breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 201 + + +#### removeCoupon + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + + +#### applyRewardPoints + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + + +#### getAddresses + +- ##### What's New + - [Added] property `address[].sector` of schema `Address` in response with status code 200 + - [Added] property `address[].state_code` of schema `Address` in response with status code 200 + + +#### addAddress + +- ##### What's New + - [Added] property `sector` of schema `Address` in request body + - [Added] property `state_code` of schema `Address` in request body + + +#### getAddressById + +- ##### What's New + - [Added] property `sector` of schema `Address` in response with status code 200 + - [Added] property `state_code` of schema `Address` in response with status code 200 + + +#### updateAddress + +- ##### What's New + - [Added] property `sector` of schema `Address` in request body + - [Added] property `state_code` of schema `Address` in request body + + +#### selectAddress + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 201 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `items[].charges` of schema `CartProductInfo` in response with status code 201 + - [Added] property `breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 201 +#### selectPaymentMode + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + #### getShipments +- ##### What's New + - [Added] property `breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + - [Added] property `shipments[].promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `shipments[].items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `shipments[].items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `shipments[].items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### checkoutCart + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `cart.breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + + +#### getCartSharedItems + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `cart.breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 404 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 404 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 404 + - [Added] property `cart.items[].charges` of schema `CartProductInfo` in response with status code 404 + - [Added] property `cart.breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 404 + + +#### updateCartWithSharedItems + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `cart.breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + + +#### checkoutCartV2 + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].charges` of schema `CartProductInfo` in response with status code 200 + - [Added] property `cart.breakup_values.raw.total_charge` of schema `RawBreakup` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + + +### Catalog + + + +#### getCollections + +- ##### What's New + - [Added] property `items[].tags` of schema `GetCollectionDetailNest` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].tag` of schema `GetCollectionDetailNest` in response with status code 200 + + +#### getProductPriceBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] `query` parameter `pincode` (type: `string`) + + + +#### getProductSellersBySlug + +- ##### What's Deprecated + - [Breaking] [Deleted] `query` parameter `pincode` (type: `string`) + + + +### Configuration + + + +#### getApplication + +- ##### What's New + - [Added] property `modified_at` of schema `Application` in response with status code 200 + - [Added] property `slug` of schema `Application` in response with status code 200 + - [Added] property `mode` of schema `Application` in response with status code 200 + - [Added] property `status` of schema `Application` in response with status code 200 + - [Added] property `tokens` of schema `Application` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `Application` in response with status code 200 + + +#### getOwnerInfo + +- ##### What's New + - [Added] property `application_info.meta[]` of schema `ApplicationInfo` in response with status code 200 + - [Added] property `application_info.company_info` of schema `ApplicationInfo` in response with status code 200 + - [Added] property `application_info.owner_info` of schema `ApplicationInfo` in response with status code 200 + - [Added] property `application_info.mode` of schema `ApplicationInfo` in response with status code 200 + - [Added] property `application_info.tokens` of schema `ApplicationInfo` in response with status code 200 + - [Added] property `application_info.domains` of schema `ApplicationInfo` in response with status code 200 + - [Added] property `application_info.favicon` of schema `ApplicationInfo` in response with status code 200 + - [Added] property `application_info.mobile_logo` of schema `ApplicationInfo` in response with status code 200 + - [Added] property `application_info.slug` of schema `ApplicationInfo` in response with status code 200 + - ##### What's Deprecated - - [Breaking] [Deleted] property `items[].fulfilling_store.brand_store_tags[]` of schema `ShipmentItemFulFillingStore` in response with status code 200 + - [Deleted] properties `application_info.meta.name`, `application_info.meta.value` in response with status code 200 + - [Breaking] [Deleted] property `company_info` of schema `ApplicationAboutResponse` in response with status code 200 + - [Breaking] [Deleted] property `owner_info` of schema `ApplicationAboutResponse` in response with status code 200 - ##### What's Changed - - [Breaking] [Changed] Type from `array` to `string` of property `items[].fulfilling_store.brand_store_tags` of schema `ShipmentItemFulFillingStore` in response with status code 200 + - [Breaking] [Changed] Type from `object` to `array` of property `application_info.meta` of schema `ApplicationMeta` in response with status code 200 -#### getApplicationShipments +#### getBasicDetails + +- ##### What's New + - [Added] property `slug` of schema `ApplicationDetail` in response with status code 200 + - [Added] property `company_id` of schema `ApplicationDetail` in response with status code 200 + + +#### getIntegrationTokens + +- ##### What's New + - [Added] property `modified_at` of schema `AppTokenResponse` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `AppTokenResponse` in response with status code 200 + + +#### getFeatures + +- ##### What's New + - [Added] property `feature.common.listing_page` of schema `CommonFeature` in response with status code 200 + - [Added] property `feature.common.international_shipping` of schema `CommonFeature` in response with status code 200 + - [Added] property `feature.modified_at` of schema `AppFeature` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `feature.updated_at` of schema `AppFeature` in response with status code 200 + + +#### getContactInfo + +- ##### What's New + - [Breaking] [Added] properties `address.loc.type`, `address.loc.coordinates` in response with status code 200 + - [Added] property `address.phone[]` of schema `InformationAddress` in response with status code 200 + - [Breaking] [Added] properties `support.phone[].code`, `support.phone[].number`, `support.phone[].key` in response with status code 200 + - [Breaking] [Added] properties `support.email[].value`, `support.email[].key` in response with status code 200 + - [Added] property `links[]` of schema `ApplicationInformation` in response with status code 200 + - [Added] property `business_highlights[]` of schema `ApplicationInformation` in response with status code 200 + - [Added] property `modified_at` of schema `ApplicationInformation` in response with status code 200 - ##### What's Deprecated - - [Breaking] [Deleted] property `items[].fulfilling_store.brand_store_tags[]` of schema `ShipmentItemFulFillingStore` in response with status code 200 + - [Deleted] Value format from `nullable` from property `address.loc` of schema `InformationAddress` in response with status code 200 + - [Deleted] properties `address.phone.code`, `address.phone.number` in response with status code 200 + - [Deleted] properties `links.title`, `links.link` in response with status code 200 + - [Deleted] properties `business_highlights._id`, `business_highlights.title`, `business_highlights.icon`, `business_highlights.sub_title` in response with status code 200 + - [Breaking] [Deleted] property `updated_at` of schema `ApplicationInformation` in response with status code 200 - ##### What's Changed - - [Breaking] [Changed] Type from `array` to `string` of property `items[].fulfilling_store.brand_store_tags` of schema `ShipmentItemFulFillingStore` in response with status code 200 + - [Breaking] [Changed] Type from `string` to `object` of property `address.loc` of schema `InformationAddress` in response with status code 200 + - [Breaking] [Changed] Type from `object` to `array` of property `address.phone` of schema `InformationPhone` in response with status code 200 + - [Breaking] [Changed] Type from `string` to `object` of property `support.phone[]` of schema `InformationSupport` in response with status code 200 + - [Breaking] [Changed] Type from `string` to `object` of property `support.email[]` of schema `InformationSupport` in response with status code 200 + - [Breaking] [Changed] Type from `object` to `array` of property `links` of schema `Links` in response with status code 200 + - [Breaking] [Changed] Type from `object` to `array` of property `business_highlights` of schema `BusinessHighlights` in response with status code 200 + + +#### getCurrencies + +- ##### What's New + - [Added] property `items[].modified_at` of schema `Currency` in response with status code 200 + - [Added] property `items[].country_name` of schema `Currency` in response with status code 200 + - [Added] property `items[].country_code` of schema `Currency` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].updated_at` of schema `Currency` in response with status code 200 + + +#### getCurrencyById + +- ##### What's New + - [Added] property `modified_at` of schema `Currency` in response with status code 200 + - [Added] property `country_name` of schema `Currency` in response with status code 200 + - [Added] property `country_code` of schema `Currency` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `Currency` in response with status code 200 + + +#### getAppCurrencies + +- ##### What's New + - [Added] property `supported_currency[].modified_at` of schema `Currency` in response with status code 200 + - [Added] property `supported_currency[].country_name` of schema `Currency` in response with status code 200 + - [Added] property `supported_currency[].country_code` of schema `Currency` in response with status code 200 + - [Added] property `_id` of schema `AppCurrencyResponse` in response with status code 200 + - [Added] property `created_at` of schema `AppCurrencyResponse` in response with status code 200 + - [Added] property `modified_at` of schema `AppCurrencyResponse` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `supported_currency[].updated_at` of schema `Currency` in response with status code 200 + + +#### getAppStaffList + +- ##### What's New + - [Added] Response with status 400 + + +### Content + + + +#### getBlog + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getBlogs + +- ##### What's New + - [Added] property `items[].seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getSEOConfiguration + +- ##### What's New + - [Added] property `seo.additonal_sitemap` of schema `SeoSchema` in response with status code 200 + + +#### getPage + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getPages + +- ##### What's New + - [Added] property `items[].seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getSEOMarkupSchemas + +- ##### What's New + - [Added] method `getSEOMarkupSchemas` + + + +#### getCustomObject + +- ##### What's New + - [Added] method `getCustomObject` + + + +#### getCustomFields + +- ##### What's New + - [Added] method `getCustomFields` + + + +### Logistic + + + +#### getLocations + +- ##### What's New + - [Added] method `getLocations` + + + +#### getCountries + +- ##### What's New + - [Added] method `getCountries` + + + +#### getCountry + +- ##### What's New + - [Added] method `getCountry` + + + +#### getLocalities + +- ##### What's New + - [Added] method `getLocalities` + + + +#### getLocality + +- ##### What's New + - [Added] method `getLocality` + + + +#### validateAddress + +- ##### What's New + - [Added] method `validateAddress` + + + +### Order + + + +#### getOrders + +- ##### What's New + - [Added] `query` parameter `startDate` (type: `string`) + + - [Added] `query` parameter `endDate` (type: `string`) + + - [Added] property `items[].shipments[].tracking_details[].created_ts` of schema `TrackingDetails` in response with status code 200 + - [Added] property `items[].shipments[].shipment_created_ts` of schema `Shipments` in response with status code 200 + - [Added] property `items[].order_created_ts` of schema `OrderSchema` in response with status code 200 + + +#### getOrderById + +- ##### What's New + - [Added] `query` parameter `allowInactive` (type: `boolean`) + + - [Added] property `order.shipments[].tracking_details[].created_ts` of schema `TrackingDetails` in response with status code 200 + - [Added] property `order.shipments[].shipment_created_ts` of schema `Shipments` in response with status code 200 + - [Added] property `order.order_created_ts` of schema `OrderSchema` in response with status code 200 + + +#### getPosOrderById + +- ##### What's New + - [Added] property `order.shipments[].tracking_details[].created_ts` of schema `TrackingDetails` in response with status code 200 + - [Added] property `order.shipments[].shipment_created_ts` of schema `Shipments` in response with status code 200 + - [Added] property `order.order_created_ts` of schema `OrderSchema` in response with status code 200 + + +#### getShipmentById + +- ##### What's New + - [Added] `query` parameter `allowInactive` (type: `boolean`) + + - [Added] property `shipment.tracking_details[].created_ts` of schema `TrackingDetails` in response with status code 200 + - [Added] property `shipment.shipment_created_ts` of schema `Shipments` in response with status code 200 + + +### Payment + + + +#### getActiveCardAggregator + +- ##### What's New + - [Breaking] [Added] Type `object` to property `cards` of schema `CardPaymentGateway` in response with status code 200 + - [Breaking] [Added] properties `cards.api`, `cards.aggregator`, `cards.customer_id` in response with status code 200 + - [Breaking] [Added] Required status to property `cards.aggregator` in response with status code 200 + + +#### getPaymentModeRoutes + +- ##### What's New + - [Breaking] [Deleted] Required `query` parameter `pincode` (type: `string`) + +- [Added] `query` parameter `orderId` (type: `string`) + - [Added] `query` parameter `displaySplit` (type: `boolean`) + + - [Added] `query` parameter `advancePayment` (type: `boolean`) + + - [Added] `query` parameter `shipmentId` (type: `string`) + + - [Breaking] [Added] Type `object` to property `payment_options` of schema `PaymentOptionAndFlow` in response with status code 200 + - [Breaking] [Added] properties `payment_options.payment_option`, `payment_options.payment_flows` in response with status code 200 + - [Breaking] [Added] Required status to properties `payment_options.payment_flows`, `payment_options.payment_option` in response with status code 200 + - [Added] property `payment_breakup` of schema `PaymentModeRouteResponse` in response with status code 200 + - [Added] property `advance_payment` of schema `PaymentModeRouteResponse` in response with status code 200 + +- ##### What's Changed + - [Changed] Required status of query parameter `cartId` + + +#### getPosPaymentModeRoutes + +- ##### What's New + - [Breaking] [Added] Type `object` to property `payment_options` of schema `PaymentOptionAndFlow` in response with status code 200 + - [Breaking] [Added] properties `payment_options.payment_option`, `payment_options.payment_flows` in response with status code 200 + - [Breaking] [Added] Required status to properties `payment_options.payment_flows`, `payment_options.payment_option` in response with status code 200 + - [Added] property `payment_breakup` of schema `PaymentModeRouteResponse` in response with status code 200 + - [Added] property `advance_payment` of schema `PaymentModeRouteResponse` in response with status code 200 + +- ##### What's Changed + - [Changed] Required status of query parameter `cartId` + - [Changed] Required status of query parameter `checkoutMode` + + +#### getRupifiBannerDetails + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `RupifiBannerData` in response with status code 200 + - [Breaking] [Added] properties `data.status`, `data.kyc_url` in response with status code 200 + + +#### getEpaylaterBannerDetails + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `EpaylaterBannerData` in response with status code 200 + - [Breaking] [Added] properties `data.status`, `data.message`, `data.display` in response with status code 200 + - [Breaking] [Added] Required status to property `data.display` in response with status code 200 + + +#### resendOrCancelPayment + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `LinkStatus` in response with status code 200 + - [Breaking] [Added] properties `data.status`, `data.message` in response with status code 200 + - [Breaking] [Added] Required status to properties `data.message`, `data.status` in response with status code 200 + + +#### validateVPA + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `ValidateUPI` in response with status code 200 + - [Breaking] [Added] properties `data.status`, `data.customer_name`, `data.is_valid`, `data.upi_vpa` in response with status code 200 + - [Breaking] [Added] Required status to properties `data.customer_name`, `data.is_valid`, `data.status`, `data.upi_vpa` in response with status code 200 + + +#### cardDetails + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `CardDetails` in response with status code 200 + - [Breaking] [Added] properties `data.status`, `data.country`, `data.bank_code`, `data.id`, `data.card_exp_year`, `data.card_brand`, `data.type`, `data.card_sub_type`, `data.is_domestic_card`, `data.name_on_card`, `data.card_exp_month`, `data.extended_card_type`, `data.card_object`, `data.card_token`, `data.user`, `data.bank` in response with status code 200 + - [Breaking] [Added] Required status to properties `data.bank`, `data.bank_code`, `data.card_brand`, `data.card_object`, `data.card_sub_type`, `data.country`, `data.extended_card_type`, `data.id`, `data.is_domestic_card`, `data.status`, `data.type` in response with status code 200 + + +#### addBeneficiaryDetails + +- ##### What's New + - [Breaking] [Added] Type `object` to property `details` of schema `BeneficiaryModeDetails` in request body + - [Breaking] [Added] properties `details.account_no`, `details.address`, `details.mobile`, `details.bank_name`, `details.comment`, `details.ifsc_code`, `details.vpa`, `details.branch_name`, `details.account_holder`, `details.wallet`, `details.email` in request body + - [Breaking] [Added] Required status to properties `details.account_holder`, `details.account_no`, `details.bank_name`, `details.branch_name`, `details.email`, `details.ifsc_code`, `details.mobile` in request body + + +#### getPaymentLink + +- ##### What's New + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 400 + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### createPaymentLink + +- ##### What's New + - [Breaking] [Added] Type `object` to property `meta` of schema `CreatePaymentLinkMeta` in request body + - [Breaking] [Added] properties `meta.cart_id`, `meta.checkout_mode`, `meta.assign_card_id`, `meta.amount` in request body + - [Breaking] [Added] Required status to properties `meta.amount`, `meta.cart_id`, `meta.checkout_mode` in request body + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 400 + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### resendPaymentLink + +- ##### What's New + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 400 + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### cancelPaymentLink + +- ##### What's New + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 400 + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### getPaymentModeRoutesPaymentLink + +- ##### What's New + - [Breaking] [Added] Type `object` to property `payment_options` of schema `PaymentOptionAndFlow` in response with status code 200 + - [Breaking] [Added] properties `payment_options.payment_option`, `payment_options.payment_flows` in response with status code 200 + - [Breaking] [Added] Required status to properties `payment_options.payment_flows`, `payment_options.payment_option` in response with status code 200 + - [Added] property `payment_breakup` of schema `PaymentModeRouteResponse` in response with status code 200 + - [Added] property `advance_payment` of schema `PaymentModeRouteResponse` in response with status code 200 + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 400 + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### pollingPaymentLink + +- ##### What's New + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 400 + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### createOrderHandlerPaymentLink + +- ##### What's New + - [Breaking] [Added] Type `object` to property `payment_methods` of schema `CreateOrderUserPaymentMethods` in request body + - [Breaking] [Added] properties `payment_methods.name`, `payment_methods.mode`, `payment_methods.meta` in request body + - [Breaking] [Added] Required status to properties `payment_methods.meta`, `payment_methods.mode`, `payment_methods.name` in request body + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 400 + - [Breaking] [Added] properties `error.payment_transaction_id`, `error.expired`, `error.merchant_order_id`, `error.merchant_name`, `error.msg`, `error.cancelled`, `error.amount`, `error.invalid_id` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### customerCreditSummary + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `CreditSummary` in response with status code 200 + - [Breaking] [Added] properties `data.total_due_amount`, `data.status`, `data.limit`, `data.credit_line_id`, `data.amount_available`, `data.due_amount`, `data.due_date`, `data.balance`, `data.status_message`, `data.repayment_url`, `data.soa_url`, `data.is_eligible_for_txn`, `data.merchant_customer_ref_id`, `data.buyer_status`, `data.activation_url` in response with status code 200 + + +#### redirectToAggregator + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `RedirectURL` in response with status code 200 + - [Breaking] [Added] properties `data.status`, `data.signup_url` in response with status code 200 + - [Breaking] [Added] Required status to properties `data.signup_url`, `data.status` in response with status code 200 + + +#### checkCredit + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `CreditDetail` in response with status code 200 + - [Breaking] [Added] properties `data.status`, `data.is_registered`, `data.signup_url` in response with status code 200 + - [Breaking] [Added] Required status to properties `data.is_registered`, `data.signup_url`, `data.status` in response with status code 200 + + +#### customerOnboard + +- ##### What's New + - [Breaking] [Added] Type `object` to property `personal_info` of schema `UserPersonalInfoInDetails` in request body + - [Breaking] [Added] properties `personal_info.first_name`, `personal_info.voter_id`, `personal_info.gender`, `personal_info.dob`, `personal_info.passport`, `personal_info.fathers_name`, `personal_info.mothers_name`, `personal_info.middle_name`, `personal_info.last_name`, `personal_info.pan`, `personal_info.driving_license`, `personal_info.email_verified`, `personal_info.address_as_per_id`, `personal_info.mobile_verified`, `personal_info.phone`, `personal_info.email` in request body + - [Breaking] [Added] Required status to properties `personal_info.address_as_per_id`, `personal_info.dob`, `personal_info.email_verified`, `personal_info.first_name`, `personal_info.mobile_verified`, `personal_info.phone` in request body + - [Breaking] [Added] Type `object` to property `marketplace_info` of schema `MarketplaceInfo` in request body + - [Breaking] [Added] properties `marketplace_info.date_of_joining`, `marketplace_info.name`, `marketplace_info.membership_id` in request body + - [Breaking] [Added] Required status to properties `marketplace_info.membership_id`, `marketplace_info.name` in request body + - [Breaking] [Added] Type `object` to property `business_info` of schema `BusinessDetails` in request body + - [Breaking] [Added] properties `business_info.business_ownership_type`, `business_info.vintage`, `business_info.gstin`, `business_info.pan`, `business_info.entity_type`, `business_info.shop_and_establishment`, `business_info.fssai`, `business_info.fda`, `business_info.business_type`, `business_info.name`, `business_info.address` in request body + - [Breaking] [Added] Type `object` to property `device` of schema `DeviceDetails` in request body + - [Breaking] [Added] properties `device.identification_number`, `device.identifier_type`, `device.device_model`, `device.device_make`, `device.device_type`, `device.os`, `device.os_version` in request body + - [Breaking] [Added] Type `object` to property `data` of schema `OnboardSummary` in response with status code 200 + - [Breaking] [Added] properties `data.redirect_url`, `data.session`, `data.status`, `data.status_remark`, `data.is_eligible_for_txn`, `data.merchant_customer_ref_id`, `data.activation_url` in response with status code 200 + - [Breaking] [Added] Required status to property `data.status` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Required status from property `personal_info` in request body + + +#### walletLinkInitate + +- ##### What's New + - [Added] method `walletLinkInitate` + + + +#### linkWallet + +- ##### What's New + - [Added] method `linkWallet` + + + +#### delinkWallet + +- ##### What's New + - [Added] method `delinkWallet` + + + +#### createPaymentOrder + +- ##### What's New + - [Added] method `createPaymentOrder` + + + +### PosCart + + + +#### getCart + +- ##### What's New + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### addItems + +- ##### What's New + - [Added] property `cart.applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### updateCart + +- ##### What's New + - [Added] property `cart.applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### applyCoupon + +- ##### What's New + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 201 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 201 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 201 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + + +#### removeCoupon + +- ##### What's New + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### applyRewardPoints + +- ##### What's New + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### getAddresses + +- ##### What's New + - [Added] property `address[].sector` of schema `Address` in response with status code 200 + - [Added] property `address[].state_code` of schema `Address` in response with status code 200 + + +#### addAddress + +- ##### What's New + - [Added] property `sector` of schema `Address` in request body + - [Added] property `state_code` of schema `Address` in request body + + +#### getAddressById + +- ##### What's New + - [Added] property `sector` of schema `Address` in response with status code 200 + - [Added] property `state_code` of schema `Address` in response with status code 200 + + +#### updateAddress + +- ##### What's New + - [Added] property `sector` of schema `Address` in request body + - [Added] property `state_code` of schema `Address` in request body + + +#### selectAddress + +- ##### What's New + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 201 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 201 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 201 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + + +#### selectPaymentMode + +- ##### What's New + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### getShipments + +- ##### What's New + - [Added] property `shipments[].promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `shipments[].items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `shipments[].items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `shipments[].items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### updateShipments + +- ##### What's New + - [Added] property `shipments[].promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `shipments[].items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `shipments[].items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `shipments[].items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### checkoutCart + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + + +#### getCartSharedItems + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 404 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 404 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 404 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 404 + + +#### updateCartWithSharedItems + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +### Theme + + + +#### getAllPages + +- ##### What's New + - [Added] property `pages[].sections[].predicate.schedule` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `pages[].sections[].predicate.platform` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `pages[].sections[].predicate.zones` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `pages[].seo.canonical_url` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `pages[].seo.meta_tags` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `pages[].seo.sitemap` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `pages[].seo.breadcrumb` of schema `AvailablePageSeo` in response with status code 200 + + +#### getPage + +- ##### What's New + - [Added] `query` parameter `filters` (type: `string`) + + - [Added] `query` parameter `company` (type: `integer`) + + - [Added] property `sections[].predicate.schedule` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.platform` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.zones` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.meta_tags` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.sitemap` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `AvailablePageSeo` in response with status code 200 + + +#### getAppliedTheme + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### getThemeForPreview + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +### User + + + +#### loginWithOTP + +- ##### What's Deprecated + - [Breaking] [Deleted] property `captcha_code` of schema `SendOtpRequestSchema` in request body + + +#### loginWithEmailAndPassword + +- ##### What's Deprecated + - [Breaking] [Deleted] property `captcha_code` of schema `PasswordLoginRequestSchema` in request body + + +#### sendResetPasswordEmail + +- ##### What's Deprecated + - [Breaking] [Deleted] property `captcha_code` of schema `SendResetPasswordEmailRequestSchema` in request body + + +#### sendResetPasswordMobile + +- ##### What's Deprecated + - [Breaking] [Deleted] property `captcha_code` of schema `SendResetPasswordMobileRequestSchema` in request body + + +#### sendOTPOnMobile + +- ##### What's Deprecated + - [Breaking] [Deleted] property `captcha_code` of schema `SendMobileOtpRequestSchema` in request body + + +#### sendOTPOnEmail + +- ##### What's Deprecated + - [Breaking] [Deleted] property `captcha_code` of schema `SendEmailOtpRequestSchema` in request body + + +#### userExists + +- ##### What's New + - [Added] method `userExists` + + + +#### getUserAttributes + +- ##### What's New + - [Added] method `getUserAttributes` + + + +#### updateUserAttributes + +- ##### What's New + - [Added] method `updateUserAttributes` + + + +## Partner Client + +- [Added] Lead class in partner client +- [Added] Logistics class in partner client +- [Added] Webhook class in partner client + + +### Theme + + + +#### getApplicationThemes + +- ##### What's New + - [Added] property `[].theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `[].company_id` of schema `ThemesSchema` in response with status code 200 + + +#### getThemeById + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### updateTheme + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### deleteTheme + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### createTheme + +- ##### What's New + - [Added] method `createTheme` + + + +## Platform Client + + + +### AuditTrail + + + +#### getAuditLogs + +- ##### What's Changed + - [Changed] Path From `/service/platform/audit-trail/v1.0/company/{company_id}/logs/` To `/service/platform/audit-trail/v1.0/company/{company_id}/logs` + + +#### createAuditLog + +- ##### What's Changed + - [Changed] Path From `/service/platform/audit-trail/v1.0/company/{company_id}/logs/` To `/service/platform/audit-trail/v1.0/company/{company_id}/logs` + + +### Billing + + + +#### getentityDetail + +- ##### What's New + - [Added] method `getentityDetail` + + + +### Cart + + + +#### getPromotions + +- ##### What's New + - [Breaking] [Added] properties `items[].restrictions.user_registered.end`, `items[].restrictions.user_registered.start` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `items[].restrictions.user_registered` of schema `Restrictions1` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `array` to `object` of property `items[].restrictions.payments` of schema `Restrictions1` in response with status code 200 + + +#### createPromotion + +- ##### What's New + - [Breaking] [Added] properties `restrictions.user_registered.end`, `restrictions.user_registered.start` in request body + - [Breaking] [Added] properties `restrictions.user_registered.end`, `restrictions.user_registered.start` in response with status code 201 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `restrictions.user_registered` of schema `Restrictions1` in request body + - [Deleted] Possible nullable value from `true` from property `restrictions.user_registered` of schema `Restrictions1` in response with status code 201 + +- ##### What's Changed + - [Breaking] [Changed] Type from `array` to `object` of property `restrictions.payments` of schema `Restrictions1` in request body + - [Breaking] [Changed] Type from `array` to `object` of property `restrictions.payments` of schema `Restrictions1` in response with status code 201 + + +#### getPromotionById + +- ##### What's New + - [Breaking] [Added] properties `restrictions.user_registered.end`, `restrictions.user_registered.start` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `restrictions.user_registered` of schema `Restrictions1` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `array` to `object` of property `restrictions.payments` of schema `Restrictions1` in response with status code 200 + + +#### updatePromotion + +- ##### What's New + - [Breaking] [Added] properties `restrictions.user_registered.end`, `restrictions.user_registered.start` in request body + - [Breaking] [Added] properties `restrictions.user_registered.end`, `restrictions.user_registered.start` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `restrictions.user_registered` of schema `Restrictions1` in request body + - [Deleted] Possible nullable value from `true` from property `restrictions.user_registered` of schema `Restrictions1` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `array` to `object` of property `restrictions.payments` of schema `Restrictions1` in request body + - [Breaking] [Changed] Type from `array` to `object` of property `restrictions.payments` of schema `Restrictions1` in response with status code 200 + + +#### updatePriceAdjustment + +- ##### What's New + - [Added] property `restrictions` of schema `PriceAdjustmentUpdate` in request body + - [Added] property `data.restrictions` of schema `PriceAdjustment` in response with status code 200 + + +#### addPriceAdjustment + +- ##### What's New + - [Added] property `restrictions` of schema `PriceAdjustmentAdd` in request body + - [Added] property `data.restrictions` of schema `PriceAdjustment` in response with status code 201 + + +#### fetchAndvalidateCartItems + +- ##### What's New + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### checkCartServiceability + +- ##### What's New + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### getAbandonedCartDetails + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### addItems + +- ##### What's New + - [Added] property `items[].seller_identifier` of schema `AddProductCart` in request body + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### updateCart + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### overrideCart + +- ##### What's New + - [Added] property `cart_items[].promo_list[].parent_promo_id` of schema `OverrideCartItemPromo` in request body + + +#### getCartSharedItems + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 404 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 404 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 404 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 404 + + +#### updateCartWithSharedItems + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + + +#### getCartList + +- ##### What's New + - [Added] property `data[].currency_code` of schema `CartList` in response with status code 200 + + +#### updateCartUser + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### getCart + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### platformAddItems + +- ##### What's New + - [Added] property `items[].seller_identifier` of schema `AddProductCart` in request body + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### platformUpdateCart + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### getAppCoupons + +- ##### What's New + - [Added] `query` parameter `slug` (type: `string`) + + - [Added] `query` parameter `storeId` (type: `string`) + + - [Added] property `available_coupon_list[].start_date` of schema `Coupon` in response with status code 200 + - [Added] property `available_coupon_list[].end_date` of schema `Coupon` in response with status code 200 + - [Added] property `available_coupon_list[].coupon_applicable_message` of schema `Coupon` in response with status code 200 + + +#### applyCoupon + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 201 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 201 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 201 + + +#### removeCoupon + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### getAddresses + +- ##### What's New + - [Added] property `address[].sector` of schema `PlatformAddress` in response with status code 200 + - [Added] property `address[].state_code` of schema `PlatformAddress` in response with status code 200 + - [Added] property `address[].country_phone_code` of schema `PlatformAddress` in response with status code 200 + - [Added] property `address[].country_iso_code` of schema `PlatformAddress` in response with status code 200 + - [Added] property `address[]._custom_json` of schema `PlatformAddress` in response with status code 200 + + +#### addAddress + +- ##### What's New + - [Added] property `sector` of schema `PlatformAddress` in request body + - [Added] property `state_code` of schema `PlatformAddress` in request body + - [Added] property `country_phone_code` of schema `PlatformAddress` in request body + - [Added] property `country_iso_code` of schema `PlatformAddress` in request body + - [Added] property `_custom_json` of schema `PlatformAddress` in request body + + +#### getAddressById + +- ##### What's New + - [Added] property `sector` of schema `PlatformAddress` in response with status code 200 + - [Added] property `state_code` of schema `PlatformAddress` in response with status code 200 + - [Added] property `country_phone_code` of schema `PlatformAddress` in response with status code 200 + - [Added] property `country_iso_code` of schema `PlatformAddress` in response with status code 200 + - [Added] property `_custom_json` of schema `PlatformAddress` in response with status code 200 + + +#### updateAddress + +- ##### What's New + - [Added] property `sector` of schema `PlatformAddress` in request body + - [Added] property `state_code` of schema `PlatformAddress` in request body + - [Added] property `country_phone_code` of schema `PlatformAddress` in request body + - [Added] property `country_iso_code` of schema `PlatformAddress` in request body + - [Added] property `_custom_json` of schema `PlatformAddress` in request body + + +#### selectAddress + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 201 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 201 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 201 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 201 + + +#### getShipments + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `shipments[].items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `shipments[].items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `shipments[].items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `shipments[].promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### updateShipments + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `shipments[].items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `shipments[].items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `shipments[].items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `shipments[].promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### platformCheckoutCart + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + + +#### selectPaymentMode + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +#### platformCheckoutCartV2 + +- ##### What's New + - [Added] property `cart.delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `cart.items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `cart.items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `cart.items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.cod_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Type from `integer` to `number` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + - [Breaking] [Changed] Value format from `int32` to `float` of property `cart.delivery_charges` of schema `CheckCart` in response with status code 200 + + +#### selectPaymentModeV2 + +- ##### What's New + - [Added] property `delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `items[].article.tags` of schema `ProductArticle` in response with status code 200 + - [Added] property `items[].promotions_applied[].currency` of schema `AppliedPromotion` in response with status code 200 + - [Added] property `items[].delivery_promise.iso` of schema `ShipmentPromise` in response with status code 200 + - [Added] property `applied_promo_details[].currency` of schema `AppliedPromotion` in response with status code 200 + + +### Catalog + + + +#### createCollection + +- ##### What's New + - [Added] property `seo.canonical_url` of schema `SeoDetail` in request body + + +#### updateCollection + +- ##### What's New + - [Added] property `seo.canonical_url` of schema `SeoDetail` in request body + - [Added] property `seo.canonical_url` of schema `SeoDetail` in response with status code 200 + + +#### getCollectionDetail + +- ##### What's New + - [Breaking] [Added] properties `_schedule.cron`, `_schedule.duration`, `_schedule.end`, `_schedule.next_schedule`, `_schedule.start` in response with status code 200 + - [Breaking] [Added] properties `badge.color`, `badge.text` in response with status code 200 + - [Added] property `_custom_json` of schema `GetCollectionDetailResponse` in response with status code 200 + - [Added] property `_locale_language` of schema `GetCollectionDetailResponse` in response with status code 200 + - [Added] property `action` of schema `GetCollectionDetailResponse` in response with status code 200 + - [Added] property `is_visible` of schema `GetCollectionDetailResponse` in response with status code 200 + - [Added] property `published` of schema `GetCollectionDetailResponse` in response with status code 200 + - [Added] property `seo` of schema `GetCollectionDetailResponse` in response with status code 200 + - [Added] property `sort_on` of schema `GetCollectionDetailResponse` in response with status code 200 + - [Added] property `tags` of schema `GetCollectionDetailResponse` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `cron` of schema `CollectionDetailResponse` in response with status code 200 + - [Breaking] [Deleted] property `tag` of schema `CollectionDetailResponse` in response with status code 200 + + +#### getAppLocations + +- ##### What's New + - [Added] `query` parameter `tags` (type: `array`) + + - [Added] `query` parameter `storeTypes` (type: `array`) + + + +#### listCategories + +- ##### What's New + - [Breaking] [Deleted] `query` parameter `departments` (type: `string`) + +- [Added] `query` parameter `department` (type: `integer`) + - [Added] `query` parameter `uids` (type: `array`) + + + +#### bulkHsnCode + +- ##### What's New + - [Added] Possible values `15` to property `data[].tax1` of schema `HsnUpsert` in request body + - [Added] Possible values `15` to property `data[].tax2` of schema `HsnUpsert` in request body + + +#### updateHsnCode + +- ##### What's New + - [Added] Possible values `15` to property `tax1` of schema `HsnUpsert` in request body + - [Added] Possible values `15` to property `tax2` of schema `HsnUpsert` in request body + + +#### addInventory + +- ##### What's Deprecated + - [Deleted] Possible values from `QAR,INR` from property `sizes[].currency` of schema `InvSize` in request body + + +#### getSizeGuides + +- ##### What's New + - [Added] `query` parameter `brandId` (type: `integer`) + + + +#### getConfigurationMetadata + +- ##### What's New + - [Added] `query` parameter `pageNo` (type: `integer`) + + - [Added] `query` parameter `pageSize` (type: `integer`) + + - [Added] `query` parameter `q` (type: `string`) + + - [Added] property `page` of schema `GetConfigMetadataResponse` in response with status code 200 + + +#### createProduct + +- ##### What's New + - [Added] property `uid` of schema `SuccessResponse1` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Possible values from `INR,QAR` from property `currency` of schema `ProductCreateUpdateSchemaV2` in request body + + +#### editProduct + +- ##### What's Deprecated + - [Deleted] Possible values from `INR,QAR` from property `currency` of schema `ProductCreateUpdateSchemaV2` in request body + + +#### getMarketplaces + +- ##### What's New + - [Added] method `getMarketplaces` + + + +#### updateMarketplaceOptin + +- ##### What's New + - [Added] method `updateMarketplaceOptin` + + + +### Communication + + + +#### deleteAudienceById + +- ##### What's New + - [Added] property `_id` of schema `Audience` in response with status code 200 + - [Added] property `application` of schema `Audience` in response with status code 200 + - [Added] property `name` of schema `Audience` in response with status code 200 + - [Added] property `description` of schema `Audience` in response with status code 200 + - [Added] property `records_count` of schema `Audience` in response with status code 200 + - [Added] property `type` of schema `Audience` in response with status code 200 + - [Added] property `tags` of schema `Audience` in response with status code 200 + - [Added] property `headers` of schema `Audience` in response with status code 200 + - [Added] property `file_url` of schema `Audience` in response with status code 200 + - [Added] property `is_active` of schema `Audience` in response with status code 200 + - [Added] property `created_at` of schema `Audience` in response with status code 200 + - [Added] property `updated_at` of schema `Audience` in response with status code 200 + - [Added] property `slug` of schema `Audience` in response with status code 200 + - [Added] property `__v` of schema `Audience` in response with status code 200 + - [Added] Body content in Request + +- ##### What's Deprecated + - [Breaking] [Deleted] property `message` of schema `GenericDelete` in response with status code 200 + - [Breaking] [Deleted] property `acknowledged` of schema `GenericDelete` in response with status code 200 + - [Breaking] [Deleted] property `affected` of schema `GenericDelete` in response with status code 200 + - [Breaking] [Deleted] property `operation` of schema `GenericDelete` in response with status code 200 + + +#### getEventSubscriptions + +- ##### What's New + - [Added] Response with status 404 + - [Added] Response with status 500 + + +#### createEventSubscriptions + +- ##### What's New + - [Added] method `createEventSubscriptions` + + + +#### getEventSubscriptionsById + +- ##### What's New + - [Added] method `getEventSubscriptionsById` + + + +#### editEventSubscriptions + +- ##### What's New + - [Added] method `editEventSubscriptions` + + + +#### deleteEventSubscriptionsById + +- ##### What's New + - [Added] method `deleteEventSubscriptionsById` + + + +#### createEventSubscriptionsByBulk + +- ##### What's New + - [Added] method `createEventSubscriptionsByBulk` + + + +#### createJobs + +- ##### What's New + - [Added] method `createJobs` + + + +#### getOtpConfiguration + +- ##### What's New + - [Added] method `getOtpConfiguration` + + + +#### updateOtpConfiguration + +- ##### What's New + - [Added] method `updateOtpConfiguration` + + + +### CompanyProfile + + + +#### cbsOnboardGet + +- ##### What's New + - [Added] property `business_country_info.currency` of schema `BusinessCountryInfo` in response with status code 200 + - [Added] property `business_country_info.timezone` of schema `BusinessCountryInfo` in response with status code 200 + - [Breaking] [Added] Required status to properties `business_country_info.country_code`, `business_country_info.country`, `business_country_info.currency`, `business_country_info.timezone` in response with status code 200 + - [Added] property `addresses[].state_code` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `addresses[].sector` of schema `GetAddressSerializer` in response with status code 200 + + +#### getBrands + +- ##### What's New + - [Added] property `items[].company.addresses[].state_code` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `items[].company.addresses[].sector` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `items[].company.business_country_info.currency` of schema `BusinessCountryInfo` in response with status code 200 + - [Added] property `items[].company.business_country_info.timezone` of schema `BusinessCountryInfo` in response with status code 200 + - [Breaking] [Added] Required status to properties `items[].company.business_country_info.country_code`, `items[].company.business_country_info.country`, `items[].company.business_country_info.currency`, `items[].company.business_country_info.timezone` in response with status code 200 + + +#### getLocations + +- ##### What's New + - [Added] `query` parameter `types` (type: `array`) + + - [Added] `query` parameter `tags` (type: `array`) + + - [Added] property `items[].company.addresses[].state_code` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `items[].company.addresses[].sector` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `items[].address.state_code` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `items[].address.sector` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `items[].auto_assign_courier_partner` of schema `GetLocationSerializer` in response with status code 200 + + +#### createLocation + +- ##### What's New + - [Added] property `address.sector` of schema `AddressSerializer` in request body + - [Added] property `address.state_code` of schema `AddressSerializer` in request body + - [Breaking] [Added] Required status to property `address.country_code` in request body + - [Added] property `auto_assign_courier_partner` of schema `LocationSerializer` in request body + - [Breaking] [Added] Required status to property `documents` in request body + + +#### getLocationDetail + +- ##### What's New + - [Added] property `company.addresses[].state_code` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `company.addresses[].sector` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `address.state_code` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `address.sector` of schema `GetAddressSerializer` in response with status code 200 + - [Added] property `auto_assign_courier_partner` of schema `GetLocationSerializer` in response with status code 200 + + +#### updateLocation + +- ##### What's New + - [Added] property `address.sector` of schema `AddressSerializer` in request body + - [Added] property `address.state_code` of schema `AddressSerializer` in request body + - [Breaking] [Added] Required status to property `address.country_code` in request body + - [Added] property `auto_assign_courier_partner` of schema `LocationSerializer` in request body + - [Breaking] [Added] Required status to property `documents` in request body + + +#### createLocationBulk + +- ##### What's New + - [Added] property `data[].address.sector` of schema `AddressSerializer` in request body + - [Added] property `data[].address.state_code` of schema `AddressSerializer` in request body + - [Breaking] [Added] Required status to property `data[].address.country_code` in request body + - [Added] property `data[].auto_assign_courier_partner` of schema `LocationSerializer` in request body + - [Breaking] [Added] Required status to property `data[].documents` in request body + + +### Configuration + + + +#### getBuildConfig + +- ##### What's New + - [Added] property `modified_at` of schema `MobileAppConfiguration` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `MobileAppConfiguration` in response with status code 200 + + +#### updateBuildConfig + +- ##### What's New + - [Added] property `modified_at` of schema `MobileAppConfiguration` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `MobileAppConfiguration` in response with status code 200 + + +#### getPreviousVersions + +- ##### What's New + - [Added] property `versions[]` of schema `BuildVersionHistory` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] properties `versions._id`, `versions.application`, `versions.platform_type`, `versions.build_status`, `versions.version_name`, `versions.version_code`, `versions.created_at`, `versions.updated_at`, `versions.__v` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `object` to `array` of property `versions` of schema `BuildVersion` in response with status code 200 + + +#### getAppFeatures + +- ##### What's New + - [Added] property `feature.common.listing_page` of schema `CommonFeature` in response with status code 200 + - [Added] property `feature.common.international_shipping` of schema `CommonFeature` in response with status code 200 + - [Added] property `feature.modified_at` of schema `AppFeature` in response with status code 200 + - [Added] property `success` of schema `NotFound` in response with status code 404 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `feature.updated_at` of schema `AppFeature` in response with status code 200 + + +#### updateAppFeatures + +- ##### What's New + - [Added] property `feature.common.listing_page` of schema `CommonFeature` in request body + - [Added] property `feature.common.international_shipping` of schema `CommonFeature` in request body + - [Added] property `feature.modified_at` of schema `AppFeature` in request body + - [Added] property `common.listing_page` of schema `CommonFeature` in response with status code 200 + - [Added] property `common.international_shipping` of schema `CommonFeature` in response with status code 200 + - [Added] property `modified_at` of schema `AppFeature` in response with status code 200 + - [Added] property `success` of schema `InvalidPayloadRequest` in response with status code 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `feature.updated_at` of schema `AppFeature` in request body + - [Breaking] [Deleted] property `updated_at` of schema `AppFeature` in response with status code 200 + + +#### modifyAppFeatures + +- ##### What's New + - [Added] property `feature.common.listing_page` of schema `CommonFeature` in request body + - [Added] property `feature.common.international_shipping` of schema `CommonFeature` in request body + - [Added] property `feature.modified_at` of schema `AppFeature` in request body + - [Added] property `common.listing_page` of schema `CommonFeature` in response with status code 200 + - [Added] property `common.international_shipping` of schema `CommonFeature` in response with status code 200 + - [Added] property `modified_at` of schema `AppFeature` in response with status code 200 + - [Added] Response with status 400 + - [Added] Response with status 404 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `feature.updated_at` of schema `AppFeature` in request body + - [Breaking] [Deleted] property `updated_at` of schema `AppFeature` in response with status code 200 + + +#### getAppBasicDetails + +- ##### What's New + - [Added] property `domain.message` of schema `Domain` in response with status code 200 + - [Added] property `domains[].message` of schema `Domain` in response with status code 200 + - [Added] property `slug` of schema `ApplicationDetail` in response with status code 200 + - [Added] property `company_id` of schema `ApplicationDetail` in response with status code 200 + + +#### updateAppBasicDetails + +- ##### What's New + - [Added] property `domain.message` of schema `Domain` in request body + - [Added] property `domains[].message` of schema `Domain` in request body + - [Added] property `slug` of schema `ApplicationDetail` in request body + - [Added] property `company_id` of schema `ApplicationDetail` in request body + - [Added] property `domain.message` of schema `Domain` in response with status code 200 + - [Added] property `domains[].message` of schema `Domain` in response with status code 200 + - [Added] property `slug` of schema `ApplicationDetail` in response with status code 200 + - [Added] property `company_id` of schema `ApplicationDetail` in response with status code 200 + + +#### getAppContactInfo + +- ##### What's New + - [Breaking] [Added] properties `address.loc.type`, `address.loc.coordinates` in response with status code 200 + - [Breaking] [Added] properties `support.phone[].code`, `support.phone[].number`, `support.phone[].key` in response with status code 200 + - [Breaking] [Added] properties `support.email[].value`, `support.email[].key` in response with status code 200 + - [Added] property `business_highlights[]` of schema `ApplicationInformation` in response with status code 200 + - [Added] property `modified_at` of schema `ApplicationInformation` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from `nullable` from property `address.loc` of schema `InformationAddress` in response with status code 200 + - [Deleted] properties `business_highlights._id`, `business_highlights.title`, `business_highlights.icon`, `business_highlights.sub_title` in response with status code 200 + - [Breaking] [Deleted] property `updated_at` of schema `ApplicationInformation` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `string` to `object` of property `address.loc` of schema `InformationAddress` in response with status code 200 + - [Breaking] [Changed] Type from `string` to `object` of property `support.phone[]` of schema `InformationSupport` in response with status code 200 + - [Breaking] [Changed] Type from `string` to `object` of property `support.email[]` of schema `InformationSupport` in response with status code 200 + - [Breaking] [Changed] Type from `object` to `array` of property `business_highlights` of schema `BusinessHighlights` in response with status code 200 + + +#### updateAppContactInfo + +- ##### What's New + - [Breaking] [Added] properties `address.loc.type`, `address.loc.coordinates` in request body + - [Breaking] [Added] properties `support.phone[].code`, `support.phone[].number`, `support.phone[].key` in request body + - [Breaking] [Added] properties `support.email[].value`, `support.email[].key` in request body + - [Added] property `business_highlights[]` of schema `ApplicationInformation` in request body + - [Added] property `modified_at` of schema `ApplicationInformation` in request body + - [Breaking] [Added] properties `address.loc.type`, `address.loc.coordinates` in response with status code 200 + - [Breaking] [Added] properties `support.phone[].code`, `support.phone[].number`, `support.phone[].key` in response with status code 200 + - [Breaking] [Added] properties `support.email[].value`, `support.email[].key` in response with status code 200 + - [Added] property `business_highlights[]` of schema `ApplicationInformation` in response with status code 200 + - [Added] property `modified_at` of schema `ApplicationInformation` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from `nullable` from property `address.loc` of schema `InformationAddress` in request body + - [Deleted] properties `business_highlights._id`, `business_highlights.title`, `business_highlights.icon`, `business_highlights.sub_title` in request body + - [Breaking] [Deleted] property `updated_at` of schema `ApplicationInformation` in request body + - [Deleted] Value format from `nullable` from property `address.loc` of schema `InformationAddress` in response with status code 200 + - [Deleted] properties `business_highlights._id`, `business_highlights.title`, `business_highlights.icon`, `business_highlights.sub_title` in response with status code 200 + - [Breaking] [Deleted] property `updated_at` of schema `ApplicationInformation` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `string` to `object` of property `address.loc` of schema `InformationAddress` in request body + - [Breaking] [Changed] Type from `string` to `object` of property `support.phone[]` of schema `InformationSupport` in request body + - [Breaking] [Changed] Type from `string` to `object` of property `support.email[]` of schema `InformationSupport` in request body + - [Breaking] [Changed] Type from `object` to `array` of property `business_highlights` of schema `BusinessHighlights` in request body + - [Breaking] [Changed] Type from `string` to `object` of property `address.loc` of schema `InformationAddress` in response with status code 200 + - [Breaking] [Changed] Type from `string` to `object` of property `support.phone[]` of schema `InformationSupport` in response with status code 200 + - [Breaking] [Changed] Type from `string` to `object` of property `support.email[]` of schema `InformationSupport` in response with status code 200 + - [Breaking] [Changed] Type from `object` to `array` of property `business_highlights` of schema `BusinessHighlights` in response with status code 200 + + +#### getAppApiTokens + +- ##### What's New + - [Added] property `tokens.fynd_rewards.credentials.private_key` of schema `FyndRewardsCredentials` in response with status code 200 + - [Added] property `modified_at` of schema `TokenResponse` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `TokenResponse` in response with status code 200 + + +#### updateAppApiTokens + +- ##### What's New + - [Added] property `tokens.fynd_rewards.credentials.private_key` of schema `FyndRewardsCredentials` in request body + - [Added] property `modified_at` of schema `TokenResponse` in request body + - [Added] property `tokens.fynd_rewards.credentials.private_key` of schema `FyndRewardsCredentials` in response with status code 200 + - [Added] property `modified_at` of schema `TokenResponse` in response with status code 200 + - [Added] property `success` of schema `InvalidPayloadRequest` in response with status code 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `TokenResponse` in request body + - [Breaking] [Deleted] property `updated_at` of schema `TokenResponse` in response with status code 200 + + +#### getAppCompanies + +- ##### What's New + - [Added] property `items[]` of schema `CompaniesResponse` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] properties `items.uid`, `items.name`, `items.company_type` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `object` to `array` of property `items` of schema `AppInventoryCompanies` in response with status code 200 + + +#### getAppStores + +- ##### What's New + - [Added] property `items[]` of schema `StoresResponse` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] properties `items._id`, `items.modified_on`, `items.uid`, `items.name`, `items.display_name`, `items.store_type`, `items.store_code`, `items.company_id` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `object` to `array` of property `items` of schema `AppInventoryStores` in response with status code 200 + + +#### getInventoryConfig + +- ##### What's New + - [Breaking] [Added] Type `integer` to property `inventory.brand.brands[]` of schema `InventoryBrand` in response with status code 200 + - [Breaking] [Added] Type `integer` to property `inventory.store.rules[].brands[]` of schema `AppStoreRules` in response with status code 200 + - [Added] property `inventory.company_id` of schema `AppInventoryConfig` in response with status code 200 + - [Added] property `article_assignment.enforced_stores` of schema `ArticleAssignmentConfig` in response with status code 200 + - [Added] property `cart.international_delivery_charges` of schema `AppCartConfig` in response with status code 200 + - [Added] property `payment.user_cod_limit` of schema `AppPaymentConfig` in response with status code 200 + - [Added] property `pii_masking` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `tags` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `__v` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `modified_at` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `success` of schema `NotFound` in response with status code 404 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `ApplicationInventory` in response with status code 200 + + +#### updateInventoryConfig + +- ##### What's New + - [Breaking] [Added] Type `integer` to property `inventory.brand.brands[]` of schema `InventoryBrand` in request body + - [Breaking] [Added] Type `integer` to property `inventory.store.rules[].brands[]` of schema `AppStoreRules` in request body + - [Added] property `inventory.company_id` of schema `AppInventoryConfig` in request body + - [Added] property `article_assignment.enforced_stores` of schema `ArticleAssignmentConfig` in request body + - [Added] property `cart.international_delivery_charges` of schema `AppCartConfig` in request body + - [Added] property `payment.user_cod_limit` of schema `AppPaymentConfig` in request body + - [Added] property `pii_masking` of schema `ApplicationInventory` in request body + - [Added] property `tags` of schema `ApplicationInventory` in request body + - [Added] property `__v` of schema `ApplicationInventory` in request body + - [Added] property `modified_at` of schema `ApplicationInventory` in request body + - [Breaking] [Added] Type `integer` to property `inventory.brand.brands[]` of schema `InventoryBrand` in response with status code 200 + - [Breaking] [Added] Type `integer` to property `inventory.store.rules[].brands[]` of schema `AppStoreRules` in response with status code 200 + - [Added] property `inventory.company_id` of schema `AppInventoryConfig` in response with status code 200 + - [Added] property `article_assignment.enforced_stores` of schema `ArticleAssignmentConfig` in response with status code 200 + - [Added] property `cart.international_delivery_charges` of schema `AppCartConfig` in response with status code 200 + - [Added] property `payment.user_cod_limit` of schema `AppPaymentConfig` in response with status code 200 + - [Added] property `pii_masking` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `tags` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `__v` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `modified_at` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `success` of schema `InvalidPayloadRequest` in response with status code 429 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `ApplicationInventory` in request body + - [Breaking] [Deleted] property `updated_at` of schema `ApplicationInventory` in response with status code 200 + + +#### partiallyUpdateInventoryConfig + +- ##### What's New + - [Added] property `cart.international_delivery_charges` of schema `AppCartConfig` in request body + - [Added] property `payment.user_cod_limit` of schema `AppPaymentConfig` in request body + - [Breaking] [Added] Type `integer` to property `inventory.brand.brands[]` of schema `InventoryBrand` in response with status code 200 + - [Breaking] [Added] Type `integer` to property `inventory.store.rules[].brands[]` of schema `AppStoreRules` in response with status code 200 + - [Added] property `inventory.company_id` of schema `AppInventoryConfig` in response with status code 200 + - [Added] property `article_assignment.enforced_stores` of schema `ArticleAssignmentConfig` in response with status code 200 + - [Added] property `cart.international_delivery_charges` of schema `AppCartConfig` in response with status code 200 + - [Added] property `payment.user_cod_limit` of schema `AppPaymentConfig` in response with status code 200 + - [Added] property `pii_masking` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `tags` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `__v` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `modified_at` of schema `ApplicationInventory` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `ApplicationInventory` in response with status code 200 + + +#### getAppCurrencyConfig + +- ##### What's New + - [Added] property `modified_at` of schema `AppSupportedCurrency` in response with status code 200 + - [Added] property `success` of schema `NotFound` in response with status code 404 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `AppSupportedCurrency` in response with status code 200 + + +#### updateAppCurrencyConfig + +- ##### What's New + - [Added] property `modified_at` of schema `AppSupportedCurrency` in request body + - [Added] property `modified_at` of schema `AppSupportedCurrency` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `AppSupportedCurrency` in request body + - [Breaking] [Deleted] property `updated_at` of schema `AppSupportedCurrency` in response with status code 200 + + +#### getAppSupportedCurrency + +- ##### What's New + - [Added] property `supported_currency[].modified_at` of schema `Currency` in response with status code 200 + - [Added] property `supported_currency[].country_name` of schema `Currency` in response with status code 200 + - [Added] property `supported_currency[].country_code` of schema `Currency` in response with status code 200 + - [Added] property `_id` of schema `AppCurrencyResponse` in response with status code 200 + - [Added] property `created_at` of schema `AppCurrencyResponse` in response with status code 200 + - [Added] property `modified_at` of schema `AppCurrencyResponse` in response with status code 200 + - [Added] property `success` of schema `NotFound` in response with status code 404 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `supported_currency[].updated_at` of schema `Currency` in response with status code 200 + + +#### getOrderingStoresByFilter + +- ##### What's New + - [Added] property `items[].address.sector` of schema `OptedStoreAddress` in response with status code 200 + - [Added] property `items[].address.country_code` of schema `OptedStoreAddress` in response with status code 200 + - [Added] property `items[].address.state_code` of schema `OptedStoreAddress` in response with status code 200 + + +#### updateOrderingStoreConfig + +- ##### What's New + - [Added] property `__v` of schema `DeploymentMeta` in response with status code 200 + - [Added] property `success` of schema `InvalidPayloadRequest` in response with status code 400 + - [Added] property `success` of schema `NotFound` in response with status code 404 + - [Added] property `deployment_meta.__v` of schema `DeploymentMeta` in request body + + +#### getOrderingStoreConfig + +- ##### What's New + - [Added] property `deployment_meta.__v` of schema `DeploymentMeta` in response with status code 200 + - [Added] property `success` of schema `NotFound` in response with status code 404 + + +#### getStaffOrderingStores + +- ##### What's New + - [Added] property `items[].address.sector` of schema `OptedStoreAddress` in response with status code 200 + - [Added] property `items[].address.country_code` of schema `OptedStoreAddress` in response with status code 200 + - [Added] property `items[].address.state_code` of schema `OptedStoreAddress` in response with status code 200 + + +#### getOrderingStoreCookie + +- ##### What's New + - [Added] property `success` of schema `NotFound` in response with status code 400 + + +#### getDomains + +- ##### What's New + - [Added] property `domains[].message` of schema `Domain` in response with status code 200 + + +#### addDomain + +- ##### What's New + - [Added] property `message` of schema `Domain` in response with status code 200 + - [Added] property `success` of schema `InvalidPayloadRequest` in response with status code 400 + + +#### removeDomainById + +- ##### What's New + - [Added] property `success` of schema `InvalidPayloadRequest` in response with status code 400 + - [Added] property `success` of schema `NotFound` in response with status code 404 + + +#### changeDomainType + +- ##### What's New + - [Added] property `domains[].message` of schema `Domain` in response with status code 200 + - [Added] property `success` of schema `NotFound` in response with status code 404 + + +#### createApplication + +- ##### What's New + - [Added] property `configuration.payment.callback_url` of schema `AppPaymentConfig` in request body + - [Added] property `configuration.payment.methods` of schema `AppPaymentConfig` in request body + - [Added] property `configuration.payment.payment_selection_lock` of schema `AppPaymentConfig` in request body + - [Added] property `configuration.payment.enabled` of schema `AppPaymentConfig` in request body + - [Added] property `configuration.payment.cod_amount_limit` of schema `AppPaymentConfig` in request body + - [Added] property `configuration.payment.cod_charges` of schema `AppPaymentConfig` in request body + - [Added] property `configuration.payment.anonymous_cod` of schema `AppPaymentConfig` in request body + - [Added] property `configuration.payment.user_cod_limit` of schema `AppPaymentConfig` in request body + - [Added] property `configuration.article_assignment.enforced_stores` of schema `ArticleAssignmentConfig` in request body + - [Added] property `configuration.inventory` of schema `ApplicationInventory` in request body + - [Added] property `configuration.authentication` of schema `ApplicationInventory` in request body + - [Added] property `configuration.reward_points` of schema `ApplicationInventory` in request body + - [Added] property `configuration.cart` of schema `ApplicationInventory` in request body + - [Added] property `configuration.order` of schema `ApplicationInventory` in request body + - [Added] property `configuration.logistics` of schema `ApplicationInventory` in request body + - [Added] property `configuration.pii_masking` of schema `ApplicationInventory` in request body + - [Added] property `configuration.tags` of schema `ApplicationInventory` in request body + - [Added] property `configuration.__v` of schema `ApplicationInventory` in request body + - [Added] property `configuration.business` of schema `ApplicationInventory` in request body + - [Added] property `configuration.comms_enabled` of schema `ApplicationInventory` in request body + - [Added] property `configuration.communication` of schema `ApplicationInventory` in request body + - [Added] property `configuration.platforms` of schema `ApplicationInventory` in request body + - [Added] property `configuration._id` of schema `ApplicationInventory` in request body + - [Added] property `configuration.loyalty_points` of schema `ApplicationInventory` in request body + - [Added] property `configuration.app` of schema `ApplicationInventory` in request body + - [Added] property `configuration.created_at` of schema `ApplicationInventory` in request body + - [Added] property `configuration.modified_at` of schema `ApplicationInventory` in request body + - [Added] property `configuration.modified_by` of schema `ApplicationInventory` in request body + - [Added] property `app.domains[].message` of schema `Domain` in response with status code 200 + - [Added] property `app.domain.message` of schema `Domain` in response with status code 200 + - [Added] property `app.modified_at` of schema `Application` in response with status code 200 + - [Added] property `app.mode` of schema `Application` in response with status code 200 + - [Added] property `app.status` of schema `Application` in response with status code 200 + - [Added] property `app.tokens` of schema `Application` in response with status code 200 + - [Added] property `app.secret` of schema `Application` in response with status code 200 + - [Breaking] [Added] Type `object` to property `app` of schema `Application` in response with status code 200 + - [Breaking] [Added] Type `integer` to property `configuration.inventory.brand.brands[]` of schema `InventoryBrand` in response with status code 200 + - [Breaking] [Added] Type `integer` to property `configuration.inventory.store.rules[].brands[]` of schema `AppStoreRules` in response with status code 200 + - [Added] property `configuration.inventory.company_id` of schema `AppInventoryConfig` in response with status code 200 + - [Added] property `configuration.article_assignment.enforced_stores` of schema `ArticleAssignmentConfig` in response with status code 200 + - [Added] property `configuration.cart.international_delivery_charges` of schema `AppCartConfig` in response with status code 200 + - [Added] property `configuration.payment.user_cod_limit` of schema `AppPaymentConfig` in response with status code 200 + - [Added] property `configuration.pii_masking` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `configuration.tags` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `configuration.__v` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `configuration.modified_at` of schema `ApplicationInventory` in response with status code 200 + - [Added] property `success` of schema `InvalidPayloadRequest` in response with status code 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `configuration.brand` of schema `AppInventory` in request body + - [Breaking] [Deleted] property `configuration.store` of schema `AppInventory` in request body + - [Breaking] [Deleted] property `configuration.image` of schema `AppInventory` in request body + - [Breaking] [Deleted] property `configuration.franchise_enabled` of schema `AppInventory` in request body + - [Breaking] [Deleted] property `configuration.out_of_stock` of schema `AppInventory` in request body + - [Breaking] [Deleted] property `configuration.only_verified_products` of schema `AppInventory` in request body + - [Deleted] Possible values from `ECOMM` from property `configuration.payment.mode_of_payment` of schema `InventoryPaymentConfig` in request body + - [Deleted] Possible values from `ECOMM` from property `configuration.payment.source` of schema `InventoryPaymentConfig` in request body + - [Deleted] Type from `string` from property `configuration.article_assignment.rules.store_priority.storetype_order[]` of schema `StorePriorityRule` in request body + - [Breaking] [Deleted] property `app.updated_at` of schema `Application` in response with status code 200 + - [Breaking] [Deleted] property `configuration.updated_at` of schema `ApplicationInventory` in response with status code 200 + + +#### getApplications + +- ##### What's New + - [Added] property `items[].domains[].message` of schema `Domain` in response with status code 200 + - [Added] property `items[].domain.message` of schema `Domain` in response with status code 200 + - [Added] property `items[].modified_at` of schema `Application` in response with status code 200 + - [Added] property `items[].mode` of schema `Application` in response with status code 200 + - [Added] property `items[].status` of schema `Application` in response with status code 200 + - [Added] property `items[].tokens` of schema `Application` in response with status code 200 + - [Added] property `items[].secret` of schema `Application` in response with status code 200 + - [Breaking] [Added] Type `object` to property `items[]` of schema `Application` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].updated_at` of schema `Application` in response with status code 200 + + +#### getApplicationById + +- ##### What's New + - [Added] property `domains[].message` of schema `Domain` in response with status code 200 + - [Added] property `domain.message` of schema `Domain` in response with status code 200 + - [Added] property `modified_at` of schema `Application` in response with status code 200 + - [Added] property `mode` of schema `Application` in response with status code 200 + - [Added] property `status` of schema `Application` in response with status code 200 + - [Added] property `tokens` of schema `Application` in response with status code 200 + - [Added] property `secret` of schema `Application` in response with status code 200 + - [Breaking] [Added] Type `object` to property `` of schema `Application` in response with status code 200 + - [Added] Response with status 404 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `Application` in response with status code 200 + + +#### getCurrencies + +- ##### What's New + - [Added] property `items[].modified_at` of schema `Currency` in response with status code 200 + - [Added] property `items[].country_name` of schema `Currency` in response with status code 200 + - [Added] property `items[].country_code` of schema `Currency` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].updated_at` of schema `Currency` in response with status code 200 + + +#### getIntegrationById + +- ##### What's New + - [Added] property `slug` of schema `Integration` in response with status code 200 + - [Added] property `hidden` of schema `Integration` in response with status code 200 + - [Added] property `modified_at` of schema `Integration` in response with status code 200 + - [Added] Response with status 404 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `Integration` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `object` to `string` of property `companies[]` of schema `Integration` in response with status code 200 + + +#### getAvailableOptIns + +- ##### What's New + - [Added] property `items[].slug` of schema `IntegrationOptIn` in response with status code 200 + - [Added] property `items[].hidden` of schema `IntegrationOptIn` in response with status code 200 + - [Added] property `items[].modified_at` of schema `IntegrationOptIn` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].updated_at` of schema `IntegrationOptIn` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `object` to `string` of property `items[].companies[]` of schema `IntegrationOptIn` in response with status code 200 + + +#### getSelectedOptIns + +- ##### What's New + - [Added] property `items[].slug` of schema `IntegrationOptIn` in response with status code 200 + - [Added] property `items[].hidden` of schema `IntegrationOptIn` in response with status code 200 + - [Added] property `items[].modified_at` of schema `IntegrationOptIn` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].updated_at` of schema `IntegrationOptIn` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `object` to `string` of property `items[].companies[]` of schema `IntegrationOptIn` in response with status code 200 + + +#### getIntegrationLevelConfig + +- ##### What's New + - [Added] property `items[].company_id` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `items[].modified_at` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `items[].success` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `items[].message` of schema `IntegrationLevel` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].updated_at` of schema `IntegrationLevel` in response with status code 200 + + +#### updateLevelIntegration + +- ##### What's New + - [Added] property `items[].company_id` of schema `IntegrationLevel` in request body + - [Added] property `items[].modified_at` of schema `IntegrationLevel` in request body + - [Added] property `items[].success` of schema `IntegrationLevel` in request body + - [Added] property `items[].message` of schema `IntegrationLevel` in request body + - [Added] property `company_id` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `modified_at` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `success` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `message` of schema `IntegrationLevel` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].updated_at` of schema `IntegrationLevel` in request body + - [Breaking] [Deleted] property `updated_at` of schema `IntegrationLevel` in response with status code 200 + + +#### getIntegrationByLevelId + +- ##### What's New + - [Added] property `company_id` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `modified_at` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `success` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `message` of schema `IntegrationLevel` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `IntegrationLevel` in response with status code 200 + + +#### updateLevelUidIntegration + +- ##### What's New + - [Added] property `company_id` of schema `IntegrationLevel` in request body + - [Added] property `modified_at` of schema `IntegrationLevel` in request body + - [Added] property `success` of schema `IntegrationLevel` in request body + - [Added] property `message` of schema `IntegrationLevel` in request body + - [Added] property `company_id` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `modified_at` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `success` of schema `IntegrationLevel` in response with status code 200 + - [Added] property `message` of schema `IntegrationLevel` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `updated_at` of schema `IntegrationLevel` in request body + - [Breaking] [Deleted] property `updated_at` of schema `IntegrationLevel` in response with status code 200 + + +#### getLevelActiveIntegrations + +- ##### What's New + - [Added] property `other_integration.slug` of schema `IntegrationOptIn` in response with status code 200 + - [Added] property `other_integration.hidden` of schema `IntegrationOptIn` in response with status code 200 + - [Added] property `other_integration.modified_at` of schema `IntegrationOptIn` in response with status code 200 + - [Added] property `other_entity.modified_at` of schema `OtherEntity` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `other_integration.updated_at` of schema `IntegrationOptIn` in response with status code 200 + - [Breaking] [Deleted] property `other_entity.updated_at` of schema `OtherEntity` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `object` to `string` of property `other_integration.companies[]` of schema `IntegrationOptIn` in response with status code 200 + + +#### getBrandsByCompany + +- ##### What's New + - [Added] property `brands[]` of schema `BrandsByCompanyResponse` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] properties `brands.name`, `brands.value`, `brands.brand_logo_url`, `brands.brand_banner_url`, `brands.brand_banner_portrait_url` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Type from `object` to `array` of property `brands` of schema `CompanyBrandInfo` in response with status code 200 + + +#### getStoreByBrands + +- ##### What's New + - [Added] property `items[].store_address.sector` of schema `OptedStoreAddress` in response with status code 200 + - [Added] property `items[].store_address.country_code` of schema `OptedStoreAddress` in response with status code 200 + - [Added] property `items[].store_address.state_code` of schema `OptedStoreAddress` in response with status code 200 + - [Added] property `items[].company.id` of schema `OptedCompany` in response with status code 200 + + +#### getOtherSellerApplicationById + +- ##### What's New + - [Added] property `company.id` of schema `OptedCompany` in response with status code 200 + - [Breaking] [Added] Type `array` to property `opted_inventory.items` of schema `OptedInventory` in response with status code 200 + - [Added] property `opted_inventory.items[]` of schema `OptedInventory` in response with status code 200 + - [Added] property `success` of schema `NotFound` in response with status code 404 + + +#### optOutFromApplication + +- ##### What's New + - [Added] property `success` of schema `InvalidPayloadRequest` in response with status code 400 + - [Added] property `success` of schema `NotFound` in response with status code 404 + + +### Content + + + +#### createBlog + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in request body + - [Added] property `seo.sitemap` of schema `SEO` in request body + - [Added] property `seo.breadcrumb` of schema `SEO` in request body + - [Added] property `seo.canonical_url` of schema `SEO` in request body + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getBlogs + +- ##### What's New + - [Added] property `items[].seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### updateBlog + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in request body + - [Added] property `seo.sitemap` of schema `SEO` in request body + - [Added] property `seo.breadcrumb` of schema `SEO` in request body + - [Added] property `seo.canonical_url` of schema `SEO` in request body + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### deleteBlog + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getComponentById + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getPageMeta + +- ##### What's New + - [Added] property `custom_pages[].seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `custom_pages[].seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `custom_pages[].seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `custom_pages[].seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### createPagePreview + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in request body + - [Added] property `seo.sitemap` of schema `SEO` in request body + - [Added] property `seo.breadcrumb` of schema `SEO` in request body + - [Added] property `seo.canonical_url` of schema `SEO` in request body + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### updatePagePreview + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### deletePage + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getSEOConfiguration + +- ##### What's New + - [Added] property `seo.additional_sitemap` of schema `SeoSchema` in response with status code 200 + + +#### updateSEOConfiguration + +- ##### What's New + - [Added] property `seo.additional_sitemap` of schema `SeoSchema` in request body + - [Added] property `additional_sitemap` of schema `SeoSchema` in response with status code 200 + + +#### getSlideshows + +- ##### What's Changed + - [Changed] Path From `/service/platform/content/v1.0/company/{company_id}/application/{application_id}/slideshows/` To `/service/platform/content/v1.0/company/{company_id}/application/{application_id}/slideshows` + + +#### createSlideshow + +- ##### What's Changed + - [Changed] Path From `/service/platform/content/v1.0/company/{company_id}/application/{application_id}/slideshows/` To `/service/platform/content/v1.0/company/{company_id}/application/{application_id}/slideshows` + + +#### getBlogBySlug + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### createPage + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in request body + - [Added] property `seo.sitemap` of schema `SEO` in request body + - [Added] property `seo.breadcrumb` of schema `SEO` in request body + - [Added] property `seo.canonical_url` of schema `SEO` in request body + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getPages + +- ##### What's New + - [Added] property `items[].seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `items[].seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### updatePage + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in request body + - [Added] property `seo.sitemap` of schema `SEO` in request body + - [Added] property `seo.breadcrumb` of schema `SEO` in request body + - [Added] property `seo.canonical_url` of schema `SEO` in request body + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getPageBySlug + +- ##### What's New + - [Added] property `seo.meta_tags` of schema `SEO` in response with status code 200 + - [Added] property `seo.sitemap` of schema `SEO` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `SEO` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `SEO` in response with status code 200 + + +#### getDataLoadersByService + +- ##### What's New + - [Added] method `getDataLoadersByService` + + + +#### getDefaultSEOMarkupSchema + +- ##### What's New + - [Added] method `getDefaultSEOMarkupSchema` + + + +#### getSEOMarkupSchemas + +- ##### What's New + - [Added] method `getSEOMarkupSchemas` + + + +#### createSEOMarkupSchema + +- ##### What's New + - [Added] method `createSEOMarkupSchema` + + + +#### getSEOMarkupSchema + +- ##### What's New + - [Added] method `getSEOMarkupSchema` + + + +#### editSEOMarkupSchema + +- ##### What's New + - [Added] method `editSEOMarkupSchema` + + + +#### deleteSEOMarkupSchema + +- ##### What's New + - [Added] method `deleteSEOMarkupSchema` + + + +#### getCustomFieldTypes + +- ##### What's New + - [Added] method `getCustomFieldTypes` + + + +#### getResources + +- ##### What's New + - [Added] method `getResources` + + + +#### getCustomFieldDefinitions + +- ##### What's New + - [Added] method `getCustomFieldDefinitions` + + + +#### createCustomFieldDefinition + +- ##### What's New + - [Added] method `createCustomFieldDefinition` + + + +#### 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` + + + +#### createCustomObjectDefinition + +- ##### What's New + - [Added] method `createCustomObjectDefinition` + + + +#### getCustomObjectDefinitions + +- ##### What's New + - [Added] method `getCustomObjectDefinitions` + + + +#### 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` + + + +#### getJobs + +- ##### What's New + - [Added] method `getJobs` + + + +#### importCustomObjectEntries + +- ##### What's New + - [Added] method `importCustomObjectEntries` + + + +#### exportCustomObjectEntries + +- ##### What's New + - [Added] method `exportCustomObjectEntries` + + + +#### sampleCustomObjectBulkEntry + +- ##### What's New + - [Added] method `sampleCustomObjectBulkEntry` + + + +#### getAppCustomFieldTypes + +- ##### What's New + - [Added] method `getAppCustomFieldTypes` + + + +#### getAppResources + +- ##### What's New + - [Added] method `getAppResources` + + + +#### getAppCustomFieldDefinitions + +- ##### What's New + - [Added] method `getAppCustomFieldDefinitions` + + + +#### createAppCustomFieldDefinition + +- ##### What's New + - [Added] method `createAppCustomFieldDefinition` + + + +#### 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` + + + +#### createAppCustomObjectDefinition + +- ##### What's New + - [Added] method `createAppCustomObjectDefinition` + + + +#### getAppCustomObjectDefinitions + +- ##### What's New + - [Added] method `getAppCustomObjectDefinitions` + + + +#### 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` + + + +#### getAppJobs + +- ##### What's New + - [Added] method `getAppJobs` + + + +#### 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 New + - [Breaking] [Added] Value format `date-time` to property `items[].validity.start` of schema `ValidityObject` in response with status code 200 + - [Breaking] [Added] Value format `date-time` to property `items[].validity.end` of schema `ValidityObject` in response with status code 200 + - [Added] property `items[].zone_ids` of schema `DiscountJob` in response with status code 200 + - [Added] property `error` of schema `BadRequestObjectGet` in response with status code 400 + - [Added] property `data` of schema `BadRequestObjectGet` in response with status code 400 + +- ##### What's Deprecated + - [Deleted] Required status from property `message` in response with status code 400 + +- ##### What's Changed + - [Breaking] [Changed] Type from `integer` to `string` of property `page.type` of schema `Page` in response with status code 200 + + +#### createDiscount + +- ##### What's New + - [Breaking] [Added] Value format `date-time` to property `validity.start` of schema `ValidityObject` in request body + - [Breaking] [Added] Value format `date-time` to property `validity.end` of schema `ValidityObject` in request body + - [Breaking] [Added] Value format `date-time` to property `validity.start` of schema `ValidityObject` in response with status code 200 + - [Breaking] [Added] Value format `date-time` to property `validity.end` of schema `ValidityObject` in response with status code 200 + - [Added] property `zone_ids` of schema `DiscountJob` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Required status from property `extension_ids` in request body + - [Breaking] [Deleted] property `zone_ids` of schema `CreateUpdateDiscount` in request body + + +#### getDiscount + +- ##### What's New + - [Breaking] [Added] Value format `date-time` to property `validity.start` of schema `ValidityObject` in response with status code 200 + - [Breaking] [Added] Value format `date-time` to property `validity.end` of schema `ValidityObject` in response with status code 200 + - [Added] property `zone_ids` of schema `DiscountJob` in response with status code 200 + + +#### updateDiscount + +- ##### What's New + - [Breaking] [Added] Value format `date-time` to property `validity.start` of schema `ValidityObject` in request body + - [Breaking] [Added] Value format `date-time` to property `validity.end` of schema `ValidityObject` in request body + - [Breaking] [Added] Value format `date-time` to property `validity.start` of schema `ValidityObject` in response with status code 200 + - [Breaking] [Added] Value format `date-time` to property `validity.end` of schema `ValidityObject` in response with status code 200 + - [Added] property `zone_ids` of schema `DiscountJob` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Required status from property `extension_ids` in request body + - [Breaking] [Deleted] property `zone_ids` of schema `CreateUpdateDiscount` in request body + + +#### upsertDiscountItems + +- ##### What's New + - [Added] property `items[].brand_name` of schema `DiscountItems` in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].brand_uid` of schema `DiscountItems` in request body + + +#### validateDiscountFile + +- ##### What's New + - [Breaking] [Added] Value format `date-time` to property `validity.start` of schema `ValidityObject` in request body + - [Breaking] [Added] Value format `date-time` to property `validity.end` of schema `ValidityObject` in request body + - [Added] property `company_id` of schema `FileJobRequest` in request body + - [Breaking] [Added] properties `body.name`, `body.company_id`, `body.is_active`, `body.app_ids`, `body.job_type`, `body.discount_type`, `body.discount_level`, `body.value`, `body.file_path`, `body.brand_ids`, `body.store_ids`, `body.extension_ids`, `body.zone_ids`, `body.discount_meta`, `body.validity`, `body.created_on`, `body.modified_on`, `body.created_by`, `body.modified_by`, `body.meta` in response with status code 200 + - [Added] property `progress` of schema `FileJobResponse` in response with status code 200 + - [Added] property `extension_ids` of schema `FileJobResponse` in response with status code 200 + - [Added] property `zone_ids` of schema `FileJobResponse` in response with status code 200 + - [Added] property `created_on` of schema `FileJobResponse` in response with status code 200 + - [Added] property `modified_on` of schema `FileJobResponse` in response with status code 200 + - [Added] property `created_by` of schema `FileJobResponse` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Required status from property `file_path` in response with status code 200 + - [Deleted] Required status from property `file_type` in response with status code 200 + + +#### downloadDiscountFile + +- ##### What's New + - [Breaking] [Added] properties `body.name`, `body.company_id`, `body.is_active`, `body.app_ids`, `body.job_type`, `body.discount_type`, `body.discount_level`, `body.value`, `body.file_path`, `body.brand_ids`, `body.store_ids`, `body.extension_ids`, `body.zone_ids`, `body.discount_meta`, `body.validity`, `body.created_on`, `body.modified_on`, `body.created_by`, `body.modified_by`, `body.meta` in response with status code 200 + - [Added] property `progress` of schema `FileJobResponse` in response with status code 200 + - [Added] property `extension_ids` of schema `FileJobResponse` in response with status code 200 + - [Added] property `zone_ids` of schema `FileJobResponse` in response with status code 200 + - [Added] property `created_on` of schema `FileJobResponse` in response with status code 200 + - [Added] property `modified_on` of schema `FileJobResponse` in response with status code 200 + - [Added] property `created_by` of schema `FileJobResponse` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Required status from property `file_path` in response with status code 200 + - [Deleted] Required status from property `file_type` in response with status code 200 + + +#### getValidationJob + +- ##### What's New + - [Breaking] [Added] properties `body.name`, `body.company_id`, `body.is_active`, `body.app_ids`, `body.job_type`, `body.discount_type`, `body.discount_level`, `body.value`, `body.file_path`, `body.brand_ids`, `body.store_ids`, `body.extension_ids`, `body.zone_ids`, `body.discount_meta`, `body.validity`, `body.created_on`, `body.modified_on`, `body.created_by`, `body.modified_by`, `body.meta` in response with status code 200 + - [Added] property `progress` of schema `FileJobResponse` in response with status code 200 + - [Added] property `extension_ids` of schema `FileJobResponse` in response with status code 200 + - [Added] property `zone_ids` of schema `FileJobResponse` in response with status code 200 + - [Added] property `created_on` of schema `FileJobResponse` in response with status code 200 + - [Added] property `modified_on` of schema `FileJobResponse` in response with status code 200 + - [Added] property `created_by` of schema `FileJobResponse` in response with status code 200 + - [Added] property `error` of schema `BadRequestObjectGet` in response with status code 400 + - [Added] property `data` of schema `BadRequestObjectGet` in response with status code 400 + +- ##### What's Deprecated + - [Deleted] Required status from property `file_path` in response with status code 200 + - [Deleted] Required status from property `file_type` in response with status code 200 + - [Deleted] Required status from property `message` in response with status code 400 + + +#### cancelValidationJob + +- ##### What's New + - [Added] property `error` of schema `BadRequestObjectGet` in response with status code 400 + - [Added] property `data` of schema `BadRequestObjectGet` in response with status code 400 + +- ##### What's Deprecated + - [Deleted] Required status from property `message` in response with status code 400 + + +#### getDownloadJob + +- ##### What's New + - [Breaking] [Added] properties `body.name`, `body.company_id`, `body.is_active`, `body.app_ids`, `body.job_type`, `body.discount_type`, `body.discount_level`, `body.value`, `body.file_path`, `body.brand_ids`, `body.store_ids`, `body.extension_ids`, `body.zone_ids`, `body.discount_meta`, `body.validity`, `body.created_on`, `body.modified_on`, `body.created_by`, `body.modified_by`, `body.meta` in response with status code 200 + - [Added] property `progress` of schema `FileJobResponse` in response with status code 200 + - [Added] property `extension_ids` of schema `FileJobResponse` in response with status code 200 + - [Added] property `zone_ids` of schema `FileJobResponse` in response with status code 200 + - [Added] property `created_on` of schema `FileJobResponse` in response with status code 200 + - [Added] property `modified_on` of schema `FileJobResponse` in response with status code 200 + - [Added] property `created_by` of schema `FileJobResponse` in response with status code 200 + - [Added] property `error` of schema `BadRequestObjectGet` in response with status code 400 + - [Added] property `data` of schema `BadRequestObjectGet` in response with status code 400 + +- ##### What's Deprecated + - [Deleted] Required status from property `file_path` in response with status code 200 + - [Deleted] Required status from property `file_type` in response with status code 200 + - [Deleted] Required status from property `message` in response with status code 400 + + +#### cancelDownloadJob + +- ##### What's New + - [Added] property `error` of schema `BadRequestObjectGet` in response with status code 400 + - [Added] property `data` of schema `BadRequestObjectGet` in response with status code 400 + +- ##### What's Deprecated + - [Deleted] Required status from property `message` in response with status code 400 + + +### FileStorage + + + +#### appbrowse + +- ##### What's New + - [Added] `query` parameter `search` (type: `string`) + + + +#### getPdfTypes + +- ##### What's New + - [Breaking] [Added] Required status to property `data[].country_code` in response with status code 200 + + +#### getDefaultPdfData + +- ##### What's New + - [Added] property `data[].payload.is_export` of schema `DummyTemplateDataPayload` in response with status code 200 + - [Added] property `data[].country_code` of schema `DummyTemplateData` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `data[].payload.is_international` of schema `DummyTemplateDataPayload` in response with status code 200 + + +#### browsefiles + +- ##### What's New + - [Added] method `browsefiles` + + + +### Finance + + + +#### generateReport + +- ##### What's New + - [Added] property `page.item_count` of schema `Page` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `page.item_total` of schema `Page` in response with status code 200 + + +#### downloadReport + +- ##### What's New + - [Added] property `page.item_count` of schema `Page` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `page.item_total` of schema `Page` in response with status code 200 + + +#### getData + +- ##### What's New + - [Added] property `page.item_count` of schema `Page` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `page.item_total` of schema `Page` in response with status code 200 + + +#### getReason + +- ##### What's New + - [Added] property `page.item_count` of schema `Page` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `page.item_total` of schema `Page` in response with status code 200 + + +#### getReportList + +- ##### What's New + - [Added] property `page.item_count` of schema `Page` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `page.item_total` of schema `Page` in response with status code 200 + + +#### creditlineDataplatform + +- ##### What's New + - [Breaking] [Added] properties `page.item_count`, `page.current`, `page.has_next`, `page.size`, `page.type` in response with status code 200 + + +#### invoiceListing + +- ##### What's New + - [Added] property `items[].currency` of schema `InvoiceListingResponseItems` in response with status code 200 + - [Added] property `page.item_count` of schema `Page` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `page.item_total` of schema `Page` in response with status code 200 + + +#### invoicePDF + +- ##### What's New + - [Breaking] [Added] Required status to Request body content + + +#### creditNoteDetails + +- ##### What's New + - [Breaking] [Added] properties `data.cn_details.staff_id`, `data.cn_details.expiry_date`, `data.cn_details.channel_of_issuance`, `data.cn_details.order_id`, `data.cn_details.date_issued`, `data.cn_details.ordering_channel`, `data.cn_details.shipment_id`, `data.cn_details.store_id`, `data.cn_details.invoice_number` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `data.cn_details[]` of schema `CreditNoteDetails` in response with status code 200 + + +#### generateReportCustomerCn + +- ##### What's New + - [Added] property `data.page.item_count` of schema `Page` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `data.page.item_total` of schema `Page` in response with status code 200 + + +#### invoicePaymentDetails + +- ##### What's New + - [Added] method `invoicePaymentDetails` + + + +#### invoiceActivityLogs + +- ##### What's New + - [Added] method `invoiceActivityLogs` + + + +#### unlockCreditNote + +- ##### What's New + - [Added] method `unlockCreditNote` + + + +### Lead + + + +#### getTickets + +- ##### What's Changed + - [Breaking] [Changed] operationId from `getTickets` to `getNewTickets` + + +#### getTicket + +- ##### What's Changed + - [Breaking] [Changed] operationId from `getTicket` to `getNewTicket` + + +#### editTicket + +- ##### What's Changed + - [Breaking] [Changed] operationId from `editTicket` to `editNewTicket` + + +#### createPlatformTicketHistory + +- ##### What's New + - [Added] Possible values to property `type` of schema `HistoryTypeEnum` in request body + + +#### createHistory + +- ##### What's Changed + - [Breaking] [Changed] operationId from `createHistory` to `createNewHistory` + + +#### getTicketHistory + +- ##### What's Changed + - [Breaking] [Changed] operationId from `getTicketHistory` to `getNewTicketHistory` + + +#### getTokenForVideoRoom + +- ##### What's Changed + - [Breaking] [Changed] operationId from `getTokenForVideoRoom` to `getNewTokenForVideoRoom` + + +#### getVideoParticipants + +- ##### What's Changed + - [Breaking] [Changed] operationId from `getVideoParticipants` to `getNewVideoParticipants` + + +#### deleteCustomForm + +- ##### What's New + - [Added] method `deleteCustomForm` + + + +### Serviceability + + + +#### getApplicationServiceability + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getApplicationServiceability` + + + +#### updateApplicationServiceability + +- ##### What's Deprecated + - [Breaking] [Deleted] method `updateApplicationServiceability` + + + +#### getEntityRegionView + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getEntityRegionView` + + + +#### getListView + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getListView` + + + +#### getCompanyStoreView + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getCompanyStoreView` + + + +#### updateZoneControllerView + +- ##### What's Deprecated + - [Breaking] [Deleted] method `updateZoneControllerView` + + + +#### getZoneDataView + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getZoneDataView` + + + +#### createZone + +- ##### What's New + - [Added] property `name` of schema `CreateZoneData` in request body + - [Added] property `slug` of schema `CreateZoneData` in request body + - [Added] property `company_id` of schema `CreateZoneData` in request body + - [Added] property `is_active` of schema `CreateZoneData` in request body + - [Added] property `channels` of schema `CreateZoneData` in request body + - [Added] property `store_ids` of schema `CreateZoneData` in request body + - [Added] property `region_type` of schema `CreateZoneData` in request body + - [Added] property `mapping` of schema `CreateZoneData` in request body + - [Added] property `assignment_preference` of schema `CreateZoneData` in request body + - [Breaking] [Added] Required status to property `is_active` in request body + - [Breaking] [Added] Required status to property `mapping` in request body + - [Breaking] [Added] Required status to property `name` in request body + - [Breaking] [Added] Required status to property `product` in request body + - [Breaking] [Added] Required status to property `region_type` in request body + - [Breaking] [Added] Required status to property `slug` in request body + - [Breaking] [Added] Required status to property `store_ids` in request body + - [Added] Response with status 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `identifier` of schema `ZoneRequest` in request body + - [Breaking] [Deleted] property `data` of schema `ZoneRequest` in request body + - [Breaking] [Deleted] Response with status 4XX + +- ##### What's Changed + - [Breaking] [Changed] Required status of property `data` in request body + - [Breaking] [Changed] Required status of property `identifier` in request body + - [Changed] Path From `/service/platform/logistics/v1.0/company/{company_id}/zone` To `/service/platform/logistics/v2.0/company/{company_id}/zones` + + +#### getZoneFromPincodeView + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getZoneFromPincodeView` + + + +#### getZonesFromApplicationIdView + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getZonesFromApplicationIdView` + + + +#### getZoneListView + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getZoneListView` + + + +#### getStore + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getStore` + + + +#### getAllStores +- [Note] This method is deprecated and it will be removed in future versions. + + +#### addAppDp + +- ##### What's Deprecated + - [Breaking] [Deleted] method `addAppDp` + + + +#### deleteAppDp + +- ##### What's Deprecated + - [Breaking] [Deleted] method `deleteAppDp` + + + +#### updatePincodeMopView + +- ##### What's New + - [Added] Response with status 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 4XX + + +#### updatePincodeBulkView + +- ##### What's New + - [Added] Response with status 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 4XX + + +#### updatePincodeCoDListing + +- ##### What's New + - [Added] Response with status 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 4XX + + +#### updatePincodeAuditHistory + +- ##### What's New + - [Added] Response with status 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 4XX + + +#### upsertDpAccount + +- ##### What's Deprecated + - [Breaking] [Deleted] method `upsertDpAccount` + + + +#### getDpAccount + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getDpAccount` + + + +#### updateDpRule + +- ##### What's Deprecated + - [Breaking] [Deleted] method `updateDpRule` + + + +#### getDpRules + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getDpRules` + + + +#### upsertDpRules + +- ##### What's Deprecated + - [Breaking] [Deleted] method `upsertDpRules` + + + +#### getDpRuleInsert + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getDpRuleInsert` + + + +#### upsertDpCompanyRules + +- ##### What's Deprecated + - [Breaking] [Deleted] method `upsertDpCompanyRules` + + + +#### getDpCompanyRules + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getDpCompanyRules` + + + +#### upsertDpApplicationRules + +- ##### What's Deprecated + - [Breaking] [Deleted] method `upsertDpApplicationRules` + + + +#### getDpApplicationRules + +- ##### What's Deprecated + - [Breaking] [Deleted] method `getDpApplicationRules` + + + +#### updateSelfShip + +- ##### What's New + - [Added] Response with status 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 4XX + +- ##### What's Changed + - [Breaking] [Changed] operationId from `updateSelfShip` to `patchApplicationServiceabilitySelfShipment` + + +#### getSelfShip + +- ##### What's New + - [Added] Response with status 400 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 4XX + +- ##### What's Changed + - [Breaking] [Changed] operationId from `getSelfShip` to `getApplicationServiceabilitySelfShipment` + + +#### getZones + +- ##### What's New + - [Added] method `getZones` + + + +#### updateZoneById + +- ##### What's New + - [Added] method `updateZoneById` + + + +#### getZoneById + +- ##### What's New + - [Added] method `getZoneById` + + + +#### createCourierPartnerAccount + +- ##### What's New + - [Added] method `createCourierPartnerAccount` + + + +#### getCourierPartnerAccounts + +- ##### What's New + - [Added] method `getCourierPartnerAccounts` + + + +#### updateCourierPartnerAccount + +- ##### What's New + - [Added] method `updateCourierPartnerAccount` + + + +#### getCourierPartnerAccount + +- ##### What's New + - [Added] method `getCourierPartnerAccount` + + + +#### updateCourierRule + +- ##### What's New + - [Added] method `updateCourierRule` + + + +#### getCourierPartnerRule + +- ##### What's New + - [Added] method `getCourierPartnerRule` + + + +#### createCourierPartnerRule + +- ##### What's New + - [Added] method `createCourierPartnerRule` + + + +#### getCourierPartnerRules + +- ##### What's New + - [Added] method `getCourierPartnerRules` + + + +#### updateCompanyConfiguration + +- ##### What's New + - [Added] method `updateCompanyConfiguration` + + + +#### getCompanyConfiguration + +- ##### What's New + - [Added] method `getCompanyConfiguration` + + + +#### updateApplicationConfiguration + +- ##### What's New + - [Added] method `updateApplicationConfiguration` + + + +#### getApplicationConfiguration + +- ##### What's New + - [Added] method `getApplicationConfiguration` + + + +#### bulkTat + +- ##### What's New + - [Added] method `bulkTat` + + + +#### getBulkTat + +- ##### What's New + - [Added] method `getBulkTat` + + + +#### getApplicationConfig + +- ##### What's New + - [Added] method `getApplicationConfig` + + + +#### insertApplicationConfig + +- ##### What's New + - [Added] method `insertApplicationConfig` + + + +#### updateStoreRulesConfig + +- ##### What's New + - [Added] method `updateStoreRulesConfig` + + + +#### getStoreRules + +- ##### What's New + - [Added] method `getStoreRules` + + + +#### createStoreRules + +- ##### What's New + - [Added] method `createStoreRules` + + + +#### getStoreRule + +- ##### What's New + - [Added] method `getStoreRule` + + + +#### updateStoreRules + +- ##### What's New + - [Added] method `updateStoreRules` + + + +#### bulkServiceability + +- ##### What's New + - [Added] method `bulkServiceability` + + + +#### getBulkServiceability + +- ##### What's New + - [Added] method `getBulkServiceability` + + + +#### getServiceability + +- ##### What's New + - [Added] method `getServiceability` + + + +#### updateServiceability + +- ##### What's New + - [Added] method `updateServiceability` + + + +#### createPackageMaterial + +- ##### What's New + - [Added] method `createPackageMaterial` + + + +#### getPackageMaterialList + +- ##### What's New + - [Added] method `getPackageMaterialList` + + + +#### createPackageMaterialRule + +- ##### What's New + - [Added] method `createPackageMaterialRule` + + + +#### getPackageMaterialRules + +- ##### What's New + - [Added] method `getPackageMaterialRules` + + + +#### updatePackageMaterialRule + +- ##### What's New + - [Added] method `updatePackageMaterialRule` + + + +#### getPackageMaterialRule + +- ##### What's New + - [Added] method `getPackageMaterialRule` + + + +#### updatePackageMaterials + +- ##### What's New + - [Added] method `updatePackageMaterials` + + + +#### getPackageMaterials + +- ##### What's New + - [Added] method `getPackageMaterials` + + + +#### updateCourierPartnerRulePriority + +- ##### What's New + - [Added] method `updateCourierPartnerRulePriority` + + + +### Order + + + +#### invalidateShipmentCache + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + - [Deleted] Required status from property `error` in response with status code 5XX + + +#### reassignLocation + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### updateShipmentLock + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### getAnnouncements + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### updateAddress + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### updateShipmentStatus + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### processManifest + +- ##### What's Deprecated + - [Breaking] [Deleted] method `processManifest` + + + +#### dispatchManifest + +- ##### What's Deprecated + - [Breaking] [Deleted] method `dispatchManifest` + + + +#### getRoleBasedActions + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + - [Deleted] Required status from property `error` in response with status code 5XX + + +#### getShipmentHistory + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + - [Deleted] Required status from property `error` in response with status code 5XX + + +#### updatePackagingDimensions + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### createOrder + +- ##### What's New + - [Added] property `shipping_info.address` of schema `ShippingInfo` in request body + - [Added] property `billing_info.address` of schema `BillingInfo` in request body + +- ##### What's Deprecated + - [Deleted] Required status from properties `shipping_info.address1`, `shipping_info.city`, `shipping_info.country`, `shipping_info.first_name`, `shipping_info.pincode`, `shipping_info.primary_email`, `shipping_info.primary_mobile_number`, `shipping_info.state` in request body + - [Deleted] Required status from properties `billing_info.address1`, `billing_info.city`, `billing_info.country`, `billing_info.first_name`, `billing_info.pincode`, `billing_info.primary_email`, `billing_info.primary_mobile_number`, `billing_info.state` in request body + + +#### uploadConsent + +- ##### What's Deprecated + - [Breaking] [Deleted] method `uploadConsent` + + + +#### fetchCreditBalanceDetail + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### fetchRefundModeConfig + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### attachOrderUser + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### sendUserMobileOTP + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### verifyMobileOTP + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### downloadLanesReport + +- ##### What's New + - [Added] property `start_date` of schema `BulkReportsDownloadRequest` in request body + - [Added] property `end_date` of schema `BulkReportsDownloadRequest` in request body + +- ##### What's Deprecated + - [Breaking] [Deleted] property `from_date` of schema `BulkReportsDownloadRequest` in request body + - [Breaking] [Deleted] property `to_date` of schema `BulkReportsDownloadRequest` in request body + + +#### eInvoiceRetry + +- ##### What's New + - [Added] property `shipments_data[].einvoice_type` of schema `EInvoiceRetryShipmentData` in request body + - [Breaking] [Added] Required status to property `shipments_data[].einvoice_type` in request body + - [Added] property `response_data[].einvoice_type` of schema `EInvoiceResponseData` in response with status code 200 + - [Added] property `response_data[].status` of schema `EInvoiceResponseData` in response with status code 200 + - [Added] property `response_data[].einvoice_info` of schema `EInvoiceResponseData` in response with status code 200 + - [Breaking] [Added] Required status to property `response_data[].status` in response with status code 200 + - [Added] Response with status 400 + - [Added] Response with status 500 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `success` of schema `EInvoiceRetryResponse` in response with status code 200 + - [Breaking] [Deleted] property `success_count` of schema `EInvoiceRetryResponse` in response with status code 200 + - [Breaking] [Deleted] property `message` of schema `EInvoiceRetryResponse` in response with status code 200 + - [Breaking] [Deleted] property `response_data[].success` of schema `EInvoiceResponseData` in response with status code 200 + - [Breaking] [Deleted] property `response_data[].ack_no` of schema `EInvoiceResponseData` in response with status code 200 + - [Breaking] [Deleted] property `response_data[].irn` of schema `EInvoiceResponseData` in response with status code 200 + - [Breaking] [Deleted] property `response_data[].ack_dt` of schema `EInvoiceResponseData` in response with status code 200 + - [Breaking] [Deleted] property `response_data[].timeout` of schema `EInvoiceResponseData` in response with status code 200 + - [Breaking] [Deleted] property `response_data[].timeout_unit` of schema `EInvoiceResponseData` in response with status code 200 + - [Deleted] Required status from property `success_count` in response with status code 200 + - [Breaking] [Deleted] Response with status 4XX + +- ##### What's Changed + - [Breaking] [Changed] Required status of property `response_data[].success` in response with status code 200 + + +#### trackShipment + +- ##### What's New + - [Breaking] [Added] Possible nullable value `true` to property `page.item_total` of schema `PageDetails` in response with status code 200 + - [Breaking] [Added] Possible nullable value `true` to property `page.current` of schema `PageDetails` in response with status code 200 + - [Breaking] [Added] Possible nullable value `true` to property `page.size` of schema `PageDetails` in response with status code 200 + - [Breaking] [Added] Possible nullable value `true` to property `page.type` of schema `PageDetails` in response with status code 200 + - [Breaking] [Added] Possible nullable value `true` to property `page.has_next` of schema `PageDetails` in response with status code 200 + - [Added] property `page.has_previous` of schema `PageDetails` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### updateShipmentTracking + +- ##### What's Deprecated + - [Deleted] Required status from property `error` in response with status code 4XX + + +#### getShipments + +- ##### What's New + - [Added] `query` parameter `startDate` (type: `string`) + + - [Added] `query` parameter `endDate` (type: `string`) + + - [Breaking] [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.created_ts` 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[].bags[].bag_status[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].bag_status[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].current_operational_status.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].current_operational_status.updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].current_status.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].current_status.updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].fulfilling_store.tags` of schema `ShipmentItemFulFillingStore` in response with status code 200 + - [Added] property `items[].order_created_ts` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].estimated_sla_ts` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].status_created_ts` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].shipment_created_ts` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].currency` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].currency_info` of schema `ShipmentItem` in response with status code 200 + + +#### getShipmentById + +- ##### What's New + - [Added] property `shipments[].tracking_list[].created_ts` of schema `TrackingList` in response with status code 200 + - [Added] property `shipments[].order.created_ts` of schema `OrderDetailsData` in response with status code 200 + - [Added] property `shipments[].delivery_details.state_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].delivery_details.country_iso_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].delivery_details.country_phone_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].billing_details.state_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].billing_details.country_iso_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].billing_details.country_phone_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].bag_status_history[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `shipments[].bag_status_history[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `shipments[].bags[].bag_status[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `shipments[].bags[].bag_status[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `shipments[].bags[].current_status.created_ts` of schema `CurrentStatus` in response with status code 200 + - [Added] property `shipments[].status.created_ts` of schema `ShipmentStatusData` in response with status code 200 + - [Added] property `shipments[].estimated_sla_ts` of schema `PlatformShipment` in response with status code 200 + - [Added] property `shipments[].shipment_created_ts` of schema `PlatformShipment` in response with status code 200 + - [Added] property `shipments[].currency` of schema `PlatformShipment` in response with status code 200 + - [Added] property `shipments[].currency_info` of schema `PlatformShipment` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `shipments[].shipment_details.box_type` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.shipments` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.fulfillment_id` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.articles` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.dp_id` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.meta` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.affiliate_shipment_id` of schema `ShipmentDetails` in response with status code 200 + - [Deleted] Required status from properties `shipments[].shipment_details.affiliate_shipment_id`, `shipments[].shipment_details.articles`, `shipments[].shipment_details.fulfillment_id`, `shipments[].shipment_details.shipments` in response with status code 200 + + +#### getOrderById + +- ##### What's New + - [Added] `query` parameter `allowInactive` (type: `boolean`) + + - [Added] property `order.created_ts` of schema `OrderData` in response with status code 200 + - [Added] property `shipments[].tracking_list[].created_ts` of schema `TrackingList` in response with status code 200 + - [Added] property `shipments[].order.created_ts` of schema `OrderDetailsData` in response with status code 200 + - [Added] property `shipments[].delivery_details.state_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].delivery_details.country_iso_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].delivery_details.country_phone_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].billing_details.state_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].billing_details.country_iso_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].billing_details.country_phone_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `shipments[].bag_status_history[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `shipments[].bag_status_history[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `shipments[].bags[].bag_status[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `shipments[].bags[].bag_status[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `shipments[].bags[].current_status.created_ts` of schema `CurrentStatus` in response with status code 200 + - [Added] property `shipments[].status.created_ts` of schema `ShipmentStatusData` in response with status code 200 + - [Added] property `shipments[].estimated_sla_ts` of schema `PlatformShipment` in response with status code 200 + - [Added] property `shipments[].shipment_created_ts` of schema `PlatformShipment` in response with status code 200 + - [Added] property `shipments[].currency` of schema `PlatformShipment` in response with status code 200 + - [Added] property `shipments[].currency_info` of schema `PlatformShipment` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `shipments[].shipment_details.box_type` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.shipments` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.fulfillment_id` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.articles` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.dp_id` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.meta` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `shipments[].shipment_details.affiliate_shipment_id` of schema `ShipmentDetails` in response with status code 200 + - [Deleted] Required status from properties `shipments[].shipment_details.affiliate_shipment_id`, `shipments[].shipment_details.articles`, `shipments[].shipment_details.fulfillment_id`, `shipments[].shipment_details.shipments` in response with status code 200 + + +#### getLaneConfig + +- ##### What's New + - [Added] `query` parameter `startDate` (type: `string`) + + - [Added] `query` parameter `endDate` (type: `string`) + + + +#### getOrders + +- ##### What's New + - [Added] `query` parameter `startDate` (type: `string`) + + - [Added] `query` parameter `endDate` (type: `string`) + + - [Added] property `items[].shipments[].tracking_list[].created_ts` of schema `TrackingList` in response with status code 200 + - [Added] property `items[].shipments[].order.created_ts` of schema `OrderDetailsData` in response with status code 200 + - [Added] property `items[].shipments[].delivery_details.state_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `items[].shipments[].delivery_details.country_iso_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `items[].shipments[].delivery_details.country_phone_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `items[].shipments[].billing_details.state_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `items[].shipments[].billing_details.country_iso_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `items[].shipments[].billing_details.country_phone_code` of schema `UserDetailsData` in response with status code 200 + - [Added] property `items[].shipments[].bag_status_history[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].shipments[].bag_status_history[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].shipments[].bags[].bag_status[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].shipments[].bags[].bag_status[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].shipments[].bags[].current_status.created_ts` of schema `CurrentStatus` in response with status code 200 + - [Added] property `items[].shipments[].status.created_ts` of schema `ShipmentStatusData` in response with status code 200 + - [Added] property `items[].shipments[].estimated_sla_ts` of schema `PlatformShipment` in response with status code 200 + - [Added] property `items[].shipments[].shipment_created_ts` of schema `PlatformShipment` in response with status code 200 + - [Added] property `items[].shipments[].currency` of schema `PlatformShipment` in response with status code 200 + - [Added] property `items[].shipments[].currency_info` of schema `PlatformShipment` in response with status code 200 + - [Added] property `items[].order_created_ts` of schema `PlatformOrderItems` in response with status code 200 + - [Added] property `items[].currency` of schema `PlatformOrderItems` in response with status code 200 + - [Added] property `items[].currency_info` of schema `PlatformOrderItems` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].shipments[].shipment_details.box_type` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].shipments[].shipment_details.shipments` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].shipments[].shipment_details.fulfillment_id` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].shipments[].shipment_details.articles` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].shipments[].shipment_details.dp_id` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].shipments[].shipment_details.meta` of schema `ShipmentDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].shipments[].shipment_details.affiliate_shipment_id` of schema `ShipmentDetails` in response with status code 200 + - [Deleted] Required status from properties `items[].shipments[].shipment_details.affiliate_shipment_id`, `items[].shipments[].shipment_details.articles`, `items[].shipments[].shipment_details.fulfillment_id`, `items[].shipments[].shipment_details.shipments` in response with status code 200 + + +#### getApplicationShipments + +- ##### What's New + - [Breaking] [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.created_ts` 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[].bags[].bag_status[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].bag_status[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].current_operational_status.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].current_operational_status.updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].current_status.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bags[].current_status.updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].fulfilling_store.tags` of schema `ShipmentItemFulFillingStore` in response with status code 200 + - [Added] property `items[].order_created_ts` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].estimated_sla_ts` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].status_created_ts` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].shipment_created_ts` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].currency` of schema `ShipmentItem` in response with status code 200 + - [Added] property `items[].currency_info` of schema `ShipmentItem` in response with status code 200 + + +#### getfilters + +- ##### What's New + - [Breaking] [Added] Value format `int32` to property `advance_filter.returned[].options[].min_search_size` of schema `FilterInfoOption` in response with status code 200 + - [Breaking] [Added] Value format `int32` to property `advance_filter.action_centre[].options[].min_search_size` of schema `FilterInfoOption` in response with status code 200 + - [Breaking] [Added] Value format `int32` to property `advance_filter.unfulfilled[].options[].min_search_size` of schema `FilterInfoOption` in response with status code 200 + - [Breaking] [Added] Value format `int32` to property `advance_filter.filters[].options[].min_search_size` of schema `FilterInfoOption` in response with status code 200 + - [Breaking] [Added] Value format `int32` to property `advance_filter.processed[].options[].min_search_size` of schema `FilterInfoOption` in response with status code 200 + - [Breaking] [Added] Value format `int32` to property `global_filter[].options[].min_search_size` of schema `FilterInfoOption` in response with status code 200 + + +#### getBulkShipmentExcelFile + +- ##### What's New + - [Breaking] [Deleted] `query` parameter `fromDate` (type: `string`) + +- [Added] `query` parameter `startDate` (type: `string`) + - [Breaking] [Deleted] `query` parameter `toDate` (type: `string`) + +- [Added] `query` parameter `endDate` (type: `string`) + + +#### getBagById + +- ##### What's New + - [Added] property `bag_status[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `bag_status[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `current_operational_status.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `current_operational_status.updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `bag_status_history.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `bag_status_history.updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `current_status.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `current_status.updated_ts` of schema `BagStatusHistory` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `article_details._id` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `article_details.brand_id` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `article_details.dimension` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `article_details.category` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `article_details.weight` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `article_details.attributes` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `article_details.quantity` of schema `ArticleDetails` in response with status code 200 + - [Deleted] Required status from properties `article_details._id`, `article_details.attributes`, `article_details.brand_id`, `article_details.category`, `article_details.dimension`, `article_details.quantity`, `article_details.weight` in response with status code 200 + - [Deleted] Required status from property `error` in response with status code 4XX + - [Deleted] Required status from property `error` in response with status code 5XX + + +#### getBags + +- ##### What's New + - [Added] property `items[].bag_status[].created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bag_status[].updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].current_operational_status.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].current_operational_status.updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bag_status_history.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].bag_status_history.updated_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].current_status.created_ts` of schema `BagStatusHistory` in response with status code 200 + - [Added] property `items[].current_status.updated_ts` of schema `BagStatusHistory` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `items[].article_details._id` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].article_details.brand_id` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].article_details.dimension` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].article_details.category` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].article_details.weight` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].article_details.attributes` of schema `ArticleDetails` in response with status code 200 + - [Breaking] [Deleted] property `items[].article_details.quantity` of schema `ArticleDetails` in response with status code 200 + - [Deleted] Required status from properties `items[].article_details._id`, `items[].article_details.attributes`, `items[].article_details.brand_id`, `items[].article_details.category`, `items[].article_details.dimension`, `items[].article_details.quantity`, `items[].article_details.weight` in response with status code 200 + - [Deleted] Required status from property `error` in response with status code 4XX + - [Deleted] Required status from property `error` in response with status code 5XX + + +#### generatePOSReceiptByOrderId + +- ##### What's New + - [Added] property `payment_receipt_template` of schema `GeneratePosOrderReceiptResponse` in response with status code 200 + - [Added] property `customer_cn_receipt_template` of schema `GeneratePosOrderReceiptResponse` in response with status code 200 + - [Added] property `invoice_receipt_template` of schema `GeneratePosOrderReceiptResponse` in response with status code 200 + + +#### bulkStateTransistion + +- ##### What's New + - [Added] method `bulkStateTransistion` + + + +#### bulkListing + +- ##### What's New + - [Added] method `bulkListing` + + + +#### jobDetails + +- ##### What's New + - [Added] method `jobDetails` + + + +#### getFileByStatus + +- ##### What's New + - [Added] method `getFileByStatus` + + + +#### getManifestShipments + +- ##### What's New + - [Added] method `getManifestShipments` + + + +#### getManifests + +- ##### What's New + - [Added] method `getManifests` + + + +#### processManifests + +- ##### What's New + - [Added] method `processManifests` + + + +#### getManifestDetails + +- ##### What's New + - [Added] method `getManifestDetails` + + + +#### dispatchManifests + +- ##### What's New + - [Added] method `dispatchManifests` + + + +#### uploadConsents + +- ##### What's New + - [Added] method `uploadConsents` + + + +#### getManifestfilters + +- ##### What's New + - [Added] method `getManifestfilters` + + + +#### failedOrderLogs + +- ##### What's New + - [Added] method `failedOrderLogs` + + + +#### failedOrderLogDetails + +- ##### What's New + - [Added] method `failedOrderLogDetails` + + + +#### getStateTransitionFlags + +- ##### What's New + - [Added] method `getStateTransitionFlags` + + + +#### getStateTransitionFlagsById + +- ##### What's New + - [Added] method `getStateTransitionFlagsById` + + + +#### getStateTransitionFilters + +- ##### What's New + - [Added] method `getStateTransitionFilters` + + + +#### getStateTransitionFiltersById + +- ##### What's New + - [Added] method `getStateTransitionFiltersById` + + + +#### getStateManagerTasks + +- ##### What's New + - [Added] method `getStateManagerTasks` + + + +#### getStateManagerTaskById + +- ##### What's New + - [Added] method `getStateManagerTaskById` + + + +#### getStateManagerStates + +- ##### What's New + - [Added] method `getStateManagerStates` + + + +#### getAllowedTemplatesForBulk + +- ##### What's New + - [Added] method `getAllowedTemplatesForBulk` + + + +#### getTemplate + +- ##### What's New + - [Added] method `getTemplate` + + + +### Payment + + + +#### getPaymentModeRoutes + +- ##### What's New + - [Added] `query` parameter `orderId` (type: `string`) + + - [Added] `query` parameter `shipmentId` (type: `string`) + + - [Breaking] [Added] Type `object` to property `payment_options` of schema `PaymentOptions` in response with status code 200 + - [Breaking] [Added] properties `payment_options.payment_option` in response with status code 200 + - [Breaking] [Added] Required status to property `payment_options.payment_option` in response with status code 200 + - [Added] property `payment_breakup` of schema `PaymentOptionsResponse` in response with status code 200 + + +#### getAllPayouts + +- ##### What's New + - [Breaking] [Added] Type `object` to property `items[].customers` of schema `PayoutCustomer` in response with status code 200 + - [Breaking] [Added] properties `items[].customers.unique_external_id`, `items[].customers.mobile`, `items[].customers.name`, `items[].customers.email`, `items[].customers.id` in response with status code 200 + - [Breaking] [Added] Type `object` to property `items[].more_attributes` of schema `PayoutMoreAttributes` in response with status code 200 + - [Breaking] [Added] properties `items[].more_attributes.branch_name`, `items[].more_attributes.city`, `items[].more_attributes.account_no`, `items[].more_attributes.country`, `items[].more_attributes.state`, `items[].more_attributes.account_holder`, `items[].more_attributes.ifsc_code`, `items[].more_attributes.account_type`, `items[].more_attributes.bank_name` in response with status code 200 + - [Breaking] [Added] Type `object` to property `items[].payouts_aggregators[]` of schema `PayoutAggregator` in response with status code 200 + - [Breaking] [Added] properties `items[].payouts_aggregators[].aggregator_id`, `items[].payouts_aggregators[].aggregator_fund_id`, `items[].payouts_aggregators[].payout_details_id` in response with status code 200 + + +#### savePayout + +- ##### What's New + - [Breaking] [Added] Type `object` to property `bank_details` of schema `PayoutBankDetails` in request body + - [Breaking] [Added] properties `bank_details.ifsc_code`, `bank_details.account_holder`, `bank_details.state`, `bank_details.country`, `bank_details.account_type`, `bank_details.account_no`, `bank_details.city`, `bank_details.bank_name`, `bank_details.branch_name`, `bank_details.pincode` in request body + - [Breaking] [Added] Required status to properties `bank_details.account_type`, `bank_details.ifsc_code` in request body + + +#### updatePayout + +- ##### What's New + - [Breaking] [Added] Type `object` to property `bank_details` of schema `PayoutBankDetails` in request body + - [Breaking] [Added] properties `bank_details.ifsc_code`, `bank_details.account_holder`, `bank_details.state`, `bank_details.country`, `bank_details.account_type`, `bank_details.account_no`, `bank_details.city`, `bank_details.bank_name`, `bank_details.branch_name`, `bank_details.pincode` in request body + - [Breaking] [Added] Required status to properties `bank_details.account_type`, `bank_details.ifsc_code` in request body + + +#### getUserCODlimitRoutes + +- ##### What's New + - [Breaking] [Added] Type `object` to property `user_cod_data` of schema `CODdata` in response with status code 200 + - [Breaking] [Added] properties `user_cod_data.remaining_limit`, `user_cod_data.user_id`, `user_cod_data.is_active`, `user_cod_data.limit`, `user_cod_data.usages` in response with status code 200 + - [Breaking] [Added] Required status to properties `user_cod_data.is_active`, `user_cod_data.limit`, `user_cod_data.remaining_limit`, `user_cod_data.usages`, `user_cod_data.user_id` in response with status code 200 + + +#### edcDeviceStats + +- ##### What's New + - [Breaking] [Added] Type `object` to property `statistics` of schema `StatisticsData` in response with status code 200 + - [Breaking] [Added] properties `statistics.inactive_device_count`, `statistics.active_device_count` in response with status code 200 + - [Breaking] [Added] Required status to properties `statistics.active_device_count`, `statistics.inactive_device_count` in response with status code 200 + + +#### updateEdcDevice + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `EdcDevice` in response with status code 200 + - [Breaking] [Added] properties `data.edc_model`, `data.store_id`, `data.aggregator_id`, `data.terminal_unique_identifier`, `data.edc_device_serial_no`, `data.is_active`, `data.aggregator_name`, `data.terminal_serial_no`, `data.merchant_store_pos_code`, `data.device_tag`, `data.application_id` in response with status code 200 + - [Breaking] [Added] Required status to properties `data.aggregator_id`, `data.application_id`, `data.device_tag`, `data.edc_device_serial_no`, `data.is_active`, `data.store_id`, `data.terminal_serial_no`, `data.terminal_unique_identifier` in response with status code 200 + + +#### getEdcDevice + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `EdcDevice` in response with status code 200 + - [Breaking] [Added] properties `data.edc_model`, `data.store_id`, `data.aggregator_id`, `data.terminal_unique_identifier`, `data.edc_device_serial_no`, `data.is_active`, `data.aggregator_name`, `data.terminal_serial_no`, `data.merchant_store_pos_code`, `data.device_tag`, `data.application_id` in response with status code 200 + - [Breaking] [Added] Required status to properties `data.aggregator_id`, `data.application_id`, `data.device_tag`, `data.edc_device_serial_no`, `data.is_active`, `data.store_id`, `data.terminal_serial_no`, `data.terminal_unique_identifier` in response with status code 200 + + +#### edcDeviceList + +- ##### What's New + - [Breaking] [Added] Type `object` to property `page` of schema `Page` in response with status code 200 + - [Breaking] [Added] properties `page.size`, `page.has_next`, `page.current`, `page.type`, `page.item_total` in response with status code 200 + - [Breaking] [Added] Required status to properties `page.current`, `page.has_next`, `page.item_total`, `page.size`, `page.type` in response with status code 200 + + +#### getPosPaymentModeRoutes + +- ##### What's New + - [Added] `query` parameter `orderId` (type: `string`) + + - [Added] `query` parameter `displaySplit` (type: `boolean`) + + - [Added] `query` parameter `advancePayment` (type: `boolean`) + + - [Added] `query` parameter `shipmentId` (type: `string`) + + - [Breaking] [Added] Type `object` to property `payment_options` of schema `PaymentOptionAndFlow` in response with status code 200 + - [Breaking] [Added] properties `payment_options.payment_option`, `payment_options.payment_flows` in response with status code 200 + - [Breaking] [Added] Required status to properties `payment_options.payment_flows`, `payment_options.payment_option` in response with status code 200 + - [Added] property `payment_breakup` of schema `PaymentModeRouteResponse` in response with status code 200 + - [Added] property `advance_payment` of schema `PaymentModeRouteResponse` in response with status code 200 + +- ##### What's Changed + - [Changed] Required status of query parameter `cartId` + - [Changed] Required status of query parameter `checkoutMode` + + +#### resendOrCancelPayment + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `LinkStatus` in response with status code 200 + - [Breaking] [Added] properties `data.status`, `data.message` in response with status code 200 + - [Breaking] [Added] Required status to properties `data.message`, `data.status` in response with status code 200 + + +#### getPaymentLink + +- ##### What's New + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 400 + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### createPaymentLink + +- ##### What's New + - [Breaking] [Added] Type `object` to property `meta` of schema `CreatePaymentLinkMeta` in request body + - [Breaking] [Added] properties `meta.cart_id`, `meta.checkout_mode`, `meta.amount`, `meta.assign_card_id` in request body + - [Breaking] [Added] Required status to properties `meta.amount`, `meta.cart_id`, `meta.checkout_mode` in request body + - [Added] property `country_phone_code` of schema `CreatePaymentLinkRequest` in request body + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 400 + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### pollingPaymentLink + +- ##### What's New + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 400 + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### resendPaymentLink + +- ##### What's New + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 400 + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### cancelPaymentLink + +- ##### What's New + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 400 + - [Breaking] [Added] properties `error.msg`, `error.payment_transaction_id`, `error.invalid_id`, `error.merchant_order_id`, `error.merchant_name`, `error.amount`, `error.expired`, `error.cancelled` in response with status code 500 + +- ##### What's Deprecated + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 400 + - [Deleted] Possible nullable value from `true` from property `error` of schema `ErrorResponse` in response with status code 500 + + +#### getPaymentCodeOption + +- ##### What's New + - [Breaking] [Added] Type `object` to property `data` of schema `GetPaymentCode` in response with status code 200 + - [Breaking] [Added] properties `data.method_code` in response with status code 200 + - [Breaking] [Added] Required status to property `data.method_code` in response with status code 200 + + +#### updatePaymentSession + +- ##### What's New + - [Added] property `payment_details[].meta` of schema `PaymentSessionDetail` in request body + + +#### updateRefundSession + +- ##### What's New + - [Added] property `error` of schema `RefundSessionRequestSerializer` in request body + - [Added] property `message` of schema `RefundSessionRequestSerializer` in request body + + +#### getPaymentModeControlRoutes + +- ##### What's New + - [Added] method `getPaymentModeControlRoutes` + + + +#### setMerchantModeControlRoutes + +- ##### What's New + - [Added] method `setMerchantModeControlRoutes` + + + +#### getPaymentModeCustomConfig + +- ##### What's New + - [Added] method `getPaymentModeCustomConfig` + + + +#### setPaymentModeCustomConfig + +- ##### What's New + - [Added] method `setPaymentModeCustomConfig` + + + +#### getPaymentSession + +- ##### What's New + - [Added] method `getPaymentSession` + + + +#### createPaymentOrder + +- ##### What's New + - [Added] method `createPaymentOrder` + + + +#### getMerchantAggregatorAppVersion + +- ##### What's New + - [Added] method `getMerchantAggregatorAppVersion` + + + +#### patchMerchantPaymentOptionVersion + +- ##### What's New + - [Added] method `patchMerchantPaymentOptionVersion` + + + +### Theme + + + +#### getAllPages + +- ##### What's New + - [Added] property `pages[].sections[].predicate.schedule` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `pages[].sections[].predicate.platform` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `pages[].sections[].predicate.zones` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `pages[].seo.canonical_url` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `pages[].seo.meta_tags` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `pages[].seo.sitemap` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `pages[].seo.breadcrumb` of schema `AvailablePageSeo` in response with status code 200 + + +#### createPage + +- ##### What's New + - [Added] property `sections[].predicate.schedule` of schema `AvailablePagePredicate` in request body + - [Added] property `sections[].predicate.platform` of schema `AvailablePagePredicate` in request body + - [Added] property `sections[].predicate.zones` of schema `AvailablePagePredicate` in request body + - [Added] property `seo.canonical_url` of schema `AvailablePageSeo` in request body + - [Added] property `seo.meta_tags` of schema `AvailablePageSeo` in request body + - [Added] property `seo.sitemap` of schema `AvailablePageSeo` in request body + - [Added] property `seo.breadcrumb` of schema `AvailablePageSeo` in request body + - [Added] property `sections[].predicate.schedule` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.platform` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.zones` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.meta_tags` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.sitemap` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `AvailablePageSeo` in response with status code 200 + + +#### updateMultiplePages + +- ##### What's New + - [Added] property `pages[].sections[].predicate.schedule` of schema `AvailablePagePredicate` in request body + - [Added] property `pages[].sections[].predicate.platform` of schema `AvailablePagePredicate` in request body + - [Added] property `pages[].sections[].predicate.zones` of schema `AvailablePagePredicate` in request body + - [Added] property `pages[].seo.canonical_url` of schema `AvailablePageSeo` in request body + - [Added] property `pages[].seo.meta_tags` of schema `AvailablePageSeo` in request body + - [Added] property `pages[].seo.sitemap` of schema `AvailablePageSeo` in request body + - [Added] property `pages[].seo.breadcrumb` of schema `AvailablePageSeo` in request body + - [Added] property `pages[].sections[].predicate.schedule` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `pages[].sections[].predicate.platform` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `pages[].sections[].predicate.zones` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `pages[].seo.canonical_url` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `pages[].seo.meta_tags` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `pages[].seo.sitemap` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `pages[].seo.breadcrumb` of schema `AvailablePageSeo` in response with status code 200 + + +#### getPage + +- ##### What's New + - [Added] property `sections[].predicate.schedule` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.platform` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.zones` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.meta_tags` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.sitemap` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `AvailablePageSeo` in response with status code 200 + + +#### updatePage + +- ##### What's New + - [Added] property `sections[].predicate.schedule` of schema `AvailablePagePredicate` in request body + - [Added] property `sections[].predicate.platform` of schema `AvailablePagePredicate` in request body + - [Added] property `sections[].predicate.zones` of schema `AvailablePagePredicate` in request body + - [Added] property `seo.canonical_url` of schema `AvailablePageSeo` in request body + - [Added] property `seo.meta_tags` of schema `AvailablePageSeo` in request body + - [Added] property `seo.sitemap` of schema `AvailablePageSeo` in request body + - [Added] property `seo.breadcrumb` of schema `AvailablePageSeo` in request body + - [Added] property `sections[].predicate.schedule` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.platform` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.zones` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.meta_tags` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.sitemap` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `AvailablePageSeo` in response with status code 200 + + +#### deletePage + +- ##### What's New + - [Added] property `sections[].predicate.schedule` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.platform` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `sections[].predicate.zones` of schema `AvailablePagePredicate` in response with status code 200 + - [Added] property `seo.canonical_url` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.meta_tags` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.sitemap` of schema `AvailablePageSeo` in response with status code 200 + - [Added] property `seo.breadcrumb` of schema `AvailablePageSeo` in response with status code 200 + + +#### getCompanyLevelThemes + +- ##### What's New + - [Added] `query` parameter `searchText` (type: `string`) + + - [Added] property `[].marketplace_theme_id.release` of schema `MarketplaceThemeId` in response with status code 200 + - [Added] property `[].marketplace_theme_id.created_at` of schema `MarketplaceThemeId` in response with status code 200 + - [Added] property `[].marketplace_theme_id.updated_at` of schema `MarketplaceThemeId` in response with status code 200 + - [Added] property `[].applied_themes` of schema `CompanyThemeSchema` in response with status code 200 + + +#### addMarketplaceThemeToCompany + +- ##### What's New + - [Added] property `marketplace_theme_id.release` of schema `MarketplaceThemeId` in response with status code 200 + - [Added] property `marketplace_theme_id.created_at` of schema `MarketplaceThemeId` in response with status code 200 + - [Added] property `marketplace_theme_id.updated_at` of schema `MarketplaceThemeId` in response with status code 200 + - [Added] property `applied_themes` of schema `CompanyThemeSchema` in response with status code 200 + + +#### deleteCompanyTheme + +- ##### What's New + - [Added] property `marketplace_theme_id.release` of schema `MarketplaceThemeId` in response with status code 200 + - [Added] property `marketplace_theme_id.created_at` of schema `MarketplaceThemeId` in response with status code 200 + - [Added] property `marketplace_theme_id.updated_at` of schema `MarketplaceThemeId` in response with status code 200 + - [Added] property `applied_themes` of schema `CompanyThemeSchema` in response with status code 200 + + +#### getApplicationThemes + +- ##### What's New + - [Added] property `[].theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `[].company_id` of schema `ThemesSchema` in response with status code 200 + + +#### getThemeById + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### updateTheme + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### deleteTheme + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### addThemeToApplication + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### updateThemeName + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### applyTheme + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### duplicateTheme + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### getAppliedTheme + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### getThemeForPreview + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### upgradeTheme + +- ##### What's New + - [Added] property `theme_type` of schema `ThemesSchema` in response with status code 200 + - [Added] property `company_id` of schema `ThemesSchema` in response with status code 200 + + +#### getCompanyLevelPrivateThemes + +- ##### What's New + - [Added] method `getCompanyLevelPrivateThemes` + + + +### User + + + +#### createUserGroup + +- ##### What's New + - [Added] property `conditions` of schema `CreateUserGroup` in request body + - [Added] property `type` of schema `CreateUserGroup` in request body + - [Added] property `conditions` of schema `UserGroupResponseSchema` in response with status code 201 + - [Added] property `error` of schema `UserGroupResponseSchema` in response with status code 201 + - [Added] property `is_active` of schema `UserGroupResponseSchema` in response with status code 201 + - [Added] property `type` of schema `UserGroupResponseSchema` in response with status code 201 + +- ##### What's Deprecated + - [Deleted] Required status from property `file_url` in request body + + +#### getUserGroups + +- ##### What's New + - [Added] `query` parameter `type` (type: `string`) + + - [Added] property `items[].conditions` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `items[].error` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `items[].is_active` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `items[].type` of schema `UserGroupResponseSchema` in response with status code 200 + + +#### updateUserGroup + +- ##### What's New + - [Added] property `conditions` of schema `UpdateUserGroupSchema` in request body + - [Added] property `type` of schema `UpdateUserGroupSchema` in request body + - [Added] property `conditions` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `error` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `is_active` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `type` of schema `UserGroupResponseSchema` in response with status code 200 + + +#### getUserGroupById + +- ##### What's New + - [Added] property `conditions` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `error` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `is_active` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `type` of schema `UserGroupResponseSchema` in response with status code 200 + + +#### updateUserGroupPartially + +- ##### What's New + - [Added] property `conditions` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `error` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `is_active` of schema `UserGroupResponseSchema` in response with status code 200 + - [Added] property `type` of schema `UserGroupResponseSchema` in response with status code 200 + + +#### createUserAttributeDefinition + +- ##### What's New + - [Added] method `createUserAttributeDefinition` + + + +#### getUserAttributeDefinitions + +- ##### What's New + - [Added] method `getUserAttributeDefinitions` + + + +#### updateUserAttributeDefinition + +- ##### What's New + - [Added] method `updateUserAttributeDefinition` + + + +#### deleteUserAttributeDefinitionById + +- ##### What's New + - [Added] method `deleteUserAttributeDefinitionById` + + + +#### getUserAttributeDefinitionById + +- ##### What's New + - [Added] method `getUserAttributeDefinitionById` + + + +#### updateUserAttribute + +- ##### What's New + - [Added] method `updateUserAttribute` + + + +#### getUserAttribute + +- ##### What's New + - [Added] method `getUserAttribute` + + + +#### deleteUserAttribute + +- ##### What's New + - [Added] method `deleteUserAttribute` + + + +#### getUserAttributesForUser + +- ##### What's New + - [Added] method `getUserAttributesForUser` + + + +#### getUserAttributeById + +- ##### What's New + - [Added] method `getUserAttributeById` + + + +### Webhook + + + +#### manualRetryOfFailedEvent + +- ##### What's New + - [Added] property `status` of schema `RetryEventRequest` in request body + +- ##### What's Deprecated + - [Deleted] Value format from `date-time` from property `end_date` of schema `EventProcessRequest` in request body + - [Deleted] Value format from `date-time` from property `start_date` of schema `EventProcessRequest` in request body + - [Breaking] [Deleted] Response with status 400 + +- ##### What's Changed + - [Breaking] [Changed] Type from `string` to `object` of property `` of schema `EventProcessedSuccessResponse` in response with status code 200 + + +#### getEventCounts + +- ##### What's New + - [Added] property `status` of schema `RetryEventRequest` in request body + +- ##### What's Deprecated + - [Deleted] Value format from `date-time` from property `end_date` of schema `EventProcessRequest` in request body + - [Deleted] Value format from `date-time` from property `start_date` of schema `EventProcessRequest` in request body + - [Breaking] [Deleted] Response with status 400 + + +#### getManualRetryStatus + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 400 + + +#### manualRetryCancel + +- ##### What's Deprecated + - [Deleted] properties `success`, `message` in response with status code 200 + - [Breaking] [Deleted] Response with status 400 + + +#### getDeliveryReports + +- ##### What's New + - [Added] property `status` of schema `EventProcessRequest` in request body + - [Added] property `rows[].message_id` of schema `EventProcessReportObject` in response with status code 200 + - [Added] property `rows[].event_trace_id` of schema `EventProcessReportObject` in response with status code 200 + - [Added] property `page.total_page` of schema `Page` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Response with status 400 + +- ##### What's Changed + - [Breaking] [Changed] Type from `string` to `object` of property `rows[].data` of schema `EventProcessReportObject` in response with status code 200 + + +#### downloadDeliveryReport + +- ##### What's New + - [Added] property `status` of schema `EventProcessRequest` in request body + + +#### fetchAllEventConfigurations + +- ##### What's New + - [Breaking] [Added] Possible nullable value `true` to property `event_configs[].description` of schema `EventConfigResponse` in response with status code 200 + - [Added] property `event_configs[].event_schema` of schema `EventConfigResponse` in response with status code 200 + - [Added] property `event_configs[].updated_on` of schema `EventConfigResponse` in response with status code 200 + - [Breaking] [Added] Type `object` to property `event_configs[]` of schema `EventConfigResponse` in response with status code 200 + - [Breaking] [Added] Type `object` to property `` of schema `` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from `int32` from property `event_configs[].id` of schema `EventConfig` in response with status code 200 + + +#### getReportFilters + +- ##### What's New + - [Breaking] [Added] Type `array` to property `` of schema `` in response with status code 200 + - [Added] property `[]` of schema `` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] properties `items` in response with status code 200 + + +#### getHistoricalReports + +- ##### What's New + - [Added] property `items[].association.subscriber_ids` of schema `HistoryAssociation` in response with status code 200 + - [Breaking] [Added] Type `object` to property `items[].association` of schema `HistoryAssociation` in response with status code 200 + - [Added] property `items[].filters.events` of schema `HistoryFilters` in response with status code 200 + - [Added] property `items[].filters.search_text` of schema `HistoryFilters` in response with status code 200 + - [Breaking] [Added] Possible nullable value `true` to property `items[].upload_service_response` of schema `UploadServiceObject` in response with status code 200 + - [Breaking] [Added] Possible nullable value `true` to property `items[].updated_on` of schema `HistoryItems` in response with status code 200 + - [Added] property `page` of schema `HistoryResponse` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from `int32` from property `items[].association.company_id` of schema `AssociationDetails` in response with status code 200 + + +#### cancelJobByName + +- ##### What's New + - [Added] property `message` of schema `CancelResponse` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `code` of schema `CancelResponse` in response with status code 200 + + +#### getSubscribersByCompany + +- ##### What's New + - [Added] property `items` of schema `SubscriberConfigList` in response with status code 200 + - [Added] property `page` of schema `SubscriberConfigList` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] property `id` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `name` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `webhook_url` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `association` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `custom_headers` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `email_id` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `status` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `auth_meta` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `created_on` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `updated_on` of schema `SubscriberResponse` in response with status code 200 + - [Breaking] [Deleted] property `event_configs` of schema `SubscriberResponse` in response with status code 200 + +- ##### What's Changed + - [Breaking] [Changed] Required status of query parameter `page_no` + - [Changed] Required status of path parameter `company_id` + - [Changed] Path From `/service/platform/webhook/v1.0/company/{company_id}/subscriber` To `/service/platform/webhook/v1.0/company/{company_id}/subscriber/` + + +#### registerSubscriberToEvent + +- ##### What's New + - [Added] Possible values `active` to property `status` of schema `SubscriberConfig` in request body + - [Added] Possible values `inactive` to property `status` of schema `SubscriberConfig` in request body + - [Added] Possible values `active` to property `status` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] Possible values `inactive` to property `status` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] property `modified_by` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] property `updated_on` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] property `created_on` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] property `type` of schema `SubscriberConfigResponse` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in request body + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in request body + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in request body + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in response with status code 200 + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in response with status code 200 + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in response with status code 200 + +- ##### What's Changed + - [Changed] Path From `/service/platform/webhook/v1.0/company/{company_id}/subscriber` To `/service/platform/webhook/v1.0/company/{company_id}/subscriber/` + + +#### updateSubscriberConfig + +- ##### What's New + - [Added] Possible values `active` to property `status` of schema `SubscriberConfig` in request body + - [Added] Possible values `inactive` to property `status` of schema `SubscriberConfig` in request body + - [Added] Possible values `active` to property `status` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] Possible values `inactive` to property `status` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] property `modified_by` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] property `updated_on` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] property `created_on` of schema `SubscriberConfigResponse` in response with status code 200 + - [Added] property `type` of schema `SubscriberConfigResponse` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in request body + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in request body + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in request body + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in response with status code 200 + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in response with status code 200 + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in response with status code 200 + +- ##### What's Changed + - [Changed] Path From `/service/platform/webhook/v1.0/company/{company_id}/subscriber` To `/service/platform/webhook/v1.0/company/{company_id}/subscriber/` + + +#### getSubscriberById + +- ##### What's New + - [Added] Possible values `active` to property `status` of schema `SubscriberResponse` in response with status code 200 + - [Added] Possible values `inactive` to property `status` of schema `SubscriberResponse` in response with status code 200 + - [Added] property `event_configs[].event_schema` of schema `EventConfigs` in response with status code 200 + - [Added] property `event_configs[].updated_on` of schema `EventConfigs` in response with status code 200 + - [Added] property `event_configs[].subscriber_event_mapping` of schema `EventConfigs` in response with status code 200 + - [Breaking] [Added] Type `object` to property `event_configs[]` of schema `EventConfigs` in response with status code 200 + - [Added] property `modified_by` of schema `SubscriberResponse` in response with status code 200 + - [Added] property `type` of schema `SubscriberResponse` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in response with status code 200 + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in response with status code 200 + - [Breaking] [Deleted] Possible values from property `status` of schema `SubscriberStatus` in response with status code 200 + + +#### getSubscribersByExtensionId + +- ##### What's New + - [Added] Possible values `active` to property `items[].status` of schema `SubscriberResponse` in response with status code 200 + - [Added] Possible values `inactive` to property `items[].status` of schema `SubscriberResponse` in response with status code 200 + - [Added] property `items[].event_configs[].event_schema` of schema `EventConfigs` in response with status code 200 + - [Added] property `items[].event_configs[].updated_on` of schema `EventConfigs` in response with status code 200 + - [Added] property `items[].event_configs[].subscriber_event_mapping` of schema `EventConfigs` in response with status code 200 + - [Breaking] [Added] Type `object` to property `items[].event_configs[]` of schema `EventConfigs` in response with status code 200 + - [Added] property `items[].modified_by` of schema `SubscriberResponse` in response with status code 200 + - [Added] property `items[].type` of schema `SubscriberResponse` in response with status code 200 + - [Added] property `page.total_page` of schema `Page` in response with status code 200 + +- ##### What's Deprecated + - [Breaking] [Deleted] Possible values from property `items[].status` of schema `SubscriberStatus` in response with status code 200 + - [Breaking] [Deleted] Possible values from property `items[].status` of schema `SubscriberStatus` in response with status code 200 + - [Breaking] [Deleted] Possible values from property `items[].status` of schema `SubscriberStatus` in response with status code 200 + +- ##### What's Changed + - [Changed] Path From `/service/platform/webhook/v1.0/company/{company_id}/extension/{extension_id}/subscriber` To `/service/platform/webhook/v1.0/company/{company_id}/extension/{extension_id}/subscriber/` + + +## Public Client + +- [Added] Billing class in public client +- [Added] Content class in public client + + +### Webhook + + + +#### fetchAllWebhookEvents + +- ##### What's New + - [Breaking] [Added] Possible nullable value `true` to property `event_configs[].description` of schema `EventConfig` in response with status code 200 + - [Added] property `event_configs[].event_schema` of schema `EventConfig` in response with status code 200 + - [Added] property `event_configs[].updated_on` of schema `EventConfig` in response with status code 200 + - [Breaking] [Added] Type `object` to property `event_configs[]` of schema `EventConfig` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from `int32` from property `event_configs[].id` of schema `EventConfig` in response with status code 200 + + +#### queryWebhookEventDetails + +- ##### What's New + - [Breaking] [Added] Possible nullable value `true` to property `event_configs[].description` of schema `EventConfig` in response with status code 200 + - [Added] property `event_configs[].event_schema` of schema `EventConfig` in response with status code 200 + - [Added] property `event_configs[].updated_on` of schema `EventConfig` in response with status code 200 + - [Breaking] [Added] Type `object` to property `event_configs[]` of schema `EventConfig` in response with status code 200 + +- ##### What's Deprecated + - [Deleted] Value format from `int32` from property `event_configs[].id` of schema `EventConfig` in response with status code 200 + + +#### notifyDepricatedEvent + +- ##### What's New + - [Added] method `notifyDepricatedEvent` + + + +#### testHandlerTransformation + +- ##### What's New + - [Added] method `testHandlerTransformation` + -#### generateInvoiceID +#### validateSchema - ##### What's New - - [Added] method `generateInvoiceID` + - [Added] method `validateSchema` diff --git a/README.md b/README.md index 1a92ae6e2..2e064144f 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,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.3.11-beta.7' --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.3.11-beta.8' --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 b16b4f850..5086b3514 100644 --- a/dist/application.js +++ b/dist/application.js @@ -1 +1 @@ -(()=>{var e={469:(e,t,r)=>{const{ApplicationConfig:a,ApplicationClient:n,ApplicationModel:o}=r(911);e.exports={ApplicationConfig:a,ApplicationClient:n,ApplicationModel:o}},5113:function(e){var t;"undefined"!=typeof self&&self,t=()=>(()=>{var e={249:function(e,t,r){var a;e.exports=(a=a||function(e,t){var a;if("undefined"!=typeof window&&window.crypto&&(a=window.crypto),"undefined"!=typeof self&&self.crypto&&(a=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(a=globalThis.crypto),!a&&"undefined"!=typeof window&&window.msCrypto&&(a=window.msCrypto),!a&&void 0!==r.g&&r.g.crypto&&(a=r.g.crypto),!a)try{a=r(480)}catch(e){}var n=function(){if(a){if("function"==typeof a.getRandomValues)try{return a.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof a.randomBytes)try{return a.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),s={},i=s.lib={},l=i.Base={extend:function(e){var t=o(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=i.WordArray=l.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,r=e.words,a=this.sigBytes,n=e.sigBytes;if(this.clamp(),a%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[a+o>>>2]|=s<<24-(a+o)%4*8}else for(var i=0;i>>2]=r[i>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-n%4*8&255;a.push((o>>>4).toString(16)),a.push((15&o).toString(16))}return a.join("")},parse:function(e){for(var t=e.length,r=[],a=0;a>>3]|=parseInt(e.substr(a,2),16)<<24-a%8*4;return new c.init(r,t/2)}},p=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,a=[],n=0;n>>2]>>>24-n%4*8&255;a.push(String.fromCharCode(o))}return a.join("")},parse:function(e){for(var t=e.length,r=[],a=0;a>>2]|=(255&e.charCodeAt(a))<<24-a%4*8;return new c.init(r,t)}},g=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},m=i.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=g.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,a=this._data,n=a.words,o=a.sigBytes,s=this.blockSize,i=o/(4*s),l=(i=t?e.ceil(i):e.max((0|i)-this._minBufferSize,0))*s,u=e.min(4*l,o);if(l){for(var d=0;da&&(t=e.finalize(t)),t.clamp();for(var n=this._oKey=t.clone(),s=this._iKey=t.clone(),i=n.words,l=s.words,c=0;c>>7)^(m<<14|m>>>18)^m>>>3,w=c[g-2],y=(w<<15|w>>>17)^(w<<13|w>>>19)^w>>>10;c[g]=f+c[g-7]+y+c[g-16]}var b=a&n^a&o^n&o,h=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),_=p+((i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25))+(i&u^~i&d)+l[g]+c[g];p=d,d=u,u=i,i=s+_|0,s=o,o=n,n=a,a=_+(h+b)|0}r[0]=r[0]+a|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+i|0,r[5]=r[5]+u|0,r[6]=r[6]+d|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,a=8*this._nDataBytes,n=8*t.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=e.floor(a/4294967296),r[15+(n+64>>>9<<4)]=a,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),a.SHA256)},335:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,a,n,o){a=a||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var i=/\+/g;e=e.split(a);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u=0?(d=f.substr(0,w),p=f.substr(w+1)):(d=f,p=""),g=decodeURIComponent(d),m=decodeURIComponent(p),t(s,g)?r(s[g])?s[g].push(m):s[g]=[s[g],m]:s[g]=m}return s};var r=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,o,s,i){return o=o||"&",s=s||"=",null===e&&(e=void 0),"object"==typeof e?a(n(e),(function(n){var i=encodeURIComponent(t(n))+s;return r(e[n])?a(e[n],(function(e){return i+encodeURIComponent(t(e))})).join(o):i+encodeURIComponent(t(e[n]))})).join(o):i?encodeURIComponent(t(i))+s+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var r=[],a=0;a{"use strict";t.decode=t.parse=r(335),t.encode=t.stringify=r(795)},832:function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(735)),o=r(601),s=r(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 r=this.request.headers=this.request.headers||{};!this.request.method&&this.request.body&&(this.request.method="POST"),r.Host||r.host||(r.Host=this.request.host,this.request.port&&(r.Host+=":"+this.request.port)),this.request.host||(this.request.host=r.Host||r.host)}return e.prototype.prepareRequest=function(){this.parsePath();var e,t=this.request,r=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||(r["x-fp-date"]?this.datetime=r["x-fp-date"]||r["x-fp-date"]:r["x-fp-date"]=this.getDateTime()),delete r["x-fp-signature"],delete r["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,s.hmac)(this.secret,e,"hex"))},e.prototype.stringToSign=function(){return[this.getDateTime(),(0,s.hash)(this.canonicalString(),"hex")].join("\n")},e.prototype.canonicalString=function(){this.parsedPath||this.prepareRequest();var e=this.parsedPath.path,t=this.parsedPath.query,r=(this.request.headers,""),a=this.request.doNotEncodePath,n=(0,s.hash)(this.request.body||"","hex");if(t){var o=Object.keys(t).reduce((function(e,r){return r?(e[(0,s.encodeRfc3986Full)(r)]=(Array.isArray(t[r]),t[r]),e):e}),{}),i=[];Object.keys(o).sort().forEach((function(e){Array.isArray(o[e])?o[e].map(s.encodeRfc3986Full).sort().forEach((function(t){i.push(e+"="+t)})):i.push(e+"="+(0,s.encodeRfc3986Full)(o[e]))})),r=i.join("&")}return"/"!==e&&"/"!==(e=(e=e.replace(/\/{2,}/g,"/")).split("/").reduce((function(e,t){return".."===t?e.pop():"."!==t&&(a&&(t=decodeURIComponent(t.replace(/\+/g," "))),e.push((0,s.encodeRfc3986Full)(t))),e}),[]).join("/"))[0]&&(e="/"+e),[this.request.method||"GET",e,r,this.canonicalHeaders()+"\n",this.signedHeaders(),n].join("\n")},e.prototype.canonicalHeaders=function(){var e=this.request.headers;return Object.keys(e).filter((function(e){if(null==o.HEADERS_TO_IGNORE[e.toLowerCase()]){var t=!1;for(var r in o.HEADERS_TO_INCLUDE)t=t||new RegExp(o.HEADERS_TO_INCLUDE[r],"ig").test(e);return t}return!1})).sort((function(e,t){return e.toLowerCase()=0&&(delete(r=n.default.parse(e.slice(t+1)))["x-fp-signature"],delete r["X-Fp-Signature"],e=e.slice(0,t)),e=e.split("/").map((function(e){return encodeURIComponent(decodeURIComponent(e))})).join("/"),this.parsedPath={path:e,query:r}},e.prototype.formatPath=function(){var e=this.parsedPath.path,t=this.parsedPath.query;return t?(null!=t[""]&&delete t[""],e+"?"+(0,s.encodeRfc3986)(n.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,r){"use strict";var a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,r=1,a=arguments.length;r{}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a].call(o.exports,o,o.exports,r),o.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(607)})(),e.exports=t()},9669:(e,t,r)=>{e.exports=r(1609)},5448:(e,t,r)=>{"use strict";var a=r(4867),n=r(6026),o=r(4372),s=r(5327),i=r(4097),l=r(4109),c=r(7985),u=r(7874),d=r(2648),p=r(644),g=r(205);e.exports=function(e){return new Promise((function(t,r){var m,f=e.data,w=e.headers,y=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m)}a.isFormData(f)&&a.isStandardBrowserEnv()&&delete w["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var _=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";w.Authorization="Basic "+btoa(_+":"+v)}var k=i(e.baseURL,e.url);function R(){if(h){var a="getAllResponseHeaders"in h?l(h.getAllResponseHeaders()):null,o={data:y&&"text"!==y&&"json"!==y?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:a,config:e,request:h};n((function(e){t(e),b()}),(function(e){r(e),b()}),o),h=null}}if(h.open(e.method.toUpperCase(),s(k,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=R:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(R)},h.onabort=function(){h&&(r(new d("Request aborted",d.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new d("Network Error",d.ERR_NETWORK,e,h,h)),h=null},h.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",a=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new d(t,a.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,h)),h=null},a.isStandardBrowserEnv()){var P=(e.withCredentials||c(k))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;P&&(w[e.xsrfHeaderName]=P)}"setRequestHeader"in h&&a.forEach(w,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete w[t]:h.setRequestHeader(t,e)})),a.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),y&&"json"!==y&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(m=function(e){h&&(r(!e||e&&e.type?new p:e),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m))),f||(f=null);var C=g(k);C&&-1===["http","https","file"].indexOf(C)?r(new d("Unsupported protocol "+C+":",d.ERR_BAD_REQUEST,e)):h.send(f)}))}},1609:(e,t,r)=>{"use strict";var a=r(4867),n=r(1849),o=r(321),s=r(7185),i=function e(t){var r=new o(t),i=n(o.prototype.request,r);return a.extend(i,o.prototype,r),a.extend(i,r),i.create=function(r){return e(s(t,r))},i}(r(5546));i.Axios=o,i.CanceledError=r(644),i.CancelToken=r(4972),i.isCancel=r(6502),i.VERSION=r(7288).version,i.toFormData=r(7675),i.AxiosError=r(2648),i.Cancel=i.CanceledError,i.all=function(e){return Promise.all(e)},i.spread=r(8713),i.isAxiosError=r(6268),e.exports=i,e.exports.default=i},4972:(e,t,r)=>{"use strict";var a=r(644);function n(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,a=r._listeners.length;for(t=0;t{"use strict";var a=r(2648);function n(e){a.call(this,null==e?"canceled":e,a.ERR_CANCELED),this.name="CanceledError"}r(4867).inherits(n,a,{__CANCEL__:!0}),e.exports=n},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{"use strict";var a=r(4867),n=r(5327),o=r(782),s=r(3572),i=r(7185),l=r(4097),c=r(4875),u=c.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=i(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&c.assertOptions(r,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var a=[],n=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!n){var d=[s,void 0];for(Array.prototype.unshift.apply(d,a),d=d.concat(l),o=Promise.resolve(t);d.length;)o=o.then(d.shift(),d.shift());return o}for(var p=t;a.length;){var g=a.shift(),m=a.shift();try{p=g(p)}catch(e){m(e);break}}try{o=s(p)}catch(e){return Promise.reject(e)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},d.prototype.getUri=function(e){e=i(this.defaults,e);var t=l(e.baseURL,e.url);return n(t,e.params,e.paramsSerializer)},a.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,r){return this.request(i(r||{},{method:e,url:t,data:(r||{}).data}))}})),a.forEach(["post","put","patch"],(function(e){function t(t){return function(r,a,n){return this.request(i(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},2648:(e,t,r)=>{"use strict";var a=r(4867);function n(e,t,r,a,n){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),a&&(this.request=a),n&&(this.response=n)}a.inherits(n,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=n.prototype,s={};["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"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(n,s),Object.defineProperty(o,"isAxiosError",{value:!0}),n.from=function(e,t,r,s,i,l){var c=Object.create(o);return a.toFlatObject(e,c,(function(e){return e!==Error.prototype})),n.call(c,e.message,t,r,s,i),c.name=e.name,l&&Object.assign(c,l),c},e.exports=n},782:(e,t,r)=>{"use strict";var a=r(4867);function n(){this.handlers=[]}n.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){a.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=n},4097:(e,t,r)=>{"use strict";var a=r(1793),n=r(7303);e.exports=function(e,t){return e&&!a(t)?n(e,t):t}},3572:(e,t,r)=>{"use strict";var a=r(4867),n=r(8527),o=r(6502),s=r(5546),i=r(644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new i}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=n.call(e,e.data,e.headers,e.transformRequest),e.headers=a.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),a.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return l(e),t.data=n.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=n.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},7185:(e,t,r)=>{"use strict";var a=r(4867);e.exports=function(e,t){t=t||{};var r={};function n(e,t){return a.isPlainObject(e)&&a.isPlainObject(t)?a.merge(e,t):a.isPlainObject(t)?a.merge({},t):a.isArray(t)?t.slice():t}function o(r){return a.isUndefined(t[r])?a.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function s(e){if(!a.isUndefined(t[e]))return n(void 0,t[e])}function i(r){return a.isUndefined(t[r])?a.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function l(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l};return a.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,n=t(e);a.isUndefined(n)&&t!==l||(r[e]=n)})),r}},6026:(e,t,r)=>{"use strict";var a=r(2648);e.exports=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new a("Request failed with status code "+r.status,[a.ERR_BAD_REQUEST,a.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}},8527:(e,t,r)=>{"use strict";var a=r(4867),n=r(5546);e.exports=function(e,t,r){var o=this||n;return a.forEach(r,(function(r){e=r.call(o,e,t)})),e}},5546:(e,t,r)=>{"use strict";var a=r(4867),n=r(6016),o=r(2648),s=r(7874),i=r(7675),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!a.isUndefined(e)&&a.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,d={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(5448)),u),transformRequest:[function(e,t){if(n(t,"Accept"),n(t,"Content-Type"),a.isFormData(e)||a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,o=a.isObject(e),s=t&&t["Content-Type"];if((r=a.isFileList(e))||o&&"multipart/form-data"===s){var l=this.env&&this.env.FormData;return i(r?{"files[]":e}:e,l&&new l)}return o||"application/json"===s?(c(t,"application/json"),function(e,t,r){if(a.isString(e))try{return(0,JSON.parse)(e),a.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||n&&a.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o.from(e,o.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:r(1623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),a.forEach(["post","put","patch"],(function(e){d.headers[e]=a.merge(l)})),e.exports=d},7874:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:e=>{e.exports={version:"0.27.2"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),a=0;a{"use strict";var a=r(4867);function n(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(a.isURLSearchParams(t))o=t.toString();else{var s=[];a.forEach(t,(function(e,t){null!=e&&(a.isArray(e)?t+="[]":e=[e],a.forEach(e,(function(e){a.isDate(e)?e=e.toISOString():a.isObject(e)&&(e=JSON.stringify(e)),s.push(n(t)+"="+n(e))})))})),o=s.join("&")}if(o){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var a=r(4867);e.exports=a.isStandardBrowserEnv()?{write:function(e,t,r,n,o,s){var i=[];i.push(e+"="+encodeURIComponent(t)),a.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),a.isString(n)&&i.push("path="+n),a.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:(e,t,r)=>{"use strict";var a=r(4867);e.exports=function(e){return a.isObject(e)&&!0===e.isAxiosError}},7985:(e,t,r)=>{"use strict";var a=r(4867);e.exports=a.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var a=e;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=a.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},6016:(e,t,r)=>{"use strict";var a=r(4867);e.exports=function(e,t){a.forEach(e,(function(r,a){a!==t&&a.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[a])}))}},1623:e=>{e.exports=null},4109:(e,t,r)=>{"use strict";var a=r(4867),n=["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.exports=function(e){var t,r,o,s={};return e?(a.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=a.trim(e.substr(0,o)).toLowerCase(),r=a.trim(e.substr(o+1)),t){if(s[t]&&n.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},205:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7675:(e,t,r)=>{"use strict";var a=r(4867);e.exports=function(e,t){t=t||new FormData;var r=[];function n(e){return null===e?"":a.isDate(e)?e.toISOString():a.isArrayBuffer(e)||a.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,s){if(a.isPlainObject(o)||a.isArray(o)){if(-1!==r.indexOf(o))throw Error("Circular reference detected in "+s);r.push(o),a.forEach(o,(function(r,o){if(!a.isUndefined(r)){var i,l=s?s+"."+o:o;if(r&&!s&&"object"==typeof r)if(a.endsWith(o,"{}"))r=JSON.stringify(r);else if(a.endsWith(o,"[]")&&(i=a.toArray(r)))return void i.forEach((function(e){!a.isUndefined(e)&&t.append(l,n(e))}));e(r,l)}})),r.pop()}else t.append(s,n(o))}(e),t}},4875:(e,t,r)=>{"use strict";var a=r(7288).version,n=r(2648),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+a+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,a,i){if(!1===e)throw new n(o(a," has been removed"+(t?" in "+t:"")),n.ERR_DEPRECATED);return t&&!s[a]&&(s[a]=!0,console.warn(o(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,a,i)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new n("options must be an object",n.ERR_BAD_OPTION_VALUE);for(var a=Object.keys(e),o=a.length;o-- >0;){var s=a[o],i=t[s];if(i){var l=e[s],c=void 0===l||i(l,s,e);if(!0!==c)throw new n("option "+s+" must be "+c,n.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new n("Unknown option "+s,n.ERR_BAD_OPTION)}},validators:o}},4867:(e,t,r)=>{"use strict";var a,n=r(1849),o=Object.prototype.toString,s=(a=Object.create(null),function(e){var t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});function i(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function l(e){return Array.isArray(e)}function c(e){return void 0===e}var u=i("ArrayBuffer");function d(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var g=i("Date"),m=i("File"),f=i("Blob"),w=i("FileList");function y(e){return"[object Function]"===o.call(e)}var b=i("URLSearchParams");function h(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var r=0,a=e.length;r0;)s[o=a[n]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:i,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var a=e.indexOf(t,r);return-1!==a&&a===r},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:v,isFileList:w}},3204:e=>{"use strict";const t=/[\p{Lu}]/u,r=/[\p{Ll}]/u,a=/^[\p{Lu}](?![\p{Lu}])/gu,n=/([\p{Alpha}\p{N}_]|$)/u,o=/[_.\- ]+/,s=new RegExp("^"+o.source),i=new RegExp(o.source+n.source,"gu"),l=new RegExp("\\d+"+n.source,"gu"),c=(e,n)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(n={pascalCase:!1,preserveConsecutiveUppercase:!1,...n},0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length)return"";const o=!1===n.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(n.locale),c=!1===n.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(n.locale);return 1===e.length?n.pascalCase?c(e):o(e):(e!==o(e)&&(e=((e,a,n)=>{let o=!1,s=!1,i=!1;for(let l=0;l(a.lastIndex=0,e.replace(a,(e=>t(e)))))(e,o):o(e),n.pascalCase&&(e=c(e.charAt(0))+e.slice(1)),((e,t)=>(i.lastIndex=0,l.lastIndex=0,e.replace(i,((e,r)=>t(r))).replace(l,(e=>t(e)))))(e,c))};e.exports=c,e.exports.default=c},4020:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),a=new RegExp("("+t+")+","gi");function n(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),a=e.slice(t);return Array.prototype.concat.call([],n(r),n(a))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r)||[],a=1;a{"use strict";e.exports=function(e,t){for(var r={},a=Object.keys(e),n=Array.isArray(t),o=0;o{var t;self,t=()=>{return e={7629:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(9474),s=r(1687),i=r(8652),l=r(8160),c=r(3292),u=r(6354),d=r(8901),p=r(9708),g=r(6914),m=r(2294),f=r(6133),w=r(1152),y=r(8863),b=r(2036),h={Base:class{constructor(e){this.type=e,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new m.Ids,this._preferences=null,this._refs=new f.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return a("function"==typeof p.describe,"Manifest functionality disabled"),p.describe(this)}allow(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return a(void 0!==e,"Missing example"),l.assertOptions(t,["override"]),this._inner("examples",e,{single:!0,override:t.override})}external(e,t){return"object"==typeof e&&(a(!t,"Cannot combine options with description"),t=e.description,e=e.method),a("function"==typeof e,"Method must be a function"),a(void 0===t||t&&"string"==typeof t,"Description must be a non-empty string"),this._inner("externals",{method:e,description:t},{single:!0})}failover(e,t){return this._default("failover",e,t)}forbidden(){return this.presence("forbidden")}id(e){return e?(a("string"==typeof e,"id must be a non-empty string"),a(/^[^\.]+$/.test(e),"id cannot contain period character"),this.$_setFlag("id",e)):this.$_setFlag("id",void 0)}invalid(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"Invalid mode:",e),this.$_setFlag("only",e)}optional(){return this.presence("optional")}prefs(e){a(e,"Missing preferences"),a(void 0===e.context,"Cannot override context"),a(void 0===e.externals,"Cannot override externals"),a(void 0===e.warnings,"Cannot override warnings"),a(void 0===e.debug,"Cannot override debug"),l.checkPreferences(e);const t=this.clone();return t._preferences=l.preferences(t._preferences,e),t}presence(e){return a(["optional","required","forbidden"].includes(e),"Unknown presence mode",e),this.$_setFlag("presence",e)}raw(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("result",e?"raw":void 0)}result(e){return a(["raw","strip"].includes(e),"Unknown result mode",e),this.$_setFlag("result",e)}required(){return this.presence("required")}strict(e){const t=this.clone(),r=void 0!==e&&!e;return t._preferences=l.preferences(t._preferences,{convert:r}),t}strip(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("result",e?"strip":void 0)}tag(){for(var e=arguments.length,t=new Array(e),r=0;re.keep||e.name!==r)),t._singleRules.delete(r));for(const r of e._rules)e._definition.rules[r.method].multi||t._singleRules.set(r.name,r),t._rules.push(r);if(t._flags.empty&&e._flags.empty){t._flags.empty=t._flags.empty.concat(e._flags.empty);const r=Object.assign({},e._flags);delete r.empty,s(t._flags,r)}else if(e._flags.empty){t._flags.empty=e._flags.empty;const r=Object.assign({},e._flags);delete r.empty,s(t._flags,r)}else s(t._flags,e._flags);for(const r in e.$_terms){const a=e.$_terms[r];a?t.$_terms[r]?t.$_terms[r]=t.$_terms[r].concat(a):t.$_terms[r]=a.slice():t.$_terms[r]||(t.$_terms[r]=a)}return this.$_root._tracer&&this.$_root._tracer._combine(t,[this,e]),t.$_mutateRebuild()}extend(e){return a(!e.base,"Cannot extend type with another base"),d.type(this,e)}extract(e){return e=Array.isArray(e)?e:e.split("."),this._ids.reach(e)}fork(e,t){a(!this._inRuleset(),"Cannot fork inside a ruleset");let r=this;for(let a of[].concat(e))a=Array.isArray(a)?a:a.split("."),r=r._ids.fork(a,t,r);return r.$_temp.ruleset=!1,r}rule(e){const t=this._definition;l.assertOptions(e,Object.keys(t.modifiers)),a(!1!==this.$_temp.ruleset,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const r=null===this.$_temp.ruleset?this._rules.length-1:this.$_temp.ruleset;a(r>=0&&rt.tailor(e),ref:!1}),t.$_temp.ruleset=!1,t.$_mutateRebuild()}tracer(){return w.location?w.location(this):this}validate(e,t){return y.entry(e,this,t)}validateAsync(e,t){return y.entryAsync(e,this,t)}$_addRule(e){"string"==typeof e&&(e={name:e}),a(e&&"object"==typeof e,"Invalid options"),a(e.name&&"string"==typeof e.name,"Invalid rule name");for(const t in e)a("_"!==t[0],"Cannot set private rule properties");const t=Object.assign({},e);t._resolve=[],t.method=t.method||t.name;const r=this._definition.rules[t.method],n=t.args;a(r,"Unknown rule",t.method);const o=this.clone();if(n){a(1===Object.keys(n).length||Object.keys(n).length===this._definition.rules[t.name].args.length,"Invalid rule definition for",this.type,t.name);for(const e in n){let s=n[e];if(r.argsByName){const i=r.argsByName.get(e);if(i.ref&&l.isResolvable(s))t._resolve.push(e),o.$_mutateRegister(s);else if(i.normalize&&(s=i.normalize(s),n[e]=s),i.assert){const t=l.validateArg(s,e,i);a(!t,t,"or reference")}}void 0!==s?n[e]=s:delete n[e]}}return r.multi||(o._ruleRemove(t.name,{clone:!1}),o._singleRules.set(t.name,t)),!1===o.$_temp.ruleset&&(o.$_temp.ruleset=null),r.priority?o._rules.unshift(t):o._rules.push(t),o}$_compile(e,t){return c.schema(this.$_root,e,t)}$_createError(e,t,r,a,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const s=!1!==o.flags?this._flags:{},i=o.messages?g.merge(this._definition.messages,o.messages):this._definition.messages;return new u.Report(e,t,r,s,i,a,n)}$_getFlag(e){return this._flags[e]}$_getRule(e){return this._singleRules.get(e)}$_mapLabels(e){return e=Array.isArray(e)?e:e.split("."),this._ids.labels(e)}$_match(e,t,r,a){(r=Object.assign({},r)).abortEarly=!0,r._externals=!1,t.snapshot();const n=!y.validate(e,this,t,r,a).errors;return t.restore(),n}$_modify(e){return l.assertOptions(e,["each","once","ref","schema"]),m.schema(this,e)||this}$_mutateRebuild(){return a(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(e,t)=>{let{source:r,name:a,path:n,key:o}=t;const s=this._definition[r][a]&&this._definition[r][a].register;!1!==s&&this.$_mutateRegister(e,{family:s,key:o})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(e){let{family:t,key:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._refs.register(e,t),this._ids.register(e,{key:r})}$_property(e){return this._definition.properties[e]}$_reach(e){return this._ids.reach(e)}$_rootReferences(){return this._refs.roots()}$_setFlag(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a("_"===e[0]||!this._inRuleset(),"Cannot set flag inside a ruleset");const n=this._definition.flags[e]||{};if(o(t,n.default)&&(t=void 0),o(t,this._flags[e]))return this;const s=!1!==r.clone?this.clone():this;return void 0!==t?(s._flags[e]=t,s.$_mutateRegister(t)):delete s._flags[e],"_"!==e[0]&&(s.$_temp.ruleset=!1),s}$_parent(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{};return l.assertOptions(r,"literal"),a(void 0!==t,"Missing",e,"value"),a("function"==typeof t||!r.literal,"Only function value supports literal option"),"function"==typeof t&&r.literal&&(t={[l.symbols.literal]:!0,literal:t}),this.$_setFlag(e,t)}_generate(e,t,r){if(!this.$_terms.whens)return{schema:this};const a=[],n=[];for(let o=0;oc)break}const o=n.join(", ");if(t.mainstay.tracer.debug(t,"rule","when",o),!o)return{schema:this};if(!t.mainstay.tracer.active&&this.$_temp.whens[o])return{schema:this.$_temp.whens[o],id:o};let s=this;this._definition.generate&&(s=this._definition.generate(this,e,t,r));for(const e of a)s=s.concat(e);return this.$_root._tracer&&this.$_root._tracer._combine(s,[this,...a]),this.$_temp.whens[o]=s,{schema:s,id:o}}_inner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a(!this._inRuleset(),`Cannot set ${e} inside a ruleset`);const n=this.clone();return n.$_terms[e]&&!r.override||(n.$_terms[e]=[]),r.single?n.$_terms[e].push(t):n.$_terms[e].push(...t),n.$_temp.ruleset=!1,n}_inRuleset(){return null!==this.$_temp.ruleset&&!1!==this.$_temp.ruleset}_ruleRemove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this._singleRules.has(e))return this;const r=!1!==t.clone?this.clone():this;r._singleRules.delete(e);const a=[];for(let t=0;t{"use strict";const a=r(375),n=r(8571),o=r(8160),s={max:1e3,supported:new Set(["undefined","boolean","number","string"])};t.provider={provision:e=>new s.Cache(e)},s.Cache=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o.assertOptions(e,["max"]),a(void 0===e.max||e.max&&e.max>0&&isFinite(e.max),"Invalid max cache size"),this._max=e.max||s.max,this._map=new Map,this._list=new s.List}get length(){return this._map.size}set(e,t){if(null!==e&&!s.supported.has(typeof e))return;let r=this._map.get(e);if(r)return r.value=t,void this._list.first(r);r=this._list.unshift({key:e,value:t}),this._map.set(e,r),this._compact()}get(e){const t=this._map.get(e);if(t)return this._list.first(t),n(t.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},s.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:t,prev:r}=e;return t.prev=r,r&&(r.next=t),e===this.tail&&(this.tail=t),e.prev=null,e.next=null,e}}},8160:(e,t,r)=>{"use strict";const a=r(375),n=r(7916),o=r(5934);let s,i;const l={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};t.version=o.version,t.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},t.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},t.assertOptions=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Options";a(e&&"object"==typeof e&&!Array.isArray(e),"Options must be of type object");const n=Object.keys(e).filter((e=>!t.includes(e)));a(0===n.length,`${r} contain unknown keys: ${n}`)},t.checkPreferences=function(e){i=i||r(3378);const t=i.preferences.validate(e);if(t.error)throw new n([t.error.details[0].message])},t.compare=function(e,t,r){switch(r){case"=":return e===t;case">":return e>t;case"<":return e=":return e>=t;case"<=":return e<=t}},t.default=function(e,t){return void 0===e?t:e},t.isIsoDate=function(e){return l.isoDate.test(e)},t.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},t.isResolvable=function(e){return!!e&&(e[t.symbols.ref]||e[t.symbols.template])},t.isSchema=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e&&e[t.symbols.any];return!!n&&(a(r.legacy||n.version===t.version,"Cannot mix different versions of joi schemas"),!0)},t.isValues=function(e){return e[t.symbols.values]},t.limit=function(e){return Number.isSafeInteger(e)&&e>=0},t.preferences=function(e,a){s=s||r(6914),e=e||{},a=a||{};const n=Object.assign({},e,a);return a.errors&&e.errors&&(n.errors=Object.assign({},e.errors,a.errors),n.errors.wrap=Object.assign({},e.errors.wrap,a.errors.wrap)),a.messages&&(n.messages=s.compile(a.messages,e.messages)),delete n[t.symbols.prefs],n},t.tryWithPath=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{return e()}catch(e){throw void 0!==e.path?e.path=t+"."+e.path:e.path=t,r.append&&(e.message=`${e.message} (${e.path})`),e}},t.validateArg=function(e,r,a){let{assert:n,message:o}=a;if(t.isSchema(n)){const t=n.validate(e);if(!t.error)return;return t.error.message}if(!n(e))return r?`${r} ${o}`:o},t.verifyFlat=function(e,t){for(const r of e)a(!Array.isArray(r),"Method no longer accepts array arguments:",t)}},3292:(e,t,r)=>{"use strict";const a=r(375),n=r(8160),o=r(6133),s={};t.schema=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.assertOptions(r,["appendPath","override"]);try{return s.schema(e,t,r)}catch(e){throw r.appendPath&&void 0!==e.path&&(e.message=`${e.message} (${e.path})`),e}},s.schema=function(e,t,r){a(void 0!==t,"Invalid undefined schema"),Array.isArray(t)&&(a(t.length,"Invalid empty array schema"),1===t.length&&(t=t[0]));const o=function(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:{};n.assertOptions(o,["legacy"]);const i=r&&r[n.symbols.any];if(i)return a(o.legacy||i.version===n.version,"Cannot mix different versions of joi schemas:",i.version,n.version),r;if("object"!=typeof r||!o.legacy)return t.schema(e,r,{appendPath:!0});const l=s.walk(r);return l?l.compile(l.root,r):t.schema(e,r,{appendPath:!0})},s.walk=function(e){if("object"!=typeof e)return null;if(Array.isArray(e)){for(const t of e){const e=s.walk(t);if(e)return e}return null}const t=e[n.symbols.any];if(t)return{root:e[t.root],compile:t.compile};a(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const t in e){const r=s.walk(e[t]);if(r)return r}return null},s.simple=function(e){return null===e||["boolean","string","number"].includes(typeof e)},t.when=function(e,r,i){if(void 0===i&&(a(r&&"object"==typeof r,"Missing options"),i=r,r=o.create(".")),Array.isArray(i)&&(i={switch:i}),n.assertOptions(i,["is","not","then","otherwise","switch","break"]),n.isSchema(r))return a(void 0===i.is,'"is" can not be used with a schema condition'),a(void 0===i.not,'"not" can not be used with a schema condition'),a(void 0===i.switch,'"switch" can not be used with a schema condition'),s.condition(e,{is:r,then:i.then,otherwise:i.otherwise,break:i.break});if(a(o.isRef(r)||"string"==typeof r,"Invalid condition:",r),a(void 0===i.not||void 0===i.is,'Cannot combine "is" with "not"'),void 0===i.switch){let l=i;void 0!==i.not&&(l={is:i.not,then:i.otherwise,otherwise:i.then,break:i.break});let c=void 0!==l.is?e.$_compile(l.is):e.$_root.invalid(null,!1,0,"").required();return a(void 0!==l.then||void 0!==l.otherwise,'options must have at least one of "then", "otherwise", or "switch"'),a(void 0===l.break||void 0===l.then||void 0===l.otherwise,"Cannot specify then, otherwise, and break all together"),void 0===i.is||o.isRef(i.is)||n.isSchema(i.is)||(c=c.required()),s.condition(e,{ref:t.ref(r),is:c,then:l.then,otherwise:l.otherwise,break:l.break})}a(Array.isArray(i.switch),'"switch" must be an array'),a(void 0===i.is,'Cannot combine "switch" with "is"'),a(void 0===i.not,'Cannot combine "switch" with "not"'),a(void 0===i.then,'Cannot combine "switch" with "then"');const l={ref:t.ref(r),switch:[],break:i.break};for(let t=0;t{"use strict";const a=r(5688),n=r(8160),o=r(3328);t.Report=class{constructor(e,r,a,n,o,s,i){if(this.code=e,this.flags=n,this.messages=o,this.path=s.path,this.prefs=i,this.state=s,this.value=r,this.message=null,this.template=null,this.local=a||{},this.local.label=t.label(this.flags,this.state,this.prefs,this.messages),void 0===this.value||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const e=this.path[this.path.length-1];"object"!=typeof e&&(this.local.key=e)}}_setTemplate(e){if(this.template=e,!this.flags.label&&0===this.path.length){const e=this._template(this.template,"root");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const e=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return void 0===t?`Error code "${e}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(e,r){return t.template(this.value,e,r||this.code,this.state,this.prefs)}},t.path=function(e){let t="";for(const r of e)"object"!=typeof r&&("string"==typeof r?(t&&(t+="."),t+=r):t+=`[${r}]`);return t},t.template=function(e,t,r,a,s){if(!t)return;if(o.isTemplate(t))return"root"!==r?t:null;let i=s.errors.language;if(n.isResolvable(i)&&(i=i.resolve(e,a,s)),i&&t[i]){if(void 0!==t[i][r])return t[i][r];if(void 0!==t[i]["*"])return t[i]["*"]}return t[r]?t[r]:t["*"]},t.label=function(e,r,a,n){if(e.label)return e.label;if(!a.errors.label)return"";let o=r.path;return"key"===a.errors.label&&r.path.length>1&&(o=r.path.slice(-1)),t.path(o)||t.template(null,a.messages,"root",r,a)||n&&t.template(null,n,"root",r,a)||"value"},t.process=function(e,r,a){if(!e)return null;const{override:n,message:o,details:s}=t.details(e);if(n)return n;if(a.errors.stack)return new t.ValidationError(o,s,r);const i=Error.stackTraceLimit;Error.stackTraceLimit=0;const l=new t.ValidationError(o,s,r);return Error.stackTraceLimit=i,l},t.details=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const a=[];for(const n of e){if(n instanceof Error){if(!1!==t.override)return{override:n};const e=n.toString();r.push(e),a.push({message:e,type:"override",context:{error:n}});continue}const e=n.toString();r.push(e),a.push({message:e,path:n.path.filter((e=>"object"!=typeof e)),type:n.code,context:n.local})}return r.length>1&&(r=[...new Set(r)]),{message:r.join(". "),details:a}},t.ValidationError=class extends Error{constructor(e,t,r){super(e),this._original=r,this.details=t}static isError(e){return e instanceof t.ValidationError}},t.ValidationError.prototype.isJoi=!0,t.ValidationError.prototype.name="ValidationError",t.ValidationError.prototype.annotate=a.error},8901:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(8160),s=r(6914),i={};t.type=function(e,t){const r=Object.getPrototypeOf(e),l=n(r),c=e._assign(Object.create(l)),u=Object.assign({},t);delete u.base,l._definition=u;const d=r._definition||{};u.messages=s.merge(d.messages,u.messages),u.properties=Object.assign({},d.properties,u.properties),c.type=u.type,u.flags=Object.assign({},d.flags,u.flags);const p=Object.assign({},d.terms);if(u.terms)for(const e in u.terms){const t=u.terms[e];a(void 0===c.$_terms[e],"Invalid term override for",u.type,e),c.$_terms[e]=t.init,p[e]=t}u.terms=p,u.args||(u.args=d.args),u.prepare=i.prepare(u.prepare,d.prepare),u.coerce&&("function"==typeof u.coerce&&(u.coerce={method:u.coerce}),u.coerce.from&&!Array.isArray(u.coerce.from)&&(u.coerce={method:u.coerce.method,from:[].concat(u.coerce.from)})),u.coerce=i.coerce(u.coerce,d.coerce),u.validate=i.validate(u.validate,d.validate);const g=Object.assign({},d.rules);if(u.rules)for(const e in u.rules){const t=u.rules[e];a("object"==typeof t,"Invalid rule definition for",u.type,e);let r=t.method;if(void 0===r&&(r=function(){return this.$_addRule(e)}),r&&(a(!l[e],"Rule conflict in",u.type,e),l[e]=r),a(!g[e],"Rule conflict in",u.type,e),g[e]=t,t.alias){const e=[].concat(t.alias);for(const r of e)l[r]=t.method}t.args&&(t.argsByName=new Map,t.args=t.args.map((e=>("string"==typeof e&&(e={name:e}),a(!t.argsByName.has(e.name),"Duplicated argument name",e.name),o.isSchema(e.assert)&&(e.assert=e.assert.strict().label(e.name)),t.argsByName.set(e.name,e),e))))}u.rules=g;const m=Object.assign({},d.modifiers);if(u.modifiers)for(const e in u.modifiers){a(!l[e],"Rule conflict in",u.type,e);const t=u.modifiers[e];a("function"==typeof t,"Invalid modifier definition for",u.type,e);const r=function(t){return this.rule({[e]:t})};l[e]=r,m[e]=t}if(u.modifiers=m,u.overrides){l._super=r,c.$_super={};for(const e in u.overrides)a(r[e],"Cannot override missing",e),u.overrides[e][o.symbols.parent]=r[e],c.$_super[e]=r[e].bind(c);Object.assign(l,u.overrides)}u.cast=Object.assign({},d.cast,u.cast);const f=Object.assign({},d.manifest,u.manifest);return f.build=i.build(u.manifest&&u.manifest.build,d.manifest&&d.manifest.build),u.manifest=f,u.rebuild=i.rebuild(u.rebuild,d.rebuild),c},i.build=function(e,t){return e&&t?function(r,a){return t(e(r,a),a)}:e||t},i.coerce=function(e,t){return e&&t?{from:e.from&&t.from?[...new Set([...e.from,...t.from])]:null,method(r,a){let n;if((!t.from||t.from.includes(typeof r))&&(n=t.method(r,a),n)){if(n.errors||void 0===n.value)return n;r=n.value}if(!e.from||e.from.includes(typeof r)){const t=e.method(r,a);if(t)return t}return n}}:e||t},i.prepare=function(e,t){return e&&t?function(r,a){const n=e(r,a);if(n){if(n.errors||void 0===n.value)return n;r=n.value}return t(r,a)||n}:e||t},i.rebuild=function(e,t){return e&&t?function(r){t(r),e(r)}:e||t},i.validate=function(e,t){return e&&t?function(r,a){const n=t(r,a);if(n){if(n.errors&&(!Array.isArray(n.errors)||n.errors.length))return n;r=n.value}return e(r,a)||n}:e||t}},5107:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(8652),s=r(8160),i=r(3292),l=r(6354),c=r(8901),u=r(9708),d=r(6133),p=r(3328),g=r(1152);let m;const f={types:{alternatives:r(4946),any:r(8068),array:r(546),boolean:r(4937),date:r(7500),function:r(390),link:r(8785),number:r(3832),object:r(8966),string:r(7417),symbol:r(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const e={_types:new Set(Object.keys(f.types))};for(const t of e._types)e[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n2?r-2:0),n=2;n2?r-2:0),n=2;n{"use strict";const a=r(375),n=r(8571),o=r(3328);t.compile=function(e,t){if("string"==typeof e)return a(!t,"Cannot set single message string"),new o(e);if(o.isTemplate(e))return a(!t,"Cannot set single message template"),e;a("object"==typeof e&&!Array.isArray(e),"Invalid message options"),t=t?n(t):{};for(let r in e){const n=e[r];if("root"===r||o.isTemplate(n)){t[r]=n;continue}if("string"==typeof n){t[r]=new o(n);continue}a("object"==typeof n&&!Array.isArray(n),"Invalid message for",r);const s=r;for(r in t[s]=t[s]||{},n){const e=n[r];"root"===r||o.isTemplate(e)?t[s][r]=e:(a("string"==typeof e,"Invalid message for",r,"in",s),t[s][r]=new o(e))}}return t},t.decompile=function(e){const t={};for(let r in e){const a=e[r];if("root"===r){t.root=a;continue}if(o.isTemplate(a)){t[r]=a.describe({compact:!0});continue}const n=r;for(r in t[n]={},a){const e=a[r];"root"!==r?t[n][r]=e.describe({compact:!0}):t[n].root=e}}return t},t.merge=function(e,r){if(!e)return t.compile(r);if(!r)return e;if("string"==typeof r)return new o(r);if(o.isTemplate(r))return r;const s=n(e);for(let e in r){const t=r[e];if("root"===e||o.isTemplate(t)){s[e]=t;continue}if("string"==typeof t){s[e]=new o(t);continue}a("object"==typeof t&&!Array.isArray(t),"Invalid message for",e);const n=e;for(e in s[n]=s[n]||{},t){const r=t[e];"root"===e||o.isTemplate(r)?s[n][e]=r:(a("string"==typeof r,"Invalid message for",e,"in",n),s[n][e]=new o(r))}}return s}},2294:(e,t,r)=>{"use strict";const a=r(375),n=r(8160),o=r(6133),s={};t.Ids=s.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new s.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(const[t,r]of e._byId.entries())a(!this._byKey.has(t),"Schema id conflicts with existing key:",t),this._byId.set(t,r);for(const[t,r]of e._byKey.entries())a(!this._byId.has(t),"Schema key conflicts with existing id:",t),this._byKey.set(t,r)}fork(e,t,r){const o=this._collect(e);o.push({schema:r});const i=o.shift();let l={id:i.id,schema:t(i.schema)};a(n.isSchema(l.schema),"adjuster function failed to return a joi schema type");for(const e of o)l={id:e.id,schema:s.fork(e.schema,l.id,l.schema)};return l.schema}labels(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=e[0],a=this._get(r);if(!a)return[...t,...e].join(".");const n=e.slice(1);return t=[...t,a.schema._flags.label||r],n.length?a.schema._ids.labels(n,t):t.join(".")}reach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=e[0],n=this._get(r);a(n,"Schema does not contain path",[...t,...e].join("."));const o=e.slice(1);return o.length?n.schema._ids.reach(o,[...t,r]):n.schema}register(e){let{key:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||!n.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const r=e._flags.id;if(r){const t=this._byId.get(r);a(!t||t.schema===e,"Cannot add different schemas with the same id:",r),a(!this._byKey.has(r),"Schema id conflicts with existing key:",r),this._byId.set(r,{schema:e,id:r})}t&&(a(!this._byKey.has(t),"Schema already contains key:",t),a(!this._byId.has(t),"Schema key conflicts with existing id:",t),this._byKey.set(t,{schema:e,id:t}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=e[0],o=this._get(n);a(o,"Schema does not contain path",[...t,...e].join(".")),r=[o,...r];const s=e.slice(1);return s.length?o.schema._ids._collect(s,[...t,n],r):r}_get(e){return this._byId.get(e)||this._byKey.get(e)}},s.fork=function(e,r,a){const n=t.schema(e,{each:(e,t)=>{let{key:n}=t;if(r===(e._flags.id||n))return a},ref:!1});return n?n.$_mutateRebuild():e},t.schema=function(e,t){let r;for(const a in e._flags){if("_"===a[0])continue;const n=s.scan(e._flags[a],{source:"flags",name:a},t);void 0!==n&&(r=r||e.clone(),r._flags[a]=n)}for(let a=0;a{"use strict";const a=r(375),n=r(8571),o=r(9621),s=r(8160);let i;const l={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};t.create=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a("string"==typeof e,"Invalid reference key:",e),s.assertOptions(t,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),a(!t.prefix||"object"==typeof t.prefix,"options.prefix must be of type object");const r=Object.assign({},l.defaults,t);delete r.prefix;const n=r.separator,o=l.context(e,n,t.prefix);if(r.type=o.type,e=o.key,"value"===r.type)if(o.root&&(a(!n||e[0]!==n,"Cannot specify relative path with root prefix"),r.ancestor="root",e||(e=null)),n&&n===e)e=null,r.ancestor=0;else if(void 0!==r.ancestor)a(!n||!e||e[0]!==n,"Cannot combine prefix with ancestor option");else{const[t,a]=l.ancestor(e,n);a&&""===(e=e.slice(a))&&(e=null),r.ancestor=t}return r.path=n?null===e?[]:e.split(n):[e],new l.Ref(r)},t.in=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.create(e,{...r,in:!0})},t.isRef=function(e){return!!e&&!!e[s.symbols.ref]},l.Ref=class{constructor(e){a("object"==typeof e,"Invalid reference construction"),s.assertOptions(e,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),a([!1,void 0].includes(e.separator)||"string"==typeof e.separator&&1===e.separator.length,"Invalid separator"),a(!e.adjust||"function"==typeof e.adjust,"options.adjust must be a function"),a(!e.map||Array.isArray(e.map),"options.map must be an array"),a(!e.map||!e.adjust,"Cannot set both map and adjust options"),Object.assign(this,l.defaults,e),a("value"===this.type||void 0===this.ancestor,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return a(!this.in||o.in,"Invalid in() reference usage"),"global"===this.type?this._resolve(r.context,t,o):"local"===this.type?this._resolve(n,t,o):this.ancestor?"root"===this.ancestor?this._resolve(t.ancestors[t.ancestors.length-1],t,o):(a(this.ancestor<=t.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(t.ancestors[this.ancestor-1],t,o)):this._resolve(e,t,o)}_resolve(e,t,r){let a;if("value"===this.type&&t.mainstay.shadow&&!1!==r.shadow&&(a=t.mainstay.shadow.get(this.absolute(t))),void 0===a&&(a=o(e,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(a=this.adjust(a)),this.map){const e=this.map.get(a);void 0!==e&&(a=e)}return t.mainstay&&t.mainstay.tracer.resolve(t,this,a),a}toString(){return this.display}absolute(e){return[...e.path.slice(0,-this.ancestor),...this.path]}clone(){return new l.Ref(this)}describe(){const e={path:this.path};"value"!==this.type&&(e.type=this.type),"."!==this.separator&&(e.separator=this.separator),"value"===this.type&&1!==this.ancestor&&(e.ancestor=this.ancestor),this.map&&(e.map=[...this.map]);for(const t of["adjust","iterables","render"])null!==this[t]&&void 0!==this[t]&&(e[t]=this[t]);return!1!==this.in&&(e.in=!0),{ref:e}}updateDisplay(){const e=null!==this.key?this.key:"";if("value"!==this.type)return void(this.display=`ref:${this.type}:${e}`);if(!this.separator)return void(this.display=`ref:${e}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${e}`);if("root"===this.ancestor)return void(this.display=`ref:root:${e}`);if(1===this.ancestor)return void(this.display=`ref:${e||".."}`);const t=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${t}${e||""}`}},l.Ref.prototype[s.symbols.ref]=!0,t.build=function(e){return"value"===(e=Object.assign({},l.defaults,e)).type&&void 0===e.ancestor&&(e.ancestor=1),new l.Ref(e)},l.context=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e=e.trim(),r){const a=void 0===r.global?"$":r.global;if(a!==t&&e.startsWith(a))return{key:e.slice(a.length),type:"global"};const n=void 0===r.local?"#":r.local;if(n!==t&&e.startsWith(n))return{key:e.slice(n.length),type:"local"};const o=void 0===r.root?"/":r.root;if(o!==t&&e.startsWith(o))return{key:e.slice(o.length),type:"value",root:!0}}return{key:e,type:"value"}},l.ancestor=function(e,t){if(!t)return[1,0];if(e[0]!==t)return[1,0];if(e[1]!==t)return[0,1];let r=2;for(;e[r]===t;)++r;return[r-1,r]},t.toSibling=0,t.toParent=1,t.Manager=class{constructor(){this.refs=[]}register(e,a){if(e)if(a=void 0===a?t.toParent:a,Array.isArray(e))for(const t of e)this.register(t,a);else if(s.isSchema(e))for(const t of e._refs.refs)t.ancestor-a>=0&&this.refs.push({ancestor:t.ancestor-a,root:t.root});else t.isRef(e)&&"value"===e.type&&e.ancestor-a>=0&&this.refs.push({ancestor:e.ancestor-a,root:e.root}),i=i||r(3328),i.isTemplate(e)&&this.register(e.refs(),a)}get length(){return this.refs.length}clone(){const e=new t.Manager;return e.refs=n(this.refs),e}reset(){this.refs=[]}roots(){return this.refs.filter((e=>!e.ancestor)).map((e=>e.root))}}},3378:(e,t,r)=>{"use strict";const a=r(5107),n={};n.wrap=a.string().min(1).max(2).allow(!1),t.preferences=a.object({allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),context:a.object(),convert:a.boolean(),dateFormat:a.valid("date","iso","string","time","utc"),debug:a.boolean(),errors:{escapeHtml:a.boolean(),label:a.valid("path","key",!1),language:[a.string(),a.object().ref()],render:a.boolean(),stack:a.boolean(),wrap:{label:n.wrap,array:n.wrap,string:n.wrap}},externals:a.boolean(),messages:a.object(),noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:a.valid("required","optional","forbidden"),skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()}).strict(),n.nameRx=/^[a-zA-Z0-9]\w*$/,n.rule=a.object({alias:a.array().items(a.string().pattern(n.nameRx)).single(),args:a.array().items(a.string(),a.object({name:a.string().pattern(n.nameRx).required(),ref:a.boolean(),assert:a.alternatives([a.function(),a.object().schema()]).conditional("ref",{is:!0,then:a.required()}),normalize:a.function(),message:a.string().when("assert",{is:a.function(),then:a.required()})})),convert:a.boolean(),manifest:a.boolean(),method:a.function().allow(!1),multi:a.boolean(),validate:a.function()}),t.extension=a.object({type:a.alternatives([a.string(),a.object().regex()]).required(),args:a.function(),cast:a.object().pattern(n.nameRx,a.object({from:a.function().maxArity(1).required(),to:a.function().minArity(1).maxArity(2).required()})),base:a.object().schema().when("type",{is:a.object().regex(),then:a.forbidden()}),coerce:[a.function().maxArity(3),a.object({method:a.function().maxArity(3).required(),from:a.array().items(a.string()).single()})],flags:a.object().pattern(n.nameRx,a.object({setter:a.string(),default:a.any()})),manifest:{build:a.function().arity(2)},messages:[a.object(),a.string()],modifiers:a.object().pattern(n.nameRx,a.function().minArity(1).maxArity(2)),overrides:a.object().pattern(n.nameRx,a.function()),prepare:a.function().maxArity(3),rebuild:a.function().arity(1),rules:a.object().pattern(n.nameRx,n.rule),terms:a.object().pattern(n.nameRx,a.object({init:a.array().allow(null).required(),manifest:a.object().pattern(/.+/,[a.valid("schema","single"),a.object({mapped:a.object({from:a.string().required(),to:a.string().required()}).required()})])})),validate:a.function().maxArity(3)}).strict(),t.extensions=a.array().items(a.object(),a.function().arity(1)).strict(),n.desc={buffer:a.object({buffer:a.string()}),func:a.object({function:a.function().required(),options:{literal:!0}}),override:a.object({override:!0}),ref:a.object({ref:a.object({type:a.valid("value","global","local"),path:a.array().required(),separator:a.string().length(1).allow(!1),ancestor:a.number().min(0).integer().allow("root"),map:a.array().items(a.array().length(2)).min(1),adjust:a.function(),iterables:a.boolean(),in:a.boolean(),render:a.boolean()}).required()}),regex:a.object({regex:a.string().min(3)}),special:a.object({special:a.valid("deep").required()}),template:a.object({template:a.string().required(),options:a.object()}),value:a.object({value:a.alternatives([a.object(),a.array()]).required()})},n.desc.entity=a.alternatives([a.array().items(a.link("...")),a.boolean(),a.function(),a.number(),a.string(),n.desc.buffer,n.desc.func,n.desc.ref,n.desc.regex,n.desc.special,n.desc.template,n.desc.value,a.link("/")]),n.desc.values=a.array().items(null,a.boolean(),a.function(),a.number().allow(1/0,-1/0),a.string().allow(""),a.symbol(),n.desc.buffer,n.desc.func,n.desc.override,n.desc.ref,n.desc.regex,n.desc.template,n.desc.value),n.desc.messages=a.object().pattern(/.+/,[a.string(),n.desc.template,a.object().pattern(/.+/,[a.string(),n.desc.template])]),t.description=a.object({type:a.string().required(),flags:a.object({cast:a.string(),default:a.any(),description:a.string(),empty:a.link("/"),failover:n.desc.entity,id:a.string(),label:a.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:a.boolean(),unit:a.string()}).unknown(),preferences:{allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),convert:a.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:a.boolean(),label:["path","key"],language:[a.string(),n.desc.ref],wrap:{label:n.wrap,array:n.wrap}},externals:a.boolean(),messages:n.desc.messages,noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:["required","optional","forbidden"],skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()},allow:n.desc.values,invalid:n.desc.values,rules:a.array().min(1).items({name:a.string().required(),args:a.object().min(1),keep:a.boolean(),message:[a.string(),n.desc.messages],warn:a.boolean()}),keys:a.object().pattern(/.*/,a.link("/")),link:n.desc.ref}).pattern(/^[a-z]\w*$/,a.any())},493:(e,t,r)=>{"use strict";const a=r(8571),n=r(9621),o=r(8160),s={value:Symbol("value")};e.exports=s.State=class{constructor(e,t,r){this.path=e,this.ancestors=t,this.mainstay=r.mainstay,this.schemas=r.schemas,this.debug=null}localize(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const a=new s.State(e,t,this);return r&&a.schemas&&(a.schemas=[s.schemas(r),...a.schemas]),a}nest(e,t){const r=new s.State(this.path,this.ancestors,this);return r.schemas=r.schemas&&[s.schemas(e),...r.schemas],r.debug=t,r}shadow(e,t){this.mainstay.shadow=this.mainstay.shadow||new s.Shadow,this.mainstay.shadow.set(this.path,e,t)}snapshot(){this.mainstay.shadow&&(this._snapshot=a(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},s.schemas=function(e){return o.isSchema(e)?{schema:e}:e},s.Shadow=class{constructor(){this._values=null}set(e,t,r){if(!e.length)return;if("strip"===r&&"number"==typeof e[e.length-1])return;this._values=this._values||new Map;let a=this._values;for(let t=0;t{"use strict";const a=r(375),n=r(8571),o=r(5277),s=r(1447),i=r(8160),l=r(6354),c=r(6133),u={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};e.exports=u.Template=class{constructor(e,t){if(a("string"==typeof e,"Template source must be a string"),a(!e.includes("\0")&&!e.includes(""),"Template source cannot contain reserved control characters"),this.source=e,this.rendered=e,this._template=null,t){const{functions:e,...r}=t;this._settings=Object.keys(r).length?n(r):void 0,this._functions=e,this._functions&&(a(Object.keys(this._functions).every((e=>"string"==typeof e)),"Functions keys must be strings"),a(Object.values(this._functions).every((e=>"function"==typeof e)),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const e=u.encode(this.source),t=u.split(e);let r=!1;const a=[],n=t.shift();n&&a.push(n);for(const e of t){const t="{"!==e[0],n=t?"}":"}}",o=e.indexOf(n);if(-1===o||"{"===e[1]){a.push(`{${u.decode(e)}`);continue}let s=e.slice(t?0:1,o);const i=":"===s[0];i&&(s=s.slice(1));const l=this._ref(u.decode(s),{raw:t,wrapped:i});a.push(l),"string"!=typeof l&&(r=!0);const c=e.slice(o+n.length);c&&a.push(u.decode(c))}r?this._template=a:this.rendered=a.join("")}static date(e,t){return u.dateFormat[t.dateFormat].call(e)}describe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this._settings&&e.compact)return this.source;const t={template:this.source};return this._settings&&(t.options=this._settings),this._functions&&(t.functions=this._functions),t}static build(e){return new u.Template(e.template,e.options||e.functions?{...e.options,functions:e.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(e){return!!e&&!!e[i.symbols.template]}refs(){if(!this._template)return;const e=[];for(const t of this._template)"string"!=typeof t&&e.push(...t.refs);return e}resolve(e,t,r,a){return this._template&&1===this._template.length?this._part(this._template[0],e,t,r,a,{}):this.render(e,t,r,a)}_part(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a4&&void 0!==arguments[4]?arguments[4]:{};if(!this.isDynamic())return this.rendered;const s=[];for(const i of this._template)if("string"==typeof i)s.push(i);else{const l=this._part(i,e,t,r,a,n),c=u.stringify(l,e,t,r,a,n);if(void 0!==c){const e=i.raw||!1===(n.errors&&n.errors.escapeHtml)?c:o(c);s.push(u.wrap(e,i.wrapped&&r.errors.wrap.label))}}return s.join("")}_ref(e,t){let{raw:r,wrapped:a}=t;const n=[],o=e=>{const t=c.create(e,this._settings);return n.push(t),e=>{const r=t.resolve(...e);return void 0!==r?r:null}};try{const t=this._functions?{...u.functions,...this._functions}:u.functions;var i=new s.Parser(e,{reference:o,functions:t,constants:u.constants})}catch(t){throw t.message=`Invalid template variable "${e}" fails due to: ${t.message}`,t}if(i.single){if("reference"===i.single.type){const e=n[0];return{ref:e,raw:r,refs:n,wrapped:a||"local"===e.type&&"label"===e.key}}return u.stringify(i.single.value)}return{formula:i,raw:r,refs:n}}toString(){return this.source}},u.Template.prototype[i.symbols.template]=!0,u.Template.prototype.isImmutable=!0,u.encode=function(e){return e.replace(/\\(\{+)/g,((e,t)=>u.opens.slice(0,t.length))).replace(/\\(\}+)/g,((e,t)=>u.closes.slice(0,t.length)))},u.decode=function(e){return e.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},u.split=function(e){const t=[];let r="";for(let a=0;a5&&void 0!==arguments[5]?arguments[5]:{};const s=typeof e,i=a&&a.errors&&a.errors.wrap||{};let l=!1;if(c.isRef(e)&&e.render&&(l=e.in,e=e.resolve(t,r,a,n,{in:e.in,...o})),null===e)return"null";if("string"===s)return u.wrap(e,o.arrayItems&&i.string);if("number"===s||"function"===s||"symbol"===s)return e.toString();if("object"!==s)return JSON.stringify(e);if(e instanceof Date)return u.Template.date(e,a);if(e instanceof Map){const t=[];for(const[r,a]of e.entries())t.push(`${r.toString()} -> ${a.toString()}`);e=t}if(!Array.isArray(e))return e.toString();const d=[];for(const s of e)d.push(u.stringify(s,t,r,a,n,{arrayItems:!0,...o}));return u.wrap(d.join(", "),!l&&i.array)},u.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},u.functions={if:(e,t,r)=>e?t:r,length:e=>"string"==typeof e?e.length:e&&"object"==typeof e?Array.isArray(e)?e.length:Object.keys(e).length:null,msg(e){const[t,r,a,n,o]=this,s=o.messages;if(!s)return"";const i=l.template(t,s[0],e,r,a)||l.template(t,s[1],e,r,a);return i?i.render(t,r,a,n,o):""},number:e=>"number"==typeof e?e:"string"==typeof e?parseFloat(e):"boolean"==typeof e?e?1:0:e instanceof Date?e.getTime():null}},4946:(e,t,r)=>{"use strict";const a=r(375),n=r(1687),o=r(8068),s=r(8160),i=r(3292),l=r(6354),c=r(6133),u={};e.exports=o.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:c.toSibling}},args(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;al.details(e,{override:!1})))})};if("one"===r._flags.match)return 1===t.length?{value:t[0]}:{errors:a("alternatives.one")};if(t.length!==r.$_terms.matches.length)return{errors:a("alternatives.all",{details:i.map((e=>l.details(e,{override:!1})))})};const c=e=>e.$_terms.matches.some((e=>"object"===e.schema.type||"alternatives"===e.schema.type&&c(e.schema)));return c(r)?{value:t.reduce(((e,t)=>n(e,t,{mergeArrays:!1})))}:{value:t[t.length-1]}}const i=[];for(let t=0;t"is"!==r.path[0]?t.label(e):void 0,ref:!1})}},rebuild(e){e.$_modify({each:t=>{s.isSchema(t)&&"array"===t.type&&e.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(e,t){if(t.matches)for(const r of t.matches){const{schema:t,ref:a,is:n,not:o,then:s,otherwise:i}=r;e=t?e.try(t):a?e.conditional(a,{is:n,then:s,not:o,otherwise:i,switch:r.switch}):e.conditional(n,{then:s,otherwise:i})}return e}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),u.errors=function(e,t){let{error:r,state:a}=t;if(!e.length)return{errors:r("alternatives.any")};if(1===e.length)return{errors:e[0].reports};const n=new Set,o=[];for(const{reports:t,schema:s}of e){if(t.length>1)return u.unmatched(e,r);const i=t[0];if(i instanceof l.Report==0)return u.unmatched(e,r);if(i.state.path.length!==a.path.length){o.push({type:s.type,report:i});continue}if("any.only"===i.code){for(const e of i.local.valids)n.add(e);continue}const[c,d]=i.code.split(".");"base"===d?n.add(c):o.push({type:s.type,report:i})}return o.length?1===o.length?{errors:o[0].report}:u.unmatched(e,r):{errors:r("alternatives.types",{types:[...n]})}},u.unmatched=function(e,t){const r=[];for(const t of e)r.push(...t.reports);return{errors:t("alternatives.match",l.details(r,{override:!1}))}}},8068:(e,t,r)=>{"use strict";const a=r(375),n=r(7629),o=r(8160),s=r(6914);e.exports=n.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,t){return a("function"==typeof e,"Method must be a function"),a(void 0===t||t&&"string"==typeof t,"Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:t}})},validate(e,t,r){let{method:a}=r;try{return a(e,t)}catch(e){return t.error("any.custom",{error:e})}},args:["method","description"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){a(o.isSchema(e)&&e._flags.id,"Schema must be a schema with an id");const t=this.clone();return t.$_terms.shared=t.$_terms.shared||[],t.$_terms.shared.push(e),t.$_mutateRegister(e),t}},warning:{method(e,t){return a(e&&"string"==typeof e,"Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:t},warn:!0})},validate(e,t,r){let{code:a,local:n}=r;return t.error(a,n)},args:["code","local"],multi:!0}},modifiers:{keep(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.keep=t},message(e,t){e.message=s.compile(t)},warn(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.warn=t}},manifest:{build(e,t){for(const r in t){const a=t[r];if(["examples","externals","metas","notes","tags"].includes(r))for(const t of a)e=e[r.slice(0,-1)](t);else if("alterations"!==r)if("whens"!==r){if("shared"===r)for(const t of a)e=e.shared(t)}else for(const t of a){const{ref:r,is:a,not:n,then:o,otherwise:s,concat:i}=t;e=i?e.concat(i):r?e.when(r,{is:a,not:n,then:o,otherwise:s,switch:t.switch,break:t.break}):e.when(a,{then:o,otherwise:s,break:t.break})}else{const t={};for(const{target:e,adjuster:r}of a)t[e]=r;e=e.alter(t)}}return e}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(e,t,r)=>{"use strict";const a=r(375),n=r(9474),o=r(9621),s=r(8068),i=r(8160),l=r(3292),c={};e.exports=s.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(e,t){let{schema:r,state:a,prefs:n}=t;if(!Array.isArray(e))return;const o=r.$_getRule("sort");return o?c.sort(r,e,o.args.options,a,n):void 0}},validate(e,t){let{schema:r,error:a}=t;if(!Array.isArray(e)){if(r._flags.single){const t=[e];return t[i.symbols.arraySingle]=!0,{value:t}}return{errors:a("array.base")}}if(r.$_getRule("items")||r.$_terms.externals)return{value:e.slice()}},rules:{has:{method(e){e=this.$_compile(e,{appendPath:!0});const t=this.$_addRule({name:"has",args:{schema:e}});return t.$_mutateRegister(e),t},validate(e,t,r){let{state:a,prefs:n,error:o}=t,{schema:s}=r;const i=[e,...a.ancestors];for(let t=0;tthis.$_compile(t[e])),e,{append:!0});a.$_terms.items.push(r)}return a.$_mutateRebuild()},validate(e,t){let{schema:r,error:a,state:n,prefs:o,errorsArray:s}=t;const l=r.$_terms._requireds.slice(),u=r.$_terms.ordered.slice(),d=[...r.$_terms._inclusions,...l],p=!e[i.symbols.arraySingle];delete e[i.symbols.arraySingle];const g=s();let m=e.length;for(let t=0;t="})}},ordered:{method(){for(var e=arguments.length,t=new Array(e),r=0;rthis.$_compile(t[e])),e,{append:!0});c.validateSingle(r,a),a.$_mutateRegister(r),a.$_terms.ordered.push(r)}return a.$_mutateRebuild()}},single:{method(e){const t=void 0===e||!!e;return a(!t||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",t)}},sort:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.assertOptions(e,["by","order"]);const t={order:e.order||"ascending"};return e.by&&(t.by=l.ref(e.by,{ancestor:0}),a(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(e,t,r){let{error:a,state:n,prefs:o,schema:s}=t,{options:i}=r;const{value:l,errors:u}=c.sort(s,e,i,n,o);if(u)return u;for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{};a(!e||"function"==typeof e||"string"==typeof e,"comparator must be a function or a string"),i.assertOptions(t,["ignoreUndefined","separator"]);const r={name:"unique",args:{options:t,comparator:e}};if(e)if("string"==typeof e){const a=i.default(t.separator,".");r.path=a?e.split(a):[e]}else r.comparator=e;return this.$_addRule(r)},validate(e,t,r,s){let{state:i,error:l,schema:c}=t,{comparator:u,options:d}=r,{comparator:p,path:g}=s;const m={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},f=p||n,w=d.ignoreUndefined;for(let t=0;tnew Set(e)}},rebuild(e){e.$_terms._inclusions=[],e.$_terms._exclusions=[],e.$_terms._requireds=[];for(const t of e.$_terms.items)c.validateSingle(t,e),"required"===t._flags.presence?e.$_terms._requireds.push(t):"forbidden"===t._flags.presence?e.$_terms._exclusions.push(t):e.$_terms._inclusions.push(t);for(const t of e.$_terms.ordered)c.validateSingle(t,e)},manifest:{build:(e,t)=>(t.items&&(e=e.items(...t.items)),t.ordered&&(e=e.ordered(...t.ordered)),e)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),c.fillMissedErrors=function(e,t,r,a,n,o){const s=[];let i=0;for(const e of r){const t=e._flags.label;t?s.push(t):++i}s.length?i?t.push(e.$_createError("array.includesRequiredBoth",a,{knownMisses:s,unknownMisses:i},n,o)):t.push(e.$_createError("array.includesRequiredKnowns",a,{knownMisses:s},n,o)):t.push(e.$_createError("array.includesRequiredUnknowns",a,{unknownMisses:i},n,o))},c.fillOrderedErrors=function(e,t,r,a,n,o){const s=[];for(const e of r)"required"===e._flags.presence&&s.push(e);s.length&&c.fillMissedErrors(e,t,s,a,n,o)},c.fillDefault=function(e,t,r,a){const n=[];let o=!0;for(let s=e.length-1;s>=0;--s){const i=e[s],l=[t,...r.ancestors],c=i.$_validate(void 0,r.localize(r.path,l,i),a).value;if(o){if(void 0===c)continue;o=!1}n.unshift(c)}n.length&&t.push(...n)},c.fastSplice=function(e,t){let r=t;for(;r{let d=c.compare(l,u,s,i);if(null!==d)return d;if(r.by&&(l=r.by.resolve(l,a,n),u=r.by.resolve(u,a,n)),d=c.compare(l,u,s,i),null!==d)return d;const p=typeof l;if(p!==typeof u)throw e.$_createError("array.sort.mismatching",t,null,a,n);if("number"!==p&&"string"!==p)throw e.$_createError("array.sort.unsupported",t,{type:p},a,n);return"number"===p?(l-u)*o:l{"use strict";const a=r(375),n=r(8068),o=r(8160),s=r(2036),i={isBool:function(e){return"boolean"==typeof e}};e.exports=n.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(e,t){let{schema:r}=t;if("boolean"!=typeof e){if("string"==typeof e){const t=r._flags.sensitive?e:e.toLowerCase();e="true"===t||"false"!==t&&e}return"boolean"!=typeof e&&(e=r.$_terms.truthy&&r.$_terms.truthy.has(e,null,null,!r._flags.sensitive)||(!r.$_terms.falsy||!r.$_terms.falsy.has(e,null,null,!r._flags.sensitive))&&e),{value:e}}},validate(e,t){let{error:r}=t;if("boolean"!=typeof e)return{value:e,errors:r("boolean.base")}},rules:{truthy:{method(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("sensitive",e)}}},cast:{number:{from:i.isBool,to:(e,t)=>e?1:0},string:{from:i.isBool,to:(e,t)=>e?"true":"false"}},manifest:{build:(e,t)=>(t.truthy&&(e=e.truthy(...t.truthy)),t.falsy&&(e=e.falsy(...t.falsy)),e)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(e,t,r)=>{"use strict";const a=r(375),n=r(8068),o=r(8160),s=r(3328),i={isDate:function(e){return e instanceof Date}};e.exports=n.extend({type:"date",coerce:{from:["number","string"],method(e,t){let{schema:r}=t;return{value:i.parse(e,r._flags.format)||e}}},validate(e,t){let{schema:r,error:a,prefs:n}=t;if(e instanceof Date&&!isNaN(e.getTime()))return;const o=r._flags.format;return n.convert&&o&&"string"==typeof e?{value:e,errors:a("date.format",{format:o})}:{value:e,errors:a("date.base")}},rules:{compare:{method:!1,validate(e,t,r,a){let{date:n}=r,{name:s,operator:i,args:l}=a;const c="now"===n?Date.now():n.getTime();return o.compare(e.getTime(),c,i)?e:t.error("date."+s,{limit:l.date,value:e})},args:[{name:"date",ref:!0,normalize:e=>"now"===e?e:i.parse(e),assert:e=>null!==e,message:"must have a valid date format"}]},format:{method(e){return a(["iso","javascript","unix"].includes(e),"Unknown date format",e),this.$_setFlag("format",e)}},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{date:e},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{date:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{date:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{date:e},operator:">="})}},timestamp:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"javascript";return a(["javascript","unix"].includes(e),'"type" must be one of "javascript, unix"'),this.format(e)}}},cast:{number:{from:i.isDate,to:(e,t)=>e.getTime()},string:{from:i.isDate,to(e,t){let{prefs:r}=t;return s.date(e,r)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),i.parse=function(e,t){if(e instanceof Date)return e;if("string"!=typeof e&&(isNaN(e)||!isFinite(e)))return null;if(/^\s*$/.test(e))return null;if("iso"===t)return o.isIsoDate(e)?i.date(e.toString()):null;const r=e;if("string"==typeof e&&/^[+-]?\d+(\.\d+)?$/.test(e)&&(e=parseFloat(e)),t){if("javascript"===t)return i.date(1*e);if("unix"===t)return i.date(1e3*e);if("string"==typeof r)return null}return i.date(e)},i.date=function(e){const t=new Date(e);return isNaN(t.getTime())?null:t}},390:(e,t,r)=>{"use strict";const a=r(375),n=r(7824);e.exports=n.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(e){return a(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:e}})},validate(e,t,r){let{n:a}=r;return e.length===a?e:t.error("function.arity",{n:a})}},class:{method(){return this.$_addRule("class")},validate:(e,t)=>/^\s*class\s/.test(e.toString())?e:t.error("function.class",{value:e})},minArity:{method(e){return a(Number.isSafeInteger(e)&&e>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:e}})},validate(e,t,r){let{n:a}=r;return e.length>=a?e:t.error("function.minArity",{n:a})}},maxArity:{method(e){return a(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:e}})},validate(e,t,r){let{n:a}=r;return e.length<=a?e:t.error("function.maxArity",{n:a})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(e,t,r)=>{"use strict";const a=r(978),n=r(375),o=r(8571),s=r(3652),i=r(8068),l=r(8160),c=r(3292),u=r(6354),d=r(6133),p=r(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};e.exports=i.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(e,t)=>e.keys(t),validate(e,t){let{schema:r,error:a,state:n,prefs:o}=t;if(!e||typeof e!==r.$_property("typeof")||Array.isArray(e))return{value:e,errors:a("object.base",{type:r.$_property("typeof")})};if(!(r.$_terms.renames||r.$_terms.dependencies||r.$_terms.keys||r.$_terms.patterns||r.$_terms.externals))return;e=g.clone(e,o);const s=[];if(r.$_terms.renames&&!g.rename(r,e,n,o,s))return{value:e,errors:s};if(!r.$_terms.keys&&!r.$_terms.patterns&&!r.$_terms.dependencies)return{value:e,errors:s};const i=new Set(Object.keys(e));if(r.$_terms.keys){const t=[e,...n.ancestors];for(const a of r.$_terms.keys){const r=a.key,l=e[r];i.delete(r);const c=n.localize([...n.path,r],t,a),u=a.schema.$_validate(l,c,o);if(u.errors){if(o.abortEarly)return{value:e,errors:u.errors};void 0!==u.value&&(e[r]=u.value),s.push(...u.errors)}else"strip"===a.schema._flags.result||void 0===u.value&&void 0!==l?delete e[r]:void 0!==u.value&&(e[r]=u.value)}}if(i.size||r._flags._hasPatternMatch){const t=g.unknown(r,e,i,s,n,o);if(t)return t}if(r.$_terms.dependencies)for(const t of r.$_terms.dependencies){if(null!==t.key&&!1===g.isPresent(t.options)(t.key.resolve(e,n,o,null,{shadow:!1})))continue;const a=g.dependencies[t.rel](r,t,e,n,o);if(a){const t=r.$_createError(a.code,e,a.context,n,o);if(o.abortEarly)return{value:e,errors:t};s.push(t)}}return{value:e,errors:s}},rules:{and:{method(){for(var e=arguments.length,t=new Array(e),r=0;r!e.hasOwnProperty(t.key))):new g.Keys;for(const r in e)l.tryWithPath((()=>t.$_terms.keys.push({key:r,schema:this.$_compile(e[r])})),r)}else t.$_terms.keys=new g.Keys;else t.$_terms.keys=null;return t.$_mutateRebuild()}},length:{method(e){return this.$_addRule({name:"length",args:{limit:e},operator:"="})},validate(e,t,r,a){let{limit:n}=r,{name:o,operator:s,args:i}=a;return l.compare(Object.keys(e).length,n,s)?e:t.error("object."+o,{limit:i.limit,value:e})},args:[{name:"limit",ref:!0,assert:l.limit,message:"must be a positive integer"}]},max:{method(e){return this.$_addRule({name:"max",method:"length",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"length",args:{limit:e},operator:">="})}},nand:{method(){for(var e=arguments.length,t=new Array(e),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};const a=e instanceof RegExp;a||(e=this.$_compile(e,{appendPath:!0})),n(void 0!==t,"Invalid rule"),l.assertOptions(r,["fallthrough","matches"]),a&&n(!e.flags.includes("g")&&!e.flags.includes("y"),"pattern should not use global or sticky mode"),t=this.$_compile(t,{appendPath:!0});const o=this.clone();o.$_terms.patterns=o.$_terms.patterns||[];const s={[a?"regex":"schema"]:e,rule:t};return r.matches&&(s.matches=this.$_compile(r.matches),"array"!==s.matches.type&&(s.matches=s.matches.$_root.array().items(s.matches)),o.$_mutateRegister(s.matches),o.$_setFlag("_hasPatternMatch",!0,{clone:!1})),r.fallthrough&&(s.fallthrough=!0),o.$_terms.patterns.push(s),o.$_mutateRegister(t),o}},ref:{method(){return this.$_addRule("ref")},validate:(e,t)=>d.isRef(e)?e:t.error("object.refType",{value:e})},regex:{method(){return this.$_addRule("regex")},validate:(e,t)=>e instanceof RegExp?e:t.error("object.regex",{value:e})},rename:{method(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n("string"==typeof e||e instanceof RegExp,"Rename missing the from argument"),n("string"==typeof t||t instanceof p,"Invalid rename to argument"),n(t!==e,"Cannot rename key to same name:",e),l.assertOptions(r,["alias","ignoreUndefined","override","multiple"]);const o=this.clone();o.$_terms.renames=o.$_terms.renames||[];for(const t of o.$_terms.renames)n(t.from!==e,"Cannot rename the same key multiple times");return t instanceof p&&o.$_mutateRegister(t),o.$_terms.renames.push({from:e,to:t,options:a(g.renameDefaults,r)}),o}},schema:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:e}})},validate(e,t,r){let{type:a}=r;return!l.isSchema(e)||"any"!==a&&e.type!==a?t.error("object.schema",{type:a}):e}},unknown:{method(e){return this.$_setFlag("unknown",!1!==e)}},with:{method(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return g.dependency(this,"with",e,t,r)}},without:{method(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return g.dependency(this,"without",e,t,r)}},xor:{method(){for(var e=arguments.length,t=new Array(e),r=0;rt.add(r,{after:r.schema.$_rootReferences(),group:r.key})),r.key);e.$_terms.keys=new g.Keys(...t.nodes)}},manifest:{build(e,t){if(t.keys&&(e=e.keys(t.keys)),t.dependencies)for(const{rel:r,key:a=null,peers:n,options:o}of t.dependencies)e=g.dependency(e,r,a,n,o);if(t.patterns)for(const{regex:r,schema:a,rule:n,fallthrough:o,matches:s}of t.patterns)e=e.pattern(r||a,n,{fallthrough:o,matches:s});if(t.renames)for(const{from:r,to:a,options:n}of t.renames)e=e.rename(r,a,n);return e}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(e,t){if("object"==typeof e){if(t.nonEnumerables)return o(e,{shallow:!0});const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e),r}const r=function(){for(var t=arguments.length,r=new Array(t),a=0;a1&&"object"==typeof a[a.length-1]?a.pop():{}),l.assertOptions(o,["separator","isPresent"]),a=[].concat(a);const s=l.default(o.separator,"."),i=[];for(const e of a)n("string"==typeof e,t,"peers must be strings"),i.push(c.ref(e,{separator:s,ancestor:0,prefix:!1}));null!==r&&(r=c.ref(r,{separator:s,ancestor:0,prefix:!1}));const u=e.clone();return u.$_terms.dependencies=u.$_terms.dependencies||[],u.$_terms.dependencies.push(new g.Dependency(t,r,i,a,o)),u},g.dependencies={and(e,t,r,a,n){const o=[],s=[],i=t.peers.length,l=g.isPresent(t.options);for(const e of t.peers)!1===l(e.resolve(r,a,n,null,{shadow:!1}))?o.push(e.key):s.push(e.key);if(o.length!==i&&s.length!==i)return{code:"object.and",context:{present:s,presentWithLabels:g.keysToLabels(e,s),missing:o,missingWithLabels:g.keysToLabels(e,o)}}},nand(e,t,r,a,n){const o=[],s=g.isPresent(t.options);for(const e of t.peers)s(e.resolve(r,a,n,null,{shadow:!1}))&&o.push(e.key);if(o.length!==t.peers.length)return;const i=t.paths[0],l=t.paths.slice(1);return{code:"object.nand",context:{main:i,mainWithLabel:g.keysToLabels(e,i),peers:l,peersWithLabels:g.keysToLabels(e,l)}}},or(e,t,r,a,n){const o=g.isPresent(t.options);for(const e of t.peers)if(o(e.resolve(r,a,n,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:t.paths,peersWithLabels:g.keysToLabels(e,t.paths)}}},oxor(e,t,r,a,n){const o=[],s=g.isPresent(t.options);for(const e of t.peers)s(e.resolve(r,a,n,null,{shadow:!1}))&&o.push(e.key);if(!o.length||1===o.length)return;const i={peers:t.paths,peersWithLabels:g.keysToLabels(e,t.paths)};return i.present=o,i.presentWithLabels=g.keysToLabels(e,o),{code:"object.oxor",context:i}},with(e,t,r,a,n){const o=g.isPresent(t.options);for(const s of t.peers)if(!1===o(s.resolve(r,a,n,null,{shadow:!1})))return{code:"object.with",context:{main:t.key.key,mainWithLabel:g.keysToLabels(e,t.key.key),peer:s.key,peerWithLabel:g.keysToLabels(e,s.key)}}},without(e,t,r,a,n){const o=g.isPresent(t.options);for(const s of t.peers)if(o(s.resolve(r,a,n,null,{shadow:!1})))return{code:"object.without",context:{main:t.key.key,mainWithLabel:g.keysToLabels(e,t.key.key),peer:s.key,peerWithLabel:g.keysToLabels(e,s.key)}}},xor(e,t,r,a,n){const o=[],s=g.isPresent(t.options);for(const e of t.peers)s(e.resolve(r,a,n,null,{shadow:!1}))&&o.push(e.key);if(1===o.length)return;const i={peers:t.paths,peersWithLabels:g.keysToLabels(e,t.paths)};return 0===o.length?{code:"object.missing",context:i}:(i.present=o,i.presentWithLabels=g.keysToLabels(e,o),{code:"object.xor",context:i})}},g.keysToLabels=function(e,t){return Array.isArray(t)?t.map((t=>e.$_mapLabels(t))):e.$_mapLabels(t)},g.isPresent=function(e){return"function"==typeof e.isPresent?e.isPresent:e=>void 0!==e},g.rename=function(e,t,r,a,n){const o={};for(const s of e.$_terms.renames){const i=[],l="string"!=typeof s.from;if(l)for(const e in t){if(void 0===t[e]&&s.options.ignoreUndefined)continue;if(e===s.to)continue;const r=s.from.exec(e);r&&i.push({from:e,to:s.to,match:r})}else!Object.prototype.hasOwnProperty.call(t,s.from)||void 0===t[s.from]&&s.options.ignoreUndefined||i.push(s);for(const c of i){const i=c.from;let u=c.to;if(u instanceof p&&(u=u.render(t,r,a,c.match)),i!==u){if(!s.options.multiple&&o[u]&&(n.push(e.$_createError("object.rename.multiple",t,{from:i,to:u,pattern:l},r,a)),a.abortEarly))return!1;if(Object.prototype.hasOwnProperty.call(t,u)&&!s.options.override&&!o[u]&&(n.push(e.$_createError("object.rename.override",t,{from:i,to:u,pattern:l},r,a)),a.abortEarly))return!1;void 0===t[i]?delete t[u]:t[u]=t[i],o[u]=!0,s.options.alias||delete t[i]}}}return!0},g.unknown=function(e,t,r,a,n,o){if(e.$_terms.patterns){let s=!1;const i=e.$_terms.patterns.map((e=>{if(e.matches)return s=!0,[]})),l=[t,...n.ancestors];for(const s of r){const c=t[s],u=[...n.path,s];for(let d=0;d{"use strict";const a=r(375),n=r(8068),o=r(8160),s=r(3292),i=r(6354),l={};e.exports=n.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(e,t)=>e.ref(t),validate(e,t){let{schema:r,state:n,prefs:o}=t;a(r.$_terms.link,"Uninitialized link schema");const s=l.generate(r,e,n,o),i=r.$_terms.link[0].ref;return s.$_validate(e,n.nest(s,`link:${i.display}:${s.type}`),o)},generate:(e,t,r,a)=>l.generate(e,t,r,a),rules:{ref:{method(e){a(!this.$_terms.link,"Cannot reinitialize schema"),e=s.ref(e),a("value"===e.type||"local"===e.type,"Invalid reference type:",e.type),a("local"===e.type||"root"===e.ancestor||e.ancestor>0,"Link cannot reference itself");const t=this.clone();return t.$_terms.link=[{ref:e}],t}},relative:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("relative",e)}}},overrides:{concat(e){a(this.$_terms.link,"Uninitialized link schema"),a(o.isSchema(e),"Invalid schema object"),a("link"!==e.type,"Cannot merge type link with another link");const t=this.clone();return t.$_terms.whens||(t.$_terms.whens=[]),t.$_terms.whens.push({concat:e}),t.$_mutateRebuild()}},manifest:{build:(e,t)=>(a(t.link,"Invalid link description missing link"),e.ref(t.link))}}),l.generate=function(e,t,r,a){let n=r.mainstay.links.get(e);if(n)return n._generate(t,r,a).schema;const o=e.$_terms.link[0].ref,{perspective:s,path:i}=l.perspective(o,r);l.assert(s,"which is outside of schema boundaries",o,e,r,a);try{n=i.length?s.$_reach(i):s}catch(t){l.assert(!1,"to non-existing schema",o,e,r,a)}return l.assert("link"!==n.type,"which is another link",o,e,r,a),e._flags.relative||r.mainstay.links.set(e,n),n._generate(t,r,a).schema},l.perspective=function(e,t){if("local"===e.type){for(const{schema:r,key:a}of t.schemas){if((r._flags.id||a)===e.path[0])return{perspective:r,path:e.path.slice(1)};if(r.$_terms.shared)for(const t of r.$_terms.shared)if(t._flags.id===e.path[0])return{perspective:t,path:e.path.slice(1)}}return{perspective:null,path:null}}return"root"===e.ancestor?{perspective:t.schemas[t.schemas.length-1].schema,path:e.path}:{perspective:t.schemas[e.ancestor]&&t.schemas[e.ancestor].schema,path:e.path}},l.assert=function(e,t,r,n,o,s){e||a(!1,`"${i.label(n._flags,o,s)}" contains link reference "${r.display}" ${t}`)}},3832:(e,t,r)=>{"use strict";const a=r(375),n=r(8068),o=r(8160),s={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};e.exports=n.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,t){let{schema:r,error:a}=t;if(!e.match(s.numberRx))return;e=e.trim();const n={value:parseFloat(e)};if(0===n.value&&(n.value=0),!r._flags.unsafe)if(e.match(/e/i)){if(s.extractSignificantDigits(e)!==s.extractSignificantDigits(String(n.value)))return n.errors=a("number.unsafe"),n}else{const t=n.value.toString();if(t.match(/e/i))return n;if(t!==s.normalizeDecimal(e))return n.errors=a("number.unsafe"),n}return n}},validate(e,t){let{schema:r,error:a,prefs:n}=t;if(e===1/0||e===-1/0)return{value:e,errors:a("number.infinity")};if(!o.isNumber(e))return{value:e,errors:a("number.base")};const s={value:e};if(n.convert){const e=r.$_getRule("precision");if(e){const t=Math.pow(10,e.args.limit);s.value=Math.round(s.value*t)/t}}return 0===s.value&&(s.value=0),!r._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e"})}},integer:{method(){return this.$_addRule("integer")},validate:(e,t)=>Math.trunc(e)-e==0?e:t.error("number.integer")},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{limit:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{limit:e},operator:">="})}},multiple:{method(e){return this.$_addRule({name:"multiple",args:{base:e}})},validate(e,t,r,a){let{base:n}=r;return e*(1/n)%1==0?e:t.error("number.multiple",{multiple:a.args.base,value:e})},args:[{name:"base",ref:!0,assert:e=>"number"==typeof e&&isFinite(e)&&e>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(e,t)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:t.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(e){return a(Number.isSafeInteger(e),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:e}})},validate(e,t,r){let{limit:a}=r;const n=e.toString().match(s.precisionRx);return Math.max((n[1]?n[1].length:0)-(n[2]?parseInt(n[2],10):0),0)<=a?e:t.error("number.precision",{limit:a,value:e})},convert:!0},sign:{method(e){return a(["negative","positive"].includes(e),"Invalid sign",e),this.$_addRule({name:"sign",args:{sign:e}})},validate(e,t,r){let{sign:a}=r;return"negative"===a&&e<0||"positive"===a&&e>0?e:t.error(`number.${a}`)}},unsafe:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"enabled must be a boolean"),this.$_setFlag("unsafe",e)}}},cast:{string:{from:e=>"number"==typeof e,to:(e,t)=>e.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),s.extractSignificantDigits=function(e){return e.replace(s.exponentialPartRegex,"").replace(s.dotRegex,"").replace(s.trailingZerosRegex,"").replace(s.leadingSignAndZerosRegex,"")},s.normalizeDecimal=function(e){return(e=e.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&e.endsWith("0")&&(e=e.replace(/0+$/,"")),"-0"===e?"0":e}},8966:(e,t,r)=>{"use strict";const a=r(7824);e.exports=a.extend({type:"object",cast:{map:{from:e=>e&&"object"==typeof e,to:(e,t)=>new Map(Object.entries(e))}}})},7417:(e,t,r)=>{"use strict";const a=r(375),n=r(5380),o=r(1745),s=r(9959),i=r(6064),l=r(9926),c=r(5752),u=r(8068),d=r(8160),p={tlds:l instanceof Set&&{tlds:{allow:l,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:s.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};e.exports=u.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(e,t){let{schema:r,state:a,prefs:n}=t;const o=r.$_getRule("normalize");o&&(e=e.normalize(o.args.form));const s=r.$_getRule("case");s&&(e="upper"===s.args.direction?e.toLocaleUpperCase():e.toLocaleLowerCase());const i=r.$_getRule("trim");if(i&&i.args.enabled&&(e=e.trim()),r.$_terms.replacements)for(const t of r.$_terms.replacements)e=e.replace(t.pattern,t.replacement);const l=r.$_getRule("hex");if(l&&l.args.options.byteAligned&&e.length%2!=0&&(e=`0${e}`),r.$_getRule("isoDate")){const t=p.isoDate(e);t&&(e=t)}if(r._flags.truncate){const t=r.$_getRule("max");if(t){let o=t.args.limit;if(d.isResolvable(o)&&(o=o.resolve(e,a,n),!d.limit(o)))return{value:e,errors:r.$_createError("any.ref",o,{ref:t.args.limit,arg:"limit",reason:"must be a positive integer"},a,n)};e=e.slice(0,o)}}return{value:e}}},validate(e,t){let{schema:r,error:a}=t;if("string"!=typeof e)return{value:e,errors:a("string.base")};if(""===e){const t=r.$_getRule("min");if(t&&0===t.args.limit)return;return{value:e,errors:a("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(e,t)=>/^[a-zA-Z0-9]+$/.test(e)?e:t.error("string.alphanum")},base64:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.assertOptions(e,["paddingRequired","urlSafe"]),e={urlSafe:!1,paddingRequired:!0,...e},a("boolean"==typeof e.paddingRequired,"paddingRequired must be boolean"),a("boolean"==typeof e.urlSafe,"urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:e}})},validate(e,t,r){let{options:a}=r;return p.base64Regex[a.paddingRequired][a.urlSafe].test(e)?e:t.error("string.base64")}},case:{method(e){return a(["lower","upper"].includes(e),"Invalid case:",e),this.$_addRule({name:"case",args:{direction:e}})},validate(e,t,r){let{direction:a}=r;return"lower"===a&&e===e.toLocaleLowerCase()||"upper"===a&&e===e.toLocaleUpperCase()?e:t.error(`string.${a}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(e,t){let r=e.length,a=0,n=1;for(;r--;){const t=e.charAt(r)*n;a+=t-9*(t>9),n^=3}return a>0&&a%10==0?e:t.error("string.creditCard")}},dataUri:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.assertOptions(e,["paddingRequired"]),e={paddingRequired:!0,...e},a("boolean"==typeof e.paddingRequired,"paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:e}})},validate(e,t,r){let{options:a}=r;const n=e.match(p.dataUriRegex);if(n){if(!n[2])return e;if("base64"!==n[2])return e;if(p.base64Regex[a.paddingRequired].false.test(n[3]))return e}return t.error("string.dataUri")}},domain:{method(e){e&&d.assertOptions(e,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const t=p.addressOptions(e);return this.$_addRule({name:"domain",args:{options:e},address:t})},validate(e,t,r,a){let{address:o}=a;return n.isValid(e,o)?e:t.error("string.domain")}},email:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),a(void 0===e.multiple||"boolean"==typeof e.multiple,"multiple option must be an boolean");const t=p.addressOptions(e),r=new RegExp(`\\s*[${e.separator?i(e.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:e},regex:r,address:t})},validate(e,t,r,a){let{options:n}=r,{regex:s,address:i}=a;const l=n.multiple?e.split(s):[e],c=[];for(const e of l)o.isValid(e,i)||c.push(e);return c.length?t.error("string.email",{value:e,invalids:c}):e}},guid:{alias:"uuid",method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["version","separator"]);let t="";if(e.version){const r=[].concat(e.version);a(r.length>=1,"version must have at least 1 valid version specified");const n=new Set;for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return d.assertOptions(e,["byteAligned"]),e={byteAligned:!1,...e},a("boolean"==typeof e.byteAligned,"byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:e}})},validate(e,t,r){let{options:a}=r;return p.hexRegex.test(e)?a.byteAligned&&e.length%2!=0?t.error("string.hexAlign"):e:t.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(e,t)=>n.isValid(e,{minDomainSegments:1})||p.ipRegex.test(e)?e:t.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["cidr","version"]);const{cidr:t,versions:r,regex:a}=s.regex(e),n=e.version?r:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:t,version:n}},regex:a})},validate(e,t,r,a){let{options:n}=r,{regex:o}=a;return o.test(e)?e:n.version?t.error("string.ipVersion",{value:e,cidr:n.cidr,version:n.version}):t.error("string.ip",{value:e,cidr:n.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(e,t){let{error:r}=t;return p.isoDate(e)?e:r("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(e,t)=>p.isoDurationRegex.test(e)?e:t.error("string.isoDuration")},length:{method(e,t){return p.length(this,"length",e,"=",t)},validate(e,t,r,a){let{limit:n,encoding:o}=r,{name:s,operator:i,args:l}=a;const c=!o&&e.length;return d.compare(c,n,i)?e:t.error("string."+s,{limit:l.limit,value:e,encoding:o})},args:[{name:"limit",ref:!0,assert:d.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(e,t){return p.length(this,"max",e,"<=",t)},args:["limit","encoding"]},min:{method(e,t){return p.length(this,"min",e,">=",t)},args:["limit","encoding"]},normalize:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"NFC";return a(p.normalizationForms.includes(e),"normalization form must be one of "+p.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:e}})},validate(e,t,r){let{error:a}=t,{form:n}=r;return e===e.normalize(n)?e:a("string.normalize",{value:e,form:n})},convert:!0},pattern:{alias:"regex",method(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(e instanceof RegExp,"regex must be a RegExp"),a(!e.flags.includes("g")&&!e.flags.includes("y"),"regex should not use global or sticky mode"),"string"==typeof t&&(t={name:t}),d.assertOptions(t,["invert","name"]);const r=["string.pattern",t.invert?".invert":"",t.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:e,options:t},errorCode:r})},validate(e,t,r,a){let{regex:n,options:o}=r,{errorCode:s}=a;return n.test(e)^o.invert?e:t.error(s,{name:o.name,regex:n,value:e})},args:["regex","options"],multi:!0},replace:{method(e,t){"string"==typeof e&&(e=new RegExp(i(e),"g")),a(e instanceof RegExp,"pattern must be a RegExp"),a("string"==typeof t,"replacement must be a String");const r=this.clone();return r.$_terms.replacements||(r.$_terms.replacements=[]),r.$_terms.replacements.push({pattern:e,replacement:t}),r}},token:{method(){return this.$_addRule("token")},validate:(e,t)=>/^\w+$/.test(e)?e:t.error("string.token")},trim:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:e}})},validate(e,t,r){let{enabled:a}=r;return a&&e!==e.trim()?t.error("string.trim"):e},convert:!0},truncate:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"enabled must be a boolean"),this.$_setFlag("truncate",e)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),e.domain&&d.assertOptions(e.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:t,scheme:r}=c.regex(e),a=e.domain?p.addressOptions(e.domain):null;return this.$_addRule({name:"uri",args:{options:e},regex:t,domain:a,scheme:r})},validate(e,t,r,a){let{options:o}=r,{regex:s,domain:i,scheme:l}=a;if(["http:/","https:/"].includes(e))return t.error("string.uri");const c=s.exec(e);if(c){const r=c[1]||c[2];return!i||o.allowRelative&&!r||n.isValid(r,i)?e:t.error("string.domain",{value:r})}return o.relativeOnly?t.error("string.uriRelativeOnly"):o.scheme?t.error("string.uriCustomScheme",{scheme:l,value:e}):t.error("string.uri")}}},manifest:{build(e,t){if(t.replacements)for(const{pattern:r,replacement:a}of t.replacements)e=e.replace(r,a);return e}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),p.addressOptions=function(e){if(!e)return e;if(a(void 0===e.minDomainSegments||Number.isSafeInteger(e.minDomainSegments)&&e.minDomainSegments>0,"minDomainSegments must be a positive integer"),a(void 0===e.maxDomainSegments||Number.isSafeInteger(e.maxDomainSegments)&&e.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),!1===e.tlds)return e;if(!0===e.tlds||void 0===e.tlds)return a(p.tlds,"Built-in TLD list disabled"),Object.assign({},e,p.tlds);a("object"==typeof e.tlds,"tlds must be true, false, or an object");const t=e.tlds.deny;if(t)return Array.isArray(t)&&(e=Object.assign({},e,{tlds:{deny:new Set(t)}})),a(e.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),a(!e.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),p.validateTlds(e.tlds.deny,"tlds.deny"),e;const r=e.tlds.allow;return r?!0===r?(a(p.tlds,"Built-in TLD list disabled"),Object.assign({},e,p.tlds)):(Array.isArray(r)&&(e=Object.assign({},e,{tlds:{allow:new Set(r)}})),a(e.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),p.validateTlds(e.tlds.allow,"tlds.allow"),e):e},p.validateTlds=function(e,t){for(const r of e)a(n.isValid(r,{minDomainSegments:1,maxDomainSegments:1}),`${t} must contain valid top level domain names`)},p.isoDate=function(e){if(!d.isIsoDate(e))return null;/.*T.*[+-]\d\d$/.test(e)&&(e+="00");const t=new Date(e);return isNaN(t.getTime())?null:t.toISOString()},p.length=function(e,t,r,n,o){return a(!o||!1,"Invalid encoding:",o),e.$_addRule({name:t,method:"length",args:{limit:r,encoding:o},operator:n})}},8826:(e,t,r)=>{"use strict";const a=r(375),n=r(8068),o={};o.Map=class extends Map{slice(){return new o.Map(this)}},e.exports=n.extend({type:"symbol",terms:{map:{init:new o.Map}},coerce:{method(e,t){let{schema:r,error:a}=t;const n=r.$_terms.map.get(e);return n&&(e=n),r._flags.only&&"symbol"!=typeof e?{value:e,errors:a("symbol.map",{map:r.$_terms.map})}:{value:e}}},validate(e,t){let{error:r}=t;if("symbol"!=typeof e)return{value:e,errors:r("symbol.base")}},rules:{map:{method(e){e&&!e[Symbol.iterator]&&"object"==typeof e&&(e=Object.entries(e)),a(e&&e[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),r=[];for(const n of e){a(n&&n[Symbol.iterator],"Entry must be an iterable");const[e,o]=n;a("object"!=typeof e&&"function"!=typeof e&&"symbol"!=typeof e,"Key must not be of type object, function, or Symbol"),a("symbol"==typeof o,"Value must be a Symbol"),t.$_terms.map.set(e,o),r.push(o)}return t.valid(...r)}}},manifest:{build:(e,t)=>(t.map&&(e=e.map(t.map)),e)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(738),s=r(9621),i=r(8160),l=r(6354),c=r(493),u={result:Symbol("result")};t.entry=function(e,t,r){let n=i.defaults;r&&(a(void 0===r.warnings,"Cannot override warnings preference in synchronous validation"),a(void 0===r.artifacts,"Cannot override artifacts preference in synchronous validation"),n=i.preferences(i.defaults,r));const o=u.entry(e,t,n);a(!o.mainstay.externals.length,"Schema with external rules must use validateAsync()");const s={value:o.value};return o.error&&(s.error=o.error),o.mainstay.warnings.length&&(s.warning=l.details(o.mainstay.warnings)),o.mainstay.debug&&(s.debug=o.mainstay.debug),o.mainstay.artifacts&&(s.artifacts=o.mainstay.artifacts),s},t.entryAsync=async function(e,t,r){let a=i.defaults;r&&(a=i.preferences(i.defaults,r));const n=u.entry(e,t,a),o=n.mainstay;if(n.error)throw o.debug&&(n.error.debug=o.debug),n.error;if(o.externals.length){let t=n.value;const c=[];for(const n of o.externals){const d=n.state.path,p="link"===n.schema.type?o.links.get(n.schema):null;let g,m,f=t;const w=d.length?[t]:[],y=d.length?s(e,d):e;if(d.length){g=d[d.length-1];let e=t;for(const t of d.slice(0,-1))e=e[t],w.unshift(e);m=w[0],f=m[g]}try{const e=(e,t)=>(p||n.schema).$_createError(e,f,t,n.state,a),s=await n.method(f,{schema:n.schema,linked:p,state:n.state,prefs:r,original:y,error:e,errorsArray:u.errorsArray,warn:(e,t)=>o.warnings.push((p||n.schema).$_createError(e,f,t,n.state,a)),message:(e,t)=>(p||n.schema).$_createError("external",f,t,n.state,a,{messages:e})});if(void 0===s||s===f)continue;if(s instanceof l.Report){if(o.tracer.log(n.schema,n.state,"rule","external","error"),c.push(s),a.abortEarly)break;continue}if(Array.isArray(s)&&s[i.symbols.errors]){if(o.tracer.log(n.schema,n.state,"rule","external","error"),c.push(...s),a.abortEarly)break;continue}m?(o.tracer.value(n.state,"rule",f,s,"external"),m[g]=s):(o.tracer.value(n.state,"rule",t,s,"external"),t=s)}catch(e){throw a.errors.label&&(e.message+=` (${n.label})`),e}}if(n.value=t,c.length)throw n.error=l.process(c,e,a),o.debug&&(n.error.debug=o.debug),n.error}if(!a.warnings&&!a.debug&&!a.artifacts)return n.value;const c={value:n.value};return o.warnings.length&&(c.warning=l.details(o.warnings)),o.debug&&(c.debug=o.debug),o.artifacts&&(c.artifacts=o.artifacts),c},u.Mainstay=class{constructor(e,t,r){this.externals=[],this.warnings=[],this.tracer=e,this.debug=t,this.links=r,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const e=this._snapshots.pop();this.externals=e.externals,this.warnings=e.warnings}commit(){this._snapshots.pop()}},u.entry=function(e,r,a){const{tracer:n,cleanup:o}=u.tracer(r,a),s=a.debug?[]:null,i=r._ids._schemaChain?new Map:null,d=new u.Mainstay(n,s,i),p=r._ids._schemaChain?[{schema:r}]:null,g=new c([],[],{mainstay:d,schemas:p}),m=t.validate(e,r,g,a);o&&r.$_root.untrace();const f=l.process(m.errors,e,a);return{value:m.value,error:f,mainstay:d}},u.tracer=function(e,t){return e.$_root._tracer?{tracer:e.$_root._tracer._register(e)}:t.debug?(a(e.$_root.trace,"Debug mode not supported"),{tracer:e.$_root.trace()._register(e),cleanup:!0}):{tracer:u.ignore}},t.validate=function(e,t,r,a){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(t.$_terms.whens&&(t=t._generate(e,r,a).schema),t._preferences&&(a=u.prefs(t,a)),t._cache&&a.cache){const a=t._cache.get(e);if(r.mainstay.tracer.debug(r,"validate","cached",!!a),a)return a}const o=(n,o,s)=>t.$_createError(n,e,o,s||r,a),s={original:e,prefs:a,schema:t,state:r,error:o,errorsArray:u.errorsArray,warn:(e,t,a)=>r.mainstay.warnings.push(o(e,t,a)),message:(n,o)=>t.$_createError("custom",e,o,r,a,{messages:n})};r.mainstay.tracer.entry(t,r);const l=t._definition;if(l.prepare&&void 0!==e&&a.convert){const t=l.prepare(e,s);if(t){if(r.mainstay.tracer.value(r,"prepare",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),s);e=t.value}}if(l.coerce&&void 0!==e&&a.convert&&(!l.coerce.from||l.coerce.from.includes(typeof e))){const t=l.coerce.method(e,s);if(t){if(r.mainstay.tracer.value(r,"coerced",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),s);e=t.value}}const c=t._flags.empty;c&&c.$_match(u.trim(e,t),r.nest(c),i.defaults)&&(r.mainstay.tracer.value(r,"empty",e,void 0),e=void 0);const d=n.presence||t._flags.presence||(t._flags._endedSwitch?null:a.presence);if(void 0===e){if("forbidden"===d)return u.finalize(e,null,s);if("required"===d)return u.finalize(e,[t.$_createError("any.required",e,null,r,a)],s);if("optional"===d){if(t._flags.default!==i.symbols.deepDefault)return u.finalize(e,null,s);r.mainstay.tracer.value(r,"default",e,{}),e={}}}else if("forbidden"===d)return u.finalize(e,[t.$_createError("any.unknown",e,null,r,a)],s);const p=[];if(t._valids){const n=t._valids.get(e,r,a,t._flags.insensitive);if(n)return a.convert&&(r.mainstay.tracer.value(r,"valids",e,n.value),e=n.value),r.mainstay.tracer.filter(t,r,"valid",n),u.finalize(e,null,s);if(t._flags.only){const n=t.$_createError("any.only",e,{valids:t._valids.values({display:!0})},r,a);if(a.abortEarly)return u.finalize(e,[n],s);p.push(n)}}if(t._invalids){const n=t._invalids.get(e,r,a,t._flags.insensitive);if(n){r.mainstay.tracer.filter(t,r,"invalid",n);const o=t.$_createError("any.invalid",e,{invalids:t._invalids.values({display:!0})},r,a);if(a.abortEarly)return u.finalize(e,[o],s);p.push(o)}}if(l.validate){const t=l.validate(e,s);if(t&&(r.mainstay.tracer.value(r,"base",e,t.value),e=t.value,t.errors)){if(!Array.isArray(t.errors))return p.push(t.errors),u.finalize(e,p,s);if(t.errors.length)return p.push(...t.errors),u.finalize(e,p,s)}}return t._rules.length?u.rules(e,p,s):u.finalize(e,p,s)},u.rules=function(e,t,r){const{schema:a,state:n,prefs:o}=r;for(const s of a._rules){const l=a._definition.rules[s.method];if(l.convert&&o.convert){n.mainstay.tracer.log(a,n,"rule",s.name,"full");continue}let c,d=s.args;if(s._resolve.length){d=Object.assign({},d);for(const t of s._resolve){const r=l.argsByName.get(t),s=d[t].resolve(e,n,o),u=r.normalize?r.normalize(s):s,p=i.validateArg(u,null,r);if(p){c=a.$_createError("any.ref",s,{arg:t,ref:d[t],reason:p},n,o);break}d[t]=u}}c=c||l.validate(e,r,d,s);const p=u.rule(c,s);if(p.errors){if(n.mainstay.tracer.log(a,n,"rule",s.name,"error"),s.warn){n.mainstay.warnings.push(...p.errors);continue}if(o.abortEarly)return u.finalize(e,p.errors,r);t.push(...p.errors)}else n.mainstay.tracer.log(a,n,"rule",s.name,"pass"),n.mainstay.tracer.value(n,"rule",e,p.value,s.name),e=p.value}return u.finalize(e,t,r)},u.rule=function(e,t){return e instanceof l.Report?(u.error(e,t),{errors:[e],value:null}):Array.isArray(e)&&e[i.symbols.errors]?(e.forEach((e=>u.error(e,t))),{errors:e,value:null}):{errors:null,value:e}},u.error=function(e,t){return t.message&&e._setTemplate(t.message),e},u.finalize=function(e,t,r){t=t||[];const{schema:n,state:o,prefs:s}=r;if(t.length){const a=u.default("failover",void 0,t,r);void 0!==a&&(o.mainstay.tracer.value(o,"failover",e,a),e=a,t=[])}if(t.length&&n._flags.error)if("function"==typeof n._flags.error){t=n._flags.error(t),Array.isArray(t)||(t=[t]);for(const e of t)a(e instanceof Error||e instanceof l.Report,"error() must return an Error object")}else t=[n._flags.error];if(void 0===e){const a=u.default("default",e,t,r);o.mainstay.tracer.value(o,"default",e,a),e=a}if(n._flags.cast&&void 0!==e){const t=n._definition.cast[n._flags.cast];if(t.from(e)){const a=t.to(e,r);o.mainstay.tracer.value(o,"cast",e,a,n._flags.cast),e=a}}if(n.$_terms.externals&&s.externals&&!1!==s._externals)for(const{method:e}of n.$_terms.externals)o.mainstay.externals.push({method:e,schema:n,state:o,label:l.label(n._flags,o,s)});const i={value:e,errors:t.length?t:null};return n._flags.result&&(i.value="strip"===n._flags.result?void 0:r.original,o.mainstay.tracer.value(o,n._flags.result,e,i.value),o.shadow(e,n._flags.result)),n._cache&&!1!==s.cache&&!n._refs.length&&n._cache.set(r.original,i),void 0===e||i.errors||void 0===n._flags.artifact||(o.mainstay.artifacts=o.mainstay.artifacts||new Map,o.mainstay.artifacts.has(n._flags.artifact)||o.mainstay.artifacts.set(n._flags.artifact,[]),o.mainstay.artifacts.get(n._flags.artifact).push(o.path)),i},u.prefs=function(e,t){const r=t===i.defaults;return r&&e._preferences[i.symbols.prefs]?e._preferences[i.symbols.prefs]:(t=i.preferences(t,e._preferences),r&&(e._preferences[i.symbols.prefs]=t),t)},u.default=function(e,t,r,a){const{schema:o,state:s,prefs:l}=a,c=o._flags[e];if(l.noDefaults||void 0===c)return t;if(s.mainstay.tracer.log(o,s,"rule",e,"full"),!c)return c;if("function"==typeof c){const i=c.length?[n(s.ancestors[0]),a]:[];try{return c(...i)}catch(t){return void r.push(o.$_createError(`any.${e}`,null,{error:t},s,l))}}return"object"!=typeof c?c:c[i.symbols.literal]?c.literal:i.isResolvable(c)?c.resolve(t,s,l):n(c)},u.trim=function(e,t){if("string"!=typeof e)return e;const r=t.$_getRule("trim");return r&&r.args.enabled?e.trim():e},u.ignore={active:!1,debug:o,entry:o,filter:o,log:o,resolve:o,value:o},u.errorsArray=function(){const e=[];return e[i.symbols.errors]=!0,e}},2036:(e,t,r)=>{"use strict";const a=r(375),n=r(9474),o=r(8160),s={};e.exports=s.Values=class{constructor(e,t){this._values=new Set(e),this._refs=new Set(t),this._lowercase=s.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,t){o.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),t&&t.register(e)):this.has(e,null,null,!1)||(this._values.add(e),"string"==typeof e&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,t,r){if(e=e||new s.Values,t){if(t._override)return t.clone();for(const r of[...t._values,...t._refs])e.add(r)}if(r)for(const t of[...r._values,...r._refs])e.remove(t);return e.length?e:null}remove(e){o.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),"string"==typeof e&&this._lowercase.delete(e.toLowerCase()))}has(e,t,r,a){return!!this.get(e,t,r,a)}get(e,t,r,a){if(!this.length)return!1;if(this._values.has(e))return{value:e};if("string"==typeof e&&e&&a){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&"object"!=typeof e)return!1;if("object"==typeof e)for(const t of this._values)if(n(t,e))return{value:t};if(t)for(const o of this._refs){const s=o.resolve(e,t,r,null,{in:!0});if(void 0===s)continue;const i=o.in&&"object"==typeof s?Array.isArray(s)?s:Object.keys(s):[s];for(const t of i)if(typeof t==typeof e)if(a&&e&&"string"==typeof e){if(t.toLowerCase()===e.toLowerCase())return{value:t,ref:o}}else if(n(t,e))return{value:t,ref:o}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const e=[];for(const t of[...this._values,...this._refs])void 0!==t&&e.push(t);return e}return Array.from([...this._values,...this._refs])}clone(){const e=new s.Values(this._values,this._refs);return e._override=this._override,e}concat(e){a(!e._override,"Cannot concat override set of values");const t=new s.Values([...this._values,...e._values],[...this._refs,...e._refs]);return t._override=this._override,t}describe(){const e=[];this._override&&e.push({override:!0});for(const t of this._values.values())e.push(t&&"object"==typeof t?{value:t}:t);for(const t of this._refs.values())e.push(t.describe());return e}},s.Values.prototype[o.symbols.values]=!0,s.Values.prototype.slice=s.Values.prototype.clone,s.lowercases=function(e){const t=new Map;if(e)for(const r of e)"string"==typeof r&&t.set(r.toLowerCase(),r);return t}},978:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(1687),s=r(9621),i={};e.exports=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(a(e&&"object"==typeof e,"Invalid defaults value: must be an object"),a(!t||!0===t||"object"==typeof t,"Invalid source value: must be true, falsy or an object"),a("object"==typeof r,"Invalid options: must be an object"),!t)return null;if(r.shallow)return i.applyToDefaultsWithShallow(e,t,r);const s=n(e);if(!0===t)return s;const l=void 0!==r.nullOverride&&r.nullOverride;return o(s,t,{nullOverride:l,mergeArrays:!1})},i.applyToDefaultsWithShallow=function(e,t,r){const l=r.shallow;a(Array.isArray(l),"Invalid keys");const c=new Map,u=!0===t?null:new Set;for(let r of l){r=Array.isArray(r)?r:r.split(".");const a=s(e,r);a&&"object"==typeof a?c.set(a,u&&s(t,r)||a):u&&u.add(r)}const d=n(e,{},c);if(!u)return d;for(const e of u)i.reachCopy(d,t,e);const p=void 0!==r.nullOverride&&r.nullOverride;return o(d,t,{nullOverride:p,mergeArrays:!1})},i.reachCopy=function(e,t,r){for(const e of r){if(!(e in t))return;const r=t[e];if("object"!=typeof r||null===r)return;t=r}const a=t;let n=e;for(let e=0;e{"use strict";const a=r(7916);e.exports=function(e){if(!e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{"use strict";const a=r(9621),n=r(4277),o=r(7043),s={needsProtoHack:new Set([n.set,n.map,n.weakSet,n.weakMap])};e.exports=s.clone=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("object"!=typeof e||null===e)return e;let a=s.clone,i=r;if(t.shallow){if(!0!==t.shallow)return s.cloneWithShallow(e,t);a=e=>e}else if(i){const t=i.get(e);if(t)return t}else i=new Map;const l=n.getInternalProto(e);if(l===n.buffer)return!1;if(l===n.date)return new Date(e.getTime());if(l===n.regex)return new RegExp(e);const c=s.base(e,l,t);if(c===e)return e;if(i&&i.set(e,c),l===n.set)for(const r of e)c.add(a(r,t,i));else if(l===n.map)for(const[r,n]of e)c.set(r,a(n,t,i));const u=o.keys(e,t);for(const r of u){if("__proto__"===r)continue;if(l===n.array&&"length"===r){c.length=e.length;continue}const o=Object.getOwnPropertyDescriptor(e,r);o?o.get||o.set?Object.defineProperty(c,r,o):o.enumerable?c[r]=a(e[r],t,i):Object.defineProperty(c,r,{enumerable:!1,writable:!0,configurable:!0,value:a(e[r],t,i)}):Object.defineProperty(c,r,{enumerable:!0,writable:!0,configurable:!0,value:a(e[r],t,i)})}return c},s.cloneWithShallow=function(e,t){const r=t.shallow;(t=Object.assign({},t)).shallow=!1;const n=new Map;for(const t of r){const r=a(e,t);"object"!=typeof r&&"function"!=typeof r||n.set(r,r)}return s.clone(e,t,n)},s.base=function(e,t,r){if(!1===r.prototype)return s.needsProtoHack.has(t)?new t.constructor:t===n.array?[]:{};const a=Object.getPrototypeOf(e);if(a&&a.isImmutable)return e;if(t===n.array){const e=[];return a!==t&&Object.setPrototypeOf(e,a),e}if(s.needsProtoHack.has(t)){const e=new a.constructor;return a!==t&&Object.setPrototypeOf(e,a),e}return Object.create(a)}},9474:(e,t,r)=>{"use strict";const a=r(4277),n={mismatched:null};e.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!n.isDeepEqual(e,t,r,[])},n.isDeepEqual=function(e,t,r,o){if(e===t)return 0!==e||1/e==1/t;const s=typeof e;if(s!==typeof t)return!1;if(null===e||null===t)return!1;if("function"===s){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if("object"!==s)return e!=e&&t!=t;const i=n.getSharedType(e,t,!!r.prototype);switch(i){case a.buffer:return!1;case a.promise:return e===t;case a.regex:return e.toString()===t.toString();case n.mismatched:return!1}for(let r=o.length-1;r>=0;--r)if(o[r].isSame(e,t))return!0;o.push(new n.SeenEntry(e,t));try{return!!n.isDeepEqualObj(i,e,t,r,o)}finally{o.pop()}},n.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?n.mismatched:a.getInternalProto(e);const o=a.getInternalProto(e);return o!==a.getInternalProto(t)?n.mismatched:o},n.valueOf=function(e){const t=e.valueOf;if(void 0===t)return e;try{return t.call(e)}catch(e){return e}},n.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)},n.isSetSimpleEqual=function(e,t){for(const r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0},n.isDeepEqualObj=function(e,t,r,o,s){const{isDeepEqual:i,valueOf:l,hasOwnEnumerableProperty:c}=n,{keys:u,getOwnPropertySymbols:d}=Object;if(e===a.array){if(!o.part){if(t.length!==r.length)return!1;for(let e=0;e{"use strict";const a=r(8761);e.exports=class extends Error{constructor(e){super(e.filter((e=>""!==e)).map((e=>"string"==typeof e?e:e instanceof Error?e.message:a(e))).join(" ")||"Unknown error"),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t.assert)}}},5277:e=>{"use strict";const t={};e.exports=function(e){if(!e)return"";let r="";for(let a=0;a=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)},t.isSafe=function(e){return t.safeCharCodes.has(e)},t.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),t.safeCharCodes=function(){const e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||32===t||46===t||44===t||45===t||58===t||95===t)&&e.add(t);return e}()},6064:e=>{"use strict";e.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:e=>{"use strict";e.exports=function(){}},1687:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(7043),s={};e.exports=s.merge=function(e,t,r){if(a(e&&"object"==typeof e,"Invalid target value: must be an object"),a(null==t||"object"==typeof t,"Invalid source value: must be null, undefined, or an object"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){a(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let a=0;a{"use strict";const a=r(375),n={};e.exports=function(e,t,r){if(!1===t||null==t)return e;"string"==typeof(r=r||{})&&(r={separator:r});const o=Array.isArray(t);a(!o||!r.separator,"Separator option is not valid for array-based chain");const s=o?t:t.split(r.separator||".");let i=e;for(let e=0;e{"use strict";e.exports=function(){try{return JSON.stringify(...arguments)}catch(e){return"[Cannot display object: "+e.message+"]"}}},4277:(e,t)=>{"use strict";const r={};t=e.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},r.typeMap=new Map([["[object Error]",t.error],["[object Map]",t.map],["[object Promise]",t.promise],["[object Set]",t.set],["[object WeakMap]",t.weakMap],["[object WeakSet]",t.weakSet]]),t.getInternalProto=function(e){if(Array.isArray(e))return t.array;if(e instanceof Date)return t.date;if(e instanceof RegExp)return t.regex;if(e instanceof Error)return t.error;const a=Object.prototype.toString.call(e);return r.typeMap.get(a)||t.generic}},7043:(e,t)=>{"use strict";t.keys=function(e){return!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).symbols?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}},3652:(e,t,r)=>{"use strict";const a=r(375),n={};t.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(e,t){const r=[].concat((t=t||{}).before||[]),n=[].concat(t.after||[]),o=t.group||"?",s=t.sort||0;a(!r.includes(o),`Item cannot come before itself: ${o}`),a(!r.includes("?"),"Item cannot come before unassociated items"),a(!n.includes(o),`Item cannot come after itself: ${o}`),a(!n.includes("?"),"Item cannot come after unassociated items"),Array.isArray(e)||(e=[e]);for(const t of e){const e={seq:this._items.length,sort:s,before:r,after:n,group:o,node:t};this._items.push(e)}if(!t.manual){const e=this._sort();a(e,"item","?"!==o?`added into group ${o}`:"","created a dependencies error")}return this.nodes}merge(e){Array.isArray(e)||(e=[e]);for(const t of e)if(t)for(const e of t._items)this._items.push(Object.assign({},e));this._items.sort(n.mergeSort);for(let e=0;ee.sort===t.sort?0:e.sort{"use strict";const a=r(443),n=r(2178),o={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:a.URL||URL};t.analyze=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return n.code("DOMAIN_NON_EMPTY_STRING");if("string"!=typeof e)throw new Error("Invalid input: domain must be a string");if(e.length>256)return n.code("DOMAIN_TOO_LONG");if(o.nonAsciiRx.test(e)){if(!1===t.allowUnicode)return n.code("DOMAIN_INVALID_UNICODE_CHARS");e=e.normalize("NFC")}if(o.domainControlRx.test(e))return n.code("DOMAIN_INVALID_CHARS");e=o.punycode(e),t.allowFullyQualified&&"."===e[e.length-1]&&(e=e.slice(0,-1));const r=t.minDomainSegments||o.minDomainSegments,a=e.split(".");if(a.lengtht.maxDomainSegments)return n.code("DOMAIN_SEGMENTS_COUNT_MAX");const s=t.tlds;if(s){const e=a[a.length-1].toLowerCase();if(s.deny&&s.deny.has(e)||s.allow&&!s.allow.has(e))return n.code("DOMAIN_FORBIDDEN_TLDS")}for(let e=0;e63)return n.code("DOMAIN_LONG_SEGMENT");if(e{"use strict";const a=r(9848),n=r(5380),o=r(2178),s={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(a.TextEncoder||TextEncoder)};t.analyze=function(e,t){return s.email(e,t)},t.isValid=function(e,t){return!s.email(e,t)},s.email=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw new Error("Invalid input: email must be a string");if(!e)return o.code("EMPTY_STRING");const r=!s.nonAsciiRx.test(e);if(!r){if(!1===t.allowUnicode)return o.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const a=e.split("@");if(2!==a.length)return a.length>2?o.code("MULTIPLE_AT_CHAR"):o.code("MISSING_AT_CHAR");const[i,l]=a;if(!i)return o.code("EMPTY_LOCAL");if(!t.ignoreLength){if(e.length>254)return o.code("ADDRESS_TOO_LONG");if(s.encoder.encode(i).length>64)return o.code("LOCAL_TOO_LONG")}return s.local(i,r)||n.analyze(l,t)},s.local=function(e,t){const r=e.split(".");for(const e of r){if(!e.length)return o.code("EMPTY_LOCAL_SEGMENT");if(t){if(!s.atextRx.test(e))return o.code("INVALID_LOCAL_CHARS")}else for(const t of e){if(s.atextRx.test(t))continue;const e=s.binary(t);if(!s.atomRx.test(e))return o.code("INVALID_LOCAL_CHARS")}}},s.binary=function(e){return Array.from(s.encoder.encode(e)).map((e=>String.fromCharCode(e))).join("")},s.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,s.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(e,t)=>{"use strict";t.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},t.code=function(e){return{code:e,error:t.codes[e]}}},9959:(e,t,r)=>{"use strict";const a=r(375),n=r(5752);t.regex=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(void 0===e.cidr||"string"==typeof e.cidr,"options.cidr must be a string");const t=e.cidr?e.cidr.toLowerCase():"optional";a(["required","optional","forbidden"].includes(t),"options.cidr must be one of required, optional, forbidden"),a(void 0===e.version||"string"==typeof e.version||Array.isArray(e.version),"options.version must be a string or an array of string");let r=e.version||["ipv4","ipv6","ipvfuture"];Array.isArray(r)||(r=[r]),a(r.length>=1,"options.version must have at least 1 version specified");for(let e=0;e{if("forbidden"===t)return n.ip[e];const r=`\\/${"ipv4"===e?n.ip.v4Cidr:n.ip.v6Cidr}`;return"required"===t?`${n.ip[e]}${r}`:`${n.ip[e]}(?:${r})?`})).join("|")})`,s=new RegExp(`^${o}$`);return{cidr:t,versions:r,regex:s,raw:o}}},5752:(e,t,r)=>{"use strict";const a=r(375),n=r(6064),o={generate:function(){const e={},t="\\dA-Fa-f",r="["+t+"]",a="\\w-\\.~",n="!\\$&'\\(\\)\\*\\+,;=",o="%"+t,s=a+o+n+":@",i="["+s+"]",l="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";e.ipv4address="(?:"+l+"\\.){3}"+l;const c=r+"{1,4}",u="(?:"+c+":"+c+"|"+e.ipv4address+")",d="(?:"+c+":){6}"+u,p="::(?:"+c+":){5}"+u,g="(?:"+c+")?::(?:"+c+":){4}"+u,m="(?:(?:"+c+":){0,1}"+c+")?::(?:"+c+":){3}"+u,f="(?:(?:"+c+":){0,2}"+c+")?::(?:"+c+":){2}"+u,w="(?:(?:"+c+":){0,3}"+c+")?::"+c+":"+u,y="(?:(?:"+c+":){0,4}"+c+")?::"+u,b="(?:(?:"+c+":){0,5}"+c+")?::"+c,h="(?:(?:"+c+":){0,6}"+c+")?::";e.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",e.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",e.ipv6address="(?:"+d+"|"+p+"|"+g+"|"+m+"|"+f+"|"+w+"|"+y+"|"+b+"|"+h+")",e.ipvFuture="v"+r+"+\\.["+a+n+":]+",e.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",e.schemeRegex=new RegExp(e.scheme);const _="["+a+o+n+":]*",v="["+a+o+n+"]{1,255}",k="(?:\\[(?:"+e.ipv6address+"|"+e.ipvFuture+")\\]|"+e.ipv4address+"|"+v+")",R="(?:"+_+"@)?"+k+"(?::\\d*)?",P="(?:"+_+"@)?("+k+")(?::\\d*)?",C=i+"*",j=i+"+",q="(?:\\/"+C+")*",S="\\/(?:"+j+q+")?",A=j+q,E="["+a+o+n+"@]+"+q,H="(?:\\/\\/\\/"+C+q+")";return e.hierPart="(?:(?:\\/\\/"+R+q+")|"+S+"|"+A+"|"+H+")",e.hierPartCapture="(?:(?:\\/\\/"+P+q+")|"+S+"|"+A+")",e.relativeRef="(?:(?:\\/\\/"+R+q+")|"+S+"|"+E+"|)",e.relativeRefCapture="(?:(?:\\/\\/"+P+q+")|"+S+"|"+E+"|)",e.query="["+s+"\\/\\?]*(?=#|$)",e.queryWithSquareBrackets="["+s+"\\[\\]\\/\\?]*(?=#|$)",e.fragment="["+s+"\\/\\?]*",e}};o.rfc3986=o.generate(),t.ip={v4Cidr:o.rfc3986.ipv4Cidr,v6Cidr:o.rfc3986.ipv6Cidr,ipv4:o.rfc3986.ipv4address,ipv6:o.rfc3986.ipv6address,ipvfuture:o.rfc3986.ipvFuture},o.createRegex=function(e){const t=o.rfc3986,r="(?:\\?"+(e.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",s=e.domain?t.relativeRefCapture:t.relativeRef;if(e.relativeOnly)return o.wrap(s+r);let i="";if(e.scheme){a(e.scheme instanceof RegExp||"string"==typeof e.scheme||Array.isArray(e.scheme),"scheme must be a RegExp, String, or Array");const r=[].concat(e.scheme);a(r.length>=1,"scheme must have at least 1 scheme specified");const o=[];for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return e.scheme||e.allowRelative||e.relativeOnly||e.allowQuerySquareBrackets||e.domain?o.createRegex(e):o.uriRegex}},1447:(e,t)=>{"use strict";const r={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};t.Parser=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t[r.settings]&&t.constants)for(const e in t.constants){const r=t.constants[e];if(null!==r&&!["boolean","number","string"].includes(typeof r))throw new Error(`Formula constant ${e} contains invalid ${typeof r} value type`)}this.settings=t[r.settings]?t:Object.assign({[r.settings]:!0,constants:{},functions:{}},t),this.single=null,this._parts=null,this._parse(e)}_parse(e){let a=[],n="",o=0,s=!1;const i=e=>{if(o)throw new Error("Formula missing closing parenthesis");const i=a.length?a[a.length-1]:null;if(s||n||e){if(i&&"reference"===i.type&&")"===e)return i.type="function",i.value=this._subFormula(n,i.value),void(n="");if(")"===e){const e=new t.Parser(n,this.settings);a.push({type:"segment",value:e})}else if(s){if("]"===s)return a.push({type:"reference",value:n}),void(n="");a.push({type:"literal",value:n})}else if(r.operatorCharacters.includes(n))i&&"operator"===i.type&&r.operators.includes(i.value+n)?i.value+=n:a.push({type:"operator",value:n});else if(n.match(r.numberRx))a.push({type:"constant",value:parseFloat(n)});else if(void 0!==this.settings.constants[n])a.push({type:"constant",value:this.settings.constants[n]});else{if(!n.match(r.tokenRx))throw new Error(`Formula contains invalid token: ${n}`);a.push({type:"reference",value:n})}n=""}};for(const t of e)s?t===s?(i(),s=!1):n+=t:o?"("===t?(n+=t,++o):")"===t?(--o,o?n+=t:i(t)):n+=t:t in r.literals?s=r.literals[t]:"("===t?(i(),++o):r.operatorCharacters.includes(t)?(i(),n=t,i()):" "!==t?n+=t:i();i(),a=a.map(((e,t)=>"operator"!==e.type||"-"!==e.value||t&&"operator"!==a[t-1].type?e:{type:"operator",value:"n"}));let l=!1;for(const e of a){if("operator"===e.type){if(r.operatorsPrefix.includes(e.value))continue;if(!l)throw new Error("Formula contains an operator in invalid position");if(!r.operators.includes(e.value))throw new Error(`Formula contains an unknown operator ${e.value}`)}else if(l)throw new Error("Formula missing expected operator");l=!l}if(!l)throw new Error("Formula contains invalid trailing operator");1===a.length&&["reference","literal","constant"].includes(a[0].type)&&(this.single={type:"reference"===a[0].type?"reference":"value",value:a[0].value}),this._parts=a.map((e=>{if("operator"===e.type)return r.operatorsPrefix.includes(e.value)?e:e.value;if("reference"!==e.type)return e.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(e.value))throw new Error(`Formula contains invalid reference ${e.value}`);return this.settings.reference?this.settings.reference(e.value):r.reference(e.value)}))}_subFormula(e,a){const n=this.settings.functions[a];if("function"!=typeof n)throw new Error(`Formula contains unknown function ${a}`);let o=[];if(e){let t="",n=0,s=!1;const i=()=>{if(!t)throw new Error(`Formula contains function ${a} with invalid arguments ${e}`);o.push(t),t=""};for(let a=0;anew t.Parser(e,this.settings))),function(e){const t=[];for(const r of o)t.push(r.evaluate(e));return n.call(e,...t)}}evaluate(e){const t=this._parts.slice();for(let a=t.length-2;a>=0;--a){const n=t[a];if(n&&"operator"===n.type){const o=t[a+1];t.splice(a+1,1);const s=r.evaluate(o,e);t[a]=r.single(n.value,s)}}return r.operatorsOrder.forEach((a=>{for(let n=1;n":return t>a;case">=":return t>=a;case"==":return t===a;case"!=":return t!==a;case"&&":return t&&a;case"||":return t||a}return null},r.exists=function(e){return null!=e}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:e=>{"use strict";e.exports=JSON.parse('{"version":"17.11.0"}')}},t={},function r(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,r),o.exports}(5107);var e,t},e.exports=t()},2043:function(e,t,r){var a,n;!function(o,s){"use strict";a=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"];function n(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(t,r){for(var n=0;n=0&&r<=i.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==n&&function(e){var r=(a[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),s.call(i,r,e),typeof console===t&&r{"use strict";const a=r(610),n=r(4020),o=r(500),s=r(2806),i=Symbol("encodeFragmentIdentifier");function l(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,t){return t.encode?t.strict?a(e):encodeURIComponent(e):e}function u(e,t){return t.decode?n(e):e}function d(e){return Array.isArray(e)?e.sort():"object"==typeof e?d(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 m(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){l((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,a)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===a[e]&&(a[e]={}),a[e][t[1]]=r):a[e]=r};case"bracket":return(e,r,a)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==a[e]?a[e]=[].concat(a[e],r):a[e]=[r]:a[e]=r};case"colon-list-separator":return(e,r,a)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==a[e]?a[e]=[].concat(a[e],r):a[e]=[r]:a[e]=r};case"comma":case"separator":return(t,r,a)=>{const n="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!n&&u(r,e).includes(e.arrayFormatSeparator);r=o?u(r,e):r;const s=n||o?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);a[t]=s};case"bracket-separator":return(t,r,a)=>{const n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n)return void(a[t]=r?u(r,e):r);const o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==a[t]?a[t]=[].concat(a[t],o):a[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),a=Object.create(null);if("string"!=typeof e)return a;if(!(e=e.trim().replace(/^[?#&]/,"")))return a;for(const n of e.split("&")){if(""===n)continue;let[e,s]=o(t.decode?n.replace(/\+/g," "):n,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:u(s,t),r(u(e,t),s,a)}for(const e of Object.keys(a)){const r=a[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=m(r[e],t);else a[e]=m(r,t)}return!1===t.sort?a:(!0===t.sort?Object.keys(a).sort():Object.keys(a).sort(t.sort)).reduce(((e,t)=>{const r=a[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=d(r):e[t]=r,e}),Object.create(null))}t.extract=g,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";l((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],a=function(e){switch(e.arrayFormat){case"index":return t=>(r,a)=>{const n=r.length;return void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[c(t,e),"[",n,"]"].join("")]:[...r,[c(t,e),"[",c(n,e),"]=",c(a,e)].join("")]};case"bracket":return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[c(t,e),"[]"].join("")]:[...r,[c(t,e),"[]=",c(a,e)].join("")];case"colon-list-separator":return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[c(t,e),":list="].join("")]:[...r,[c(t,e),":list=",c(a,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(a,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?a:(n=null===n?"":n,0===a.length?[[c(r,e),t,c(n,e)].join("")]:[[a,c(n,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,c(t,e)]:[...r,[c(t,e),"=",c(a,e)].join("")]}}(t),n={};for(const t of Object.keys(e))r(t)||(n[t]=e[t]);const o=Object.keys(n);return!1!==t.sort&&o.sort(t.sort),o.map((r=>{const n=e[r];return void 0===n?"":null===n?c(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?c(r,t)+"[]":n.reduce(a(r),[]).join("&"):c(r,t)+"="+c(n,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,a]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:f(g(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:u(a,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[i]:!0},r);const a=p(e.url).split("?")[0]||"",n=t.extract(e.url),o=t.parse(n,{sort:!1}),s=Object.assign(o,e.query);let l=t.stringify(s,r);l&&(l=`?${l}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[i]?c(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${a}${l}${u}`},t.pick=(e,r,a)=>{a=Object.assign({parseFragmentIdentifier:!0,[i]:!1},a);const{url:n,query:o,fragmentIdentifier:l}=t.parseUrl(e,a);return t.stringifyUrl({url:n,query:s(o,r),fragmentIdentifier:l},a)},t.exclude=(e,r,a)=>{const n=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,n,a)}},500: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 r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},610:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},7886:(e,t,r)=>{const{fdkAxios:a}=r(2638),{convertStringToBase64:n}=r(5860);e.exports=class{static execute(e,t,r,o,s,i,l){let c={Authorization:"Bearer "+n(`${e.applicationID}:${e.applicationToken}`)};e.cookie&&(c={...c,cookie:e.cookie}),e.locationDetails&&(c={...c,"x-location-detail":JSON.stringify(e.locationDetails)}),e.currencyCode&&(c={...c,"x-currency-code":e.currencyCode});const u=e.extraHeaders.reduce(((e,t)=>({...e,...t})),{});let d={method:t,url:r,params:o,data:s,headers:{...c,...u,...i},responseHeaders:l.responseHeaders};return d=JSON.parse(JSON.stringify(d)),a.request(d)}}},9007:(e,t,r)=>{const a=r(2403),n=r(4196),o=r(737),s=r(4113),i=r(5970),l=r(4976),c=r(8568),u=r(562),d=r(4203),p=r(9171),g=r(3242),m=r(4823),f=r(4107),w=r(3740),y=r(4683),b=r(9792),{FDKClientValidationError:h}=r(7208);e.exports=class{constructor(e){this.config=e,this.cart=new a(e),this.catalog=new n(e),this.common=new o(e),this.communication=new s(e),this.configuration=new i(e),this.content=new l(e),this.fileStorage=new c(e),this.lead=new u(e),this.logistic=new d(e),this.order=new p(e),this.payment=new g(e),this.posCart=new m(e),this.rewards=new f(e),this.share=new w(e),this.theme=new y(e),this.user=new b(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 h("Currency code should be string only");this.config.currencyCode=e}setExtraHeaders(e){if("object"!=typeof e)throw new h("Context value should be an object");this.config.extraHeaders.push(e)}}},6894:(e,t,r)=>{const{FDKInvalidCredentialError:a}=r(7208),{Logger:n,setLoggerLevel:o}=r(7378);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){o(e.toUpperCase()),this.logLevel=e.toUpperCase()}setCookie(e){this.cookie=e}validate(){if(!this.applicationID)throw n({level:"ERROR",message:"No Application ID Present"}),new a("No Application ID Present");if(!this.applicationToken)throw n({level:"ERROR",message:"No Application Token Present"}),new a("No Application Token Present");if(this.applicationToken.length<5)throw n({level:"ERROR",message:"Invalid Application Token"}),new a("Invalid Application Token");if("boolean"!=typeof this.options.strictResponseCheck)throw n({level:"ERROR",message:"Invalid Application Token"}),n({level:"ERROR",message:"Invalid Value for options.strictResponseCheck, provide boolean value"}),new a("Invalid Value for options.strictResponseCheck, provide boolean value")}}},2403:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(6206)),l=r(7350),{Logger:c}=r(7378),u=r(2705);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",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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addAddress({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.addAddress().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.addAddress().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > addAddress \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.addAddress,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SaveAddressResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Cart > addAddress \n ${m}`})}return p}async addItems({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.addItems().validate({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.addItems().validate({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > addItems \n ${w}`});const y={};y.i=t,y.b=r,y.area_code=u,y.buy_now=d,y.id=p;const b=await a.execute(this._conf,"post",s({url:this._urls.addItems,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.AddCartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > addItems \n ${_}`})}return b}async applyCoupon({body:e,i:t,b:r,p:u,id:d,buyNow:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.applyCoupon().validate({body:e,i:t,b:r,p:u,id:d,buyNow:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.applyCoupon().validate({body:e,i:t,b:r,p:u,id:d,buyNow:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > applyCoupon \n ${w}`});const y={};y.i=t,y.b=r,y.p=u,y.id=d,y.buy_now=p;const b=await a.execute(this._conf,"post",s({url:this._urls.applyCoupon,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.CartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > applyCoupon \n ${_}`})}return b}async applyRewardPoints({body:e,id:t,i:r,b:u,buyNow:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.applyRewardPoints().validate({body:e,id:t,i:r,b:u,buyNow:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:f}=i.applyRewardPoints().validate({body:e,id:t,i:r,b:u,buyNow:d},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > applyRewardPoints \n ${f}`});const w={};w.id=t,w.i=r,w.b=u,w.buy_now=d;const y=await a.execute(this._conf,"post",s({url:this._urls.applyRewardPoints,params:{}}),w,e,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.CartDetailResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > Cart > applyRewardPoints \n ${h}`})}return y}async checkoutCart({body:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.checkoutCart().validate({body:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.checkoutCart().validate({body:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > checkoutCart \n ${p}`});const g={};g.buy_now=t;const m=await a.execute(this._conf,"post",s({url:this._urls.checkoutCart,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.CartCheckoutResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Cart > checkoutCart \n ${w}`})}return m}async checkoutCartV2({body:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.checkoutCartV2().validate({body:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.checkoutCartV2().validate({body:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > checkoutCartV2 \n ${p}`});const g={};g.buy_now=t;const m=await a.execute(this._conf,"post",s({url:this._urls.checkoutCartV2,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.CartCheckoutResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Cart > checkoutCartV2 \n ${w}`})}return m}async deleteCart({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.deleteCart().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.deleteCart().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > deleteCart \n ${d}`});const p={};p.id=e;const g=await a.execute(this._conf,"put",s({url:this._urls.deleteCart,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.DeleteCartDetailResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Cart > deleteCart \n ${f}`})}return g}async getAddressById({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:w}=i.getAddressById().validate({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:y}=i.getAddressById().validate({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getAddressById \n ${y}`});const b={};b.cart_id=t,b.buy_now=r,b.mobile_no=u,b.checkout_mode=d,b.tags=p,b.is_default=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getAddressById,params:{id:e}}),b,void 0,{...m},{responseHeaders:f});let _=h;f&&(_=h[0]);const{error:v}=l.Address().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getAddressById \n ${v}`})}return h}async getAddresses({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.getAddresses().validate({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.getAddresses().validate({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getAddresses \n ${w}`});const y={};y.cart_id=e,y.buy_now=t,y.mobile_no=r,y.checkout_mode=u,y.tags=d,y.is_default=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getAddresses,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.GetAddressesResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getAddresses \n ${_}`})}return b}async getBulkDiscountOffers({itemId:e,articleId:t,uid:r,slug:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getBulkDiscountOffers().validate({itemId:e,articleId:t,uid:r,slug:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getBulkDiscountOffers().validate({itemId:e,articleId:t,uid:r,slug:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getBulkDiscountOffers \n ${m}`});const f={};f.item_id=e,f.article_id=t,f.uid=r,f.slug=u;const w=await a.execute(this._conf,"get",s({url:this._urls.getBulkDiscountOffers,params:{}}),f,void 0,{...d},{responseHeaders:p});let y=w;p&&(y=w[0]);const{error:b}=l.BulkPriceResponse().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getBulkDiscountOffers \n ${b}`})}return w}async getCart({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:w}=i.getCart().validate({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:y}=i.getCart().validate({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCart \n ${y}`});const b={};b.id=e,b.i=t,b.b=r,b.c=u,b.assign_card_id=d,b.area_code=p,b.buy_now=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getCart,params:{}}),b,void 0,{...m},{responseHeaders:f});let _=h;f&&(_=h[0]);const{error:v}=l.CartDetailResponse().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCart \n ${v}`})}return h}async getCartLastModified({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:l}=i.getCartLastModified().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(l)return Promise.reject(new n(l));const{error:d}=i.getCartLastModified().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCartLastModified \n ${d}`});const p={};p.id=e;const g=await a.execute(this._conf,"head",s({url:this._urls.getCartLastModified,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=u.string().allow("").validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCartLastModified \n ${f}`})}return g}async getCartShareLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCartShareLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCartShareLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCartShareLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getCartShareLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetShareCartLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCartShareLink \n ${m}`})}return p}async getCartSharedItems({token:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCartSharedItems().validate({token:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCartSharedItems().validate({token:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCartSharedItems \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCartSharedItems,params:{token:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SharedCartResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCartSharedItems \n ${m}`})}return p}async getCoupons({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getCoupons().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getCoupons().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCoupons \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getCoupons,params:{}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.GetCouponResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCoupons \n ${w}`})}return m}async getItemCount({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getItemCount().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getItemCount().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getItemCount \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getItemCount,params:{}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.CartItemCountResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getItemCount \n ${w}`})}return m}async getLadderOffers({slug:e,storeId:t,promotionId:r,pageSize:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getLadderOffers().validate({slug:e,storeId:t,promotionId:r,pageSize:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getLadderOffers().validate({slug:e,storeId:t,promotionId:r,pageSize:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getLadderOffers \n ${m}`});const f={};f.slug=e,f.store_id=t,f.promotion_id=r,f.page_size=u;const w=await a.execute(this._conf,"get",s({url:this._urls.getLadderOffers,params:{}}),f,void 0,{...d},{responseHeaders:p});let y=w;p&&(y=w[0]);const{error:b}=l.LadderPriceOffers().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getLadderOffers \n ${b}`})}return w}async getPromotionOffers({slug:e,pageSize:t,promotionGroup:r,storeId:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getPromotionOffers().validate({slug:e,pageSize:t,promotionGroup:r,storeId:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getPromotionOffers().validate({slug:e,pageSize:t,promotionGroup:r,storeId:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getPromotionOffers \n ${m}`});const f={};f.slug=e,f.page_size=t,f.promotion_group=r,f.store_id=u;const w=await a.execute(this._conf,"get",s({url:this._urls.getPromotionOffers,params:{}}),f,void 0,{...d},{responseHeaders:p});let y=w;p&&(y=w[0]);const{error:b}=l.PromotionOffersResponse().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getPromotionOffers \n ${b}`})}return w}async getShipments({p:e,id:t,buyNow:r,addressId:u,areaCode:d,orderType:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.getShipments().validate({p:e,id:t,buyNow:r,addressId:u,areaCode:d,orderType:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.getShipments().validate({p:e,id:t,buyNow:r,addressId:u,areaCode:d,orderType:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getShipments \n ${w}`});const y={};y.p=e,y.id=t,y.buy_now=r,y.address_id=u,y.area_code=d,y.order_type=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getShipments,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.CartShipmentsResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getShipments \n ${_}`})}return b}async removeAddress({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.removeAddress().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.removeAddress().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > removeAddress \n ${d}`});const p=await a.execute(this._conf,"delete",s({url:this._urls.removeAddress,params:{id:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.DeleteAddressResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Cart > removeAddress \n ${m}`})}return p}async removeCoupon({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.removeCoupon().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.removeCoupon().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > removeCoupon \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"delete",s({url:this._urls.removeCoupon,params:{}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.CartDetailResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Cart > removeCoupon \n ${w}`})}return m}async selectAddress({body:e,cartId:t,buyNow:r,i:u,b:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.selectAddress().validate({body:e,cartId:t,buyNow:r,i:u,b:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:f}=i.selectAddress().validate({body:e,cartId:t,buyNow:r,i:u,b:d},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > selectAddress \n ${f}`});const w={};w.cart_id=t,w.buy_now=r,w.i=u,w.b=d;const y=await a.execute(this._conf,"post",s({url:this._urls.selectAddress,params:{}}),w,e,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.CartDetailResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > Cart > selectAddress \n ${h}`})}return y}async selectPaymentMode({body:e,id:t,buyNow:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.selectPaymentMode().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.selectPaymentMode().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > selectPaymentMode \n ${g}`});const m={};m.id=t,m.buy_now=r;const f=await a.execute(this._conf,"put",s({url:this._urls.selectPaymentMode,params:{}}),m,e,{...u},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=l.CartDetailResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > Cart > selectPaymentMode \n ${y}`})}return f}async updateAddress({id:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateAddress().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateAddress().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > updateAddress \n ${p}`});const g=await a.execute(this._conf,"put",s({url:this._urls.updateAddress,params:{id:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.UpdateAddressResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Cart > updateAddress \n ${f}`})}return g}async updateCart({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.updateCart().validate({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.updateCart().validate({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > updateCart \n ${w}`});const y={};y.id=t,y.i=r,y.b=u,y.area_code=d,y.buy_now=p;const b=await a.execute(this._conf,"put",s({url:this._urls.updateCart,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.UpdateCartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > updateCart \n ${_}`})}return b}async updateCartMeta({body:e,id:t,buyNow:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.updateCartMeta().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.updateCartMeta().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > updateCartMeta \n ${g}`});const m={};m.id=t,m.buy_now=r;const f=await a.execute(this._conf,"put",s({url:this._urls.updateCartMeta,params:{}}),m,e,{...u},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=l.CartMetaResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > Cart > updateCartMeta \n ${y}`})}return f}async updateCartWithSharedItems({token:e,action:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateCartWithSharedItems().validate({token:e,action:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateCartWithSharedItems().validate({token:e,action:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > updateCartWithSharedItems \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.updateCartWithSharedItems,params:{token:e,action:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.SharedCartResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Cart > updateCartWithSharedItems \n ${f}`})}return g}async validateCouponForPayment({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:f,type:w,cardId:y,requestHeaders:b}={requestHeaders:{}},{responseHeaders:h}={responseHeaders:!1}){const{error:_}=i.validateCouponForPayment().validate({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:f,type:w,cardId:y},{abortEarly:!1,allowUnknown:!0});if(_)return Promise.reject(new n(_));const{error:v}=i.validateCouponForPayment().validate({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:f,type:w,cardId:y},{abortEarly:!1,allowUnknown:!1});v&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > validateCouponForPayment \n ${v}`});const k={};k.id=e,k.buy_now=t,k.address_id=r,k.payment_mode=u,k.payment_identifier=d,k.aggregator_name=p,k.merchant_code=g,k.iin=m,k.network=f,k.type=w,k.card_id=y;const R=await a.execute(this._conf,"get",s({url:this._urls.validateCouponForPayment,params:{}}),k,void 0,{...b},{responseHeaders:h});let P=R;h&&(P=R[0]);const{error:C}=l.PaymentCouponValidate().validate(P,{abortEarly:!1,allowUnknown:!0});if(C){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(C));c({level:"WARN",message:`Response Validation Warnings for application > Cart > validateCouponForPayment \n ${C}`})}return R}}},7350:(e,t,r)=>{const a=r(2705);class n{static ActionQuery(){return a.object({product_slug:a.array().items(a.string().allow(""))})}static AddCartDetailResponse(){return a.object({cart:n.CartDetailResponse(),message:a.string().allow(""),partial:a.boolean(),success:a.boolean()})}static AddCartRequest(){return a.object({items:a.array().items(n.AddProductCart()),new_cart:a.boolean()})}static AddProductCart(){return a.object({_custom_json:a.any(),article_assignment:a.any(),article_id:a.string().allow(""),display:a.string().allow(""),extra_meta:a.any(),item_id:a.number(),item_size:a.string().allow(""),meta:a.any(),parent_item_identifiers:a.array().items(a.object().pattern(/\S/,a.string().allow(""))),pos:a.boolean(),product_group_tags:a.array().items(a.string().allow("").allow(null)),quantity:a.number(),seller_id:a.number(),store_id:a.number()})}static Address(){return a.object({_custom_json:a.any(),address:a.string().allow(""),address_type:a.string().allow(""),area:a.string().allow(""),area_code:a.string().allow(""),area_code_slug:a.string().allow(""),checkout_mode:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),country_code:a.string().allow(""),country_iso_code:a.string().allow(""),country_phone_code:a.string().allow(""),created_by_user_id:a.string().allow(""),email:a.string().allow(""),geo_location:n.GeoLocation(),google_map_point:a.any(),id:a.string().allow(""),is_active:a.boolean(),is_default_address:a.boolean(),landmark:a.string().allow(""),meta:a.any(),name:a.string().allow(""),phone:a.string().allow(""),state:a.string().allow(""),tags:a.array().items(a.string().allow("")),user_id:a.string().allow("")})}static AppliedFreeArticles(){return a.object({article_id:a.string().allow(""),free_gift_item_details:n.FreeGiftItem(),parent_item_identifier:a.string().allow(""),quantity:a.number()})}static AppliedPromotion(){return a.object({amount:a.number(),applied_free_articles:a.array().items(n.AppliedFreeArticles()),article_quantity:a.number(),buy_rules:a.array().items(n.BuyRules()),discount_rules:a.array().items(n.DiscountRulesApp()),mrp_promotion:a.boolean(),offer_text:a.string().allow(""),ownership:n.Ownership(),promo_id:a.string().allow(""),promotion_group:a.string().allow(""),promotion_name:a.string().allow(""),promotion_type:a.string().allow("")})}static ApplyCouponRequest(){return a.object({coupon_code:a.string().allow("").required()})}static ArticleGiftDetail(){return a.object({article_id:n.GiftDetail()})}static ArticlePriceInfo(){return a.object({base:n.BasePrice(),converted:n.BasePrice()})}static BaseInfo(){return a.object({name:a.string().allow(""),uid:a.number()})}static BasePrice(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number()})}static BulkPriceOffer(){return a.object({offers:a.array().items(n.OfferItem()),seller:n.OfferSeller()})}static BulkPriceResponse(){return a.object({data:a.array().items(n.BulkPriceOffer())})}static BuyRules(){return a.object({cart_conditions:a.any(),item_criteria:a.any()})}static CartBreakup(){return a.object({coupon:n.CouponBreakup(),display:a.array().items(n.DisplayBreakup()),loyalty_points:n.LoyaltyPoints(),raw:n.RawBreakup()})}static CartCheckoutCustomMeta(){return a.object({key:a.string().allow("").required(),value:a.string().allow("").required()})}static CartCheckoutDetailRequest(){return a.object({address_id:a.string().allow(""),aggregator:a.string().allow(""),billing_address:a.any(),billing_address_id:a.string().allow(""),callback_url:a.string().allow(""),custom_meta:a.array().items(n.CartCheckoutCustomMeta()),customer_details:a.any(),delivery_address:a.any(),extra_meta:a.any(),id:a.string().allow(""),merchant_code:a.string().allow(""),meta:a.any(),order_type:a.string().allow(""),ordering_store:a.number(),payment_auto_confirm:a.boolean(),payment_extra_identifiers:a.any(),payment_identifier:a.string().allow(""),payment_mode:a.string().allow("").required(),payment_params:a.any(),staff:n.StaffCheckout()})}static CartCheckoutDetailV2Request(){return a.object({address_id:a.string().allow(""),aggregator:a.string().allow(""),billing_address:a.any(),billing_address_id:a.string().allow(""),callback_url:a.string().allow("").allow(null),cart_id:a.string().allow(""),custom_meta:a.any(),customer_details:a.any().allow(null),delivery_address:a.any(),extra_meta:a.any(),id:a.string().allow("").allow(null),merchant_code:a.string().allow(""),meta:a.any(),order_type:a.string().allow(""),ordering_store:a.number().allow(null),payment_auto_confirm:a.boolean(),payment_identifier:a.string().allow("").allow(null),payment_methods:a.array().items(n.PaymentMethod()).required(),payment_mode:a.string().allow("").required(),payment_params:a.any().allow(null),staff:n.StaffCheckout()})}static CartCheckoutResponse(){return a.object({app_intercept_url:a.string().allow(""),callback_url:a.string().allow(""),cart:n.CheckCart(),data:a.any(),message:a.string().allow(""),order_id:a.string().allow(""),payment_confirm_url:a.string().allow(""),success:a.boolean()})}static CartCommonConfig(){return a.object({delivery_charges_config:n.DeliveryChargesConfig()})}static CartCurrency(){return a.object({code:a.string().allow(""),symbol:a.string().allow("")})}static CartDetailCoupon(){return a.object({cashback_amount:a.number(),cashback_message_primary:a.string().allow(""),cashback_message_secondary:a.string().allow(""),coupon_code:a.string().allow(""),coupon_description:a.string().allow(""),coupon_id:a.string().allow(""),coupon_subtitle:a.string().allow(""),coupon_title:a.string().allow(""),coupon_type:a.string().allow(""),coupon_value:a.number(),discount:a.number(),is_applied:a.boolean(),is_valid:a.boolean(),maximum_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number()})}static CartDetailResponse(){return a.object({applied_promo_details:a.array().items(n.AppliedPromotion()),breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),common_config:n.CartCommonConfig(),coupon:n.CartDetailCoupon(),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),notification:a.any(),pan_config:a.any(),pan_no:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),staff_user_id:a.string().allow(""),success:a.boolean(),uid:a.string().allow("")})}static CartItemCountResponse(){return a.object({user_cart_items_count:a.number()})}static CartMetaMissingResponse(){return a.object({errors:a.array().items(a.string().allow(""))})}static CartMetaRequest(){return a.object({checkout_mode:a.string().allow(""),comment:a.string().allow(""),delivery_slots:a.any(),gift_details:n.ArticleGiftDetail(),gstin:a.string().allow(""),pick_up_customer_details:a.any()})}static CartMetaResponse(){return a.object({is_valid:a.boolean(),message:a.string().allow("")})}static CartProduct(){return a.object({_custom_json:a.any(),action:n.ProductAction(),attributes:a.any(),brand:n.BaseInfo(),categories:a.array().items(n.CategoryInfo()),images:a.array().items(n.ProductImage()),item_code:a.string().allow("").allow(null),name:a.string().allow(""),slug:a.string().allow(""),tags:a.array().items(a.string().allow("")),teaser_tag:n.Tags(),type:a.string().allow(""),uid:a.number()})}static CartProductIdentifer(){return a.object({identifier:a.string().allow("")})}static CartProductInfo(){return a.object({article:n.ProductArticle(),availability:n.ProductAvailability(),bulk_offer:a.any(),coupon:n.CouponDetails(),coupon_message:a.string().allow(""),custom_order:a.any(),delivery_promise:n.ShipmentPromise(),discount:a.string().allow(""),identifiers:n.CartProductIdentifer().required(),is_set:a.boolean(),key:a.string().allow(""),message:a.string().allow(""),moq:a.any(),parent_item_identifiers:a.any(),price:n.ProductPriceInfo(),price_per_unit:n.ProductPricePerUnitInfo(),product:n.CartProduct(),product_ean_id:a.string().allow(""),promo_meta:n.PromoMeta(),promotions_applied:a.array().items(n.AppliedPromotion()),quantity:a.number()})}static CartShipmentsResponse(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),error:a.boolean(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),last_modified:a.string().allow(""),message:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),shipments:a.array().items(n.ShipmentResponse()),uid:a.string().allow("")})}static CategoryInfo(){return a.object({name:a.string().allow(""),uid:a.number()})}static ChargesThreshold(){return a.object({charges:a.number(),threshold:a.number()})}static CheckCart(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),cod_available:a.boolean(),cod_charges:a.number(),cod_message:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_charge_order_value:a.number(),delivery_charges:a.number(),delivery_promise:n.ShipmentPromise(),error_message:a.string().allow(""),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),order_id:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),store_code:a.string().allow(""),store_emps:a.array().items(a.any()),success:a.boolean(),uid:a.string().allow(""),user_type:a.string().allow("")})}static Coupon(){return a.object({coupon_code:a.string().allow(""),coupon_type:a.string().allow("").allow(null),coupon_value:a.number(),description:a.string().allow("").allow(null),expires_on:a.string().allow(""),is_applicable:a.boolean(),is_applied:a.boolean(),max_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number(),sub_title:a.string().allow(""),title:a.string().allow("")})}static CouponBreakup(){return a.object({code:a.string().allow(""),coupon_type:a.string().allow("").allow(null),coupon_value:a.number(),description:a.string().allow("").allow(null),is_applied:a.boolean(),max_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number(),sub_title:a.string().allow("").allow(null),title:a.string().allow("").allow(null),type:a.string().allow(""),uid:a.string().allow(""),value:a.number()})}static CouponDetails(){return a.object({code:a.string().allow(""),discount_single_quantity:a.number(),discount_total_quantity:a.number()})}static CouponValidity(){return a.object({code:a.string().allow("").allow(null),discount:a.number(),display_message_en:a.string().allow("").allow(null),next_validation_required:a.boolean().allow(null),title:a.string().allow(""),valid:a.boolean()})}static CurrencyInfo(){return a.object({code:a.string().allow(""),symbol:a.string().allow("")})}static CustomerDetails(){return a.object({email:a.string().allow(""),mobile:a.string().allow("").required(),name:a.string().allow("")})}static DeleteAddressResponse(){return a.object({id:a.string().allow(""),is_deleted:a.boolean()})}static DeleteCartDetailResponse(){return a.object({message:a.string().allow(""),success:a.boolean()})}static DeliveryChargesConfig(){return a.object({charges:a.array().items(n.ChargesThreshold()),enabled:a.boolean()})}static DiscountRulesApp(){return a.object({item_criteria:a.any(),matched_buy_rules:a.array().items(a.string().allow("")),offer:a.any(),raw_offer:a.any()})}static DisplayBreakup(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),display:a.string().allow(""),key:a.string().allow(""),message:a.array().items(a.string().allow("")),value:a.number()})}static FreeGiftItem(){return a.object({item_brand_name:a.string().allow(""),item_id:a.number(),item_images_url:a.array().items(a.string().allow("")),item_name:a.string().allow(""),item_price_details:a.any(),item_slug:a.string().allow("")})}static FreeGiftItems(){return a.object({item_brand_name:a.string().allow(""),item_id:a.number(),item_images_url:a.array().items(a.string().allow("")),item_name:a.string().allow(""),item_price_details:a.any(),item_slug:a.string().allow("")})}static GeoLocation(){return a.object({latitude:a.number(),longitude:a.number()})}static GetAddressesResponse(){return a.object({address:a.array().items(n.Address()),pii_masking:a.boolean()})}static GetCouponResponse(){return a.object({available_coupon_list:a.array().items(n.Coupon()),page:n.PageCoupon()})}static GetShareCartLinkRequest(){return a.object({id:a.string().allow(""),meta:a.any()})}static GetShareCartLinkResponse(){return a.object({share_url:a.string().allow(""),token:a.string().allow("")})}static GiftDetail(){return a.object({gift_message:a.string().allow(""),is_gift_applied:a.boolean()})}static LadderOfferItem(){return a.object({margin:a.number(),max_quantity:a.number(),min_quantity:a.number(),price:n.LadderPrice(),type:a.string().allow("")})}static LadderPrice(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),offer_price:a.number()})}static LadderPriceOffer(){return a.object({buy_rules:a.any(),calculate_on:a.string().allow(""),description:a.string().allow(""),discount_rules:a.array().items(a.any()),free_gift_items:a.array().items(n.FreeGiftItems()),id:a.string().allow(""),offer_prices:a.array().items(n.LadderOfferItem()),offer_text:a.string().allow(""),promotion_group:a.string().allow(""),valid_till:a.string().allow("")})}static LadderPriceOffers(){return a.object({available_offers:a.array().items(n.LadderPriceOffer()),currency:n.CurrencyInfo()})}static LoyaltyPoints(){return a.object({applicable:a.number(),description:a.string().allow(""),is_applied:a.boolean(),total:a.number()})}static OfferItem(){return a.object({auto_applied:a.boolean(),best:a.boolean(),margin:a.number(),price:n.OfferPrice(),quantity:a.number(),total:a.number(),type:a.string().allow("")})}static OfferPrice(){return a.object({bulk_effective:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number()})}static OfferSeller(){return a.object({name:a.string().allow(""),uid:a.number()})}static OperationErrorResponse(){return a.object({message:a.string().allow(""),success:a.boolean()})}static Ownership(){return a.object({payable_by:a.string().allow(""),payable_category:a.string().allow("")})}static PageCoupon(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),total:a.number(),total_item_count:a.number()})}static PaymentCouponValidate(){return a.object({coupon_validity:n.CouponValidity(),message:a.string().allow(""),success:a.boolean().required()})}static PaymentMeta(){return a.object({merchant_code:a.string().allow(""),payment_gateway:a.string().allow(""),payment_identifier:a.string().allow("").allow(null),type:a.string().allow("")})}static PaymentMethod(){return a.object({amount:a.number().allow(null),mode:a.string().allow("").required(),name:a.string().allow(""),payment:a.string().allow(""),payment_extra_identifiers:a.any(),payment_meta:n.PaymentMeta().required()})}static PaymentSelectionLock(){return a.object({default_options:a.string().allow(""),enabled:a.boolean(),payment_identifier:a.string().allow("")})}static ProductAction(){return a.object({query:n.ActionQuery(),type:a.string().allow(""),url:a.string().allow("")})}static ProductArticle(){return a.object({_custom_json:a.any(),cart_item_meta:a.any(),extra_meta:a.any(),gift_card:a.any(),identifier:a.any(),is_gift_visible:a.boolean(),meta:a.any(),mto_quantity:a.number(),parent_item_identifiers:a.any(),price:n.ArticlePriceInfo(),product_group_tags:a.array().items(a.string().allow("")),quantity:a.number(),seller:n.BaseInfo(),seller_identifier:a.string().allow(""),size:a.string().allow(""),store:n.StoreInfo(),type:a.string().allow(""),uid:a.string().allow("")})}static ProductAvailability(){return a.object({available_sizes:a.array().items(n.ProductAvailabilitySize()),deliverable:a.boolean(),is_valid:a.boolean(),other_store_quantity:a.number(),out_of_stock:a.boolean(),sizes:a.array().items(a.string().allow(""))})}static ProductAvailabilitySize(){return a.object({display:a.string().allow(""),is_available:a.boolean(),value:a.string().allow("")})}static ProductImage(){return a.object({aspect_ratio:a.string().allow(""),secure_url:a.string().allow(""),url:a.string().allow("")})}static ProductPrice(){return a.object({add_on:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),selling:a.number()})}static ProductPriceInfo(){return a.object({base:n.ProductPrice(),converted:n.ProductPrice()})}static ProductPricePerUnit(){return a.object({add_on:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),selling_price:a.number()})}static ProductPricePerUnitInfo(){return a.object({base:n.ProductPricePerUnit(),converted:n.ProductPricePerUnit()})}static PromiseFormatted(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static PromiseTimestamp(){return a.object({max:a.number(),min:a.number()})}static PromoMeta(){return a.object({message:a.string().allow("")})}static PromotionOffer(){return a.object({buy_rules:a.any(),description:a.string().allow(""),discount_rules:a.array().items(a.any()),free_gift_items:a.array().items(n.FreeGiftItems()),id:a.string().allow(""),offer_text:a.string().allow(""),promotion_group:a.string().allow(""),valid_till:a.string().allow("")})}static PromotionOffersResponse(){return a.object({available_promotions:a.array().items(n.PromotionOffer())})}static RawBreakup(){return a.object({cod_charge:a.number(),convenience_fee:a.number(),coupon:a.number(),delivery_charge:a.number(),discount:a.number(),fynd_cash:a.number(),gift_card:a.number(),gst_charges:a.number(),mop_total:a.number(),mrp_total:a.number(),subtotal:a.number(),total:a.number(),vog:a.number(),you_saved:a.number()})}static RewardPointRequest(){return a.object({points:a.boolean().required()})}static SaveAddressResponse(){return a.object({id:a.string().allow(""),is_default_address:a.boolean(),success:a.boolean()})}static SelectCartAddressRequest(){return a.object({billing_address_id:a.string().allow(""),cart_id:a.string().allow(""),id:a.string().allow("")})}static SharedCart(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),shared_cart_details:n.SharedCartDetails(),uid:a.string().allow("")})}static SharedCartDetails(){return a.object({created_on:a.string().allow(""),meta:a.any(),source:a.any(),token:a.string().allow(""),user:a.any()})}static SharedCartResponse(){return a.object({cart:n.SharedCart(),error:a.string().allow("")})}static ShipmentPromise(){return a.object({formatted:n.PromiseFormatted(),timestamp:n.PromiseTimestamp()})}static ShipmentResponse(){return a.object({box_type:a.string().allow("").allow(null),dp_id:a.string().allow("").allow(null),dp_options:a.any().allow(null),fulfillment_id:a.number(),fulfillment_type:a.string().allow(""),items:a.array().items(n.CartProductInfo()),order_type:a.string().allow(""),promise:n.ShipmentPromise(),shipment_type:a.string().allow(""),shipments:a.number()})}static StaffCheckout(){return a.object({_id:a.string().allow("").required(),employee_code:a.string().allow(""),first_name:a.string().allow("").required(),last_name:a.string().allow("").required(),user:a.string().allow("").required()})}static StoreInfo(){return a.object({name:a.string().allow(""),store_code:a.string().allow(""),uid:a.number()})}static Tags(){return a.object({tags:a.any()})}static UpdateAddressResponse(){return a.object({id:a.string().allow(""),is_default_address:a.boolean(),is_updated:a.boolean(),success:a.boolean()})}static UpdateCartDetailResponse(){return a.object({cart:n.CartDetailResponse(),message:a.string().allow(""),success:a.boolean()})}static UpdateCartPaymentRequest(){return a.object({address_id:a.string().allow(""),aggregator_name:a.string().allow(""),id:a.string().allow(""),merchant_code:a.string().allow(""),payment_identifier:a.string().allow("").allow(null),payment_mode:a.string().allow("")})}static UpdateCartRequest(){return a.object({items:a.array().items(n.UpdateProductCart()),operation:a.string().allow("").required()})}static UpdateProductCart(){return a.object({_custom_json:a.any(),article_id:a.string().allow(""),extra_meta:a.any(),identifiers:n.CartProductIdentifer().required(),item_id:a.number(),item_index:a.number(),item_size:a.string().allow(""),meta:a.any(),parent_item_identifiers:a.any(),quantity:a.number()})}}e.exports=n},6206:(e,t,r)=>{const a=r(2705),n=r(7350);e.exports=class{static addAddress(){return a.object({body:n.Address().required()}).required()}static addItems(){return a.object({i:a.boolean(),b:a.boolean(),areaCode:a.string().allow(""),buyNow:a.boolean(),id:a.string().allow(""),body:n.AddCartRequest().required()}).required()}static applyCoupon(){return a.object({i:a.boolean(),b:a.boolean(),p:a.boolean(),id:a.string().allow(""),buyNow:a.boolean(),body:n.ApplyCouponRequest().required()}).required()}static applyRewardPoints(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),buyNow:a.boolean(),body:n.RewardPointRequest().required()}).required()}static checkoutCart(){return a.object({buyNow:a.boolean(),body:n.CartCheckoutDetailRequest().required()}).required()}static checkoutCartV2(){return a.object({buyNow:a.boolean(),body:n.CartCheckoutDetailV2Request().required()}).required()}static deleteCart(){return a.object({id:a.string().allow("")})}static getAddressById(){return a.object({id:a.string().allow("").required(),cartId:a.string().allow(""),buyNow:a.boolean(),mobileNo:a.string().allow(""),checkoutMode:a.string().allow(""),tags:a.string().allow(""),isDefault:a.boolean()}).required()}static getAddresses(){return a.object({cartId:a.string().allow(""),buyNow:a.boolean(),mobileNo:a.string().allow(""),checkoutMode:a.string().allow(""),tags:a.string().allow(""),isDefault:a.boolean()})}static getBulkDiscountOffers(){return a.object({itemId:a.number(),articleId:a.string().allow(""),uid:a.number(),slug:a.string().allow("")})}static getCart(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),c:a.boolean(),assignCardId:a.number(),areaCode:a.string().allow(""),buyNow:a.boolean()})}static getCartLastModified(){return a.object({id:a.string().allow("")})}static getCartShareLink(){return a.object({body:n.GetShareCartLinkRequest().required()}).required()}static getCartSharedItems(){return a.object({token:a.string().allow("").required()}).required()}static getCoupons(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static getItemCount(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static getLadderOffers(){return a.object({slug:a.string().allow("").required(),storeId:a.string().allow(""),promotionId:a.string().allow(""),pageSize:a.number()}).required()}static getPromotionOffers(){return a.object({slug:a.string().allow(""),pageSize:a.number(),promotionGroup:a.string().allow(""),storeId:a.number()})}static getShipments(){return a.object({p:a.boolean(),id:a.string().allow(""),buyNow:a.boolean(),addressId:a.string().allow(""),areaCode:a.string().allow(""),orderType:a.string().allow("")})}static removeAddress(){return a.object({id:a.string().allow("").required()}).required()}static removeCoupon(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static selectAddress(){return a.object({cartId:a.string().allow(""),buyNow:a.boolean(),i:a.boolean(),b:a.boolean(),body:n.SelectCartAddressRequest().required()}).required()}static selectPaymentMode(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),body:n.UpdateCartPaymentRequest().required()}).required()}static updateAddress(){return a.object({id:a.string().allow("").required(),body:n.Address().required()}).required()}static updateCart(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),areaCode:a.string().allow(""),buyNow:a.boolean(),body:n.UpdateCartRequest().required()}).required()}static updateCartMeta(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),body:n.CartMetaRequest().required()}).required()}static updateCartWithSharedItems(){return a.object({token:a.string().allow("").required(),action:a.string().allow("").required()}).required()}static validateCouponForPayment(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),addressId:a.string().allow(""),paymentMode:a.string().allow(""),paymentIdentifier:a.string().allow(""),aggregatorName:a.string().allow(""),merchantCode:a.string().allow(""),iin:a.string().allow(""),network:a.string().allow(""),type:a.string().allow(""),cardId:a.string().allow("")})}}},4196:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=r(3589),l=r(3853),c=r(5761),{Logger:u}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async followById({collectionType:e,collectionId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.followById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.followById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > followById \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.followById,params:{collectionType:e,collectionId:t}}),{},void 0,{...r},{responseHeaders:i});let m=g;i&&(m=g[0]);const{error:f}=c.FollowPostResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > followById \n ${f}`})}return g}async getBrandDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getBrandDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getBrandDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getBrandDetailBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getBrandDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.BrandDetailResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getBrandDetailBySlug \n ${m}`})}return p}async getBrands({department:e,pageNo:t,pageSize:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getBrands().validate({department:e,pageNo:t,pageSize:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getBrands().validate({department:e,pageNo:t,pageSize:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getBrands \n ${g}`});const m={};m.department=e,m.page_no=t,m.page_size=r;const f=await a.execute(this._conf,"get",s({url:this._urls.getBrands,params:{}}),m,void 0,{...i},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=c.BrandListingResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getBrands \n ${y}`})}return f}getBrandsPaginator({department:e,pageSize:t}={}){const r=new i;return r.setCallback((async()=>{r.nextId;const a=r.pageNo,n=await this.getBrands({department:e,pageNo:a,pageSize:t});return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getCategories({department:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getCategories().validate({department:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getCategories().validate({department:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCategories \n ${d}`});const p={};p.department=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getCategories,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=c.CategoryListingResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCategories \n ${f}`})}return g}async getCategoryDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getCategoryDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getCategoryDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCategoryDetailBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCategoryDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.CategoryMetaResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCategoryDetailBySlug \n ${m}`})}return p}async getCollectionDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getCollectionDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getCollectionDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCollectionDetailBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCollectionDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.CollectionDetailResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCollectionDetailBySlug \n ${m}`})}return p}async getCollectionItemsBySlug({slug:e,f:t,q:r,filters:i,sortOn:d,pageId:p,pageSize:g,pageNo:m,pageType:f,requestHeaders:w}={requestHeaders:{}},{responseHeaders:y}={responseHeaders:!1}){const{error:b}=l.getCollectionItemsBySlug().validate({slug:e,f:t,q:r,filters:i,sortOn:d,pageId:p,pageSize:g,pageNo:m,pageType:f},{abortEarly:!1,allowUnknown:!0});if(b)return Promise.reject(new n(b));const{error:h}=l.getCollectionItemsBySlug().validate({slug:e,f:t,q:r,filters:i,sortOn:d,pageId:p,pageSize:g,pageNo:m,pageType:f},{abortEarly:!1,allowUnknown:!1});h&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCollectionItemsBySlug \n ${h}`});const _={};_.f=t,_.q=r,_.filters=i,_.sort_on=d,_.page_id=p,_.page_size=g,_.page_no=m,_.page_type=f;const v=await a.execute(this._conf,"get",s({url:this._urls.getCollectionItemsBySlug,params:{slug:e}}),_,void 0,{...w},{responseHeaders:y});let k=v;y&&(k=v[0]);const{error:R}=c.ProductListingResponse().validate(k,{abortEarly:!1,allowUnknown:!0});if(R){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(R));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCollectionItemsBySlug \n ${R}`})}return v}getCollectionItemsBySlugPaginator({slug:e,f:t,q:r,filters:a,sortOn:n,pageSize:o}={}){const s=new i;return s.setCallback((async()=>{const i=s.nextId,l=s.pageNo,c=await this.getCollectionItemsBySlug({slug:e,f:t,q:r,filters:a,sortOn:n,pageId:i,pageSize:o,pageNo:l,pageType:"cursor"});return s.setPaginator({hasNext:!!c.page.has_next,nextId:c.page.next_id}),c}).bind(this)),s}async getCollections({pageNo:e,pageSize:t,tag:r,q:i,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=l.getCollections().validate({pageNo:e,pageSize:t,tag:r,q:i},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=l.getCollections().validate({pageNo:e,pageSize:t,tag:r,q:i},{abortEarly:!1,allowUnknown:!1});m&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCollections \n ${m}`});const f={};f.page_no=e,f.page_size=t,f.tag=r,f.q=i;const w=await a.execute(this._conf,"get",s({url:this._urls.getCollections,params:{}}),f,void 0,{...d},{responseHeaders:p});let y=w;p&&(y=w[0]);const{error:b}=c.GetCollectionListingResponse().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCollections \n ${b}`})}return w}getCollectionsPaginator({pageSize:e,tag:t,q:r}={}){const a=new i;return a.setCallback((async()=>{a.nextId;const n=a.pageNo,o=await this.getCollections({pageNo:n,pageSize:e,tag:t,q:r});return a.setPaginator({hasNext:!!o.page.has_next,nextId:o.page.next_id}),o}).bind(this)),a}async getComparedFrequentlyProductBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getComparedFrequentlyProductBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getComparedFrequentlyProductBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getComparedFrequentlyProductBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.ProductFrequentlyComparedSimilarResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${m}`})}return p}async getDepartments({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getDepartments().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getDepartments().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getDepartments \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getDepartments,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.DepartmentResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getDepartments \n ${g}`})}return d}async getFollowIds({collectionType:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getFollowIds().validate({collectionType:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getFollowIds().validate({collectionType:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getFollowIds \n ${d}`});const p={};p.collection_type=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getFollowIds,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=c.FollowIdsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getFollowIds \n ${f}`})}return g}async getFollowedListing({collectionType:e,pageId:t,pageSize:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getFollowedListing().validate({collectionType:e,pageId:t,pageSize:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getFollowedListing().validate({collectionType:e,pageId:t,pageSize:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getFollowedListing \n ${g}`});const m={};m.page_id=t,m.page_size=r;const f=await a.execute(this._conf,"get",s({url:this._urls.getFollowedListing,params:{collectionType:e}}),m,void 0,{...i},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=c.GetFollowListingResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getFollowedListing \n ${y}`})}return f}getFollowedListingPaginator({collectionType:e,pageSize:t}={}){const r=new i;return r.setCallback((async()=>{const a=r.nextId,n=(r.pageNo,await this.getFollowedListing({collectionType:e,pageId:a,pageSize:t}));return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getFollowerCountById({collectionType:e,collectionId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getFollowerCountById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getFollowerCountById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getFollowerCountById \n ${p}`});const g=await a.execute(this._conf,"get",s({url:this._urls.getFollowerCountById,params:{collectionType:e,collectionId:t}}),{},void 0,{...r},{responseHeaders:i});let m=g;i&&(m=g[0]);const{error:f}=c.FollowerCountResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getFollowerCountById \n ${f}`})}return g}async getHomeProducts({sortOn:e,pageId:t,pageSize:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getHomeProducts().validate({sortOn:e,pageId:t,pageSize:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getHomeProducts().validate({sortOn:e,pageId:t,pageSize:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getHomeProducts \n ${g}`});const m={};m.sort_on=e,m.page_id=t,m.page_size=r;const f=await a.execute(this._conf,"get",s({url:this._urls.getHomeProducts,params:{}}),m,void 0,{...i},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=c.HomeListingResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getHomeProducts \n ${y}`})}return f}getHomeProductsPaginator({sortOn:e,pageSize:t}={}){const r=new i;return r.setCallback((async()=>{const a=r.nextId,n=(r.pageNo,await this.getHomeProducts({sortOn:e,pageId:a,pageSize:t}));return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getInStockLocations({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:w}=l.getInStockLocations().validate({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:y}=l.getInStockLocations().validate({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g},{abortEarly:!1,allowUnknown:!1});y&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getInStockLocations \n ${y}`});const b={};b.page_no=e,b.page_size=t,b.q=r,b.city=i,b.range=d,b.latitude=p,b.longitude=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getInStockLocations,params:{}}),b,void 0,{...m},{responseHeaders:f});let _=h;f&&(_=h[0]);const{error:v}=c.ApplicationStoreListing().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getInStockLocations \n ${v}`})}return h}getInStockLocationsPaginator({pageSize:e,q:t,city:r,range:a,latitude:n,longitude:o}={}){const s=new i;return s.setCallback((async()=>{s.nextId;const i=s.pageNo,l=await this.getInStockLocations({pageNo:i,pageSize:e,q:t,city:r,range:a,latitude:n,longitude:o});return s.setPaginator({hasNext:!!l.page.has_next,nextId:l.page.next_id}),l}).bind(this)),s}async getLocationDetailsById({locationId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getLocationDetailsById().validate({locationId:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getLocationDetailsById().validate({locationId:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getLocationDetailsById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getLocationDetailsById,params:{locationId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.StoreDetails().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getLocationDetailsById \n ${m}`})}return p}async getProductBundlesBySlug({slug:e,id:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getProductBundlesBySlug().validate({slug:e,id:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getProductBundlesBySlug().validate({slug:e,id:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductBundlesBySlug \n ${p}`});const g={};g.slug=e,g.id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getProductBundlesBySlug,params:{}}),g,void 0,{...r},{responseHeaders:i});let f=m;i&&(f=m[0]);const{error:w}=c.ProductBundle().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductBundlesBySlug \n ${w}`})}return m}async getProductComparisonBySlugs({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getProductComparisonBySlugs().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getProductComparisonBySlugs().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductComparisonBySlugs \n ${d}`});const p={};p.slug=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getProductComparisonBySlugs,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=c.ProductsComparisonResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductComparisonBySlugs \n ${f}`})}return g}async getProductDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getProductDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getProductDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductDetailBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getProductDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.ProductDetail().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductDetailBySlug \n ${m}`})}return p}async getProductPriceBySlug({slug:e,size:t,storeId:r,pincode:i,moq:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=l.getProductPriceBySlug().validate({slug:e,size:t,storeId:r,pincode:i,moq:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:f}=l.getProductPriceBySlug().validate({slug:e,size:t,storeId:r,pincode:i,moq:d},{abortEarly:!1,allowUnknown:!1});f&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductPriceBySlug \n ${f}`});const w={};w.store_id=r,w.pincode=i,w.moq=d;const y=await a.execute(this._conf,"get",s({url:this._urls.getProductPriceBySlug,params:{slug:e,size:t}}),w,void 0,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=c.ProductSizePriceResponseV3().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductPriceBySlug \n ${h}`})}return y}async getProductSellersBySlug({slug:e,size:t,pincode:r,strategy:i,pageNo:d,pageSize:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=l.getProductSellersBySlug().validate({slug:e,size:t,pincode:r,strategy:i,pageNo:d,pageSize:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=l.getProductSellersBySlug().validate({slug:e,size:t,pincode:r,strategy:i,pageNo:d,pageSize:p},{abortEarly:!1,allowUnknown:!1});w&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductSellersBySlug \n ${w}`});const y={};y.pincode=r,y.strategy=i,y.page_no=d,y.page_size=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getProductSellersBySlug,params:{slug:e,size:t}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=c.ProductSizeSellersResponseV3().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductSellersBySlug \n ${_}`})}return b}getProductSellersBySlugPaginator({slug:e,size:t,pincode:r,strategy:a,pageSize:n}={}){const o=new i;return o.setCallback((async()=>{o.nextId;const s=o.pageNo,i=await this.getProductSellersBySlug({slug:e,size:t,pincode:r,strategy:a,pageNo:s,pageSize:n});return o.setPaginator({hasNext:!!i.page.has_next,nextId:i.page.next_id}),i}).bind(this)),o}async getProductSizesBySlug({slug:e,storeId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getProductSizesBySlug().validate({slug:e,storeId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getProductSizesBySlug().validate({slug:e,storeId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductSizesBySlug \n ${p}`});const g={};g.store_id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getProductSizesBySlug,params:{slug:e}}),g,void 0,{...r},{responseHeaders:i});let f=m;i&&(f=m[0]);const{error:w}=c.ProductSizes().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductSizesBySlug \n ${w}`})}return m}async getProductStockByIds({itemId:e,alu:t,skuCode:r,ean:i,upc:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=l.getProductStockByIds().validate({itemId:e,alu:t,skuCode:r,ean:i,upc:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:f}=l.getProductStockByIds().validate({itemId:e,alu:t,skuCode:r,ean:i,upc:d},{abortEarly:!1,allowUnknown:!1});f&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductStockByIds \n ${f}`});const w={};w.item_id=e,w.alu=t,w.sku_code=r,w.ean=i,w.upc=d;const y=await a.execute(this._conf,"get",s({url:this._urls.getProductStockByIds,params:{}}),w,void 0,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=c.ProductStockStatusResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductStockByIds \n ${h}`})}return y}async getProductStockForTimeByIds({timestamp:e,pageSize:t,pageId:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getProductStockForTimeByIds().validate({timestamp:e,pageSize:t,pageId:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getProductStockForTimeByIds().validate({timestamp:e,pageSize:t,pageId:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductStockForTimeByIds \n ${g}`});const m={};m.timestamp=e,m.page_size=t,m.page_id=r;const f=await a.execute(this._conf,"get",s({url:this._urls.getProductStockForTimeByIds,params:{}}),m,void 0,{...i},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=c.ProductStockPolling().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductStockForTimeByIds \n ${y}`})}return f}getProductStockForTimeByIdsPaginator({timestamp:e,pageSize:t}={}){const r=new i;return r.setCallback((async()=>{const a=r.nextId,n=(r.pageNo,await this.getProductStockForTimeByIds({timestamp:e,pageSize:t,pageId:a}));return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getProductVariantsBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getProductVariantsBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getProductVariantsBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductVariantsBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getProductVariantsBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.ProductVariantsResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductVariantsBySlug \n ${m}`})}return p}async getProducts({q:e,f:t,filters:r,sortOn:i,pageId:d,pageSize:p,pageNo:g,pageType:m,requestHeaders:f}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:y}=l.getProducts().validate({q:e,f:t,filters:r,sortOn:i,pageId:d,pageSize:p,pageNo:g,pageType:m},{abortEarly:!1,allowUnknown:!0});if(y)return Promise.reject(new n(y));const{error:b}=l.getProducts().validate({q:e,f:t,filters:r,sortOn:i,pageId:d,pageSize:p,pageNo:g,pageType:m},{abortEarly:!1,allowUnknown:!1});b&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProducts \n ${b}`});const h={};h.q=e,h.f=t,h.filters=r,h.sort_on=i,h.page_id=d,h.page_size=p,h.page_no=g,h.page_type=m;const _=await a.execute(this._conf,"get",s({url:this._urls.getProducts,params:{}}),h,void 0,{...f},{responseHeaders:w});let v=_;w&&(v=_[0]);const{error:k}=c.ProductListingResponse().validate(v,{abortEarly:!1,allowUnknown:!0});if(k){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(k));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProducts \n ${k}`})}return _}getProductsPaginator({q:e,f:t,filters:r,sortOn:a,pageSize:n}={}){const o=new i;return o.setCallback((async()=>{const s=o.nextId,i=o.pageNo,l=await this.getProducts({q:e,f:t,filters:r,sortOn:a,pageId:s,pageSize:n,pageNo:i,pageType:"cursor"});return o.setPaginator({hasNext:!!l.page.has_next,nextId:l.page.next_id}),l}).bind(this)),o}async getSearchResults({q:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getSearchResults().validate({q:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getSearchResults().validate({q:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getSearchResults \n ${d}`});const p={};p.q=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getSearchResults,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=c.AutoCompleteResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getSearchResults \n ${f}`})}return g}async getSimilarComparisonProductBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getSimilarComparisonProductBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getSimilarComparisonProductBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getSimilarComparisonProductBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getSimilarComparisonProductBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.ProductCompareResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getSimilarComparisonProductBySlug \n ${m}`})}return p}async getStores({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g,tags:m,requestHeaders:f}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:y}=l.getStores().validate({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g,tags:m},{abortEarly:!1,allowUnknown:!0});if(y)return Promise.reject(new n(y));const{error:b}=l.getStores().validate({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g,tags:m},{abortEarly:!1,allowUnknown:!1});b&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getStores \n ${b}`});const h={};h.page_no=e,h.page_size=t,h.q=r,h.city=i,h.range=d,h.latitude=p,h.longitude=g,h.tags=m;const _=await a.execute(this._conf,"get",s({url:this._urls.getStores,params:{}}),h,void 0,{...f},{responseHeaders:w});let v=_;w&&(v=_[0]);const{error:k}=c.StoreListingResponse().validate(v,{abortEarly:!1,allowUnknown:!0});if(k){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(k));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getStores \n ${k}`})}return _}getStoresPaginator({pageSize:e,q:t,city:r,range:a,latitude:n,longitude:o,tags:s}={}){const l=new i;return l.setCallback((async()=>{l.nextId;const i=l.pageNo,c=await this.getStores({pageNo:i,pageSize:e,q:t,city:r,range:a,latitude:n,longitude:o,tags:s});return l.setPaginator({hasNext:!!c.page.has_next,nextId:c.page.next_id}),c}).bind(this)),l}async unfollowById({collectionType:e,collectionId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.unfollowById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.unfollowById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > unfollowById \n ${p}`});const g=await a.execute(this._conf,"delete",s({url:this._urls.unfollowById,params:{collectionType:e,collectionId:t}}),{},void 0,{...r},{responseHeaders:i});let m=g;i&&(m=g[0]);const{error:f}=c.FollowPostResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > unfollowById \n ${f}`})}return g}}},5761:(e,t,r)=>{const a=r(2705);class n{static ApplicationItemMOQ(){return a.object({increment_unit:a.number(),maximum:a.number(),minimum:a.number()})}static ApplicationItemSEO(){return a.object({description:a.any(),title:a.any()})}static ApplicationStoreListing(){return a.object({filters:a.array().items(a.any()),items:a.array().items(n.AppStore()),page:n.Page()})}static AppStore(){return a.object({address:n.StoreAddressSerializer(),company:n.CompanyStore(),contact_numbers:a.array().items(n.SellerPhoneNumber()),departments:a.array().items(n.StoreDepartments()),manager:n.StoreManagerSerializer(),name:a.string().allow(""),store_code:a.string().allow(""),uid:a.number()})}static ArticleAssignmentV3(){return a.object({level:a.string().allow(""),strategy:a.string().allow("")})}static AttributeDetail(){return a.object({description:a.string().allow(""),display:a.string().allow(""),key:a.string().allow(""),logo:a.string().allow("")})}static AttributeMetadata(){return a.object({details:a.array().items(n.AttributeDetail()),title:a.string().allow("")})}static AutocompleteItem(){return a.object({_custom_json:a.any(),action:n.ProductListingAction(),display:a.string().allow(""),logo:n.Media(),type:a.string().allow("")})}static AutoCompleteResponse(){return a.object({items:a.array().items(n.AutocompleteItem())})}static BrandDetailResponse(){return a.object({_custom_json:a.any(),banners:n.ImageUrls(),description:a.string().allow(""),logo:n.Media(),name:a.string().allow(""),uid:a.number()})}static BrandItem(){return a.object({action:n.ProductListingAction(),banners:n.ImageUrls(),departments:a.array().items(a.string().allow("")),description:a.string().allow(""),discount:a.string().allow(""),logo:n.Media(),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static BrandListingResponse(){return a.object({items:a.array().items(n.BrandItem()),page:n.Page().required()})}static CategoryBanner(){return a.object({landscape:n.Media().required(),portrait:n.Media().required()})}static CategoryItems(){return a.object({action:n.ProductListingAction().required(),banners:n.CategoryBanner().required(),childs:a.array().items(n.Child()),name:a.string().allow("").required(),slug:a.string().allow("").required(),uid:a.number().required()})}static CategoryListingResponse(){return a.object({data:a.array().items(n.DepartmentCategoryTree()),departments:a.array().items(n.DepartmentIdentifier())})}static CategoryMetaResponse(){return a.object({_custom_json:a.any(),banners:n.ImageUrls(),logo:n.Media(),name:a.string().allow(""),uid:a.number()})}static Child(){return a.object({_custom_json:a.any(),action:n.ProductListingAction(),banners:n.ImageUrls(),childs:a.array().items(n.SecondLevelChild()),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static CollectionDetailResponse(){return a.object({_custom_json:a.any(),_schedule:a.any(),allow_facets:a.boolean(),allow_sort:a.boolean(),app_id:a.string().allow(""),badge:a.any(),banners:n.ImageUrls(),cron:a.any(),description:a.string().allow(""),is_active:a.boolean(),logo:n.Media(),meta:a.any(),name:a.string().allow(""),priority:a.number(),query:a.array().items(n.CollectionQuery()),slug:a.string().allow(""),sort_on:a.string().allow(""),tag:a.array().items(a.string().allow("")),type:a.string().allow(""),visible_facets_keys:a.array().items(a.string().allow(""))})}static CollectionListingFilter(){return a.object({tags:a.array().items(n.CollectionListingFilterTag()),type:a.array().items(n.CollectionListingFilterType())})}static CollectionListingFilterTag(){return a.object({display:a.string().allow(""),is_selected:a.boolean(),name:a.string().allow("")})}static CollectionListingFilterType(){return a.object({display:a.string().allow(""),is_selected:a.boolean(),name:a.string().allow("")})}static CollectionQuery(){return a.object({attribute:a.string().allow("").required(),op:a.string().allow("").required(),value:a.array().items(a.any()).required()})}static ColumnHeader(){return a.object({convertable:a.boolean(),value:a.string().allow("")})}static ColumnHeaders(){return a.object({col_1:n.ColumnHeader(),col_2:n.ColumnHeader(),col_3:n.ColumnHeader(),col_4:n.ColumnHeader(),col_5:n.ColumnHeader(),col_6:n.ColumnHeader()})}static CompanyDetail(){return a.object({id:a.number(),name:a.string().allow("")})}static CompanyStore(){return a.object({business_type:a.string().allow(""),company_type:a.string().allow(""),name:a.string().allow(""),uid:a.number()})}static CustomMetaFields(){return a.object({key:a.string().allow("").required(),value:a.string().allow("").required()})}static Department(){return a.object({logo:n.Media(),name:a.string().allow(""),priority_order:a.number(),slug:a.string().allow(""),uid:a.number()})}static DepartmentCategoryTree(){return a.object({department:a.string().allow("").required(),items:a.array().items(n.CategoryItems())})}static DepartmentIdentifier(){return a.object({slug:a.string().allow(""),uid:a.number()})}static DepartmentResponse(){return a.object({items:a.array().items(n.Department())})}static DetailsSchemaV3(){return a.object({key:a.string().allow(""),type:a.string().allow(""),value:a.string().allow("")})}static Dimension(){return a.object({height:a.number().required(),is_default:a.boolean().required(),length:a.number().required(),unit:a.string().allow("").required(),width:a.number().required()})}static DiscountMeta(){return a.object({end:a.string().allow(""),start:a.string().allow(""),start_timer_in_minutes:a.number(),timer:a.boolean().required()})}static ErrorResponse(){return a.object({error:a.string().allow("")})}static FollowerCountResponse(){return a.object({count:a.number()})}static FollowIdsData(){return a.object({brands:a.array().items(a.number()),collections:a.array().items(a.number()),products:a.array().items(a.number())})}static FollowIdsResponse(){return a.object({data:n.FollowIdsData()})}static FollowPostResponse(){return a.object({id:a.string().allow("").required(),message:a.string().allow("").required()})}static GetCollectionDetailNest(){return a.object({_custom_json:a.any(),_schedule:a.any(),action:n.ProductListingAction(),allow_facets:a.boolean(),allow_sort:a.boolean(),app_id:a.string().allow(""),badge:a.any(),banners:n.ImageUrls(),cron:a.any(),description:a.string().allow(""),is_active:a.boolean(),logo:n.Media(),meta:a.any(),name:a.string().allow(""),priority:a.number(),query:a.array().items(n.CollectionQuery()),slug:a.string().allow(""),sort_on:a.string().allow(""),tag:a.array().items(a.string().allow("")),type:a.string().allow(""),uid:a.string().allow(""),visible_facets_keys:a.array().items(a.string().allow(""))})}static GetCollectionListingResponse(){return a.object({filters:n.CollectionListingFilter(),items:a.array().items(n.GetCollectionDetailNest()),page:n.Page().required()})}static GetFollowListingResponse(){return a.object({items:a.array().items(n.ProductListingDetail()).required(),page:n.Page().required()})}static HomeListingResponse(){return a.object({items:a.array().items(n.ProductListingDetail()),message:a.string().allow(""),page:n.Page().required()})}static ImageUrls(){return a.object({landscape:n.Media(),portrait:n.Media()})}static LatLong(){return a.object({coordinates:a.array().items(a.number()),type:a.string().allow("")})}static MarketPlaceSttributesSchemaV3(){return a.object({details:a.array().items(n.DetailsSchemaV3()),title:a.string().allow("")})}static Media(){return a.object({alt:a.string().allow(""),meta:n.Meta(),type:a.string().allow(""),url:a.string().allow("")})}static Meta(){return a.object({source:a.string().allow("")})}static NetQuantity(){return a.object({unit:a.any(),value:a.number()})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static Price(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),max:a.number(),min:a.number()})}static ProductBrand(){return a.object({action:n.ProductListingAction(),description:a.string().allow(""),logo:n.Media(),name:a.string().allow(""),uid:a.number()})}static ProductBundle(){return a.object({items:a.array().items(n.ProductGroupingModel())})}static ProductCategoryMap(){return a.object({l1:n.ProductBrand(),l2:n.ProductBrand(),l3:n.ProductBrand()})}static ProductCompareResponse(){return a.object({attributes_metadata:a.array().items(n.AttributeMetadata()),items:a.array().items(n.ProductDetail()),subtitle:a.string().allow(""),title:a.string().allow("")})}static ProductDepartment(){return a.object({logo:n.Media(),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static ProductDetail(){return a.object({_custom_json:a.any(),_custom_meta:a.array().items(n.CustomMetaFields()),action:n.ProductListingAction(),attributes:a.any(),brand:n.ProductBrand(),categories:a.array().items(n.ProductBrand()),category_map:n.ProductCategoryMap(),color:a.string().allow(""),custom_order:n.ProductDetailCustomOrder(),department:n.ProductDepartment(),description:a.string().allow(""),discount:a.string().allow(""),grouped_attributes:a.array().items(n.ProductDetailGroupedAttribute()),has_variant:a.boolean(),highlights:a.array().items(a.string().allow("")),image_nature:a.string().allow(""),is_dependent:a.boolean(),item_code:a.string().allow(""),item_type:a.string().allow(""),medias:a.array().items(n.Media()),moq:n.ApplicationItemMOQ(),name:a.string().allow(""),net_quantity:n.NetQuantity(),price:n.ProductListingPrice(),product_group_tag:a.array().items(a.string().allow("")),product_online_date:a.string().allow(""),rating:a.number(),rating_count:a.number(),seo:n.ApplicationItemSEO(),short_description:a.string().allow(""),similars:a.array().items(a.string().allow("")),slug:a.string().allow("").required(),tags:a.array().items(a.string().allow("")),teaser_tag:a.string().allow(""),tryouts:a.array().items(a.string().allow("")),type:a.string().allow(""),uid:a.number()})}static ProductDetailAttribute(){return a.object({key:a.string().allow(""),type:a.string().allow(""),value:a.string().allow("")})}static ProductDetailCustomOrder(){return a.object({is_custom_order:a.boolean(),manufacturing_time:a.number(),manufacturing_time_unit:a.string().allow("")})}static ProductDetailGroupedAttribute(){return a.object({details:a.array().items(n.ProductDetailAttribute()),title:a.string().allow("")})}static ProductDetails(){return a.object({attributes:a.any(),brand_uid:a.number(),country_of_origin:a.any(),description:a.any(),grouped_attributes:a.any(),has_variant:a.boolean(),highlights:a.array().items(a.any()),hsn_code:a.number(),identifier:a.any(),image_nature:a.any(),images:a.array().items(a.any()),is_set:a.boolean(),item_code:a.any(),media:a.array().items(a.any()),name:a.any(),out_of_stock:a.boolean(),rating:a.number(),rating_count:a.number(),short_description:a.any(),slug:a.any(),template_tag:a.any()})}static ProductFilters(){return a.object({key:n.ProductFiltersKey().required(),values:a.array().items(n.ProductFiltersValue()).required()})}static ProductFiltersKey(){return a.object({display:a.string().allow("").required(),kind:a.string().allow(""),logo:a.string().allow(""),name:a.string().allow("").required()})}static ProductFiltersValue(){return a.object({count:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),display:a.string().allow("").required(),display_format:a.string().allow(""),is_selected:a.boolean().required(),max:a.number(),min:a.number(),query_format:a.string().allow(""),selected_max:a.number(),selected_min:a.number(),value:a.string().allow("")})}static ProductFrequentlyComparedSimilarResponse(){return a.object({similars:n.ProductCompareResponse()})}static ProductGroupingModel(){return a.object({_id:a.any(),choice:a.any(),company_id:a.number(),created_by:n.UserDetail(),created_on:a.string().allow("").required(),is_active:a.boolean(),logo:a.string().allow("").allow(null),meta:a.any(),modified_by:n.UserDetail(),modified_on:a.string().allow("").required(),name:a.any().required(),page_visibility:a.array().items(a.any()),products:a.array().items(n.ProductInGroup()).required(),same_store_assignment:a.boolean(),slug:a.any(),verified_by:n.UserDetail(),verified_on:a.string().allow("")})}static ProductGroupPrice(){return a.object({currency:a.any(),max_effective:a.number(),max_marked:a.number(),min_effective:a.number(),min_marked:a.number()})}static ProductInGroup(){return a.object({allow_remove:a.boolean(),auto_add_to_cart:a.boolean(),auto_select:a.boolean(),max_quantity:a.number().required(),min_quantity:a.number(),price:n.ProductGroupPrice(),product_details:n.ProductDetails(),product_uid:a.number().required(),sizes:a.array().items(n.Size())})}static ProductListingAction(){return a.object({page:n.ProductListingActionPage(),type:a.string().allow("")})}static ProductListingActionPage(){return a.object({params:a.any(),query:a.any(),type:a.string().allow("")})}static ProductListingDetail(){return a.object({_custom_json:a.any(),_custom_meta:a.array().items(n.CustomMetaFields()),action:n.ProductListingAction(),attributes:a.any(),brand:n.ProductBrand(),categories:a.array().items(n.ProductBrand()),category_map:n.ProductCategoryMap(),color:a.string().allow(""),custom_order:n.ProductDetailCustomOrder(),description:a.string().allow(""),discount:a.string().allow(""),grouped_attributes:a.array().items(n.ProductDetailGroupedAttribute()),has_variant:a.boolean(),highlights:a.array().items(a.string().allow("")),identifiers:a.array().items(a.string().allow("")),image_nature:a.string().allow(""),is_dependent:a.boolean(),item_code:a.string().allow(""),item_type:a.string().allow(""),medias:a.array().items(n.Media()),moq:n.ApplicationItemMOQ(),name:a.string().allow(""),net_quantity:n.NetQuantity(),price:n.ProductListingPrice(),product_group_tag:a.array().items(a.string().allow("")),product_online_date:a.string().allow(""),rating:a.number(),rating_count:a.number(),sellable:a.boolean(),seo:n.ApplicationItemSEO(),short_description:a.string().allow(""),similars:a.array().items(a.string().allow("")),sizes:a.array().items(a.string().allow("")),slug:a.string().allow("").required(),tags:a.array().items(a.string().allow("")),teaser_tag:a.string().allow(""),tryouts:a.array().items(a.string().allow("")),type:a.string().allow(""),uid:a.number(),variants:a.array().items(n.ProductVariantListingResponse())})}static ProductListingPrice(){return a.object({effective:n.Price(),marked:n.Price()})}static ProductListingResponse(){return a.object({filters:a.array().items(n.ProductFilters()),items:a.array().items(n.ProductListingDetail()),page:n.Page().required(),sort_on:a.array().items(n.ProductSortOn())})}static ProductsComparisonResponse(){return a.object({attributes_metadata:a.array().items(n.AttributeMetadata()),items:a.array().items(n.ProductDetail())})}static ProductSetDistributionSizeV3(){return a.object({pieces:a.number(),size:a.string().allow("")})}static ProductSetDistributionV3(){return a.object({sizes:a.array().items(n.ProductSetDistributionSizeV3())})}static ProductSetV3(){return a.object({quantity:a.number(),size_distribution:n.ProductSetDistributionV3()})}static ProductSize(){return a.object({dimension:n.Dimension(),display:a.string().allow(""),is_available:a.boolean(),quantity:a.number(),seller_identifiers:a.array().items(a.string().allow("")),value:a.string().allow(""),weight:n.Weight()})}static ProductSizePriceResponseV3(){return a.object({article_assignment:n.ArticleAssignmentV3(),article_id:a.string().allow(""),delivery_promise:n.PromiseSchema(),discount:a.string().allow(""),discount_meta:n.DiscountMeta(),grouped_attributes:a.array().items(n.SellerGroupAttributes()),is_cod:a.boolean(),is_gift:a.boolean(),item_type:a.string().allow(""),long_lat:a.array().items(a.number()),marketplace_attributes:a.array().items(n.MarketPlaceSttributesSchemaV3()),pincode:a.number(),price:n.ProductStockPriceV3(),price_per_piece:n.ProductStockPriceV3(),price_per_unit:n.ProductStockUnitPriceV3(),quantity:a.number(),return_config:n.ReturnConfigSchemaV3(),seller:n.SellerV3(),seller_count:a.number(),set:n.ProductSetV3(),special_badge:a.string().allow(""),store:n.StoreV3(),strategy_wise_listing:a.array().items(n.StrategyWiseListingSchemaV3())})}static ProductSizes(){return a.object({discount:a.string().allow(""),discount_meta:n.DiscountMeta(),multi_size:a.boolean(),price:n.ProductSizesPrice(),sellable:a.boolean(),size_chart:n.SizeChart(),sizes:a.array().items(n.ProductSize()),stores:n.ProductSizeStores()})}static ProductSizeSellerFilterSchemaV3(){return a.object({is_selected:a.boolean(),name:a.string().allow(""),value:a.string().allow("")})}static ProductSizeSellersResponseV3(){return a.object({items:a.array().items(n.ProductSizePriceResponseV3()),page:n.Page().required(),sort_on:a.array().items(n.ProductSizeSellerFilterSchemaV3())})}static ProductSizesPrice(){return a.object({effective:n.Price(),marked:n.Price(),selling:n.Price()})}static ProductSizeStores(){return a.object({count:a.number()})}static ProductSortOn(){return a.object({display:a.string().allow(""),is_selected:a.boolean(),logo:a.string().allow(""),name:a.string().allow(""),value:a.string().allow("")})}static ProductStockPolling(){return a.object({items:a.array().items(n.ProductStockStatusItem()),page:n.Page().required()})}static ProductStockPrice(){return a.object({currency:a.string().allow(""),effective:a.number(),marked:a.number()})}static ProductStockPriceV3(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),selling:a.number()})}static ProductStockStatusItem(){return a.object({company:n.CompanyDetail(),identifier:a.any(),item_id:a.number(),price:n.ProductStockPrice(),quantity:a.number(),seller:n.Seller(),size:a.string().allow(""),store:n.StoreDetail(),uid:a.string().allow("")})}static ProductStockStatusResponse(){return a.object({items:a.array().items(n.ProductStockStatusItem())})}static ProductStockUnitPriceV3(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),price:a.number(),unit:a.string().allow("")})}static ProductVariantItemResponse(){return a.object({_custom_meta:a.array().items(n.CustomMetaFields()),action:n.ProductListingAction(),color:a.string().allow(""),color_name:a.string().allow(""),is_available:a.boolean(),medias:a.array().items(n.Media()),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number(),value:a.string().allow("")})}static ProductVariantListingResponse(){return a.object({display_type:a.string().allow(""),header:a.string().allow(""),items:a.array().items(n.ProductVariantItemResponse()),key:a.string().allow(""),total:a.number()})}static ProductVariantResponse(){return a.object({display_type:a.string().allow(""),header:a.string().allow(""),items:a.array().items(n.ProductVariantItemResponse()),key:a.string().allow("")})}static ProductVariantsResponse(){return a.object({variants:a.array().items(n.ProductVariantResponse())})}static PromiseSchema(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static ReturnConfigSchemaV3(){return a.object({returnable:a.boolean(),time:a.number(),unit:a.string().allow("")})}static SecondLevelChild(){return a.object({_custom_json:a.any(),action:n.ProductListingAction(),banners:n.ImageUrls(),childs:a.array().items(n.ThirdLevelChild()),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static Seller(){return a.object({count:a.number(),name:a.string().allow(""),uid:a.number()})}static SellerGroupAttributes(){return a.object({details:a.array().items(n.DetailsSchemaV3()),title:a.string().allow("")})}static SellerPhoneNumber(){return a.object({country_code:a.number().required(),number:a.string().allow("").required()})}static SellerV3(){return a.object({count:a.number(),name:a.string().allow(""),uid:a.number()})}static Size(){return a.object({display:a.any(),is_available:a.boolean(),quantity:a.number(),value:a.any()})}static SizeChart(){return a.object({description:a.string().allow(""),headers:n.ColumnHeaders(),image:a.string().allow(""),size_tip:a.string().allow(""),sizes:a.array().items(n.SizeChartValues()),title:a.string().allow(""),unit:a.string().allow("")})}static SizeChartValues(){return a.object({col_1:a.string().allow(""),col_2:a.string().allow(""),col_3:a.string().allow(""),col_4:a.string().allow(""),col_5:a.string().allow(""),col_6:a.string().allow("")})}static Store(){return a.object({address:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),lat_long:n.LatLong(),name:a.string().allow(""),pincode:a.number(),state:a.string().allow(""),store_code:a.string().allow(""),store_email:a.string().allow(""),tags:a.array().items(a.string().allow("")),uid:a.number()})}static StoreAddressSerializer(){return a.object({address1:a.string().allow(""),address2:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),landmark:a.string().allow(""),latitude:a.number(),longitude:a.number(),pincode:a.number(),state:a.string().allow("")})}static StoreDepartments(){return a.object({logo:a.any(),name:a.string().allow(""),priority_order:a.number(),slug:a.string().allow(""),uid:a.number()})}static StoreDetail(){return a.object({city:a.string().allow(""),code:a.string().allow(""),id:a.number(),name:a.string().allow("")})}static StoreDetails(){return a.object({_custom_json:a.any(),address:n.StoreAddressSerializer(),company:n.CompanyStore(),contact_numbers:a.array().items(n.SellerPhoneNumber()),departments:a.array().items(n.StoreDepartments()),manager:n.StoreManagerSerializer(),name:a.string().allow(""),store_code:a.string().allow(""),timing:a.array().items(n.StoreTiming()),uid:a.number()})}static StoreListingResponse(){return a.object({items:a.array().items(n.Store()).required(),page:n.Page().required()})}static StoreManagerSerializer(){return a.object({email:a.string().allow(""),mobile_no:n.SellerPhoneNumber(),name:a.string().allow("")})}static StoreTiming(){return a.object({closing:n.Time(),open:a.boolean(),opening:n.Time(),weekday:a.string().allow("")})}static StoreV3(){return a.object({count:a.number(),name:a.string().allow(""),uid:a.number()})}static StrategyWiseListingSchemaV3(){return a.object({distance:a.number(),pincode:a.number(),quantity:a.number(),tat:a.number()})}static ThirdLevelChild(){return a.object({_custom_json:a.any(),action:n.ProductListingAction(),banners:n.ImageUrls(),childs:a.array().items(a.any()),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static Time(){return a.object({hour:a.number(),minute:a.number()})}static UserDetail(){return a.object({contact:a.string().allow(""),super_user:a.boolean(),user_id:a.string().allow("").required(),username:a.string().allow("").required()})}static Weight(){return a.object({is_default:a.boolean().required(),shipping:a.number().required(),unit:a.string().allow("").required()})}}e.exports=n},3853:(e,t,r)=>{const a=r(2705);r(5761),e.exports=class{static followById(){return a.object({collectionType:a.string().allow("").required(),collectionId:a.string().allow("").required()}).required()}static getBrandDetailBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getBrands(){return a.object({department:a.string().allow(""),pageNo:a.number(),pageSize:a.number()})}static getCategories(){return a.object({department:a.string().allow("")})}static getCategoryDetailBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getCollectionDetailBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getCollectionItemsBySlug(){return a.object({slug:a.string().allow("").required(),f:a.string().allow(""),q:a.string().allow(""),filters:a.boolean(),sortOn:a.string().allow(""),pageId:a.string().allow(""),pageSize:a.number(),pageNo:a.number(),pageType:a.string().allow("")}).required()}static getCollections(){return a.object({pageNo:a.number(),pageSize:a.number(),tag:a.array().items(a.string().allow("")),q:a.string().allow("")})}static getComparedFrequentlyProductBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getDepartments(){return a.object({})}static getFollowIds(){return a.object({collectionType:a.string().allow("")})}static getFollowedListing(){return a.object({collectionType:a.string().allow("").required(),pageId:a.string().allow(""),pageSize:a.number()}).required()}static getFollowerCountById(){return a.object({collectionType:a.string().allow("").required(),collectionId:a.string().allow("").required()}).required()}static getHomeProducts(){return a.object({sortOn:a.string().allow(""),pageId:a.string().allow(""),pageSize:a.number()})}static getInStockLocations(){return a.object({pageNo:a.number(),pageSize:a.number(),q:a.string().allow(""),city:a.string().allow(""),range:a.number(),latitude:a.number(),longitude:a.number()})}static getLocationDetailsById(){return a.object({locationId:a.number().required()}).required()}static getProductBundlesBySlug(){return a.object({slug:a.string().allow(""),id:a.string().allow("")})}static getProductComparisonBySlugs(){return a.object({slug:a.array().items(a.string().allow("")).required()}).required()}static getProductDetailBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getProductPriceBySlug(){return a.object({slug:a.string().allow("").required(),size:a.string().allow("").required(),storeId:a.number(),pincode:a.string().allow(""),moq:a.number()}).required()}static getProductSellersBySlug(){return a.object({slug:a.string().allow("").required(),size:a.string().allow("").required(),pincode:a.string().allow(""),strategy:a.string().allow(""),pageNo:a.number(),pageSize:a.number()}).required()}static getProductSizesBySlug(){return a.object({slug:a.string().allow("").required(),storeId:a.number()}).required()}static getProductStockByIds(){return a.object({itemId:a.string().allow(""),alu:a.string().allow(""),skuCode:a.string().allow(""),ean:a.string().allow(""),upc:a.string().allow("")})}static getProductStockForTimeByIds(){return a.object({timestamp:a.string().allow("").required(),pageSize:a.number(),pageId:a.string().allow("")}).required()}static getProductVariantsBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getProducts(){return a.object({q:a.string().allow(""),f:a.string().allow(""),filters:a.boolean(),sortOn:a.string().allow(""),pageId:a.string().allow(""),pageSize:a.number(),pageNo:a.number(),pageType:a.string().allow("")})}static getSearchResults(){return a.object({q:a.string().allow("").required()}).required()}static getSimilarComparisonProductBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getStores(){return a.object({pageNo:a.number(),pageSize:a.number(),q:a.string().allow(""),city:a.string().allow(""),range:a.number(),latitude:a.number(),longitude:a.number(),tags:a.string().allow("")})}static unfollowById(){return a.object({collectionType:a.string().allow("").required(),collectionId:a.string().allow("").required()}).required()}}},737:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(9692)),l=r(1844),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getLocations({locationType:e,id:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getLocations().validate({locationType:e,id:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getLocations().validate({locationType:e,id:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Common > getLocations \n ${p}`});const g={};g.location_type=e,g.id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getLocations,params:{}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.Locations().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Common > getLocations \n ${w}`})}return m}async searchApplication({authorization:e,query:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.searchApplication().validate({authorization:e,query:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.searchApplication().validate({authorization:e,query:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Common > searchApplication \n ${p}`});const g={};g.query=t;const m={};m.authorization=e;const f=await a.execute(this._conf,"get",s({url:this._urls.searchApplication,params:{}}),g,void 0,{...m,...r},{responseHeaders:u});let w=f;u&&(w=f[0]);const{error:y}=l.ApplicationResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > Common > searchApplication \n ${y}`})}return f}}},1844:(e,t,r)=>{const a=r(2705);class n{static Application(){return a.object({__v:a.number(),_id:a.string().allow(""),app_type:a.string().allow(""),auth:n.ApplicationAuth(),banner:n.SecureUrl(),cache_ttl:a.number(),channel_type:a.string().allow(""),company_id:a.number(),cors:n.ApplicationCors(),created_at:a.string().allow(""),description:a.string().allow(""),domain:n.Domain(),domains:a.array().items(n.Domain()),favicon:n.SecureUrl(),is_active:a.boolean(),is_internal:a.boolean(),logo:n.SecureUrl(),meta:a.array().items(n.ApplicationMeta()),mobile_logo:n.SecureUrl(),name:a.string().allow(""),owner:a.string().allow(""),redirections:a.array().items(n.ApplicationRedirections()),token:a.string().allow(""),updated_at:a.string().allow(""),website:n.ApplicationWebsite()})}static ApplicationAuth(){return a.object({enabled:a.boolean()})}static ApplicationCors(){return a.object({domains:a.array().items(a.string().allow(""))})}static ApplicationMeta(){return a.object({name:a.string().allow(""),value:a.string().allow("")})}static ApplicationRedirections(){return a.object({redirect_from:a.string().allow(""),redirect_to:a.string().allow(""),type:a.string().allow("")})}static ApplicationResponse(){return a.object({application:n.Application()})}static ApplicationWebsite(){return a.object({basepath:a.string().allow(""),enabled:a.boolean()})}static BadRequest(){return a.object({message:a.string().allow("")})}static Domain(){return a.object({_id:a.string().allow(""),is_predefined:a.boolean(),is_primary:a.boolean(),is_shortlink:a.boolean(),name:a.string().allow(""),verified:a.boolean()})}static LocationCountry(){return a.object({__v:a.number(),_id:a.string().allow(""),capital:a.string().allow(""),country_code:a.string().allow(""),currency:a.string().allow(""),default_currency:n.LocationDefaultCurrency(),default_language:n.LocationDefaultLanguage(),iso2:a.string().allow(""),iso3:a.string().allow(""),latitude:a.string().allow(""),longitude:a.string().allow(""),name:a.string().allow(""),parent:a.string().allow(""),phone_code:a.string().allow(""),state_code:a.string().allow(""),type:a.string().allow(""),uid:a.number()})}static LocationDefaultCurrency(){return a.object({code:a.string().allow(""),name:a.string().allow(""),symbol:a.string().allow("")})}static LocationDefaultLanguage(){return a.object({code:a.string().allow(""),name:a.string().allow("")})}static Locations(){return a.object({items:a.array().items(n.LocationCountry())})}static NotFound(){return a.object({message:a.string().allow("")})}static SecureUrl(){return a.object({secure_url:a.string().allow("")})}}e.exports=n},9692:(e,t,r)=>{const a=r(2705);r(1844),e.exports=class{static getLocations(){return a.object({locationType:a.string().allow(""),id:a.string().allow("")})}static searchApplication(){return a.object({authorization:a.string().allow(""),query:a.string().allow("")})}}},4113:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(5471)),l=r(4752),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getCommunicationConsent({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getCommunicationConsent().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getCommunicationConsent().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Communication > getCommunicationConsent \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getCommunicationConsent,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.CommunicationConsent().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Communication > getCommunicationConsent \n ${g}`})}return d}async upsertAppPushtoken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.upsertAppPushtoken().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.upsertAppPushtoken().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Communication > upsertAppPushtoken \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.upsertAppPushtoken,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PushtokenRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Communication > upsertAppPushtoken \n ${m}`})}return p}async upsertCommunicationConsent({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.upsertCommunicationConsent().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.upsertCommunicationConsent().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Communication > upsertCommunicationConsent \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.upsertCommunicationConsent,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CommunicationConsentRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Communication > upsertCommunicationConsent \n ${m}`})}return p}}},4752:(e,t,r)=>{const a=r(2705);class n{static BadRequestSchema(){return a.object({message:a.string().allow(""),status:a.string().allow("")})}static CommunicationConsent(){return a.object({app_id:a.string().allow(""),channels:n.CommunicationConsentChannels(),user_id:a.string().allow("")})}static CommunicationConsentChannels(){return a.object({email:n.CommunicationConsentChannelsEmail(),sms:n.CommunicationConsentChannelsSms(),whatsapp:n.CommunicationConsentChannelsWhatsapp()})}static CommunicationConsentChannelsEmail(){return a.object({display_name:a.string().allow(""),response:a.string().allow("")})}static CommunicationConsentChannelsSms(){return a.object({display_name:a.string().allow(""),response:a.string().allow("")})}static CommunicationConsentChannelsWhatsapp(){return a.object({country_code:a.string().allow(""),display_name:a.string().allow(""),phone_number:a.string().allow(""),response:a.string().allow("")})}static CommunicationConsentReq(){return a.object({action:a.string().allow(""),channel:a.string().allow(""),response:a.string().allow("")})}static CommunicationConsentRes(){return a.object({app_id:a.string().allow(""),channels:n.CommunicationConsentChannels(),user_id:a.string().allow("")})}static PushtokenReq(){return a.object({action:a.string().allow(""),bundle_identifier:a.string().allow(""),push_token:a.string().allow(""),type:a.string().allow(""),unique_device_id:a.string().allow("")})}static PushtokenRes(){return a.object({_id:a.string().allow(""),application_id:a.string().allow(""),bundle_identifier:a.string().allow(""),created_at:a.string().allow(""),expired_at:a.string().allow(""),platform:a.string().allow(""),push_token:a.string().allow(""),type:a.string().allow(""),unique_device_id:a.string().allow(""),updated_at:a.string().allow(""),user_id:a.string().allow("")})}}e.exports=n},5471:(e,t,r)=>{const a=r(2705),n=r(4752);e.exports=class{static getCommunicationConsent(){return a.object({})}static upsertAppPushtoken(){return a.object({body:n.PushtokenReq().required()}).required()}static upsertCommunicationConsent(){return a.object({body:n.CommunicationConsentReq().required()}).required()}}},5970:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=r(3589),l=r(473),c=r(4328),{Logger:u}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAppCurrencies({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getAppCurrencies().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getAppCurrencies().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getAppCurrencies \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getAppCurrencies,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.AppCurrencyResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getAppCurrencies \n ${g}`})}return d}async getAppStaffList({pageNo:e,pageSize:t,orderIncent:r,orderingStore:i,user:d,userName:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=l.getAppStaffList().validate({pageNo:e,pageSize:t,orderIncent:r,orderingStore:i,user:d,userName:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=l.getAppStaffList().validate({pageNo:e,pageSize:t,orderIncent:r,orderingStore:i,user:d,userName:p},{abortEarly:!1,allowUnknown:!1});w&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getAppStaffList \n ${w}`});const y={};y.page_no=e,y.page_size=t,y.order_incent=r,y.ordering_store=i,y.user=d,y.user_name=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getAppStaffList,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=c.AppStaffListResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getAppStaffList \n ${_}`})}return b}getAppStaffListPaginator({pageSize:e,orderIncent:t,orderingStore:r,user:a,userName:n}={}){const o=new i;return o.setCallback((async()=>{o.nextId;const s=o.pageNo,i=await this.getAppStaffList({pageNo:s,pageSize:e,orderIncent:t,orderingStore:r,user:a,userName:n});return o.setPaginator({hasNext:!!i.page.has_next,nextId:i.page.next_id}),i}).bind(this)),o}async getAppStaffs({orderIncent:e,orderingStore:t,user:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getAppStaffs().validate({orderIncent:e,orderingStore:t,user:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getAppStaffs().validate({orderIncent:e,orderingStore:t,user:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getAppStaffs \n ${g}`});const m={};m.order_incent=e,m.ordering_store=t,m.user=r;const f=await a.execute(this._conf,"get",s({url:this._urls.getAppStaffs,params:{}}),m,void 0,{...i},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=c.AppStaffResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getAppStaffs \n ${y}`})}return f}async getApplication({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getApplication().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getApplication().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getApplication \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getApplication,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.Application().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getApplication \n ${g}`})}return d}async getBasicDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getBasicDetails().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getBasicDetails().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getBasicDetails \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getBasicDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ApplicationDetail().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getBasicDetails \n ${g}`})}return d}async getContactInfo({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getContactInfo().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getContactInfo().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getContactInfo \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getContactInfo,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ApplicationInformation().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getContactInfo \n ${g}`})}return d}async getCurrencies({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getCurrencies().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getCurrencies().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getCurrencies \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getCurrencies,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.CurrenciesResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getCurrencies \n ${g}`})}return d}async getCurrencyById({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getCurrencyById().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getCurrencyById().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getCurrencyById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCurrencyById,params:{id:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.Currency().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getCurrencyById \n ${m}`})}return p}async getFeatures({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getFeatures().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getFeatures().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getFeatures \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getFeatures,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.AppFeatureResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getFeatures \n ${g}`})}return d}async getIntegrationTokens({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getIntegrationTokens().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getIntegrationTokens().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getIntegrationTokens \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getIntegrationTokens,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.AppTokenResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getIntegrationTokens \n ${g}`})}return d}async getLanguages({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getLanguages().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getLanguages().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getLanguages \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getLanguages,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.LanguageResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getLanguages \n ${g}`})}return d}async getOrderingStoreCookie({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getOrderingStoreCookie().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getOrderingStoreCookie().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getOrderingStoreCookie \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getOrderingStoreCookie,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.SuccessMessageResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getOrderingStoreCookie \n ${m}`})}return p}async getOrderingStores({pageNo:e,pageSize:t,q:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getOrderingStores().validate({pageNo:e,pageSize:t,q:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getOrderingStores().validate({pageNo:e,pageSize:t,q:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getOrderingStores \n ${g}`});const m={};m.page_no=e,m.page_size=t,m.q=r;const f=await a.execute(this._conf,"get",s({url:this._urls.getOrderingStores,params:{}}),m,void 0,{...i},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=c.OrderingStores().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getOrderingStores \n ${y}`})}return f}getOrderingStoresPaginator({pageSize:e,q:t}={}){const r=new i;return r.setCallback((async()=>{r.nextId;const a=r.pageNo,n=await this.getOrderingStores({pageNo:a,pageSize:e,q:t});return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getOwnerInfo({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getOwnerInfo().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getOwnerInfo().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getOwnerInfo \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getOwnerInfo,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ApplicationAboutResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getOwnerInfo \n ${g}`})}return d}async getStoreDetailById({storeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getStoreDetailById().validate({storeId:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getStoreDetailById().validate({storeId:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getStoreDetailById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getStoreDetailById,params:{storeId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.OrderingStore().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getStoreDetailById \n ${m}`})}return p}async removeOrderingStoreCookie({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.removeOrderingStoreCookie().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.removeOrderingStoreCookie().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > removeOrderingStoreCookie \n ${i}`});const d=await a.execute(this._conf,"delete",s({url:this._urls.removeOrderingStoreCookie,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.SuccessMessageResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > removeOrderingStoreCookie \n ${g}`})}return d}}},4328:(e,t,r)=>{const a=r(2705);class n{static Android(){return a.object({api_key:a.string().allow(""),application_id:a.string().allow("")})}static AppCurrencyResponse(){return a.object({application:a.string().allow(""),default_currency:n.DefaultCurrency(),supported_currency:a.array().items(n.Currency())})}static AppFeature(){return a.object({__v:a.number(),_id:a.string().allow(""),app:a.string().allow(""),cart:n.CartFeature(),common:n.CommonFeature(),created_at:a.string().allow(""),home_page:n.HomePageFeature(),landing_page:n.LandingPageFeature(),order:n.OrderFeature(),pcr:n.PcrFeature(),product_detail:n.ProductDetailFeature(),qr:n.QrFeature(),registration_page:n.RegistrationPageFeature(),updated_at:a.string().allow("")})}static AppFeatureResponse(){return a.object({feature:n.AppFeature()})}static Application(){return a.object({__v:a.number(),_id:a.string().allow(""),app_type:a.string().allow(""),auth:n.ApplicationAuth(),banner:n.SecureUrl(),cache_ttl:a.number(),channel_type:a.string().allow(""),company_id:a.number(),cors:n.ApplicationCors(),created_at:a.string().allow(""),description:a.string().allow(""),domain:n.Domain(),domains:a.array().items(n.Domain()),favicon:n.SecureUrl(),is_active:a.boolean(),is_internal:a.boolean(),logo:n.SecureUrl(),meta:a.array().items(n.ApplicationMeta()),mobile_logo:n.SecureUrl(),name:a.string().allow(""),owner:a.string().allow(""),redirections:a.array().items(n.ApplicationRedirections()),token:a.string().allow(""),updated_at:a.string().allow(""),website:n.ApplicationWebsite()})}static ApplicationAboutResponse(){return a.object({application_info:n.ApplicationInfo(),company_info:n.CompanyInfo(),owner_info:n.OwnerInfo()})}static ApplicationAuth(){return a.object({enabled:a.boolean()})}static ApplicationCors(){return a.object({domains:a.array().items(a.string().allow(""))})}static ApplicationDetail(){return a.object({_id:a.string().allow(""),banner:n.SecureUrl(),description:a.string().allow(""),domain:n.Domain(),domains:a.array().items(n.Domain()),favicon:n.SecureUrl(),logo:n.SecureUrl(),mobile_logo:n.SecureUrl(),name:a.string().allow("").required()})}static ApplicationInfo(){return a.object({_id:a.string().allow(""),banner:n.SecureUrl(),cors:n.ApplicationCors(),created_at:a.string().allow(""),description:a.string().allow(""),domain:n.Domain(),is_active:a.boolean(),logo:n.SecureUrl(),meta:n.ApplicationMeta(),name:a.string().allow(""),secret:a.string().allow(""),token:a.string().allow(""),website:n.ApplicationWebsite()})}static ApplicationInformation(){return a.object({__v:a.number(),_id:a.string().allow(""),address:n.InformationAddress(),application:a.string().allow(""),business_highlights:n.BusinessHighlights(),copyright_text:a.string().allow(""),created_at:a.string().allow(""),links:n.Links(),social_links:n.SocialLinks(),support:n.InformationSupport(),updated_at:a.string().allow("")})}static ApplicationMeta(){return a.object({name:a.string().allow(""),value:a.string().allow("")})}static ApplicationRedirections(){return a.object({redirect_from:a.string().allow(""),redirect_to:a.string().allow(""),type:a.string().allow("")})}static ApplicationWebsite(){return a.object({basepath:a.string().allow(""),enabled:a.boolean()})}static AppStaff(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),employee_code:a.string().allow(""),first_name:a.string().allow(""),last_name:a.string().allow(""),order_incent:a.boolean(),profile_pic_url:a.string().allow(""),stores:a.array().items(a.number()),title:a.string().allow(""),user:a.string().allow("")})}static AppStaffListResponse(){return a.object({items:a.array().items(n.AppStaff()),page:n.Page()})}static AppStaffResponse(){return a.object({staff_users:a.array().items(n.AppStaff())})}static AppTokenResponse(){return a.object({__v:a.number(),_id:a.string().allow(""),application:a.string().allow(""),created_at:a.string().allow(""),tokens:n.Tokens(),updated_at:a.string().allow("")})}static BlogLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static BusinessHighlights(){return a.object({_id:a.string().allow(""),icon:a.string().allow(""),sub_title:a.string().allow(""),title:a.string().allow("")})}static CartFeature(){return a.object({google_map:a.boolean(),gst_input:a.boolean(),placing_for_customer:a.boolean(),revenue_engine_coupon:a.boolean(),staff_selection:a.boolean()})}static CommonFeature(){return a.object({communication_optin_dialog:n.CommunicationOptinDialogFeature(),compare_products:n.CompareProductsFeature(),currency:n.CurrencyFeature(),deployment_store_selection:n.DeploymentStoreSelectionFeature(),feedback:n.FeedbackFeature(),listing_price:n.ListingPriceFeature(),revenue_engine:n.RevenueEngineFeature(),reward_points:n.RewardPointsConfig()})}static CommunicationOptinDialogFeature(){return a.object({visibility:a.boolean()})}static CompanyAboutAddress(){return a.object({address_type:a.string().allow(""),address1:a.string().allow(""),address2:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),pincode:a.number(),state:a.string().allow("")})}static CompanyInfo(){return a.object({_id:a.string().allow(""),addresses:a.array().items(n.CompanyAboutAddress()),created_on:a.string().allow(""),is_active:a.boolean(),name:a.string().allow(""),notification_emails:a.array().items(a.string().allow("")),uid:a.number()})}static CompareProductsFeature(){return a.object({enabled:a.boolean()})}static Credentials(){return a.object({android:n.Android(),api_key:a.string().allow(""),application_id:a.string().allow(""),gcm_sender_id:a.string().allow(""),ios:n.Ios(),project_id:a.string().allow("")})}static Credit(){return a.object({enabled:a.boolean()})}static CurrenciesResponse(){return a.object({items:a.array().items(n.Currency())})}static Currency(){return a.object({_id:a.string().allow(""),code:a.string().allow(""),created_at:a.string().allow(""),decimal_digits:a.number(),is_active:a.boolean(),name:a.string().allow(""),symbol:a.string().allow(""),updated_at:a.string().allow("")})}static CurrencyFeature(){return a.object({default_currency:a.string().allow(""),type:a.string().allow(""),value:a.array().items(a.string().allow(""))})}static Debit(){return a.object({auto_apply:a.boolean(),enabled:a.boolean(),strategy_channel:a.string().allow("")})}static DefaultCurrency(){return a.object({code:a.string().allow(""),ref:a.string().allow("")})}static DeploymentStoreSelectionFeature(){return a.object({enabled:a.boolean(),type:a.string().allow("")})}static Domain(){return a.object({_id:a.string().allow(""),is_predefined:a.boolean(),is_primary:a.boolean(),is_shortlink:a.boolean(),name:a.string().allow(""),verified:a.boolean()})}static FacebookLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static FeedbackFeature(){return a.object({enabled:a.boolean()})}static Firebase(){return a.object({credentials:n.Credentials(),enabled:a.boolean()})}static Freshchat(){return a.object({credentials:n.FreshchatCredentials(),enabled:a.boolean()})}static FreshchatCredentials(){return a.object({app_id:a.string().allow(""),app_key:a.string().allow(""),web_token:a.string().allow("")})}static FyndRewards(){return a.object({credentials:n.FyndRewardsCredentials()})}static FyndRewardsCredentials(){return a.object({public_key:a.string().allow("")})}static GoogleMap(){return a.object({credentials:n.GoogleMapCredentials()})}static GoogleMapCredentials(){return a.object({api_key:a.string().allow("")})}static GooglePlusLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static Gtm(){return a.object({credentials:n.GtmCredentials(),enabled:a.boolean()})}static GtmCredentials(){return a.object({api_key:a.string().allow("")})}static HomePageFeature(){return a.object({order_processing:a.boolean()})}static InformationAddress(){return a.object({address_line:a.array().items(a.string().allow("")),city:a.string().allow(""),country:a.string().allow(""),loc:a.string().allow(""),phone:n.InformationPhone(),pincode:a.number()})}static InformationPhone(){return a.object({code:a.string().allow(""),number:a.string().allow("")})}static InformationSupport(){return a.object({email:a.array().items(a.string().allow("")),phone:a.array().items(a.string().allow("")),timing:a.string().allow("")})}static InstagramLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static Ios(){return a.object({api_key:a.string().allow(""),application_id:a.string().allow("")})}static LandingPageFeature(){return a.object({continue_as_guest:a.boolean(),launch_page:n.LaunchPage(),login_btn_text:a.string().allow(""),show_domain_textbox:a.boolean(),show_register_btn:a.boolean()})}static LanguageResponse(){return a.object({items:a.array().items(n.SupportedLanguage())})}static LaunchPage(){return a.object({page_type:a.string().allow(""),params:a.any(),query:a.any()})}static LinkedInLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static Links(){return a.object({link:a.string().allow(""),title:a.string().allow("")})}static ListingPriceFeature(){return a.object({sort:a.string().allow(""),value:a.string().allow("")})}static Moengage(){return a.object({credentials:n.MoengageCredentials(),enabled:a.boolean()})}static MoengageCredentials(){return a.object({app_id:a.string().allow("")})}static NotFound(){return a.object({message:a.string().allow("")})}static OptedStoreAddress(){return a.object({address1:a.string().allow(""),address2:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),lat_long:n.StoreLatLong(),pincode:a.number(),state:a.string().allow("")})}static OrderFeature(){return a.object({buy_again:a.boolean()})}static OrderingStore(){return a.object({_id:a.string().allow(""),address:n.OptedStoreAddress(),code:a.string().allow(""),display_name:a.string().allow(""),name:a.string().allow(""),pincode:a.number(),store_code:a.string().allow(""),store_type:a.string().allow(""),uid:a.number()})}static OrderingStores(){return a.object({__v:a.number(),_id:a.string().allow(""),all_stores:a.boolean(),app:a.string().allow(""),deployed_stores:a.array().items(a.number()),enabled:a.boolean(),items:a.array().items(n.OrderingStore()),page:n.Page(),type:a.string().allow("")})}static OrderingStoreSelect(){return a.object({uid:a.number().required()})}static OrderingStoreSelectRequest(){return a.object({ordering_store:n.OrderingStoreSelect().required()})}static OwnerInfo(){return a.object({_id:a.string().allow(""),emails:a.array().items(n.UserEmail()),first_name:a.string().allow(""),last_name:a.string().allow(""),phone_numbers:a.array().items(n.UserPhoneNumber()),profile_pic:a.string().allow("")})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static PcrFeature(){return a.object({staff_selection:a.boolean()})}static PinterestLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static ProductDetailFeature(){return a.object({request_product:a.boolean(),seller_selection:a.boolean(),similar:a.array().items(a.string().allow("")),update_product_meta:a.boolean()})}static QrFeature(){return a.object({application:a.boolean(),collections:a.boolean(),products:a.boolean()})}static RegistrationPageFeature(){return a.object({ask_store_address:a.boolean()})}static RevenueEngineFeature(){return a.object({enabled:a.boolean()})}static RewardPointsConfig(){return a.object({credit:n.Credit(),debit:n.Debit()})}static Safetynet(){return a.object({credentials:n.SafetynetCredentials(),enabled:a.boolean()})}static SafetynetCredentials(){return a.object({api_key:a.string().allow("")})}static SecureUrl(){return a.object({secure_url:a.string().allow("")})}static Segment(){return a.object({credentials:n.SegmentCredentials(),enabled:a.boolean()})}static SegmentCredentials(){return a.object({write_key:a.string().allow("")})}static SocialLinks(){return a.object({blog_link:n.BlogLink(),facebook:n.FacebookLink(),google_plus:n.GooglePlusLink(),instagram:n.InstagramLink(),linked_in:n.LinkedInLink(),pinterest:n.PinterestLink(),twitter:n.TwitterLink(),vimeo:n.VimeoLink(),youtube:n.YoutubeLink()})}static StoreLatLong(){return a.object({coordinates:a.array().items(a.number()),type:a.string().allow("")})}static SuccessMessageResponse(){return a.object({message:a.string().allow("")})}static SupportedLanguage(){return a.object({code:a.string().allow(""),name:a.string().allow("")})}static Tokens(){return a.object({firebase:n.Firebase(),freshchat:n.Freshchat(),fynd_rewards:n.FyndRewards(),google_map:n.GoogleMap(),gtm:n.Gtm(),moengage:n.Moengage(),safetynet:n.Safetynet(),segment:n.Segment()})}static TwitterLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static UnhandledError(){return a.object({message:a.string().allow("")})}static UserEmail(){return a.object({active:a.boolean(),email:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static UserPhoneNumber(){return a.object({active:a.boolean(),country_code:a.number(),phone:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static VimeoLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static YoutubeLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}}e.exports=n},473:(e,t,r)=>{const a=r(2705),n=r(4328);e.exports=class{static getAppCurrencies(){return a.object({})}static getAppStaffList(){return a.object({pageNo:a.number(),pageSize:a.number(),orderIncent:a.boolean(),orderingStore:a.number(),user:a.string().allow(""),userName:a.string().allow("")})}static getAppStaffs(){return a.object({orderIncent:a.boolean(),orderingStore:a.number(),user:a.string().allow("")})}static getApplication(){return a.object({})}static getBasicDetails(){return a.object({})}static getContactInfo(){return a.object({})}static getCurrencies(){return a.object({})}static getCurrencyById(){return a.object({id:a.string().allow("").required()}).required()}static getFeatures(){return a.object({})}static getIntegrationTokens(){return a.object({})}static getLanguages(){return a.object({})}static getOrderingStoreCookie(){return a.object({body:n.OrderingStoreSelectRequest().required()}).required()}static getOrderingStores(){return a.object({pageNo:a.number(),pageSize:a.number(),q:a.string().allow("")})}static getOwnerInfo(){return a.object({})}static getStoreDetailById(){return a.object({storeId:a.number().required()}).required()}static removeOrderingStoreCookie(){return a.object({})}}},4976:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=r(3589),l=r(8207),c=r(3377),{Logger:u}=r(7378);r(2705),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/",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",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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAnnouncements({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getAnnouncements().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getAnnouncements().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getAnnouncements \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getAnnouncements,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.AnnouncementsResponseSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getAnnouncements \n ${g}`})}return d}async getBlog({slug:e,rootId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getBlog().validate({slug:e,rootId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getBlog().validate({slug:e,rootId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getBlog \n ${p}`});const g={};g.root_id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getBlog,params:{slug:e}}),g,void 0,{...r},{responseHeaders:i});let f=m;i&&(f=m[0]);const{error:w}=c.BlogSchema().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Content > getBlog \n ${w}`})}return m}async getBlogs({pageNo:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getBlogs().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getBlogs().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getBlogs \n ${p}`});const g={};g.page_no=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getBlogs,params:{}}),g,void 0,{...r},{responseHeaders:i});let f=m;i&&(f=m[0]);const{error:w}=c.BlogGetResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Content > getBlogs \n ${w}`})}return m}getBlogsPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{t.nextId;const r=t.pageNo,a=await this.getBlogs({pageNo:r,pageSize:e});return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getDataLoaders({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getDataLoaders().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getDataLoaders().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getDataLoaders \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getDataLoaders,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.DataLoadersSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getDataLoaders \n ${g}`})}return d}async getFaqBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getFaqBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getFaqBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getFaqBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.FaqSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqBySlug \n ${m}`})}return p}async getFaqCategories({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getFaqCategories().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getFaqCategories().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqCategories \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getFaqCategories,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.GetFaqCategoriesSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqCategories \n ${g}`})}return d}async getFaqCategoryBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getFaqCategoryBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getFaqCategoryBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqCategoryBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getFaqCategoryBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.GetFaqCategoryBySlugSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqCategoryBySlug \n ${m}`})}return p}async getFaqs({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getFaqs().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getFaqs().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqs \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getFaqs,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.FaqResponseSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqs \n ${g}`})}return d}async getFaqsByCategorySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getFaqsByCategorySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getFaqsByCategorySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqsByCategorySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getFaqsByCategorySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.GetFaqSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqsByCategorySlug \n ${m}`})}return p}async getLandingPage({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getLandingPage().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getLandingPage().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getLandingPage \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getLandingPage,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.LandingPageSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getLandingPage \n ${g}`})}return d}async getLegalInformation({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getLegalInformation().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getLegalInformation().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getLegalInformation \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getLegalInformation,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ApplicationLegal().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getLegalInformation \n ${g}`})}return d}async getNavigations({pageNo:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getNavigations().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getNavigations().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getNavigations \n ${p}`});const g={};g.page_no=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getNavigations,params:{}}),g,void 0,{...r},{responseHeaders:i});let f=m;i&&(f=m[0]);const{error:w}=c.NavigationGetResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Content > getNavigations \n ${w}`})}return m}getNavigationsPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{t.nextId;const r=t.pageNo,a=await this.getNavigations({pageNo:r,pageSize:e});return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getPage({slug:e,rootId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getPage().validate({slug:e,rootId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getPage().validate({slug:e,rootId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getPage \n ${p}`});const g={};g.root_id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getPage,params:{slug:e}}),g,void 0,{...r},{responseHeaders:i});let f=m;i&&(f=m[0]);const{error:w}=c.PageSchema().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Content > getPage \n ${w}`})}return m}async getPages({pageNo:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getPages().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getPages().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getPages \n ${p}`});const g={};g.page_no=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getPages,params:{}}),g,void 0,{...r},{responseHeaders:i});let f=m;i&&(f=m[0]);const{error:w}=c.PageGetResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Content > getPages \n ${w}`})}return m}getPagesPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{t.nextId;const r=t.pageNo,a=await this.getPages({pageNo:r,pageSize:e});return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getSEOConfiguration({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getSEOConfiguration().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getSEOConfiguration().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getSEOConfiguration \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getSEOConfiguration,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.SeoComponent().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getSEOConfiguration \n ${g}`})}return d}async getSlideshow({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getSlideshow().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getSlideshow().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getSlideshow \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getSlideshow,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.SlideshowSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Content > getSlideshow \n ${m}`})}return p}async getSlideshows({pageNo:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getSlideshows().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getSlideshows().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getSlideshows \n ${p}`});const g={};g.page_no=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getSlideshows,params:{}}),g,void 0,{...r},{responseHeaders:i});let f=m;i&&(f=m[0]);const{error:w}=c.SlideshowGetResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Content > getSlideshows \n ${w}`})}return m}getSlideshowsPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{t.nextId;const r=t.pageNo,a=await this.getSlideshows({pageNo:r,pageSize:e});return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getSupportInformation({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getSupportInformation().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getSupportInformation().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getSupportInformation \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getSupportInformation,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.Support().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getSupportInformation \n ${g}`})}return d}async getTags({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getTags().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getTags().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getTags \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getTags,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.TagsSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getTags \n ${g}`})}return d}}},3377:(e,t,r)=>{const a=r(2705);class n{static Action(){return a.object({page:n.ActionPage(),popup:n.ActionPage(),type:a.string().allow("")})}static ActionPage(){return a.object({params:a.object().pattern(/\S/,a.array().items(a.string().allow(""))),query:a.object().pattern(/\S/,a.array().items(a.string().allow(""))),type:n.PageType().required(),url:a.string().allow("")})}static AnnouncementSchema(){return a.object({announcement:a.string().allow(""),schedule:n.ScheduleStartSchema()})}static AnnouncementsResponseSchema(){return a.object({announcements:a.object().pattern(/\S/,a.array().items(n.AnnouncementSchema())),refresh_pages:a.array().items(a.string().allow("")),refresh_rate:a.number()})}static ApplicationLegal(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),created_at:a.string().allow(""),faq:a.array().items(n.ApplicationLegalFAQ()),policy:a.string().allow(""),returns:a.string().allow(""),shipping:a.string().allow(""),tnc:a.string().allow(""),updated_at:a.string().allow("")})}static ApplicationLegalFAQ(){return a.object({answer:a.string().allow(""),question:a.string().allow("")})}static Asset(){return a.object({aspect_ratio:a.string().allow(""),id:a.string().allow(""),secure_url:a.string().allow("")})}static Author(){return a.object({designation:a.string().allow(""),id:a.string().allow(""),name:a.string().allow("")})}static BlogGetResponse(){return a.object({items:a.array().items(n.BlogSchema()),page:n.Page()})}static BlogSchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),_schedule:n.CronSchedule(),application:a.string().allow(""),archived:a.boolean(),author:n.Author(),content:a.array().items(n.ResourceContent()),date_meta:n.DateMeta(),feature_image:n.Asset(),published:a.boolean(),reading_time:a.string().allow(""),seo:n.SEO(),slug:a.string().allow(""),tags:a.array().items(a.string().allow("")),title:a.string().allow("")})}static CategorySchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),application:a.string().allow(""),children:a.array().items(a.string().allow("")),description:a.string().allow(""),icon_url:a.string().allow(""),index:a.number(),slug:a.string().allow(""),title:a.string().allow("")})}static ChildrenSchema(){return a.object({_id:a.string().allow(""),answer:a.string().allow(""),application:a.string().allow(""),question:a.string().allow(""),slug:a.string().allow("")})}static CommonError(){return a.object({message:a.string().allow("")})}static ConfigurationSchema(){return a.object({duration:a.number(),sleep_time:a.number(),slide_direction:a.string().allow(""),start_on_launch:a.boolean()})}static ContactSchema(){return a.object({email:n.EmailSchema(),phone:n.PhoneSchema()})}static ContentAPIError(){return a.object({code:a.string().allow(""),exception:a.string().allow(""),info:a.string().allow(""),message:a.string().allow(""),meta:a.any(),request_id:a.string().allow(""),stack_trace:a.string().allow(""),status:a.number()})}static CreatedBySchema(){return a.object({id:a.string().allow("")})}static CronSchedule(){return a.object({cron:a.string().allow(""),duration:a.number(),end:a.string().allow(""),start:a.string().allow("")})}static CustomMetaTag(){return a.object({_id:a.string().allow(""),content:a.string().allow(""),name:a.string().allow("")})}static DataLoaderSchema(){return a.object({__source:n.DataLoaderSourceSchema(),_id:a.string().allow(""),content:a.string().allow(""),name:a.string().allow(""),operation_id:a.string().allow(""),service:a.string().allow(""),type:a.string().allow(""),url:a.string().allow("")})}static DataLoaderSourceSchema(){return a.object({id:a.string().allow(""),type:a.string().allow("")})}static DataLoadersSchema(){return a.object({items:a.array().items(n.DataLoaderSchema())})}static DateMeta(){return a.object({created_on:a.string().allow(""),modified_on:a.string().allow("")})}static Detail(){return a.object({description:a.string().allow(""),image_url:a.string().allow(""),title:a.string().allow("")})}static EmailProperties(){return a.object({key:a.string().allow(""),value:a.string().allow("")})}static EmailSchema(){return a.object({active:a.boolean(),email:a.array().items(n.EmailProperties())})}static FAQCategorySchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),application:a.string().allow(""),children:a.array().items(n.ChildrenSchema()),description:a.string().allow(""),icon_url:a.string().allow(""),index:a.number(),slug:a.string().allow(""),title:a.string().allow("")})}static FaqResponseSchema(){return a.object({faqs:a.array().items(n.FaqSchema())})}static FaqSchema(){return a.object({_id:a.string().allow(""),answer:a.string().allow(""),application:a.string().allow(""),question:a.string().allow(""),slug:a.string().allow(""),tags:a.array().items(a.string().allow(""))})}static GetFaqCategoriesSchema(){return a.object({categories:a.array().items(n.CategorySchema())})}static GetFaqCategoryBySlugSchema(){return a.object({category:n.FAQCategorySchema()})}static GetFaqSchema(){return a.object({faqs:a.array().items(n.FaqSchema())})}static LandingPageSchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),action:n.Action(),application:a.string().allow(""),archived:a.boolean(),created_by:n.CreatedBySchema(),date_meta:n.DateMeta(),platform:a.array().items(a.string().allow("")),slug:a.string().allow("")})}static Language(){return a.object({display:a.string().allow("")})}static LocaleLanguage(){return a.object({ar:n.Language(),en_us:n.Language(),hi:n.Language()})}static NavigationGetResponse(){return a.object({items:a.array().items(n.NavigationSchema()),page:n.Page()})}static NavigationReference(){return a.object({_locale_language:n.LocaleLanguage(),acl:a.array().items(a.string().allow("")),action:n.Action(),active:a.boolean(),display:a.string().allow(""),image:a.string().allow(""),sort_order:a.number(),sub_navigation:a.array().items(a.link("#NavigationReference")),tags:a.array().items(a.string().allow("")),type:a.string().allow("")}).id("NavigationReference")}static NavigationSchema(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),archived:a.boolean(),created_by:n.CreatedBySchema(),date_meta:n.DateMeta(),name:a.string().allow(""),navigation:a.array().items(n.NavigationReference()),orientation:n.Orientation(),platform:a.array().items(a.string().allow("")),slug:a.string().allow(""),version:a.number()})}static NextSchedule(){return a.object({end:a.string().allow(""),start:a.string().allow("")})}static Orientation(){return a.object({landscape:a.array().items(a.string().allow("")),portrait:a.array().items(a.string().allow(""))})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static PageGetResponse(){return a.object({items:a.array().items(n.PageSchema()),page:n.Page()})}static PageSchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),_schedule:n.ScheduleSchema(),application:a.string().allow(""),archived:a.boolean(),component_ids:a.array().items(a.string().allow("")),content:a.array().items(a.any()),content_path:a.string().allow(""),created_by:n.CreatedBySchema(),date_meta:n.DateMeta(),description:a.string().allow(""),feature_image:n.Asset(),orientation:a.string().allow(""),page_meta:a.array().items(a.any()),platform:a.string().allow(""),published:a.boolean(),seo:n.SEO(),slug:a.string().allow(""),tags:a.array().items(a.string().allow("")),title:a.string().allow(""),type:a.string().allow(""),visibility:a.any()})}static PhoneProperties(){return a.object({code:a.string().allow(""),key:a.string().allow(""),number:a.string().allow("")})}static PhoneSchema(){return a.object({active:a.boolean(),phone:a.array().items(n.PhoneProperties())})}static ResourceContent(){return a.object({type:a.string().allow(""),value:a.string().allow("")})}static ScheduleSchema(){return a.object({cron:a.string().allow(""),duration:a.number(),end:a.string().allow(""),next_schedule:a.array().items(n.NextSchedule()),start:a.string().allow("")})}static ScheduleStartSchema(){return a.object({end:a.string().allow(""),start:a.string().allow("")})}static SEO(){return a.object({description:a.string().allow(""),image:n.SEOImage(),title:a.string().allow("")})}static SeoComponent(){return a.object({seo:n.SeoSchema()})}static SEOImage(){return a.object({url:a.string().allow("")})}static SeoSchema(){return a.object({_id:a.string().allow(""),app:a.string().allow(""),cannonical_enabled:a.boolean(),created_at:a.string().allow(""),custom_meta_tags:a.array().items(n.CustomMetaTag()),details:n.Detail(),robots_txt:a.string().allow(""),sitemap_enabled:a.boolean(),updated_at:a.string().allow("")})}static SlideshowGetResponse(){return a.object({items:a.array().items(n.SlideshowSchema()),page:n.Page()})}static SlideshowMedia(){return a.object({action:n.Action(),auto_decide_duration:a.boolean(),bg_color:a.string().allow(""),duration:a.number(),type:a.string().allow(""),url:a.string().allow("")})}static SlideshowSchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),active:a.boolean(),application:a.string().allow(""),archived:a.boolean(),configuration:n.ConfigurationSchema(),date_meta:n.DateMeta(),media:a.array().items(n.SlideshowMedia()),platform:a.string().allow(""),slug:a.string().allow("")})}static Support(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),config_type:a.string().allow(""),contact:n.ContactSchema(),created:a.boolean(),created_at:a.string().allow(""),updated_at:a.string().allow("")})}static TagSchema(){return a.object({__source:n.TagSourceSchema(),_id:a.string().allow(""),attributes:a.any(),content:a.string().allow(""),name:a.string().allow(""),pages:a.array().items(a.any()),position:a.string().allow(""),sub_type:a.string().allow(""),type:a.string().allow(""),url:a.string().allow("")})}static TagSourceSchema(){return a.object({id:a.string().allow(""),type:a.string().allow("")})}static TagsSchema(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),tags:a.array().items(n.TagSchema())})}static PageType(){return a.string().valid("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")}}e.exports=n},8207:(e,t,r)=>{const a=r(2705);r(3377),e.exports=class{static getAnnouncements(){return a.object({})}static getBlog(){return a.object({slug:a.string().allow("").required(),rootId:a.string().allow("")}).required()}static getBlogs(){return a.object({pageNo:a.number(),pageSize:a.number()})}static getDataLoaders(){return a.object({})}static getFaqBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getFaqCategories(){return a.object({})}static getFaqCategoryBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getFaqs(){return a.object({})}static getFaqsByCategorySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getLandingPage(){return a.object({})}static getLegalInformation(){return a.object({})}static getNavigations(){return a.object({pageNo:a.number(),pageSize:a.number()})}static getPage(){return a.object({slug:a.string().allow("").required(),rootId:a.string().allow("")}).required()}static getPages(){return a.object({pageNo:a.number(),pageSize:a.number()})}static getSEOConfiguration(){return a.object({})}static getSlideshow(){return a.object({slug:a.string().allow("").required()}).required()}static getSlideshows(){return a.object({pageNo:a.number(),pageSize:a.number()})}static getSupportInformation(){return a.object({})}static getTags(){return a.object({})}}},8568:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(2601)),l=r(5108),{Logger:c}=r(7378),u=(r(2705),r(9669));class d{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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async completeUpload({namespace:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.completeUpload().validate({namespace:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.completeUpload().validate({namespace:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > FileStorage > completeUpload \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.completeUpload,params:{namespace:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.CompleteResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > FileStorage > completeUpload \n ${f}`})}return g}async signUrls({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.signUrls().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.signUrls().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > FileStorage > signUrls \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.signUrls,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SignUrlResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > FileStorage > signUrls \n ${m}`})}return p}async startUpload({namespace:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.startUpload().validate({namespace:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.startUpload().validate({namespace:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > FileStorage > startUpload \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.startUpload,params:{namespace:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.StartResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > FileStorage > startUpload \n ${f}`})}return g}}d.prototype.upload=function({data:e,file_name:t,content_type:r,namespace:a,size:n,tags:o}={}){return new Promise((async(s,i)=>{try{const l=await this.startUpload({namespace:a,body:{file_name:t,content_type:r,size:n,tags:o}});l.upload&&l.upload.url?await u.put(l.upload.url,e,{withCredentials:!1,headers:{"Content-Type":r}}):i({message:"Failed to upload file"}),delete l.tags,s(await this.completeUpload({namespace:a,body:l}))}catch(e){i(e)}}))},e.exports=d},5108:(e,t,r)=>{const a=r(2705);class n{static CDN(){return a.object({absolute_url:a.string().allow("").required(),relative_url:a.string().allow("").required(),url:a.string().allow("").required()})}static CompleteResponse(){return a.object({_id:a.string().allow("").required(),cdn:n.CDN().required(),content_type:a.string().allow("").required(),created_by:n.CreatedBy(),created_on:a.string().allow("").required(),file_name:a.string().allow("").required(),file_path:a.string().allow("").required(),modified_on:a.string().allow("").required(),namespace:a.string().allow("").required(),operation:a.string().allow("").required(),size:a.number().required(),success:a.boolean().required(),tags:a.array().items(a.string().allow("")),upload:n.Upload().required()})}static CreatedBy(){return a.object({username:a.string().allow("")})}static Params(){return a.object({subpath:a.string().allow("")})}static SignUrlRequest(){return a.object({expiry:a.number().required(),urls:a.array().items(a.string().allow("")).required()})}static SignUrlResponse(){return a.object({urls:a.array().items(n.Urls()).required()})}static StartRequest(){return a.object({content_type:a.string().allow("").required(),file_name:a.string().allow("").required(),params:n.Params(),size:a.number().required(),tags:a.array().items(a.string().allow(""))})}static StartResponse(){return a.object({cdn:n.CDN().required(),content_type:a.string().allow("").required(),file_name:a.string().allow("").required(),file_path:a.string().allow("").required(),method:a.string().allow(""),namespace:a.string().allow("").required(),operation:a.string().allow("").required(),size:a.number().required(),tags:a.array().items(a.string().allow("")),upload:n.Upload().required()})}static Upload(){return a.object({expiry:a.number().required(),url:a.string().allow("").required()})}static Urls(){return a.object({expiry:a.number().required(),signed_url:a.string().allow("").required(),url:a.string().allow("").required()})}}e.exports=n},2601:(e,t,r)=>{const a=r(2705),n=r(5108);e.exports=class{static completeUpload(){return a.object({namespace:a.string().allow("").required(),body:n.StartResponse().required()}).required()}static signUrls(){return a.object({body:n.SignUrlRequest().required()}).required()}static startUpload(){return a.object({namespace:a.string().allow("").required(),body:n.StartRequest().required()}).required()}}},562:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(2821)),l=r(4535),{Logger:c}=r(7378);r(2705),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}",getParticipantsInsideVideoRoom:"/service/application/lead/v1.0/video/room/{unique_name}/participants",getTicket:"/service/application/lead/v1.0/ticket/{id}",getTokenForVideoRoom:"/service/application/lead/v1.0/video/room/{unique_name}/token",submitCustomForm:"/service/application/lead/v1.0/form/{slug}/submit"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async createHistory({id:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.createHistory().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.createHistory().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > createHistory \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.createHistory,params:{id:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.TicketHistory().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Lead > createHistory \n ${f}`})}return g}async createTicket({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.createTicket().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.createTicket().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > createTicket \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.createTicket,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.Ticket().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > createTicket \n ${m}`})}return p}async getCustomForm({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCustomForm().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCustomForm().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > getCustomForm \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCustomForm,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CustomForm().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > getCustomForm \n ${m}`})}return p}async getParticipantsInsideVideoRoom({uniqueName:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getParticipantsInsideVideoRoom().validate({uniqueName:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getParticipantsInsideVideoRoom().validate({uniqueName:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > getParticipantsInsideVideoRoom \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getParticipantsInsideVideoRoom,params:{uniqueName:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetParticipantsInsideVideoRoomResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > getParticipantsInsideVideoRoom \n ${m}`})}return p}async getTicket({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getTicket().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getTicket().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > getTicket \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getTicket,params:{id:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.Ticket().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > getTicket \n ${m}`})}return p}async getTokenForVideoRoom({uniqueName:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getTokenForVideoRoom().validate({uniqueName:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getTokenForVideoRoom().validate({uniqueName:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > getTokenForVideoRoom \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getTokenForVideoRoom,params:{uniqueName:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetTokenForVideoRoomResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > getTokenForVideoRoom \n ${m}`})}return p}async submitCustomForm({slug:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.submitCustomForm().validate({slug:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.submitCustomForm().validate({slug:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > submitCustomForm \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.submitCustomForm,params:{slug:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.SubmitCustomFormResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Lead > submitCustomForm \n ${f}`})}return g}}},4535:(e,t,r)=>{const a=r(2705);class n{static AddTicketPayload(){return a.object({_custom_json:a.any(),category:a.string().allow("").required(),content:n.TicketContent().required(),created_by:a.any(),priority:n.PriorityEnum(),status:a.string().allow(""),subscribers:a.array().items(a.string().allow(""))})}static CreatedOn(){return a.object({user_agent:a.string().allow("").required()})}static CustomForm(){return a.object({_id:a.string().allow("").required(),application_id:a.string().allow("").required(),created_on:n.CreatedOn(),description:a.string().allow(""),header_image:a.string().allow(""),inputs:a.array().items(a.any()).required(),login_required:a.boolean().required(),poll_for_assignment:n.PollForAssignment(),priority:n.Priority().required(),should_notify:a.boolean().required(),slug:a.string().allow("").required(),submit_button:n.SubmitButton(),success_message:a.string().allow(""),title:a.string().allow("").required()})}static CustomFormSubmissionPayload(){return a.object({attachments:a.array().items(n.TicketAsset()),response:a.array().items(a.any()).required()})}static Debug(){return a.object({platform:a.string().allow(""),source:a.string().allow("")})}static Email(){return a.object({active:a.boolean(),email:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static FeedbackForm(){return a.object({inputs:a.any(),timestamps:a.any(),title:a.string().allow("")})}static GetParticipantsInsideVideoRoomResponse(){return a.object({participants:a.array().items(n.Participant()).required()})}static GetTokenForVideoRoomResponse(){return a.object({access_token:a.string().allow("").required()})}static Participant(){return a.object({identity:a.string().allow(""),status:a.string().allow(""),user:n.UserSchema()})}static PhoneNumber(){return a.object({active:a.boolean(),country_code:a.number(),phone:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static PollForAssignment(){return a.object({duration:a.number().required(),failure_message:a.string().allow("").required(),message:a.string().allow("").required(),success_message:a.string().allow("").required()})}static Priority(){return a.object({color:a.string().allow("").required(),display:a.string().allow("").required(),key:n.PriorityEnum().required()})}static Status(){return a.object({color:a.string().allow("").required(),display:a.string().allow("").required(),key:a.string().allow("").required()})}static SubmitButton(){return a.object({background_color:a.string().allow("").required(),title:a.string().allow("").required(),title_color:a.string().allow("").required()})}static SubmitCustomFormResponse(){return a.object({message:a.string().allow("").required(),ticket:n.Ticket()})}static Ticket(){return a.object({_custom_json:a.any(),_id:a.string().allow("").required(),assigned_to:a.any(),category:n.TicketCategory().required(),content:n.TicketContent(),context:n.TicketContext(),created_at:a.string().allow(""),created_by:a.any(),created_on:n.CreatedOn(),integration:a.any(),is_feedback_pending:a.boolean(),priority:n.Priority().required(),response_id:a.string().allow(""),source:n.TicketSourceEnum().required(),status:n.Status().required(),sub_category:a.string().allow(""),tags:a.array().items(a.string().allow("")),updated_at:a.string().allow("")})}static TicketAsset(){return a.object({display:a.string().allow(""),type:n.TicketAssetTypeEnum().required(),value:a.string().allow("").required()})}static TicketCategory(){return a.object({display:a.string().allow("").required(),feedback_form:n.FeedbackForm(),group_id:a.number(),key:a.string().allow("").required(),sub_categories:a.link("#TicketCategory")}).id("TicketCategory")}static TicketContent(){return a.object({attachments:a.array().items(n.TicketAsset()),description:a.string().allow(""),title:a.string().allow("").required()})}static TicketContext(){return a.object({application_id:a.string().allow(""),company_id:a.string().allow("").required()})}static TicketHistory(){return a.object({_id:a.string().allow("").required(),created_at:a.string().allow(""),created_by:a.any(),created_on:n.CreatedOn(),ticket_id:a.string().allow("").required(),type:a.string().allow("").required(),updated_at:a.string().allow(""),value:a.any().required()})}static TicketHistoryPayload(){return a.object({type:n.HistoryTypeEnum().required(),value:a.any().required()})}static UserSchema(){return a.object({_id:a.string().allow(""),account_type:a.string().allow(""),active:a.boolean(),application_id:a.string().allow(""),created_at:a.string().allow(""),dob:a.string().allow(""),emails:a.array().items(n.Email()),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),meta:a.any(),phone_numbers:a.array().items(n.PhoneNumber()),profile_pic_url:a.string().allow(""),updated_at:a.string().allow(""),user_id:a.string().allow(""),username:a.string().allow("")})}static HistoryTypeEnum(){return a.string().valid("rating","log","comment","thread")}static PriorityEnum(){return a.string().valid("low","medium","high","urgent")}static TicketAssetTypeEnum(){return a.string().valid("image","video","file","youtube","product","collection","brand","shipment","order")}static TicketSourceEnum(){return a.string().valid("platform_panel","sales_channel")}}e.exports=n},2821:(e,t,r)=>{const a=r(2705),n=r(4535);e.exports=class{static createHistory(){return a.object({id:a.string().allow("").required(),body:n.TicketHistoryPayload().required()}).required()}static createTicket(){return a.object({body:n.AddTicketPayload().required()}).required()}static getCustomForm(){return a.object({slug:a.string().allow("").required()}).required()}static getParticipantsInsideVideoRoom(){return a.object({uniqueName:a.string().allow("").required()}).required()}static getTicket(){return a.object({id:a.string().allow("").required()}).required()}static getTokenForVideoRoom(){return a.object({uniqueName:a.string().allow("").required()}).required()}static submitCustomForm(){return a.object({slug:a.string().allow("").required(),body:n.CustomFormSubmissionPayload().required()}).required()}}},4203:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(8745)),l=r(9541),{Logger:c}=r(7378);r(2705),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAllCountries:"/service/application/logistics/v1.0/country-list",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/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAllCountries({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getAllCountries().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getAllCountries().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getAllCountries \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getAllCountries,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.CountryListResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getAllCountries \n ${g}`})}return d}async getOptimalLocations({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getOptimalLocations().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getOptimalLocations().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getOptimalLocations \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getOptimalLocations,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ReAssignStoreResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getOptimalLocations \n ${m}`})}return p}async getPincodeCity({pincode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPincodeCity().validate({pincode:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPincodeCity().validate({pincode:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getPincodeCity \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getPincodeCity,params:{pincode:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PincodeApiResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getPincodeCity \n ${m}`})}return p}async getPincodeZones({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPincodeZones().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPincodeZones().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getPincodeZones \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getPincodeZones,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetZoneFromPincodeViewResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getPincodeZones \n ${m}`})}return p}async getTatProduct({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getTatProduct().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getTatProduct().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getTatProduct \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getTatProduct,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.TATViewResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getTatProduct \n ${m}`})}return p}}},9541:(e,t,r)=>{const a=r(2705);class n{static CountryEntityResponse(){return a.object({display_name:a.string().allow(""),is_active:a.boolean(),logistics:n.LogisticsResponse(),meta:n.CountryMetaResponse(),name:a.string().allow(""),parent_id:a.string().allow(""),sub_type:a.string().allow(""),type:a.string().allow(""),uid:a.string().allow("")})}static CountryListResponse(){return a.object({results:a.array().items(n.CountryEntityResponse())})}static CountryMetaResponse(){return a.object({country_code:a.string().allow(""),isd_code:a.string().allow("")})}static DP(){return a.object({area_code:a.string().allow("").allow(null),assign_dp_from_sb:a.boolean(),external_account_id:a.string().allow("").allow(null),fm_priority:a.number().required(),internal_account_id:a.string().allow(""),lm_priority:a.number().required(),operations:a.array().items(a.string().allow("")).required(),payment_mode:a.string().allow("").required(),rvp_priority:a.number().required(),transport_mode:a.string().allow("")})}static GetZoneFromPincodeViewRequest(){return a.object({country:a.string().allow("").required(),pincode:a.string().allow("").required()})}static GetZoneFromPincodeViewResponse(){return a.object({serviceability_type:a.string().allow("").required(),zones:a.array().items(a.string().allow("")).required()})}static LogisticsResponse(){return a.object({dp:a.object().pattern(/\S/,n.DP())})}static PincodeApiResponse(){return a.object({data:a.array().items(n.PincodeDataResponse()),error:n.PincodeErrorSchemaResponse().required(),success:a.boolean().required()})}static PincodeDataResponse(){return a.object({display_name:a.string().allow(""),error:n.PincodeErrorSchemaResponse().required(),lat_long:n.PincodeLatLongData(),meta:n.PincodeMetaResponse(),meta_code:n.CountryMetaResponse(),name:a.string().allow(""),parents:a.array().items(n.PincodeParentsResponse()),sub_type:a.string().allow(""),uid:a.string().allow("")})}static PincodeErrorSchemaResponse(){return a.object({message:a.string().allow("").allow(null),type:a.string().allow("").allow(null),value:a.string().allow("").allow(null)})}static PincodeLatLongData(){return a.object({coordinates:a.array().items(a.string().allow("")),type:a.string().allow("")})}static PincodeMetaResponse(){return a.object({internal_zone_id:a.number(),zone:a.string().allow("")})}static PincodeParentsResponse(){return a.object({display_name:a.string().allow(""),name:a.string().allow(""),sub_type:a.string().allow(""),uid:a.string().allow("")})}static ReAssignStoreRequest(){return a.object({articles:a.array().items(a.any()).required(),configuration:a.any().required(),identifier:a.string().allow("").required(),ignored_locations:a.array().items(a.number()).required(),to_pincode:a.string().allow("").required()})}static ReAssignStoreResponse(){return a.object({assigned_stores:a.array().items(a.any()),error:a.any().required(),pystormbreaker_uuid:a.string().allow("").required(),success:a.boolean().required(),to_pincode:a.string().allow("").required()})}static TATArticlesRequest(){return a.object({category:n.TATCategoryRequest(),manufacturing_time:a.number(),manufacturing_time_unit:a.string().allow("")})}static TATArticlesResponse(){return a.object({_manufacturing_time_seconds:a.number(),category:n.TATCategoryRequest(),error:n.TATErrorSchemaResponse(),is_cod_available:a.boolean(),manufacturing_time:a.number(),manufacturing_time_unit:a.string().allow(""),promise:n.TATPromiseResponse()})}static TATCategoryRequest(){return a.object({id:a.number(),level:a.string().allow("")})}static TATErrorSchemaResponse(){return a.object({message:a.string().allow("").allow(null),type:a.string().allow("").allow(null),value:a.string().allow("").allow(null)})}static TATFormattedResponse(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static TATLocationDetailsRequest(){return a.object({articles:a.array().items(n.TATArticlesRequest()),from_pincode:a.string().allow(""),fulfillment_id:a.number()})}static TATLocationDetailsResponse(){return a.object({articles:a.array().items(n.TATArticlesResponse()),from_pincode:a.string().allow(""),fulfillment_id:a.number()})}static TATPromiseResponse(){return a.object({formatted:n.TATFormattedResponse(),timestamp:n.TATTimestampResponse()})}static TATTimestampResponse(){return a.object({max:a.number(),min:a.number()})}static TATViewRequest(){return a.object({action:a.string().allow(""),identifier:a.string().allow(""),journey:a.string().allow(""),location_details:a.array().items(n.TATLocationDetailsRequest()),source:a.string().allow(""),to_pincode:a.string().allow("")})}static TATViewResponse(){return a.object({action:a.string().allow(""),error:n.TATErrorSchemaResponse(),identifier:a.string().allow(""),is_cod_available:a.boolean(),journey:a.string().allow(""),location_details:a.array().items(n.TATLocationDetailsResponse()),payment_mode:a.string().allow(""),request_uuid:a.string().allow(""),source:a.string().allow(""),stormbreaker_uuid:a.string().allow(""),success:a.boolean(),to_city:a.string().allow(""),to_pincode:a.string().allow("")})}}e.exports=n},8745:(e,t,r)=>{const a=r(2705),n=r(9541);e.exports=class{static getAllCountries(){return a.object({})}static getOptimalLocations(){return a.object({body:n.ReAssignStoreRequest().required()}).required()}static getPincodeCity(){return a.object({pincode:a.string().allow("").required()}).required()}static getPincodeZones(){return a.object({body:n.GetZoneFromPincodeViewRequest().required()}).required()}static getTatProduct(){return a.object({body:n.TATViewRequest().required()}).required()}}},9171:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(8174)),l=r(2453),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getCustomerDetailsByShipmentId({orderId:e,shipmentId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getCustomerDetailsByShipmentId().validate({orderId:e,shipmentId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getCustomerDetailsByShipmentId().validate({orderId:e,shipmentId:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getCustomerDetailsByShipmentId \n ${p}`});const g=await a.execute(this._conf,"get",s({url:this._urls.getCustomerDetailsByShipmentId,params:{orderId:e,shipmentId:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.CustomerDetailsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Order > getCustomerDetailsByShipmentId \n ${f}`})}return g}async getInvoiceByShipmentId({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getInvoiceByShipmentId().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getInvoiceByShipmentId().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getInvoiceByShipmentId \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getInvoiceByShipmentId,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResponseGetInvoiceShipment().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > getInvoiceByShipmentId \n ${m}`})}return p}async getOrderById({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getOrderById().validate({orderId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getOrderById().validate({orderId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getOrderById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getOrderById,params:{orderId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.OrderById().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > getOrderById \n ${m}`})}return p}async getOrders({status:e,pageNo:t,pageSize:r,fromDate:u,toDate:d,customMeta:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.getOrders().validate({status:e,pageNo:t,pageSize:r,fromDate:u,toDate:d,customMeta:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.getOrders().validate({status:e,pageNo:t,pageSize:r,fromDate:u,toDate:d,customMeta:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getOrders \n ${w}`});const y={};y.status=e,y.page_no=t,y.page_size=r,y.from_date=u,y.to_date=d,y.custom_meta=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getOrders,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.OrderList().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Order > getOrders \n ${_}`})}return b}async getPosOrderById({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPosOrderById().validate({orderId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPosOrderById().validate({orderId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getPosOrderById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getPosOrderById,params:{orderId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.OrderById().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > getPosOrderById \n ${m}`})}return p}async getShipmentBagReasons({shipmentId:e,bagId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getShipmentBagReasons().validate({shipmentId:e,bagId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getShipmentBagReasons().validate({shipmentId:e,bagId:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getShipmentBagReasons \n ${p}`});const g=await a.execute(this._conf,"get",s({url:this._urls.getShipmentBagReasons,params:{shipmentId:e,bagId:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.ShipmentBagReasons().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Order > getShipmentBagReasons \n ${f}`})}return g}async getShipmentById({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getShipmentById().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getShipmentById().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getShipmentById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getShipmentById,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShipmentById().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > getShipmentById \n ${m}`})}return p}async getShipmentReasons({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getShipmentReasons().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getShipmentReasons().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getShipmentReasons \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getShipmentReasons,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShipmentReasons().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > getShipmentReasons \n ${m}`})}return p}async sendOtpToShipmentCustomer({orderId:e,shipmentId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendOtpToShipmentCustomer().validate({orderId:e,shipmentId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendOtpToShipmentCustomer().validate({orderId:e,shipmentId:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > sendOtpToShipmentCustomer \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.sendOtpToShipmentCustomer,params:{orderId:e,shipmentId:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.SendOtpToCustomerResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Order > sendOtpToShipmentCustomer \n ${f}`})}return g}async trackShipment({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.trackShipment().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.trackShipment().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > trackShipment \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.trackShipment,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShipmentTrack().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > trackShipment \n ${m}`})}return p}async updateShipmentStatus({shipmentId:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateShipmentStatus().validate({shipmentId:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateShipmentStatus().validate({shipmentId:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > updateShipmentStatus \n ${p}`});const g=await a.execute(this._conf,"put",s({url:this._urls.updateShipmentStatus,params:{shipmentId:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.ShipmentApplicationStatusResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Order > updateShipmentStatus \n ${f}`})}return g}async verifyOtpShipmentCustomer({orderId:e,shipmentId:t,body:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.verifyOtpShipmentCustomer().validate({orderId:e,shipmentId:t,body:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.verifyOtpShipmentCustomer().validate({orderId:e,shipmentId:t,body:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > verifyOtpShipmentCustomer \n ${g}`});const m=await a.execute(this._conf,"post",s({url:this._urls.verifyOtpShipmentCustomer,params:{orderId:e,shipmentId:t}}),{},r,{...u},{responseHeaders:d});let f=m;d&&(f=m[0]);const{error:w}=l.VerifyOtpResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Order > verifyOtpShipmentCustomer \n ${w}`})}return m}}},2453:(e,t,r)=>{const a=r(2705);class n{static ApefaceApiError(){return a.object({message:a.string().allow(""),success:a.boolean()})}static AppliedFreeArticles(){return a.object({article_id:a.string().allow(""),free_gift_item_details:a.any(),parent_item_identifier:a.string().allow(""),quantity:a.number()})}static AppliedPromos(){return a.object({amount:a.number(),applied_free_articles:a.array().items(n.AppliedFreeArticles()),article_quantity:a.number(),mrp_promotion:a.boolean(),promo_id:a.string().allow(""),promotion_name:a.string().allow(""),promotion_type:a.string().allow("")})}static BagReasonMeta(){return a.object({show_text_area:a.boolean()})}static BagReasons(){return a.object({display_name:a.string().allow(""),id:a.number(),meta:n.BagReasonMeta(),qc_type:a.array().items(a.string().allow("")),question_set:a.array().items(n.QuestionSet()),reasons:a.array().items(a.link("#BagReasons"))}).id("BagReasons")}static Bags(){return a.object({applied_promos:a.array().items(n.AppliedPromos()),can_cancel:a.boolean(),can_return:a.boolean(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),current_status:n.CurrentStatus(),delivery_date:a.string().allow("").allow(null),financial_breakup:a.array().items(n.FinancialBreakup()),id:a.number(),item:n.Item(),line_number:a.number(),meta:a.any(),parent_promo_bags:a.any(),prices:n.Prices(),quantity:a.number(),returnable_date:a.string().allow("").allow(null),seller_identifier:a.string().allow("")})}static BagsForReorder(){return a.object({article_assignment:n.BagsForReorderArticleAssignment(),item_id:a.number(),item_size:a.string().allow(""),quantity:a.number(),seller_id:a.number(),store_id:a.number()})}static BagsForReorderArticleAssignment(){return a.object({level:a.string().allow(""),strategy:a.string().allow("")})}static BreakupValues(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),display:a.string().allow(""),name:a.string().allow(""),value:a.number()})}static CurrentStatus(){return a.object({journey_type:a.string().allow("").allow(null),name:a.string().allow(""),status:a.string().allow(""),updated_at:a.string().allow("")})}static CustomerDetailsResponse(){return a.object({country:a.string().allow(""),name:a.string().allow(""),order_id:a.string().allow(""),phone:a.string().allow(""),shipment_id:a.string().allow("")})}static DataUpdates(){return a.object({entities:a.array().items(n.EntitiesDataUpdates()),products:a.array().items(n.ProductsDataUpdates())})}static DeliveryAddress(){return a.object({address:a.string().allow(""),address_category:a.string().allow(""),address_type:a.string().allow(""),address1:a.string().allow(""),address2:a.string().allow(""),area:a.string().allow(""),city:a.string().allow(""),contact_person:a.string().allow(""),country:a.string().allow(""),country_iso_code:a.string().allow(""),country_phone_code:a.string().allow(""),created_at:a.string().allow(""),email:a.string().allow(""),landmark:a.string().allow(""),latitude:a.number().allow(null),longitude:a.number().allow(null),name:a.string().allow(""),phone:a.string().allow(""),pincode:a.string().allow(""),state:a.string().allow(""),updated_at:a.string().allow(""),version:a.string().allow("")})}static EntitiesDataUpdates(){return a.object({data:a.any(),filters:a.array().items(a.any())})}static EntitiesReasons(){return a.object({data:n.EntityReasonData(),filters:a.array().items(a.any())})}static EntityReasonData(){return a.object({reason_id:a.number(),reason_text:a.string().allow("")})}static ErrorResponse(){return a.object({code:a.string().allow("").allow(null),exception:a.string().allow("").allow(null),message:a.string().allow("").allow(null),stack_trace:a.string().allow("").allow(null),status:a.number()})}static FinancialBreakup(){return a.object({added_to_fynd_cash:a.boolean(),amount_paid:a.number(),amount_paid_roundoff:a.number(),brand_calculated_amount:a.number(),cashback:a.number(),cashback_applied:a.number(),cod_charges:a.number(),coupon_effective_discount:a.number(),coupon_value:a.number(),delivery_charge:a.number(),discount:a.number(),fynd_credits:a.number(),gst_fee:a.number(),gst_tag:a.string().allow(""),gst_tax_percentage:a.number(),hsn_code:a.string().allow(""),identifiers:n.Identifiers(),item_name:a.string().allow(""),price_effective:a.number(),price_marked:a.number(),promotion_effective_discount:a.number(),refund_amount:a.number(),refund_credit:a.number(),size:a.string().allow(""),total_units:a.number(),transfer_price:a.number(),value_of_good:a.number()})}static FulfillingCompany(){return a.object({id:a.number(),name:a.string().allow("")})}static FulfillingStore(){return a.object({code:a.string().allow(""),company_id:a.number(),company_name:a.string().allow(""),id:a.number(),name:a.string().allow("")})}static Identifiers(){return a.object({ean:a.string().allow(""),sku_code:a.string().allow("")})}static Invoice(){return a.object({invoice_url:a.string().allow(""),label_url:a.string().allow(""),updated_date:a.string().allow("")})}static Item(){return a.object({attributes:a.object().pattern(/\S/,a.any()),brand:n.ItemBrand(),code:a.string().allow(""),id:a.number(),image:a.array().items(a.string().allow("")),l1_categories:a.array().items(a.string().allow("")),l2_categories:a.array().items(a.string().allow("")),l3_category_name:a.string().allow(""),name:a.string().allow(""),seller_identifier:a.string().allow(""),size:a.string().allow(""),slug_key:a.string().allow("")})}static ItemBrand(){return a.object({logo:a.string().allow(""),name:a.string().allow("")})}static NestedTrackingDetails(){return a.object({is_current:a.boolean(),is_passed:a.boolean(),status:a.string().allow(""),time:a.string().allow("")})}static OrderById(){return a.object({order:n.OrderSchema()})}static OrderFilters(){return a.object({statuses:a.array().items(n.OrderStatuses())})}static OrderList(){return a.object({filters:n.OrderFilters(),items:a.array().items(n.OrderSchema()),page:n.OrderPage()})}static OrderPage(){return a.object({current:a.number(),has_next:a.boolean(),item_total:a.number(),size:a.number(),type:a.string().allow("")})}static OrderSchema(){return a.object({bags_for_reorder:a.array().items(n.BagsForReorder()),breakup_values:a.array().items(n.BreakupValues()),order_created_time:a.string().allow(""),order_id:a.string().allow(""),shipments:a.array().items(n.Shipments()),total_shipments_in_order:a.number(),user_info:n.UserInfo()})}static OrderStatuses(){return a.object({display:a.string().allow(""),is_selected:a.boolean(),value:a.number()})}static Prices(){return a.object({added_to_fynd_cash:a.boolean(),amount_paid:a.number(),amount_paid_roundoff:a.number(),brand_calculated_amount:a.number(),cashback:a.number(),cashback_applied:a.number(),cod_charges:a.number(),coupon_effective_discount:a.number(),coupon_value:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),delivery_charge:a.number(),discount:a.number(),fynd_credits:a.number(),gst_tax_percentage:a.number(),price_effective:a.number(),price_marked:a.number(),promotion_effective_discount:a.number(),refund_amount:a.number(),refund_credit:a.number(),transfer_price:a.number(),value_of_good:a.number()})}static Products(){return a.object({identifier:a.string().allow(""),line_number:a.number(),quantity:a.number()})}static ProductsDataUpdates(){return a.object({data:a.any(),filters:a.array().items(n.ProductsDataUpdatesFilters())})}static ProductsDataUpdatesFilters(){return a.object({identifier:a.string().allow(""),line_number:a.number()})}static ProductsReasons(){return a.object({data:n.ProductsReasonsData(),filters:a.array().items(n.ProductsReasonsFilters())})}static ProductsReasonsData(){return a.object({reason_id:a.number(),reason_text:a.string().allow("")})}static ProductsReasonsFilters(){return a.object({identifier:a.string().allow(""),line_number:a.number(),quantity:a.number()})}static Promise(){return a.object({show_promise:a.boolean(),timestamp:n.TimeStampData()})}static QuestionSet(){return a.object({display_name:a.string().allow(""),id:a.number()})}static ReasonsData(){return a.object({entities:a.array().items(n.EntitiesReasons()),products:a.array().items(n.ProductsReasons())})}static ResponseGetInvoiceShipment(){return a.object({presigned_type:a.string().allow("").required(),presigned_url:a.string().allow("").required(),shipment_id:a.string().allow("").required(),success:a.boolean().required()})}static SendOtpToCustomerResponse(){return a.object({message:a.string().allow(""),request_id:a.string().allow(""),resend_timer:a.number(),success:a.boolean()})}static ShipmentApplicationStatusResponse(){return a.object({statuses:a.array().items(n.StatusesBodyResponse())})}static ShipmentBagReasons(){return a.object({reasons:a.array().items(n.BagReasons()),success:a.boolean()})}static ShipmentById(){return a.object({shipment:n.Shipments()})}static ShipmentPayment(){return a.object({display_name:a.string().allow(""),logo:a.string().allow(""),mode:a.string().allow(""),mop:a.string().allow(""),payment_mode:a.string().allow(""),status:a.string().allow("")})}static ShipmentReason(){return a.object({feedback_type:a.string().allow(""),flow:a.string().allow(""),priority:a.number(),reason_id:a.number(),reason_text:a.string().allow(""),show_text_area:a.boolean()})}static ShipmentReasons(){return a.object({reasons:a.array().items(n.ShipmentReason())})}static Shipments(){return a.object({awb_no:a.string().allow(""),bags:a.array().items(n.Bags()),beneficiary_details:a.boolean(),breakup_values:a.array().items(n.BreakupValues()),can_break:a.any(),can_cancel:a.boolean(),can_return:a.boolean(),comment:a.string().allow(""),custom_meta:a.array().items(a.any()),delivery_address:n.DeliveryAddress(),delivery_date:a.string().allow("").allow(null),dp_name:a.string().allow(""),fulfilling_company:n.FulfillingCompany(),fulfilling_store:n.FulfillingStore(),invoice:n.Invoice(),need_help_url:a.string().allow(""),order_id:a.string().allow(""),order_type:a.string().allow("").allow(null),payment:n.ShipmentPayment(),prices:n.Prices(),promise:n.Promise(),refund_details:a.any(),return_meta:a.any(),returnable_date:a.string().allow("").allow(null),shipment_created_at:a.string().allow(""),shipment_id:a.string().allow(""),shipment_status:n.ShipmentStatus(),show_download_invoice:a.boolean(),show_track_link:a.boolean(),size_info:a.any(),total_bags:a.number(),total_details:n.ShipmentTotalDetails(),track_url:a.string().allow(""),tracking_details:a.array().items(n.TrackingDetails()),traking_no:a.string().allow(""),user_info:n.ShipmentUserInfo()})}static ShipmentsRequest(){return a.object({data_updates:n.DataUpdates(),identifier:a.string().allow("").required(),products:a.array().items(n.Products()),reasons:n.ReasonsData()})}static ShipmentStatus(){return a.object({hex_code:a.string().allow(""),title:a.string().allow(""),value:a.string().allow("").allow(null)})}static ShipmentTotalDetails(){return a.object({pieces:a.number(),sizes:a.number(),total_price:a.number()})}static ShipmentTrack(){return a.object({results:a.array().items(n.Track())})}static ShipmentUserInfo(){return a.object({email:a.string().allow(""),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),mobile:a.string().allow(""),name:a.string().allow("")})}static StatuesRequest(){return a.object({exclude_bags_next_state:a.string().allow(""),shipments:a.array().items(n.ShipmentsRequest()),status:a.string().allow("")})}static StatusesBodyResponse(){return a.object({shipments:a.array().items(a.any())})}static TimeStampData(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static Track(){return a.object({account_name:a.string().allow(""),awb:a.string().allow(""),last_location_recieved_at:a.string().allow(""),reason:a.string().allow(""),shipment_type:a.string().allow(""),status:a.string().allow(""),updated_at:a.string().allow(""),updated_time:a.string().allow("")})}static TrackingDetails(){return a.object({is_current:a.boolean(),is_passed:a.boolean(),status:a.string().allow(""),time:a.string().allow(""),tracking_details:a.array().items(n.NestedTrackingDetails()),value:a.string().allow("").allow(null)})}static UpdateShipmentStatusRequest(){return a.object({force_transition:a.boolean(),lock_after_transition:a.boolean(),statuses:a.array().items(n.StatuesRequest()),task:a.boolean(),unlock_before_transition:a.boolean()})}static UserInfo(){return a.object({email:a.string().allow(""),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),mobile:a.string().allow(""),name:a.string().allow("")})}static VerifyOtp(){return a.object({otp_code:a.string().allow(""),request_id:a.string().allow("")})}static VerifyOtpResponse(){return a.object({success:a.boolean()})}}e.exports=n},8174:(e,t,r)=>{const a=r(2705),n=r(2453);e.exports=class{static getCustomerDetailsByShipmentId(){return a.object({orderId:a.string().allow("").required(),shipmentId:a.string().allow("").required()}).required()}static getInvoiceByShipmentId(){return a.object({shipmentId:a.string().allow("").required()}).required()}static getOrderById(){return a.object({orderId:a.string().allow("").required()}).required()}static getOrders(){return a.object({status:a.number(),pageNo:a.number(),pageSize:a.number(),fromDate:a.string().allow(""),toDate:a.string().allow(""),customMeta:a.string().allow("")})}static getPosOrderById(){return a.object({orderId:a.string().allow("").required()}).required()}static getShipmentBagReasons(){return a.object({shipmentId:a.string().allow("").required(),bagId:a.string().allow("").required()}).required()}static getShipmentById(){return a.object({shipmentId:a.string().allow("").required()}).required()}static getShipmentReasons(){return a.object({shipmentId:a.string().allow("").required()}).required()}static sendOtpToShipmentCustomer(){return a.object({orderId:a.string().allow("").required(),shipmentId:a.string().allow("").required()}).required()}static trackShipment(){return a.object({shipmentId:a.string().allow("").required()}).required()}static updateShipmentStatus(){return a.object({shipmentId:a.string().allow("").required(),body:n.UpdateShipmentStatusRequest().required()}).required()}static verifyOtpShipmentCustomer(){return a.object({orderId:a.string().allow("").required(),shipmentId:a.string().allow("").required(),body:n.VerifyOtp().required()}).required()}}},3242:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(174)),l=r(8487),{Logger:c}=r(7378);r(2705),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/",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",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/",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"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addBeneficiaryDetails({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.addBeneficiaryDetails().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.addBeneficiaryDetails().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > addBeneficiaryDetails \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.addBeneficiaryDetails,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.RefundAccountResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > addBeneficiaryDetails \n ${m}`})}return p}async addRefundBankAccountUsingOTP({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.addRefundBankAccountUsingOTP().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.addRefundBankAccountUsingOTP().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > addRefundBankAccountUsingOTP \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.addRefundBankAccountUsingOTP,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.RefundAccountResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > addRefundBankAccountUsingOTP \n ${m}`})}return p}async attachCardToCustomer({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.attachCardToCustomer().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.attachCardToCustomer().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > attachCardToCustomer \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.attachCardToCustomer,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.AttachCardsResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > attachCardToCustomer \n ${m}`})}return p}async cancelPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.cancelPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.cancelPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > cancelPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.cancelPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CancelPaymentLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > cancelPaymentLink \n ${m}`})}return p}async cardDetails({cardInfo:e,aggregator:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.cardDetails().validate({cardInfo:e,aggregator:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.cardDetails().validate({cardInfo:e,aggregator:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > cardDetails \n ${p}`});const g={};g.aggregator=t;const m=await a.execute(this._conf,"get",s({url:this._urls.cardDetails,params:{cardInfo:e}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.CardDetailsResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > cardDetails \n ${w}`})}return m}async checkAndUpdatePaymentStatus({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.checkAndUpdatePaymentStatus().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.checkAndUpdatePaymentStatus().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > checkAndUpdatePaymentStatus \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.checkAndUpdatePaymentStatus,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PaymentStatusUpdateResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > checkAndUpdatePaymentStatus \n ${m}`})}return p}async checkAndUpdatePaymentStatusPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.checkAndUpdatePaymentStatusPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.checkAndUpdatePaymentStatusPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > checkAndUpdatePaymentStatusPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.checkAndUpdatePaymentStatusPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PaymentStatusUpdateResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > checkAndUpdatePaymentStatusPaymentLink \n ${m}`})}return p}async checkCredit({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.checkCredit().validate({aggregator:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.checkCredit().validate({aggregator:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > checkCredit \n ${d}`});const p={};p.aggregator=e;const g=await a.execute(this._conf,"get",s({url:this._urls.checkCredit,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.CheckCreditResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > checkCredit \n ${f}`})}return g}async createOrderHandlerPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.createOrderHandlerPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.createOrderHandlerPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > createOrderHandlerPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.createOrderHandlerPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CreateOrderUserResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > createOrderHandlerPaymentLink \n ${m}`})}return p}async createPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.createPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.createPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > createPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.createPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CreatePaymentLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > createPaymentLink \n ${m}`})}return p}async customerCreditSummary({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.customerCreditSummary().validate({aggregator:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.customerCreditSummary().validate({aggregator:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > customerCreditSummary \n ${d}`});const p={};p.aggregator=e;const g=await a.execute(this._conf,"get",s({url:this._urls.customerCreditSummary,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.CustomerCreditSummaryResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > customerCreditSummary \n ${f}`})}return g}async customerOnboard({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.customerOnboard().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.customerOnboard().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > customerOnboard \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.customerOnboard,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CustomerOnboardingResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > customerOnboard \n ${m}`})}return p}async deleteUserCard({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.deleteUserCard().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.deleteUserCard().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > deleteUserCard \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.deleteUserCard,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.DeleteCardsResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > deleteUserCard \n ${m}`})}return p}async enableOrDisableRefundTransferMode({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.enableOrDisableRefundTransferMode().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.enableOrDisableRefundTransferMode().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > enableOrDisableRefundTransferMode \n ${d}`});const p=await a.execute(this._conf,"put",s({url:this._urls.enableOrDisableRefundTransferMode,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.UpdateRefundTransferModeResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > enableOrDisableRefundTransferMode \n ${m}`})}return p}async getActiveCardAggregator({refresh:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getActiveCardAggregator().validate({refresh:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getActiveCardAggregator().validate({refresh:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getActiveCardAggregator \n ${d}`});const p={};p.refresh=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getActiveCardAggregator,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.ActiveCardPaymentGatewayResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getActiveCardAggregator \n ${f}`})}return g}async getActiveRefundTransferModes({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getActiveRefundTransferModes().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getActiveRefundTransferModes().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getActiveRefundTransferModes \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getActiveRefundTransferModes,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.TransferModeResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getActiveRefundTransferModes \n ${g}`})}return d}async getActiveUserCards({forceRefresh:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getActiveUserCards().validate({forceRefresh:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getActiveUserCards().validate({forceRefresh:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getActiveUserCards \n ${d}`});const p={};p.force_refresh=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getActiveUserCards,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.ListCardsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getActiveUserCards \n ${f}`})}return g}async getAggregatorsConfig({xApiToken:e,refresh:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getAggregatorsConfig().validate({xApiToken:e,refresh:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getAggregatorsConfig().validate({xApiToken:e,refresh:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getAggregatorsConfig \n ${p}`});const g={};g.refresh=t;const m={};m["x-api-token"]=e;const f=await a.execute(this._conf,"get",s({url:this._urls.getAggregatorsConfig,params:{}}),g,void 0,{...m,...r},{responseHeaders:u});let w=f;u&&(w=f[0]);const{error:y}=l.AggregatorsConfigDetailResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getAggregatorsConfig \n ${y}`})}return f}async getEpaylaterBannerDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getEpaylaterBannerDetails().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getEpaylaterBannerDetails().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getEpaylaterBannerDetails \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getEpaylaterBannerDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.EpaylaterBannerResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getEpaylaterBannerDetails \n ${g}`})}return d}async getOrderBeneficiariesDetail({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getOrderBeneficiariesDetail().validate({orderId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getOrderBeneficiariesDetail().validate({orderId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getOrderBeneficiariesDetail \n ${d}`});const p={};p.order_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getOrderBeneficiariesDetail,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.OrderBeneficiaryResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getOrderBeneficiariesDetail \n ${f}`})}return g}async getPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getPaymentLink \n ${d}`});const p={};p.payment_link_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getPaymentLink,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.GetPaymentLinkResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getPaymentLink \n ${f}`})}return g}async getPaymentModeRoutes({amount:e,cartId:t,pincode:r,checkoutMode:u,refresh:d,cardReference:p,userDetails:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:w}=i.getPaymentModeRoutes().validate({amount:e,cartId:t,pincode:r,checkoutMode:u,refresh:d,cardReference:p,userDetails:g},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:y}=i.getPaymentModeRoutes().validate({amount:e,cartId:t,pincode:r,checkoutMode:u,refresh:d,cardReference:p,userDetails:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getPaymentModeRoutes \n ${y}`});const b={};b.amount=e,b.cart_id=t,b.pincode=r,b.checkout_mode=u,b.refresh=d,b.card_reference=p,b.user_details=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getPaymentModeRoutes,params:{}}),b,void 0,{...m},{responseHeaders:f});let _=h;f&&(_=h[0]);const{error:v}=l.PaymentModeRouteResponse().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getPaymentModeRoutes \n ${v}`})}return h}async getPaymentModeRoutesPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPaymentModeRoutesPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPaymentModeRoutesPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getPaymentModeRoutesPaymentLink \n ${d}`});const p={};p.payment_link_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getPaymentModeRoutesPaymentLink,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.PaymentModeRouteResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getPaymentModeRoutesPaymentLink \n ${f}`})}return g}async getPosPaymentModeRoutes({amount:e,cartId:t,pincode:r,checkoutMode:u,orderType:d,refresh:p,cardReference:g,userDetails:m,requestHeaders:f}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:y}=i.getPosPaymentModeRoutes().validate({amount:e,cartId:t,pincode:r,checkoutMode:u,orderType:d,refresh:p,cardReference:g,userDetails:m},{abortEarly:!1,allowUnknown:!0});if(y)return Promise.reject(new n(y));const{error:b}=i.getPosPaymentModeRoutes().validate({amount:e,cartId:t,pincode:r,checkoutMode:u,orderType:d,refresh:p,cardReference:g,userDetails:m},{abortEarly:!1,allowUnknown:!1});b&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getPosPaymentModeRoutes \n ${b}`});const h={};h.amount=e,h.cart_id=t,h.pincode=r,h.checkout_mode=u,h.refresh=p,h.card_reference=g,h.order_type=d,h.user_details=m;const _=await a.execute(this._conf,"get",s({url:this._urls.getPosPaymentModeRoutes,params:{}}),h,void 0,{...f},{responseHeaders:w});let v=_;w&&(v=_[0]);const{error:k}=l.PaymentModeRouteResponse().validate(v,{abortEarly:!1,allowUnknown:!0});if(k){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(k));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getPosPaymentModeRoutes \n ${k}`})}return _}async getRupifiBannerDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getRupifiBannerDetails().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getRupifiBannerDetails().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getRupifiBannerDetails \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getRupifiBannerDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.RupifiBannerResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getRupifiBannerDetails \n ${g}`})}return d}async getUserBeneficiariesDetail({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getUserBeneficiariesDetail().validate({orderId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getUserBeneficiariesDetail().validate({orderId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getUserBeneficiariesDetail \n ${d}`});const p={};p.order_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getUserBeneficiariesDetail,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.OrderBeneficiaryResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getUserBeneficiariesDetail \n ${f}`})}return g}async initialisePayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.initialisePayment().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.initialisePayment().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > initialisePayment \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.initialisePayment,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PaymentInitializationResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > initialisePayment \n ${m}`})}return p}async initialisePaymentPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.initialisePaymentPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.initialisePaymentPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > initialisePaymentPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.initialisePaymentPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PaymentInitializationResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > initialisePaymentPaymentLink \n ${m}`})}return p}async outstandingOrderDetails({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.outstandingOrderDetails().validate({aggregator:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.outstandingOrderDetails().validate({aggregator:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > outstandingOrderDetails \n ${d}`});const p={};p.aggregator=e;const g=await a.execute(this._conf,"get",s({url:this._urls.outstandingOrderDetails,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.OutstandingOrderDetailsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > outstandingOrderDetails \n ${f}`})}return g}async paidOrderDetails({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.paidOrderDetails().validate({aggregator:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.paidOrderDetails().validate({aggregator:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > paidOrderDetails \n ${d}`});const p={};p.aggregator=e;const g=await a.execute(this._conf,"get",s({url:this._urls.paidOrderDetails,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.PaidOrderDetailsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > paidOrderDetails \n ${f}`})}return g}async pollingPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.pollingPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.pollingPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > pollingPaymentLink \n ${d}`});const p={};p.payment_link_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.pollingPaymentLink,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.PollingPaymentLinkResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > pollingPaymentLink \n ${f}`})}return g}async redirectToAggregator({source:e,aggregator:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.redirectToAggregator().validate({source:e,aggregator:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.redirectToAggregator().validate({source:e,aggregator:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > redirectToAggregator \n ${p}`});const g={};g.source=e,g.aggregator=t;const m=await a.execute(this._conf,"get",s({url:this._urls.redirectToAggregator,params:{}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.RedirectToAggregatorResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > redirectToAggregator \n ${w}`})}return m}async renderHTML({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.renderHTML().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.renderHTML().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > renderHTML \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.renderHTML,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.renderHTMLResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > renderHTML \n ${m}`})}return p}async resendOrCancelPayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.resendOrCancelPayment().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.resendOrCancelPayment().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > resendOrCancelPayment \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.resendOrCancelPayment,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResendOrCancelPaymentResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > resendOrCancelPayment \n ${m}`})}return p}async resendPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.resendPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.resendPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > resendPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.resendPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResendPaymentLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > resendPaymentLink \n ${m}`})}return p}async updateDefaultBeneficiary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.updateDefaultBeneficiary().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.updateDefaultBeneficiary().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > updateDefaultBeneficiary \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.updateDefaultBeneficiary,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SetDefaultBeneficiaryResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > updateDefaultBeneficiary \n ${m}`})}return p}async validateVPA({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.validateVPA().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.validateVPA().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > validateVPA \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.validateVPA,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ValidateVPAResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > validateVPA \n ${m}`})}return p}async verifyAndChargePayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyAndChargePayment().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyAndChargePayment().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyAndChargePayment \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyAndChargePayment,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ChargeCustomerResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyAndChargePayment \n ${m}`})}return p}async verifyCustomerForPayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyCustomerForPayment().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyCustomerForPayment().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyCustomerForPayment \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyCustomerForPayment,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ValidateCustomerResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyCustomerForPayment \n ${m}`})}return p}async verifyIfscCode({ifscCode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyIfscCode().validate({ifscCode:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyIfscCode().validate({ifscCode:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyIfscCode \n ${d}`});const p={};p.ifsc_code=e;const g=await a.execute(this._conf,"get",s({url:this._urls.verifyIfscCode,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.IfscCodeResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyIfscCode \n ${f}`})}return g}async verifyOtpAndAddBeneficiaryForBank({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyOtpAndAddBeneficiaryForBank().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyOtpAndAddBeneficiaryForBank().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyOtpAndAddBeneficiaryForBank \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyOtpAndAddBeneficiaryForBank,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.AddBeneficiaryViaOtpVerificationResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyOtpAndAddBeneficiaryForBank \n ${m}`})}return p}async verifyOtpAndAddBeneficiaryForWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyOtpAndAddBeneficiaryForWallet().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyOtpAndAddBeneficiaryForWallet().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyOtpAndAddBeneficiaryForWallet \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyOtpAndAddBeneficiaryForWallet,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.WalletOtpResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyOtpAndAddBeneficiaryForWallet \n ${m}`})}return p}}},8487:(e,t,r)=>{const a=r(2705);class n{static ActiveCardPaymentGatewayResponse(){return a.object({cards:n.CardPaymentGateway().required(),message:a.string().allow("").required(),success:a.boolean().required()})}static AddBeneficiaryDetailsOTPRequest(){return a.object({details:n.BankDetailsForOTP().required(),order_id:a.string().allow("").required()})}static AddBeneficiaryDetailsRequest(){return a.object({delights:a.boolean().required(),details:n.BeneficiaryModeDetails().required(),order_id:a.string().allow("").required(),otp:a.string().allow(""),request_id:a.string().allow(""),shipment_id:a.string().allow("").required(),transfer_mode:a.string().allow("").required()})}static AddBeneficiaryViaOtpVerificationRequest(){return a.object({hash_key:a.string().allow("").required(),otp:a.string().allow("").required(),request_id:a.string().allow("").required()})}static AddBeneficiaryViaOtpVerificationResponse(){return a.object({message:a.string().allow("").required(),success:a.boolean()})}static AggregatorConfigDetail(){return a.object({api:a.string().allow("").allow(null),config_type:a.string().allow("").required(),key:a.string().allow("").required(),merchant_id:a.string().allow("").allow(null),merchant_key:a.string().allow("").allow(null),pin:a.string().allow("").allow(null),sdk:a.boolean().allow(null),secret:a.string().allow("").required(),user_id:a.string().allow("").allow(null),verify_api:a.string().allow("").allow(null)})}static AggregatorRoute(){return a.object({api_link:a.string().allow("").allow(null),data:a.any().allow(null),payment_flow:a.string().allow("").allow(null),payment_flow_data:a.string().allow("").allow(null)})}static AggregatorsConfigDetailResponse(){return a.object({ccavenue:n.AggregatorConfigDetail(),env:a.string().allow("").required(),juspay:n.AggregatorConfigDetail(),mswipe:n.AggregatorConfigDetail(),payumoney:n.AggregatorConfigDetail(),razorpay:n.AggregatorConfigDetail(),rupifi:n.AggregatorConfigDetail(),simpl:n.AggregatorConfigDetail(),stripe:n.AggregatorConfigDetail(),success:a.boolean().required()})}static AttachCardRequest(){return a.object({card_id:a.string().allow("").allow(null).required(),name_on_card:a.string().allow(""),nickname:a.string().allow(""),refresh:a.boolean().allow(null)})}static AttachCardsResponse(){return a.object({data:a.any().required(),message:a.string().allow(""),success:a.boolean().required()})}static BalanceDetails(){return a.object({currency:a.string().allow("").allow(null),formatted_value:a.string().allow("").allow(null),value:a.number().allow(null)})}static BankDetailsForOTP(){return a.object({account_holder:a.string().allow("").required(),account_no:a.string().allow("").required(),bank_name:a.string().allow("").required(),branch_name:a.string().allow("").required(),ifsc_code:a.string().allow("").required()})}static BeneficiaryModeDetails(){return a.object({account_holder:a.string().allow("").required(),account_no:a.string().allow("").required(),address:a.string().allow(""),bank_name:a.string().allow("").required(),branch_name:a.string().allow("").required(),comment:a.string().allow(""),email:a.string().allow("").required(),ifsc_code:a.string().allow("").required(),mobile:a.string().allow("").required(),vpa:a.string().allow("").allow(null),wallet:a.string().allow("").allow(null)})}static BusinessDetails(){return a.object({address:n.KYCAddress(),business_ownership_type:a.string().allow("").allow(null),business_type:a.string().allow("").allow(null),entity_type:a.string().allow("").allow(null),fda:a.string().allow("").allow(null),fssai:a.string().allow("").allow(null),gstin:a.string().allow("").allow(null),name:a.string().allow("").allow(null),pan:a.string().allow("").allow(null),shop_and_establishment:a.any(),vintage:a.string().allow("").allow(null)})}static CancelOrResendPaymentLinkRequest(){return a.object({payment_link_id:a.string().allow("").required()})}static CancelPaymentLinkResponse(){return a.object({message:a.string().allow("").required(),status_code:a.number().required(),success:a.boolean().required()})}static Card(){return a.object({aggregator_name:a.string().allow("").required(),card_brand:a.string().allow("").allow(null),card_brand_image:a.string().allow("").allow(null),card_fingerprint:a.string().allow("").allow(null),card_id:a.string().allow("").allow(null),card_isin:a.string().allow("").allow(null),card_issuer:a.string().allow("").allow(null),card_name:a.string().allow("").allow(null),card_number:a.string().allow("").allow(null),card_reference:a.string().allow("").allow(null),card_token:a.string().allow("").allow(null),card_type:a.string().allow("").allow(null),compliant_with_tokenisation_guidelines:a.boolean().allow(null),exp_month:a.number().allow(null),exp_year:a.number().allow(null),expired:a.boolean().allow(null),nickname:a.string().allow("").allow(null)})}static CardDetails(){return a.object({bank:a.string().allow("").required(),bank_code:a.string().allow("").allow(null).required(),card_brand:a.string().allow("").required(),card_exp_month:a.string().allow(""),card_exp_year:a.string().allow(""),card_object:a.string().allow("").required(),card_sub_type:a.string().allow("").allow(null).required(),card_token:a.string().allow(""),country:a.string().allow("").required(),extended_card_type:a.string().allow("").required(),id:a.string().allow("").required(),is_domestic_card:a.boolean().required(),name_on_card:a.string().allow(""),status:a.boolean().required(),type:a.string().allow("").required(),user:a.string().allow("")})}static CardDetailsResponse(){return a.object({data:n.CardDetails().required(),success:a.boolean().required()})}static CardPaymentGateway(){return a.object({aggregator:a.string().allow("").required(),api:a.string().allow("").allow(null),customer_id:a.string().allow("").allow(null)})}static ChargeCustomerRequest(){return a.object({aggregator:a.string().allow("").required(),amount:a.number().allow(null).required(),order_id:a.string().allow("").required(),transaction_token:a.string().allow("").allow(null),verified:a.boolean().allow(null)})}static ChargeCustomerResponse(){return a.object({aggregator:a.string().allow("").required(),cart_id:a.string().allow("").allow(null),delivery_address_id:a.string().allow("").allow(null),message:a.string().allow("").required(),order_id:a.string().allow("").required(),status:a.string().allow("").required(),success:a.boolean().required()})}static CheckCreditResponse(){return a.object({data:n.CreditDetail().required(),success:a.boolean().required()})}static CreateOrderUserData(){return a.object({aggregator:a.string().allow("").allow(null),amount:a.number().allow(null),callback_url:a.string().allow("").allow(null),contact:a.string().allow("").allow(null),currency:a.string().allow("").allow(null),customer_id:a.string().allow("").allow(null),email:a.string().allow("").allow(null),merchant_order_id:a.string().allow("").allow(null),method:a.string().allow("").allow(null),order_id:a.string().allow("").allow(null)})}static CreateOrderUserPaymentMethods(){return a.object({meta:n.PaymentMethodsMeta().required(),mode:a.string().allow("").required(),name:a.string().allow("").required()})}static CreateOrderUserRequest(){return a.object({currency:a.string().allow("").required(),failure_callback_url:a.string().allow("").required(),meta:a.any().allow(null),payment_link_id:a.string().allow("").required(),payment_methods:n.CreateOrderUserPaymentMethods().required(),success_callback_url:a.string().allow("").required()})}static CreateOrderUserResponse(){return a.object({callback_url:a.string().allow("").allow(null),data:n.CreateOrderUserData(),message:a.string().allow("").required(),order_id:a.string().allow("").allow(null),payment_confirm_url:a.string().allow("").allow(null),status_code:a.number().required(),success:a.boolean().required()})}static CreatePaymentLinkMeta(){return a.object({amount:a.string().allow("").required(),assign_card_id:a.string().allow("").allow(null),cart_id:a.string().allow("").required(),checkout_mode:a.string().allow("").required(),pincode:a.string().allow("").required()})}static CreatePaymentLinkRequest(){return a.object({amount:a.number().required(),description:a.string().allow("").allow(null),email:a.string().allow("").required(),external_order_id:a.string().allow("").required(),meta:n.CreatePaymentLinkMeta().required(),mobile_number:a.string().allow("").required()})}static CreatePaymentLinkResponse(){return a.object({message:a.string().allow("").required(),payment_link_id:a.string().allow("").allow(null),payment_link_url:a.string().allow("").allow(null),polling_timeout:a.number().allow(null),status_code:a.number().required(),success:a.boolean().required()})}static CreditDetail(){return a.object({is_registered:a.boolean().required(),signup_url:a.string().allow("").required(),status:a.boolean().required()})}static CreditSummary(){return a.object({amount_available:n.BalanceDetails(),balance:n.BalanceDetails(),buyer_status:a.string().allow("").allow(null),credit_line_id:a.string().allow("").allow(null),merchant_customer_ref_id:a.string().allow("").allow(null),status:a.string().allow("").allow(null),status_message:a.string().allow("").allow(null)})}static CustomerCreditSummaryResponse(){return a.object({data:n.CreditSummary(),success:a.boolean().required()})}static CustomerOnboardingRequest(){return a.object({aggregator:a.string().allow("").required(),business_info:n.BusinessDetails(),device:n.DeviceDetails(),marketplace_info:n.MarketplaceInfo(),mcc:a.string().allow("").allow(null),personal_info:n.UserPersonalInfoInDetails().required(),source:a.string().allow("").required()})}static CustomerOnboardingResponse(){return a.object({data:n.OnboardSummary().required(),success:a.boolean().required()})}static DeleteCardsResponse(){return a.object({message:a.string().allow("").allow(null),success:a.boolean().required()})}static DeletehCardRequest(){return a.object({card_id:a.string().allow("").allow(null).required()})}static DeviceDetails(){return a.object({device_make:a.string().allow("").allow(null),device_model:a.string().allow("").allow(null),device_type:a.string().allow("").allow(null),identification_number:a.string().allow("").allow(null),identifier_type:a.string().allow("").allow(null),os:a.string().allow("").allow(null),os_version:a.string().allow("").allow(null)})}static EpaylaterBannerData(){return a.object({display:a.boolean().required(),message:a.string().allow(""),status:a.string().allow("")})}static EpaylaterBannerResponse(){return a.object({data:n.EpaylaterBannerData().required(),success:a.boolean().required()})}static ErrorCodeAndDescription(){return a.object({code:a.string().allow("").required(),description:a.string().allow("").required()})}static ErrorCodeDescription(){return a.object({code:a.string().allow("").required(),description:a.string().allow("").required(),success:a.boolean().required()})}static ErrorDescription(){return a.object({amount:a.number().allow(null),cancelled:a.boolean().allow(null),expired:a.boolean().allow(null),invalid_id:a.boolean().allow(null),merchant_name:a.string().allow("").allow(null),merchant_order_id:a.string().allow("").allow(null),msg:a.string().allow("").allow(null),payment_transaction_id:a.string().allow("").allow(null)})}static ErrorResponse(){return a.object({error:a.any().allow(null),message:a.string().allow("").required(),status_code:a.number().required(),success:a.boolean().required()})}static GetPaymentLinkResponse(){return a.object({amount:a.number().allow(null),external_order_id:a.string().allow("").allow(null),merchant_name:a.string().allow("").allow(null),message:a.string().allow("").required(),payment_link_current_status:a.string().allow("").allow(null),payment_link_url:a.string().allow("").allow(null),polling_timeout:a.number().allow(null),status_code:a.number().required(),success:a.boolean().required()})}static HttpErrorCodeAndResponse(){return a.object({error:n.ErrorCodeAndDescription(),success:a.boolean().required()})}static IfscCodeResponse(){return a.object({bank_name:a.string().allow("").required(),branch_name:a.string().allow("").required(),success:a.boolean()})}static IntentApp(){return a.object({code:a.string().allow("").allow(null),display_name:a.string().allow("").allow(null),logos:a.any().allow(null),package_name:a.string().allow("").allow(null)})}static IntentAppErrorList(){return a.object({code:a.string().allow("").allow(null),package_name:a.string().allow("").allow(null)})}static KYCAddress(){return a.object({addressline1:a.string().allow("").required(),addressline2:a.string().allow("").allow(null),city:a.string().allow("").required(),land_mark:a.string().allow("").allow(null),ownership_type:a.string().allow("").allow(null),pincode:a.string().allow("").required(),state:a.string().allow("").required()})}static LinkStatus(){return a.object({message:a.string().allow("").required(),status:a.boolean().required()})}static ListCardsResponse(){return a.object({data:a.array().items(n.Card()),message:a.string().allow("").required(),success:a.boolean().required()})}static MarketplaceInfo(){return a.object({date_of_joining:a.string().allow("").allow(null),membership_id:a.string().allow("").required(),name:a.string().allow("").required()})}static NotFoundResourceError(){return a.object({code:a.string().allow("").required(),description:a.string().allow("").required(),success:a.boolean().required()})}static OnboardSummary(){return a.object({redirect_url:a.string().allow("").required(),session:a.any().required(),status:a.boolean().required()})}static OrderBeneficiaryDetails(){return a.object({account_holder:a.string().allow("").required(),account_no:a.string().allow("").required(),address:a.string().allow("").required(),bank_name:a.string().allow("").required(),beneficiary_id:a.string().allow("").required(),branch_name:a.string().allow(""),comment:a.string().allow(""),created_on:a.string().allow("").required(),delights_user_name:a.string().allow("").allow(null),display_name:a.string().allow("").required(),email:a.string().allow("").required(),id:a.number().required(),ifsc_code:a.string().allow("").required(),is_active:a.boolean().required(),mobile:a.string().allow(""),modified_on:a.string().allow("").required(),subtitle:a.string().allow("").required(),title:a.string().allow("").required(),transfer_mode:a.string().allow("").required()})}static OrderBeneficiaryResponse(){return a.object({beneficiaries:a.array().items(n.OrderBeneficiaryDetails()),show_beneficiary_details:a.boolean()})}static OutstandingOrderDetailsResponse(){return a.object({data:a.array().items(a.any()),message:a.string().allow("").allow(null),status_code:a.number().required(),success:a.boolean().required()})}static PaidOrderDetailsResponse(){return a.object({data:a.array().items(a.any()),message:a.string().allow("").allow(null),status_code:a.number().required(),success:a.boolean().required()})}static PaymentFlow(){return a.object({ajiodhan:a.any().allow(null),bqr_razorpay:a.any().allow(null),ccavenue:a.any().allow(null),epaylater:a.any().allow(null),fynd:a.any().allow(null),jiopay:a.any().allow(null),juspay:a.any().allow(null),mswipe:a.any().allow(null),payubiz:a.any().allow(null),razorpay:a.any().allow(null),rupifi:a.any().allow(null),simpl:a.any().allow(null),stripe:a.any().allow(null),upi_razorpay:a.any().allow(null)})}static PaymentInitializationRequest(){return a.object({aggregator:a.string().allow("").required(),amount:a.number().allow(null).required(),contact:a.string().allow("").required(),currency:a.string().allow("").required(),customer_id:a.string().allow("").required(),device_id:a.string().allow("").allow(null),email:a.string().allow("").required(),merchant_order_id:a.string().allow("").required(),method:a.string().allow("").required(),order_id:a.string().allow("").required(),razorpay_payment_id:a.string().allow("").allow(null),timeout:a.number().allow(null),vpa:a.string().allow("").allow(null)})}static PaymentInitializationResponse(){return a.object({aggregator:a.string().allow("").required(),aggregator_order_id:a.string().allow(""),amount:a.number().allow(null),bqr_image:a.string().allow("").allow(null),currency:a.string().allow("").allow(null),customer_id:a.string().allow("").allow(null),device_id:a.string().allow("").allow(null),merchant_order_id:a.string().allow("").required(),method:a.string().allow("").required(),polling_url:a.string().allow("").required(),razorpay_payment_id:a.string().allow("").allow(null),status:a.string().allow(""),success:a.boolean().required(),timeout:a.number().allow(null),upi_poll_url:a.string().allow("").allow(null),virtual_id:a.string().allow("").allow(null),vpa:a.string().allow("").allow(null)})}static PaymentMethodsMeta(){return a.object({merchant_code:a.string().allow("").required(),payment_gateway:a.string().allow("").required(),payment_identifier:a.string().allow("").required()})}static PaymentModeList(){return a.object({aggregator_name:a.string().allow("").required(),card_brand:a.string().allow("").allow(null),card_brand_image:a.string().allow("").allow(null),card_fingerprint:a.string().allow("").allow(null),card_id:a.string().allow("").allow(null),card_isin:a.string().allow("").allow(null),card_issuer:a.string().allow("").allow(null),card_name:a.string().allow("").allow(null),card_number:a.string().allow("").allow(null),card_reference:a.string().allow("").allow(null),card_token:a.string().allow("").allow(null),card_type:a.string().allow("").allow(null),cod_limit:a.number().allow(null),cod_limit_per_order:a.number().allow(null),code:a.string().allow("").allow(null),compliant_with_tokenisation_guidelines:a.boolean().allow(null),display_name:a.string().allow("").allow(null),display_priority:a.number().allow(null),exp_month:a.number().allow(null),exp_year:a.number().allow(null),expired:a.boolean().allow(null),fynd_vpa:a.string().allow("").allow(null),intent_app:a.array().items(n.IntentApp()),intent_app_error_dict_list:a.array().items(n.IntentAppErrorList()),intent_app_error_list:a.array().items(a.string().allow("")),intent_flow:a.boolean().allow(null),logo_url:a.any().allow(null),merchant_code:a.string().allow("").allow(null),name:a.string().allow("").allow(null),nickname:a.string().allow("").allow(null),remaining_limit:a.number().allow(null),retry_count:a.number().allow(null),timeout:a.number().allow(null)})}static PaymentModeLogo(){return a.object({large:a.string().allow("").required(),small:a.string().allow("").required()})}static PaymentModeRouteResponse(){return a.object({payment_options:n.PaymentOptionAndFlow().required(),success:a.boolean().required()})}static PaymentOptionAndFlow(){return a.object({payment_flows:n.PaymentFlow().required(),payment_option:a.array().items(n.RootPaymentMode()).required()})}static PaymentStatusUpdateRequest(){return a.object({aggregator:a.string().allow("").required(),amount:a.number().allow(null).required(),contact:a.string().allow("").required(),currency:a.string().allow("").required(),customer_id:a.string().allow("").required(),device_id:a.string().allow("").allow(null),email:a.string().allow("").required(),merchant_order_id:a.string().allow("").required(),merchant_transaction_id:a.string().allow("").required(),method:a.string().allow("").required(),order_id:a.string().allow("").required(),status:a.string().allow("").required(),vpa:a.string().allow("")})}static PaymentStatusUpdateResponse(){return a.object({aggregator_name:a.string().allow("").required(),redirect_url:a.string().allow("").allow(null),retry:a.boolean().required(),status:a.string().allow("").required(),success:a.boolean().allow(null)})}static PollingPaymentLinkResponse(){return a.object({aggregator_name:a.string().allow("").allow(null),amount:a.number().allow(null),http_status:a.number().allow(null),message:a.string().allow("").allow(null),order_id:a.string().allow("").allow(null),payment_link_id:a.string().allow("").allow(null),redirect_url:a.string().allow("").allow(null),status:a.string().allow("").allow(null),status_code:a.number().allow(null),success:a.boolean().allow(null)})}static RedirectToAggregatorResponse(){return a.object({data:n.RedirectURL().required(),success:a.boolean().required()})}static RedirectURL(){return a.object({signup_url:a.string().allow("").required(),status:a.boolean().required()})}static RefundAccountResponse(){return a.object({data:a.any(),is_verified_flag:a.boolean(),message:a.string().allow("").required(),success:a.boolean().required()})}static renderHTMLRequest(){return a.object({base64_html:a.string().allow("").required(),returntype:a.string().allow("").allow(null)})}static renderHTMLResponse(){return a.object({html:a.string().allow("").required()})}static ResendOrCancelPaymentRequest(){return a.object({device_id:a.string().allow("").allow(null),order_id:a.string().allow("").required(),request_type:a.string().allow("").required()})}static ResendOrCancelPaymentResponse(){return a.object({data:n.LinkStatus().required(),success:a.boolean().required()})}static ResendPaymentLinkResponse(){return a.object({message:a.string().allow("").required(),polling_timeout:a.number().allow(null),status_code:a.number().required(),success:a.boolean().required()})}static RootPaymentMode(){return a.object({add_card_enabled:a.boolean().allow(null),aggregator_name:a.string().allow("").allow(null),anonymous_enable:a.boolean().allow(null),display_name:a.string().allow("").required(),display_priority:a.number().required(),is_pay_by_card_pl:a.boolean().allow(null),list:a.array().items(n.PaymentModeList()),name:a.string().allow("").required(),save_card:a.boolean().allow(null)})}static RupifiBannerData(){return a.object({kyc_url:a.string().allow(""),status:a.string().allow("")})}static RupifiBannerResponse(){return a.object({data:n.RupifiBannerData().required(),success:a.boolean().required()})}static SetDefaultBeneficiaryRequest(){return a.object({beneficiary_id:a.string().allow("").required(),order_id:a.string().allow("").required()})}static SetDefaultBeneficiaryResponse(){return a.object({is_beneficiary_set:a.boolean().required(),success:a.boolean()})}static TransferItemsDetails(){return a.object({display_name:a.string().allow(""),id:a.number().required(),logo_large:a.string().allow("").required(),logo_small:a.string().allow("").required(),name:a.string().allow("").required()})}static TransferModeDetails(){return a.object({display_name:a.string().allow("").required(),items:a.array().items(n.TransferItemsDetails())})}static TransferModeResponse(){return a.object({data:a.array().items(n.TransferModeDetails()).required()})}static UpdateRefundTransferModeRequest(){return a.object({enable:a.boolean().required(),transfer_mode:a.string().allow("").required()})}static UpdateRefundTransferModeResponse(){return a.object({success:a.boolean()})}static UserPersonalInfoInDetails(){return a.object({address_as_per_id:n.KYCAddress().required(),dob:a.string().allow("").allow(null).required(),driving_license:a.string().allow("").allow(null),email:a.string().allow("").allow(null),email_verified:a.boolean().required(),fathers_name:a.string().allow("").allow(null),first_name:a.string().allow("").required(),gender:a.string().allow("").allow(null),last_name:a.string().allow("").allow(null),middle_name:a.string().allow("").allow(null),mobile_verified:a.boolean().required(),mothers_name:a.string().allow("").allow(null),pan:a.string().allow("").allow(null),passport:a.string().allow("").allow(null),phone:a.string().allow("").required(),voter_id:a.string().allow("").allow(null)})}static ValidateCustomerRequest(){return a.object({aggregator:a.string().allow("").required(),billing_address:a.any(),delivery_address:a.any(),merchant_params:a.any(),order_items:a.array().items(a.any()),payload:a.string().allow("").allow(null),phone_number:a.string().allow("").required(),transaction_amount_in_paise:a.number().required()})}static ValidateCustomerResponse(){return a.object({data:a.any().required(),message:a.string().allow("").required(),success:a.boolean().required()})}static ValidateUPI(){return a.object({customer_name:a.string().allow("").required(),is_valid:a.boolean().required(),status:a.string().allow("").required(),upi_vpa:a.string().allow("").required()})}static ValidateVPARequest(){return a.object({upi_vpa:a.string().allow("").required()})}static ValidateVPAResponse(){return a.object({data:n.ValidateUPI().required(),success:a.boolean().required()})}static WalletOtpRequest(){return a.object({country_code:a.string().allow("").required(),mobile:a.string().allow("").required()})}static WalletOtpResponse(){return a.object({is_verified_flag:a.string().allow("").required(),request_id:a.string().allow("").required(),success:a.boolean()})}static WrongOtpError(){return a.object({description:a.string().allow("").required(),is_verified_flag:a.boolean().required(),success:a.string().allow("").required()})}}e.exports=n},174:(e,t,r)=>{const a=r(2705),n=r(8487);e.exports=class{static addBeneficiaryDetails(){return a.object({body:n.AddBeneficiaryDetailsRequest().required()}).required()}static addRefundBankAccountUsingOTP(){return a.object({body:n.AddBeneficiaryDetailsOTPRequest().required()}).required()}static attachCardToCustomer(){return a.object({body:n.AttachCardRequest().required()}).required()}static cancelPaymentLink(){return a.object({body:n.CancelOrResendPaymentLinkRequest().required()}).required()}static cardDetails(){return a.object({cardInfo:a.string().allow("").required(),aggregator:a.string().allow("")}).required()}static checkAndUpdatePaymentStatus(){return a.object({body:n.PaymentStatusUpdateRequest().required()}).required()}static checkAndUpdatePaymentStatusPaymentLink(){return a.object({body:n.PaymentStatusUpdateRequest().required()}).required()}static checkCredit(){return a.object({aggregator:a.string().allow("")})}static createOrderHandlerPaymentLink(){return a.object({body:n.CreateOrderUserRequest().required()}).required()}static createPaymentLink(){return a.object({body:n.CreatePaymentLinkRequest().required()}).required()}static customerCreditSummary(){return a.object({aggregator:a.string().allow("")})}static customerOnboard(){return a.object({body:n.CustomerOnboardingRequest().required()}).required()}static deleteUserCard(){return a.object({body:n.DeletehCardRequest().required()}).required()}static enableOrDisableRefundTransferMode(){return a.object({body:n.UpdateRefundTransferModeRequest().required()}).required()}static getActiveCardAggregator(){return a.object({refresh:a.boolean()})}static getActiveRefundTransferModes(){return a.object({})}static getActiveUserCards(){return a.object({forceRefresh:a.boolean()})}static getAggregatorsConfig(){return a.object({xApiToken:a.string().allow(""),refresh:a.boolean()})}static getEpaylaterBannerDetails(){return a.object({})}static getOrderBeneficiariesDetail(){return a.object({orderId:a.string().allow("").required()}).required()}static getPaymentLink(){return a.object({paymentLinkId:a.string().allow("")})}static getPaymentModeRoutes(){return a.object({amount:a.number().required(),cartId:a.string().allow("").required(),pincode:a.string().allow("").required(),checkoutMode:a.string().allow("").required(),refresh:a.boolean(),cardReference:a.string().allow(""),userDetails:a.string().allow("")}).required()}static getPaymentModeRoutesPaymentLink(){return a.object({paymentLinkId:a.string().allow("").required()}).required()}static getPosPaymentModeRoutes(){return a.object({amount:a.number().required(),cartId:a.string().allow("").required(),pincode:a.string().allow("").required(),checkoutMode:a.string().allow("").required(),refresh:a.boolean(),cardReference:a.string().allow(""),orderType:a.string().allow("").required(),userDetails:a.string().allow("")}).required()}static getRupifiBannerDetails(){return a.object({})}static getUserBeneficiariesDetail(){return a.object({orderId:a.string().allow("").required()}).required()}static initialisePayment(){return a.object({body:n.PaymentInitializationRequest().required()}).required()}static initialisePaymentPaymentLink(){return a.object({body:n.PaymentInitializationRequest().required()}).required()}static outstandingOrderDetails(){return a.object({aggregator:a.string().allow("")})}static paidOrderDetails(){return a.object({aggregator:a.string().allow("")})}static pollingPaymentLink(){return a.object({paymentLinkId:a.string().allow("")})}static redirectToAggregator(){return a.object({source:a.string().allow(""),aggregator:a.string().allow("")})}static renderHTML(){return a.object({body:n.renderHTMLRequest().required()}).required()}static resendOrCancelPayment(){return a.object({body:n.ResendOrCancelPaymentRequest().required()}).required()}static resendPaymentLink(){return a.object({body:n.CancelOrResendPaymentLinkRequest().required()}).required()}static updateDefaultBeneficiary(){return a.object({body:n.SetDefaultBeneficiaryRequest().required()}).required()}static validateVPA(){return a.object({body:n.ValidateVPARequest().required()}).required()}static verifyAndChargePayment(){return a.object({body:n.ChargeCustomerRequest().required()}).required()}static verifyCustomerForPayment(){return a.object({body:n.ValidateCustomerRequest().required()}).required()}static verifyIfscCode(){return a.object({ifscCode:a.string().allow("")})}static verifyOtpAndAddBeneficiaryForBank(){return a.object({body:n.AddBeneficiaryViaOtpVerificationRequest().required()}).required()}static verifyOtpAndAddBeneficiaryForWallet(){return a.object({body:n.WalletOtpRequest().required()}).required()}}},4823:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(2857)),l=r(6962),{Logger:c}=r(7378),u=r(2705);e.exports=class{constructor(e){this._conf=e,this._relativeUrls={addAddress:"/service/application/pos/cart/v1.0/address",addItems:"/service/application/pos/cart/v1.0/detail",applyCoupon:"/service/application/pos/cart/v1.0/coupon",applyRewardPoints:"/service/application/pos/cart/v1.0/redeem/points/",checkoutCart:"/service/application/pos/cart/v1.0/checkout",getAddressById:"/service/application/pos/cart/v1.0/address/{id}",getAddresses:"/service/application/pos/cart/v1.0/address",getAvailableDeliveryModes:"/service/application/pos/cart/v1.0/available-delivery-mode",getBulkDiscountOffers:"/service/application/pos/cart/v1.0/bulk-price",getCart:"/service/application/pos/cart/v1.0/detail",getCartLastModified:"/service/application/pos/cart/v1.0/detail",getCartShareLink:"/service/application/pos/cart/v1.0/share-cart",getCartSharedItems:"/service/application/pos/cart/v1.0/share-cart/{token}",getCoupons:"/service/application/pos/cart/v1.0/coupon",getItemCount:"/service/application/pos/cart/v1.0/basic",getShipments:"/service/application/pos/cart/v1.0/shipment",getStoreAddressByUid:"/service/application/pos/cart/v1.0/store-address",removeAddress:"/service/application/pos/cart/v1.0/address/{id}",removeCoupon:"/service/application/pos/cart/v1.0/coupon",selectAddress:"/service/application/pos/cart/v1.0/select-address",selectPaymentMode:"/service/application/pos/cart/v1.0/payment",updateAddress:"/service/application/pos/cart/v1.0/address/{id}",updateCart:"/service/application/pos/cart/v1.0/detail",updateCartMeta:"/service/application/pos/cart/v1.0/meta",updateCartWithSharedItems:"/service/application/pos/cart/v1.0/share-cart/{token}/{action}",updateShipments:"/service/application/pos/cart/v1.0/shipment",validateCouponForPayment:"/service/application/pos/cart/v1.0/payment/validate/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addAddress({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.addAddress().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.addAddress().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > addAddress \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.addAddress,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SaveAddressResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > addAddress \n ${m}`})}return p}async addItems({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.addItems().validate({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.addItems().validate({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > addItems \n ${w}`});const y={};y.i=t,y.b=r,y.area_code=u,y.buy_now=d,y.id=p;const b=await a.execute(this._conf,"post",s({url:this._urls.addItems,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.AddCartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > addItems \n ${_}`})}return b}async applyCoupon({body:e,i:t,b:r,p:u,id:d,buyNow:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.applyCoupon().validate({body:e,i:t,b:r,p:u,id:d,buyNow:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.applyCoupon().validate({body:e,i:t,b:r,p:u,id:d,buyNow:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > applyCoupon \n ${w}`});const y={};y.i=t,y.b=r,y.p=u,y.id=d,y.buy_now=p;const b=await a.execute(this._conf,"post",s({url:this._urls.applyCoupon,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.CartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > applyCoupon \n ${_}`})}return b}async applyRewardPoints({body:e,id:t,i:r,b:u,buyNow:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.applyRewardPoints().validate({body:e,id:t,i:r,b:u,buyNow:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:f}=i.applyRewardPoints().validate({body:e,id:t,i:r,b:u,buyNow:d},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > applyRewardPoints \n ${f}`});const w={};w.id=t,w.i=r,w.b=u,w.buy_now=d;const y=await a.execute(this._conf,"post",s({url:this._urls.applyRewardPoints,params:{}}),w,e,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.CartDetailResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > applyRewardPoints \n ${h}`})}return y}async checkoutCart({body:e,id:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.checkoutCart().validate({body:e,id:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.checkoutCart().validate({body:e,id:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > checkoutCart \n ${p}`});const g={};g.id=t;const m=await a.execute(this._conf,"post",s({url:this._urls.checkoutCart,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.CartCheckoutResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > checkoutCart \n ${w}`})}return m}async getAddressById({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:w}=i.getAddressById().validate({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:y}=i.getAddressById().validate({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getAddressById \n ${y}`});const b={};b.cart_id=t,b.buy_now=r,b.mobile_no=u,b.checkout_mode=d,b.tags=p,b.is_default=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getAddressById,params:{id:e}}),b,void 0,{...m},{responseHeaders:f});let _=h;f&&(_=h[0]);const{error:v}=l.Address().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getAddressById \n ${v}`})}return h}async getAddresses({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.getAddresses().validate({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.getAddresses().validate({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getAddresses \n ${w}`});const y={};y.cart_id=e,y.buy_now=t,y.mobile_no=r,y.checkout_mode=u,y.tags=d,y.is_default=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getAddresses,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.GetAddressesResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getAddresses \n ${_}`})}return b}async getAvailableDeliveryModes({areaCode:e,id:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getAvailableDeliveryModes().validate({areaCode:e,id:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getAvailableDeliveryModes().validate({areaCode:e,id:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getAvailableDeliveryModes \n ${p}`});const g={};g.area_code=e,g.id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getAvailableDeliveryModes,params:{}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.CartDeliveryModesResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getAvailableDeliveryModes \n ${w}`})}return m}async getBulkDiscountOffers({itemId:e,articleId:t,uid:r,slug:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getBulkDiscountOffers().validate({itemId:e,articleId:t,uid:r,slug:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getBulkDiscountOffers().validate({itemId:e,articleId:t,uid:r,slug:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getBulkDiscountOffers \n ${m}`});const f={};f.item_id=e,f.article_id=t,f.uid=r,f.slug=u;const w=await a.execute(this._conf,"get",s({url:this._urls.getBulkDiscountOffers,params:{}}),f,void 0,{...d},{responseHeaders:p});let y=w;p&&(y=w[0]);const{error:b}=l.BulkPriceResponse().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getBulkDiscountOffers \n ${b}`})}return w}async getCart({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:w}=i.getCart().validate({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:y}=i.getCart().validate({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCart \n ${y}`});const b={};b.id=e,b.i=t,b.b=r,b.c=u,b.assign_card_id=d,b.area_code=p,b.buy_now=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getCart,params:{}}),b,void 0,{...m},{responseHeaders:f});let _=h;f&&(_=h[0]);const{error:v}=l.CartDetailResponse().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCart \n ${v}`})}return h}async getCartLastModified({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:l}=i.getCartLastModified().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(l)return Promise.reject(new n(l));const{error:d}=i.getCartLastModified().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCartLastModified \n ${d}`});const p={};p.id=e;const g=await a.execute(this._conf,"head",s({url:this._urls.getCartLastModified,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=u.string().allow("").validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCartLastModified \n ${f}`})}return g}async getCartShareLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCartShareLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCartShareLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCartShareLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getCartShareLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetShareCartLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCartShareLink \n ${m}`})}return p}async getCartSharedItems({token:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCartSharedItems().validate({token:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCartSharedItems().validate({token:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCartSharedItems \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCartSharedItems,params:{token:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SharedCartResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCartSharedItems \n ${m}`})}return p}async getCoupons({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getCoupons().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getCoupons().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCoupons \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getCoupons,params:{}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.GetCouponResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCoupons \n ${w}`})}return m}async getItemCount({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getItemCount().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getItemCount().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getItemCount \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getItemCount,params:{}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.CartItemCountResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getItemCount \n ${w}`})}return m}async getShipments({pickAtStoreUid:e,orderingStoreId:t,p:r,id:u,addressId:d,areaCode:p,orderType:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:w}=i.getShipments().validate({pickAtStoreUid:e,orderingStoreId:t,p:r,id:u,addressId:d,areaCode:p,orderType:g},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:y}=i.getShipments().validate({pickAtStoreUid:e,orderingStoreId:t,p:r,id:u,addressId:d,areaCode:p,orderType:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getShipments \n ${y}`});const b={};b.pick_at_store_uid=e,b.ordering_store_id=t,b.p=r,b.id=u,b.address_id=d,b.area_code=p,b.order_type=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getShipments,params:{}}),b,void 0,{...m},{responseHeaders:f});let _=h;f&&(_=h[0]);const{error:v}=l.CartShipmentsResponse().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getShipments \n ${v}`})}return h}async getStoreAddressByUid({storeUid:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getStoreAddressByUid().validate({storeUid:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getStoreAddressByUid().validate({storeUid:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getStoreAddressByUid \n ${d}`});const p={};p.store_uid=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getStoreAddressByUid,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.StoreDetailsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getStoreAddressByUid \n ${f}`})}return g}async removeAddress({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.removeAddress().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.removeAddress().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > removeAddress \n ${d}`});const p=await a.execute(this._conf,"delete",s({url:this._urls.removeAddress,params:{id:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.DeleteAddressResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > removeAddress \n ${m}`})}return p}async removeCoupon({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.removeCoupon().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.removeCoupon().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > removeCoupon \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"delete",s({url:this._urls.removeCoupon,params:{}}),g,void 0,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.CartDetailResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > removeCoupon \n ${w}`})}return m}async selectAddress({body:e,cartId:t,buyNow:r,i:u,b:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.selectAddress().validate({body:e,cartId:t,buyNow:r,i:u,b:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:f}=i.selectAddress().validate({body:e,cartId:t,buyNow:r,i:u,b:d},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > selectAddress \n ${f}`});const w={};w.cart_id=t,w.buy_now=r,w.i=u,w.b=d;const y=await a.execute(this._conf,"post",s({url:this._urls.selectAddress,params:{}}),w,e,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.CartDetailResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > selectAddress \n ${h}`})}return y}async selectPaymentMode({body:e,id:t,buyNow:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.selectPaymentMode().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.selectPaymentMode().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > selectPaymentMode \n ${g}`});const m={};m.id=t,m.buy_now=r;const f=await a.execute(this._conf,"put",s({url:this._urls.selectPaymentMode,params:{}}),m,e,{...u},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=l.CartDetailResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > selectPaymentMode \n ${y}`})}return f}async updateAddress({id:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateAddress().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateAddress().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateAddress \n ${p}`});const g=await a.execute(this._conf,"put",s({url:this._urls.updateAddress,params:{id:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.UpdateAddressResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateAddress \n ${f}`})}return g}async updateCart({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.updateCart().validate({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.updateCart().validate({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateCart \n ${w}`});const y={};y.id=t,y.i=r,y.b=u,y.area_code=d,y.buy_now=p;const b=await a.execute(this._conf,"put",s({url:this._urls.updateCart,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.UpdateCartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateCart \n ${_}`})}return b}async updateCartMeta({body:e,id:t,buyNow:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.updateCartMeta().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.updateCartMeta().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateCartMeta \n ${g}`});const m={};m.id=t,m.buy_now=r;const f=await a.execute(this._conf,"put",s({url:this._urls.updateCartMeta,params:{}}),m,e,{...u},{responseHeaders:d});let w=f;d&&(w=f[0]);const{error:y}=l.CartMetaResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateCartMeta \n ${y}`})}return f}async updateCartWithSharedItems({token:e,action:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateCartWithSharedItems().validate({token:e,action:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateCartWithSharedItems().validate({token:e,action:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateCartWithSharedItems \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.updateCartWithSharedItems,params:{token:e,action:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.SharedCartResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateCartWithSharedItems \n ${f}`})}return g}async updateShipments({body:e,i:t,p:r,id:u,addressId:d,areaCode:p,orderType:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:w}=i.updateShipments().validate({body:e,i:t,p:r,id:u,addressId:d,areaCode:p,orderType:g},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:y}=i.updateShipments().validate({body:e,i:t,p:r,id:u,addressId:d,areaCode:p,orderType:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateShipments \n ${y}`});const b={};b.i=t,b.p=r,b.id=u,b.address_id=d,b.area_code=p,b.order_type=g;const h=await a.execute(this._conf,"put",s({url:this._urls.updateShipments,params:{}}),b,e,{...m},{responseHeaders:f});let _=h;f&&(_=h[0]);const{error:v}=l.CartShipmentsResponse().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateShipments \n ${v}`})}return h}async validateCouponForPayment({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:f,type:w,cardId:y,requestHeaders:b}={requestHeaders:{}},{responseHeaders:h}={responseHeaders:!1}){const{error:_}=i.validateCouponForPayment().validate({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:f,type:w,cardId:y},{abortEarly:!1,allowUnknown:!0});if(_)return Promise.reject(new n(_));const{error:v}=i.validateCouponForPayment().validate({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:f,type:w,cardId:y},{abortEarly:!1,allowUnknown:!1});v&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > validateCouponForPayment \n ${v}`});const k={};k.id=e,k.buy_now=t,k.address_id=r,k.payment_mode=u,k.payment_identifier=d,k.aggregator_name=p,k.merchant_code=g,k.iin=m,k.network=f,k.type=w,k.card_id=y;const R=await a.execute(this._conf,"get",s({url:this._urls.validateCouponForPayment,params:{}}),k,void 0,{...b},{responseHeaders:h});let P=R;h&&(P=R[0]);const{error:C}=l.PaymentCouponValidate().validate(P,{abortEarly:!1,allowUnknown:!0});if(C){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(C));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > validateCouponForPayment \n ${C}`})}return R}}},6962:(e,t,r)=>{const a=r(2705);class n{static ActionQuery(){return a.object({product_slug:a.array().items(a.string().allow(""))})}static AddCartDetailResponse(){return a.object({cart:n.CartDetailResponse(),message:a.string().allow(""),partial:a.boolean(),success:a.boolean()})}static AddCartRequest(){return a.object({items:a.array().items(n.AddProductCart()),new_cart:a.boolean()})}static AddProductCart(){return a.object({_custom_json:a.any(),article_assignment:a.any(),article_id:a.string().allow(""),display:a.string().allow(""),extra_meta:a.any(),item_id:a.number(),item_size:a.string().allow(""),meta:a.any(),parent_item_identifiers:a.array().items(a.object().pattern(/\S/,a.string().allow(""))),pos:a.boolean(),product_group_tags:a.array().items(a.string().allow("").allow(null)),quantity:a.number(),seller_id:a.number(),store_id:a.number()})}static Address(){return a.object({_custom_json:a.any(),address:a.string().allow(""),address_type:a.string().allow(""),area:a.string().allow(""),area_code:a.string().allow(""),area_code_slug:a.string().allow(""),checkout_mode:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),country_code:a.string().allow(""),country_iso_code:a.string().allow(""),country_phone_code:a.string().allow(""),created_by_user_id:a.string().allow(""),email:a.string().allow(""),geo_location:n.GeoLocation(),google_map_point:a.any(),id:a.string().allow(""),is_active:a.boolean(),is_default_address:a.boolean(),landmark:a.string().allow(""),meta:a.any(),name:a.string().allow(""),phone:a.string().allow(""),state:a.string().allow(""),tags:a.array().items(a.string().allow("")),user_id:a.string().allow("")})}static AppliedFreeArticles(){return a.object({article_id:a.string().allow(""),free_gift_item_details:n.FreeGiftItem(),parent_item_identifier:a.string().allow(""),quantity:a.number()})}static AppliedPromotion(){return a.object({amount:a.number(),applied_free_articles:a.array().items(n.AppliedFreeArticles()),article_quantity:a.number(),buy_rules:a.array().items(n.BuyRules()),discount_rules:a.array().items(n.DiscountRulesApp()),mrp_promotion:a.boolean(),offer_text:a.string().allow(""),ownership:n.Ownership(),promo_id:a.string().allow(""),promotion_group:a.string().allow(""),promotion_name:a.string().allow(""),promotion_type:a.string().allow("")})}static ApplyCouponRequest(){return a.object({coupon_code:a.string().allow("").required()})}static ArticleGiftDetail(){return a.object({article_id:n.GiftDetail()})}static ArticlePriceInfo(){return a.object({base:n.BasePrice(),converted:n.BasePrice()})}static BaseInfo(){return a.object({name:a.string().allow(""),uid:a.number()})}static BasePrice(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number()})}static BulkPriceOffer(){return a.object({offers:a.array().items(n.OfferItem()),seller:n.OfferSeller()})}static BulkPriceResponse(){return a.object({data:a.array().items(n.BulkPriceOffer())})}static BuyRules(){return a.object({cart_conditions:a.any(),item_criteria:a.any()})}static CartBreakup(){return a.object({coupon:n.CouponBreakup(),display:a.array().items(n.DisplayBreakup()),loyalty_points:n.LoyaltyPoints(),raw:n.RawBreakup()})}static CartCheckoutCustomMeta(){return a.object({key:a.string().allow("").required(),value:a.string().allow("").required()})}static CartCheckoutResponse(){return a.object({app_intercept_url:a.string().allow(""),callback_url:a.string().allow(""),cart:n.CheckCart(),data:a.any(),message:a.string().allow(""),order_id:a.string().allow(""),payment_confirm_url:a.string().allow(""),success:a.boolean()})}static CartCurrency(){return a.object({code:a.string().allow(""),symbol:a.string().allow("")})}static CartDeliveryModesResponse(){return a.object({available_modes:a.array().items(a.string().allow("")),pickup_stores:a.array().items(a.number())})}static CartDetailResponse(){return a.object({applied_promo_details:a.array().items(n.AppliedPromotion()),breakup_values:n.CartBreakup(),buy_now:a.boolean(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),pan_config:a.any(),pan_no:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean()})}static CartItemCountResponse(){return a.object({user_cart_items_count:a.number()})}static CartMetaMissingResponse(){return a.object({errors:a.array().items(a.string().allow(""))})}static CartMetaRequest(){return a.object({checkout_mode:a.string().allow(""),comment:a.string().allow(""),delivery_slots:a.any(),gift_details:n.ArticleGiftDetail(),gstin:a.string().allow(""),pick_up_customer_details:a.any()})}static CartMetaResponse(){return a.object({is_valid:a.boolean(),message:a.string().allow("")})}static CartPosCheckoutDetailRequest(){return a.object({address_id:a.string().allow(""),aggregator:a.string().allow(""),billing_address:a.any(),billing_address_id:a.string().allow(""),callback_url:a.string().allow("").allow(null),custom_meta:a.array().items(n.CartCheckoutCustomMeta()),customer_details:a.any().allow(null),delivery_address:a.any(),extra_meta:a.any(),files:a.array().items(n.Files()),id:a.string().allow("").allow(null),merchant_code:a.string().allow(""),meta:a.any(),order_type:a.string().allow("").required(),ordering_store:a.number().allow(null),payment_auto_confirm:a.boolean(),payment_identifier:a.string().allow("").allow(null),payment_mode:a.string().allow("").required(),payment_params:a.any().allow(null),pick_at_store_uid:a.number().allow(null),pos:a.boolean(),staff:n.StaffCheckout()})}static CartProduct(){return a.object({_custom_json:a.any(),action:n.ProductAction(),brand:n.BaseInfo(),categories:a.array().items(n.CategoryInfo()),images:a.array().items(n.ProductImage()),item_code:a.string().allow("").allow(null),name:a.string().allow(""),slug:a.string().allow(""),tags:a.array().items(a.string().allow("")),teaser_tag:n.Tags(),type:a.string().allow(""),uid:a.number()})}static CartProductIdentifer(){return a.object({identifier:a.string().allow("")})}static CartProductInfo(){return a.object({article:n.ProductArticle(),availability:n.ProductAvailability(),bulk_offer:a.any(),coupon:n.CouponDetails(),coupon_message:a.string().allow(""),custom_order:a.any(),delivery_promise:n.ShipmentPromise(),discount:a.string().allow(""),identifiers:n.CartProductIdentifer().required(),is_set:a.boolean(),key:a.string().allow(""),message:a.string().allow(""),moq:a.any(),parent_item_identifiers:a.any(),price:n.ProductPriceInfo(),price_per_unit:n.ProductPriceInfo(),product:n.CartProduct(),promo_meta:n.PromoMeta(),promotions_applied:a.array().items(n.AppliedPromotion()),quantity:a.number()})}static CartShipmentsResponse(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),error:a.boolean(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),last_modified:a.string().allow(""),message:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),shipments:a.array().items(n.ShipmentResponse()),uid:a.string().allow("")})}static CategoryInfo(){return a.object({name:a.string().allow(""),uid:a.number()})}static CheckCart(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),cod_available:a.boolean(),cod_charges:a.number(),cod_message:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_charge_order_value:a.number(),delivery_charges:a.number(),delivery_promise:n.ShipmentPromise(),error_message:a.string().allow(""),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),order_id:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),store_code:a.string().allow(""),store_emps:a.array().items(a.any()),success:a.boolean(),uid:a.string().allow(""),user_type:a.string().allow("")})}static Coupon(){return a.object({coupon_code:a.string().allow(""),coupon_type:a.string().allow("").allow(null),coupon_value:a.number(),description:a.string().allow("").allow(null),expires_on:a.string().allow(""),is_applicable:a.boolean(),is_applied:a.boolean(),max_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number(),sub_title:a.string().allow(""),title:a.string().allow("")})}static CouponBreakup(){return a.object({code:a.string().allow(""),coupon_type:a.string().allow("").allow(null),coupon_value:a.number(),description:a.string().allow("").allow(null),is_applied:a.boolean(),max_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number(),sub_title:a.string().allow("").allow(null),title:a.string().allow("").allow(null),type:a.string().allow(""),uid:a.string().allow(""),value:a.number()})}static CouponDetails(){return a.object({code:a.string().allow(""),discount_single_quantity:a.number(),discount_total_quantity:a.number()})}static CouponValidity(){return a.object({code:a.string().allow("").allow(null),discount:a.number(),display_message_en:a.string().allow("").allow(null),next_validation_required:a.boolean().allow(null),title:a.string().allow(""),valid:a.boolean()})}static CustomerDetails(){return a.object({email:a.string().allow("").allow(null),mobile:a.string().allow("").required(),name:a.string().allow("")})}static DeleteAddressResponse(){return a.object({id:a.string().allow(""),is_deleted:a.boolean()})}static DiscountRulesApp(){return a.object({item_criteria:a.any(),matched_buy_rules:a.array().items(a.string().allow("")),offer:a.any(),raw_offer:a.any()})}static DisplayBreakup(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),display:a.string().allow(""),key:a.string().allow(""),message:a.array().items(a.string().allow("")),value:a.number()})}static Files(){return a.object({key:a.string().allow("").required(),values:a.array().items(a.string().allow("")).required()})}static FreeGiftItem(){return a.object({item_brand_name:a.string().allow(""),item_id:a.number(),item_images_url:a.array().items(a.string().allow("")),item_name:a.string().allow(""),item_price_details:a.any(),item_slug:a.string().allow("")})}static GeoLocation(){return a.object({latitude:a.number(),longitude:a.number()})}static GetAddressesResponse(){return a.object({address:a.array().items(n.Address()),pii_masking:a.boolean()})}static GetCouponResponse(){return a.object({available_coupon_list:a.array().items(n.Coupon()),page:n.PageCoupon()})}static GetShareCartLinkRequest(){return a.object({id:a.string().allow(""),meta:a.any()})}static GetShareCartLinkResponse(){return a.object({share_url:a.string().allow(""),token:a.string().allow("")})}static GiftDetail(){return a.object({gift_message:a.string().allow(""),is_gift_applied:a.boolean()})}static LoyaltyPoints(){return a.object({applicable:a.number(),description:a.string().allow(""),is_applied:a.boolean(),total:a.number()})}static OfferItem(){return a.object({auto_applied:a.boolean(),best:a.boolean(),margin:a.number(),price:n.OfferPrice(),quantity:a.number(),total:a.number(),type:a.string().allow("")})}static OfferPrice(){return a.object({bulk_effective:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number()})}static OfferSeller(){return a.object({name:a.string().allow(""),uid:a.number()})}static Ownership(){return a.object({payable_by:a.string().allow(""),payable_category:a.string().allow("")})}static PageCoupon(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),total:a.number(),total_item_count:a.number()})}static PaymentCouponValidate(){return a.object({coupon_validity:n.CouponValidity(),message:a.string().allow(""),success:a.boolean().required()})}static PaymentSelectionLock(){return a.object({default_options:a.string().allow(""),enabled:a.boolean(),payment_identifier:a.string().allow("")})}static PickupStoreDetail(){return a.object({address:a.string().allow(""),address_type:a.string().allow(""),area:a.string().allow(""),area_code:a.string().allow(""),area_code_slug:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),email:a.string().allow(""),id:a.number(),landmark:a.string().allow(""),name:a.string().allow(""),phone:a.string().allow(""),pincode:a.number(),state:a.string().allow(""),store_code:a.string().allow(""),uid:a.number()})}static ProductAction(){return a.object({query:n.ActionQuery(),type:a.string().allow(""),url:a.string().allow("")})}static ProductArticle(){return a.object({_custom_json:a.any(),cart_item_meta:a.any(),extra_meta:a.any(),gift_card:a.any(),identifier:a.any(),is_gift_visible:a.boolean(),meta:a.any(),mto_quantity:a.number(),parent_item_identifiers:a.any(),price:n.ArticlePriceInfo(),product_group_tags:a.array().items(a.string().allow("")),quantity:a.number(),seller:n.BaseInfo(),seller_identifier:a.string().allow(""),size:a.string().allow(""),store:n.StoreInfo(),type:a.string().allow(""),uid:a.string().allow("")})}static ProductAvailability(){return a.object({available_sizes:a.array().items(n.ProductAvailabilitySize()),deliverable:a.boolean(),is_valid:a.boolean(),other_store_quantity:a.number(),out_of_stock:a.boolean(),sizes:a.array().items(a.string().allow(""))})}static ProductAvailabilitySize(){return a.object({display:a.string().allow(""),is_available:a.boolean(),value:a.string().allow("")})}static ProductImage(){return a.object({aspect_ratio:a.string().allow(""),secure_url:a.string().allow(""),url:a.string().allow("")})}static ProductPrice(){return a.object({add_on:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),selling:a.number()})}static ProductPriceInfo(){return a.object({base:n.ProductPrice(),converted:n.ProductPrice()})}static PromiseFormatted(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static PromiseTimestamp(){return a.object({max:a.number(),min:a.number()})}static PromoMeta(){return a.object({message:a.string().allow("")})}static RawBreakup(){return a.object({cod_charge:a.number(),convenience_fee:a.number(),coupon:a.number(),delivery_charge:a.number(),discount:a.number(),fynd_cash:a.number(),gift_card:a.number(),gst_charges:a.number(),mrp_total:a.number(),subtotal:a.number(),total:a.number(),vog:a.number(),you_saved:a.number()})}static RewardPointRequest(){return a.object({points:a.boolean().required()})}static SaveAddressResponse(){return a.object({id:a.string().allow(""),is_default_address:a.boolean(),success:a.boolean()})}static SelectCartAddressRequest(){return a.object({billing_address_id:a.string().allow(""),cart_id:a.string().allow(""),id:a.string().allow("")})}static SharedCart(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),shared_cart_details:n.SharedCartDetails(),uid:a.string().allow("")})}static SharedCartDetails(){return a.object({created_on:a.string().allow(""),meta:a.any(),source:a.any(),token:a.string().allow(""),user:a.any()})}static SharedCartResponse(){return a.object({cart:n.SharedCart(),error:a.string().allow("")})}static ShipmentPromise(){return a.object({formatted:n.PromiseFormatted(),timestamp:n.PromiseTimestamp()})}static ShipmentResponse(){return a.object({box_type:a.string().allow("").allow(null),dp_id:a.string().allow("").allow(null),dp_options:a.any().allow(null),fulfillment_id:a.number(),fulfillment_type:a.string().allow(""),items:a.array().items(n.CartProductInfo()),order_type:a.string().allow(""),promise:n.ShipmentPromise(),shipment_type:a.string().allow(""),shipments:a.number()})}static StaffCheckout(){return a.object({_id:a.string().allow("").required(),employee_code:a.string().allow(""),first_name:a.string().allow("").required(),last_name:a.string().allow("").required(),user:a.string().allow("").required()})}static StoreDetailsResponse(){return a.object({items:a.array().items(n.PickupStoreDetail())})}static StoreInfo(){return a.object({name:a.string().allow(""),store_code:a.string().allow(""),uid:a.number()})}static Tags(){return a.object({tags:a.any()})}static UpdateAddressResponse(){return a.object({id:a.string().allow(""),is_default_address:a.boolean(),is_updated:a.boolean(),success:a.boolean()})}static UpdateCartDetailResponse(){return a.object({cart:n.CartDetailResponse(),message:a.string().allow(""),success:a.boolean()})}static UpdateCartPaymentRequest(){return a.object({address_id:a.string().allow(""),aggregator_name:a.string().allow(""),id:a.string().allow(""),merchant_code:a.string().allow(""),payment_identifier:a.string().allow("").allow(null),payment_mode:a.string().allow("")})}static UpdateCartRequest(){return a.object({items:a.array().items(n.UpdateProductCart()),operation:a.string().allow("").required()})}static UpdateCartShipmentItem(){return a.object({article_uid:a.string().allow("").required(),quantity:a.number(),shipment_type:a.string().allow("").required()})}static UpdateCartShipmentRequest(){return a.object({shipments:a.array().items(n.UpdateCartShipmentItem()).required()})}static UpdateProductCart(){return a.object({_custom_json:a.any(),article_id:a.string().allow(""),extra_meta:a.any(),identifiers:n.CartProductIdentifer().required(),item_id:a.number(),item_index:a.number(),item_size:a.string().allow(""),meta:a.any(),parent_item_identifiers:a.any(),quantity:a.number()})}}e.exports=n},2857:(e,t,r)=>{const a=r(2705),n=r(6962);e.exports=class{static addAddress(){return a.object({body:n.Address().required()}).required()}static addItems(){return a.object({i:a.boolean(),b:a.boolean(),areaCode:a.string().allow(""),buyNow:a.boolean(),id:a.string().allow(""),body:n.AddCartRequest().required()}).required()}static applyCoupon(){return a.object({i:a.boolean(),b:a.boolean(),p:a.boolean(),id:a.string().allow(""),buyNow:a.boolean(),body:n.ApplyCouponRequest().required()}).required()}static applyRewardPoints(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),buyNow:a.boolean(),body:n.RewardPointRequest().required()}).required()}static checkoutCart(){return a.object({id:a.string().allow(""),body:n.CartPosCheckoutDetailRequest().required()}).required()}static getAddressById(){return a.object({id:a.string().allow("").required(),cartId:a.string().allow(""),buyNow:a.boolean(),mobileNo:a.string().allow(""),checkoutMode:a.string().allow(""),tags:a.string().allow(""),isDefault:a.boolean()}).required()}static getAddresses(){return a.object({cartId:a.string().allow(""),buyNow:a.boolean(),mobileNo:a.string().allow(""),checkoutMode:a.string().allow(""),tags:a.string().allow(""),isDefault:a.boolean()})}static getAvailableDeliveryModes(){return a.object({areaCode:a.string().allow("").required(),id:a.string().allow("")}).required()}static getBulkDiscountOffers(){return a.object({itemId:a.number(),articleId:a.string().allow(""),uid:a.number(),slug:a.string().allow("")})}static getCart(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),c:a.boolean(),assignCardId:a.number(),areaCode:a.string().allow(""),buyNow:a.boolean()})}static getCartLastModified(){return a.object({id:a.string().allow("")})}static getCartShareLink(){return a.object({body:n.GetShareCartLinkRequest().required()}).required()}static getCartSharedItems(){return a.object({token:a.string().allow("").required()}).required()}static getCoupons(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static getItemCount(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static getShipments(){return a.object({pickAtStoreUid:a.number(),orderingStoreId:a.number(),p:a.boolean(),id:a.string().allow(""),addressId:a.string().allow(""),areaCode:a.string().allow(""),orderType:a.string().allow("")})}static getStoreAddressByUid(){return a.object({storeUid:a.number().required()}).required()}static removeAddress(){return a.object({id:a.string().allow("").required()}).required()}static removeCoupon(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static selectAddress(){return a.object({cartId:a.string().allow(""),buyNow:a.boolean(),i:a.boolean(),b:a.boolean(),body:n.SelectCartAddressRequest().required()}).required()}static selectPaymentMode(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),body:n.UpdateCartPaymentRequest().required()}).required()}static updateAddress(){return a.object({id:a.string().allow("").required(),body:n.Address().required()}).required()}static updateCart(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),areaCode:a.string().allow(""),buyNow:a.boolean(),body:n.UpdateCartRequest().required()}).required()}static updateCartMeta(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),body:n.CartMetaRequest().required()}).required()}static updateCartWithSharedItems(){return a.object({token:a.string().allow("").required(),action:a.string().allow("").required()}).required()}static updateShipments(){return a.object({i:a.boolean(),p:a.boolean(),id:a.string().allow(""),addressId:a.string().allow(""),areaCode:a.string().allow(""),orderType:a.string().allow(""),body:n.UpdateCartShipmentRequest().required()}).required()}static validateCouponForPayment(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),addressId:a.string().allow(""),paymentMode:a.string().allow(""),paymentIdentifier:a.string().allow(""),aggregatorName:a.string().allow(""),merchantCode:a.string().allow(""),iin:a.string().allow(""),network:a.string().allow(""),type:a.string().allow(""),cardId:a.string().allow("")})}}},4107:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=r(3589),l=r(3253),c=r(2743),{Logger:u}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async catalogueOrder({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.catalogueOrder().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.catalogueOrder().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > catalogueOrder \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.catalogueOrder,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.CatalogueOrderResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > catalogueOrder \n ${m}`})}return p}async getOfferByName({name:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getOfferByName().validate({name:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getOfferByName().validate({name:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getOfferByName \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getOfferByName,params:{name:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.Offer().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getOfferByName \n ${m}`})}return p}async getOrderDiscount({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getOrderDiscount().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getOrderDiscount().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getOrderDiscount \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getOrderDiscount,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.OrderDiscountResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getOrderDiscount \n ${m}`})}return p}async getUserPoints({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getUserPoints().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getUserPoints().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getUserPoints \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getUserPoints,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.PointsResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getUserPoints \n ${g}`})}return d}async getUserPointsHistory({pageId:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getUserPointsHistory().validate({pageId:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getUserPointsHistory().validate({pageId:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getUserPointsHistory \n ${p}`});const g={};g.page_id=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getUserPointsHistory,params:{}}),g,void 0,{...r},{responseHeaders:i});let f=m;i&&(f=m[0]);const{error:w}=c.PointsHistoryResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getUserPointsHistory \n ${w}`})}return m}getUserPointsHistoryPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{const r=t.nextId,a=(t.pageNo,await this.getUserPointsHistory({pageId:r,pageSize:e}));return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getUserReferralDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getUserReferralDetails().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getUserReferralDetails().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getUserReferralDetails \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getUserReferralDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ReferralDetailsResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getUserReferralDetails \n ${g}`})}return d}async redeemReferralCode({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.redeemReferralCode().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.redeemReferralCode().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > redeemReferralCode \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.redeemReferralCode,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.RedeemReferralCodeResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > redeemReferralCode \n ${m}`})}return p}}},2743:(e,t,r)=>{const a=r(2705);class n{static Asset(){return a.object({aspect_ratio:a.string().allow(""),id:a.string().allow(""),secure_url:a.string().allow("")})}static CatalogueOrderRequest(){return a.object({articles:a.array().items(n.RewardsArticle())})}static CatalogueOrderResponse(){return a.object({articles:a.array().items(n.RewardsArticle())})}static DiscountProperties(){return a.object({absolute:a.number(),currency:a.string().allow(""),display_absolute:a.string().allow(""),display_percent:a.string().allow(""),percent:a.number()})}static Error(){return a.object({code:a.number(),exception:a.string().allow(""),info:a.string().allow(""),message:a.string().allow("")})}static Offer(){return a.object({_schedule:n.Schedule(),active:a.boolean(),application_id:a.string().allow(""),banner_image:n.Asset(),created_at:a.string().allow(""),name:a.string().allow(""),rule:a.any(),share:n.ShareMessages(),sub_text:a.string().allow(""),text:a.string().allow(""),type:a.string().allow(""),updated_at:a.string().allow(""),updated_by:a.string().allow(""),url:a.string().allow("")})}static OrderDiscountRequest(){return a.object({currency:a.string().allow(""),order_amount:a.number().required()})}static OrderDiscountResponse(){return a.object({applied_rule_bucket:n.OrderDiscountRuleBucket(),base_discount:n.DiscountProperties(),discount:n.DiscountProperties(),order_amount:a.number(),points:a.number()})}static OrderDiscountRuleBucket(){return a.object({high:a.number(),low:a.number(),max:a.number(),value:a.number(),value_type:a.string().allow("")})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static PointsHistory(){return a.object({_id:a.string().allow(""),application_id:a.string().allow(""),claimed:a.boolean(),created_at:a.string().allow(""),expires_on:a.string().allow(""),meta:a.any(),points:a.number(),remaining_points:a.number(),text_1:a.string().allow(""),text_2:a.string().allow(""),text_3:a.string().allow(""),txn_name:a.string().allow(""),updated_at:a.string().allow(""),user_id:a.string().allow("")})}static PointsHistoryResponse(){return a.object({items:a.array().items(n.PointsHistory()),page:n.Page()})}static PointsResponse(){return a.object({points:a.number()})}static RedeemReferralCodeRequest(){return a.object({device_id:a.string().allow(""),referral_code:a.string().allow("")})}static RedeemReferralCodeResponse(){return a.object({message:a.string().allow(""),points:a.number(),redeemed:a.boolean(),referrer_id:a.string().allow(""),referrer_info:a.string().allow("")})}static ReferralDetailsResponse(){return a.object({referral:n.Offer(),referrer_info:a.string().allow(""),share:n.ShareMessages(),terms_conditions_link:a.string().allow(""),user:n.ReferralDetailsUser()})}static ReferralDetailsUser(){return a.object({blocked:a.boolean(),points:a.number(),redeemed:a.boolean(),referral_code:a.string().allow("")})}static RewardsArticle(){return a.object({id:a.string().allow(""),points:a.number(),price:a.number()})}static Schedule(){return a.object({cron:a.string().allow(""),duration:a.number(),end:a.string().allow(""),start:a.string().allow("")})}static ShareMessages(){return a.object({email:a.number(),facebook:a.string().allow(""),fallback:a.string().allow(""),message:a.string().allow(""),messenger:a.string().allow(""),sms:a.string().allow(""),text:a.string().allow(""),twitter:a.string().allow(""),whatsapp:a.string().allow("")})}}e.exports=n},3253:(e,t,r)=>{const a=r(2705),n=r(2743);e.exports=class{static catalogueOrder(){return a.object({body:n.CatalogueOrderRequest().required()}).required()}static getOfferByName(){return a.object({name:a.string().allow("").required()}).required()}static getOrderDiscount(){return a.object({body:n.OrderDiscountRequest().required()}).required()}static getUserPoints(){return a.object({})}static getUserPointsHistory(){return a.object({pageId:a.string().allow(""),pageSize:a.number()})}static getUserReferralDetails(){return a.object({})}static redeemReferralCode(){return a.object({body:n.RedeemReferralCodeRequest().required()}).required()}}},3740:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(9421)),l=r(6734),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async createShortLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.createShortLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.createShortLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > createShortLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.createShortLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShortLinkRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > createShortLink \n ${m}`})}return p}async getApplicationQRCode({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getApplicationQRCode().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getApplicationQRCode().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getApplicationQRCode \n ${u}`});const d=await a.execute(this._conf,"post",s({url:this._urls.getApplicationQRCode,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.QRCodeResp().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Share > getApplicationQRCode \n ${g}`})}return d}async getCollectionQRCodeBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCollectionQRCodeBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCollectionQRCodeBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getCollectionQRCodeBySlug \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getCollectionQRCodeBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.QRCodeResp().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > getCollectionQRCodeBySlug \n ${m}`})}return p}async getOriginalShortLinkByHash({hash:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getOriginalShortLinkByHash().validate({hash:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getOriginalShortLinkByHash().validate({hash:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getOriginalShortLinkByHash \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getOriginalShortLinkByHash,params:{hash:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShortLinkRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > getOriginalShortLinkByHash \n ${m}`})}return p}async getProductQRCodeBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getProductQRCodeBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getProductQRCodeBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getProductQRCodeBySlug \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getProductQRCodeBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.QRCodeResp().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > getProductQRCodeBySlug \n ${m}`})}return p}async getShortLinkByHash({hash:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getShortLinkByHash().validate({hash:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getShortLinkByHash().validate({hash:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getShortLinkByHash \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getShortLinkByHash,params:{hash:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShortLinkRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > getShortLinkByHash \n ${m}`})}return p}async getUrlQRCode({url:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getUrlQRCode().validate({url:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getUrlQRCode().validate({url:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getUrlQRCode \n ${d}`});const p={};p.url=e;const g=await a.execute(this._conf,"post",s({url:this._urls.getUrlQRCode,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.QRCodeResp().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Share > getUrlQRCode \n ${f}`})}return g}}},6734:(e,t,r)=>{const a=r(2705);class n{static Attribution(){return a.object({campaign_cookie_expiry:a.string().allow("")})}static CampaignShortLink(){return a.object({medium:a.string().allow(""),source:a.string().allow("")})}static ErrorRes(){return a.object({message:a.string().allow("")})}static QRCodeResp(){return a.object({link:a.string().allow(""),svg:a.string().allow("")})}static RedirectDevice(){return a.object({link:a.string().allow(""),type:a.string().allow("")})}static Redirects(){return a.object({android:n.RedirectDevice(),force_web:a.boolean(),ios:n.RedirectDevice(),web:n.WebRedirect()})}static ShortLinkReq(){return a.object({active:a.boolean(),attribution:n.Attribution(),campaign:n.CampaignShortLink(),count:a.number(),enable_tracking:a.boolean(),expire_at:a.string().allow(""),hash:a.string().allow(""),personalized:a.boolean(),redirects:n.Redirects(),social_media_tags:n.SocialMediaTags(),title:a.string().allow("").required(),url:a.string().allow("").required()})}static ShortLinkRes(){return a.object({_id:a.string().allow(""),active:a.boolean(),app_redirect:a.boolean(),application:a.string().allow(""),attribution:n.Attribution(),campaign:n.CampaignShortLink(),count:a.number(),created_at:a.string().allow(""),created_by:a.string().allow(""),enable_tracking:a.boolean(),expire_at:a.string().allow(""),fallback:a.string().allow(""),meta:a.any(),personalized:a.boolean(),redirects:n.Redirects(),social_media_tags:n.SocialMediaTags(),title:a.string().allow(""),updated_at:a.string().allow(""),url:n.UrlInfo(),user_id:a.string().allow("")})}static SocialMediaTags(){return a.object({description:a.string().allow(""),image:a.string().allow(""),title:a.string().allow("")})}static UrlInfo(){return a.object({hash:a.string().allow(""),original:a.string().allow(""),short:a.string().allow("")})}static WebRedirect(){return a.object({link:a.string().allow(""),type:a.string().allow("")})}}e.exports=n},9421:(e,t,r)=>{const a=r(2705),n=r(6734);e.exports=class{static createShortLink(){return a.object({body:n.ShortLinkReq().required()}).required()}static getApplicationQRCode(){return a.object({})}static getCollectionQRCodeBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getOriginalShortLinkByHash(){return a.object({hash:a.string().allow("").required()}).required()}static getProductQRCodeBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getShortLinkByHash(){return a.object({hash:a.string().allow("").required()}).required()}static getUrlQRCode(){return a.object({url:a.string().allow("").required()}).required()}}},4683:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(1088)),l=r(6377),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAllPages({themeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getAllPages().validate({themeId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getAllPages().validate({themeId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Theme > getAllPages \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getAllPages,params:{themeId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.AllAvailablePageSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Theme > getAllPages \n ${m}`})}return p}async getAppliedTheme({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getAppliedTheme().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getAppliedTheme().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Theme > getAppliedTheme \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getAppliedTheme,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.ThemesSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Theme > getAppliedTheme \n ${g}`})}return d}async getPage({themeId:e,pageValue:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getPage().validate({themeId:e,pageValue:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getPage().validate({themeId:e,pageValue:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Theme > getPage \n ${p}`});const g=await a.execute(this._conf,"get",s({url:this._urls.getPage,params:{themeId:e,pageValue:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:f}=l.AvailablePageSchema().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Theme > getPage \n ${f}`})}return g}async getThemeForPreview({themeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getThemeForPreview().validate({themeId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getThemeForPreview().validate({themeId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Theme > getThemeForPreview \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getThemeForPreview,params:{themeId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ThemesSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Theme > getThemeForPreview \n ${m}`})}return p}}},6377:(e,t,r)=>{const a=r(2705);class n{static AdvanceSetting(){return a.object({divider_stroke_highlight:n.DividerStrokeHighlightSetting(),overlay_popup:n.OverlayPopupSetting(),user_alerts:n.UserAlertsSetting()})}static AllAvailablePageSchema(){return a.object({pages:a.array().items(n.AvailablePageSchema())})}static Assets(){return a.object({common_js:n.CommonJS(),css:n.CSS(),umd_js:n.UMDJs()})}static AuthConfig(){return a.object({show_footer_auth:a.boolean(),show_header_auth:a.boolean()})}static AvailablePagePredicate(){return a.object({route:n.AvailablePageRoutePredicate(),screen:n.AvailablePageScreenPredicate(),user:n.AvailablePageUserPredicate()})}static AvailablePageRoutePredicate(){return a.object({exact_url:a.string().allow(""),query:a.any(),selected:a.string().allow("")})}static AvailablePageSchema(){return a.object({_id:a.string().allow(""),path:a.string().allow(""),props:a.array().items(a.any()),sections:a.array().items(n.AvailablePageSchemaSections()),sections_meta:a.array().items(n.AvailablePageSectionMetaAttributes()),seo:n.AvailablePageSeo(),text:a.string().allow(""),theme:a.string().allow(""),type:a.string().allow(""),value:a.string().allow("")})}static AvailablePageSchemaSections(){return a.object({blocks:a.array().items(a.any()),label:a.string().allow(""),name:a.string().allow(""),predicate:n.AvailablePagePredicate(),preset:a.any(),props:a.any()})}static AvailablePageScreenPredicate(){return a.object({desktop:a.boolean(),mobile:a.boolean(),tablet:a.boolean()})}static AvailablePageSectionMetaAttributes(){return a.object({attributes:a.any()})}static AvailablePageSeo(){return a.object({_id:a.string().allow(""),description:a.string().allow(""),title:a.string().allow("")})}static AvailablePageUserPredicate(){return a.object({anonymous:a.boolean(),authenticated:a.boolean()})}static BlitzkriegApiErrorSchema(){return a.object({message:a.string().allow("")})}static BlitzkriegInternalServerErrorSchema(){return a.object({message:a.string().allow("")})}static Block(){return a.object({name:a.string().allow(""),props:n.BlockProps(),type:a.string().allow("")})}static BlockProps(){return a.object({image:n.ImagePickerProp(),slide_link:n.UrlProp()})}static ButtonSetting(){return a.object({button_link:a.string().allow(""),button_primary:a.string().allow(""),button_secondary:a.string().allow("")})}static CheckboxProp(){return a.object({type:a.string().allow(""),value:a.boolean()})}static Colors(){return a.object({accent_color:a.string().allow(""),bg_color:a.string().allow(""),button_secondary_color:a.string().allow(""),link_color:a.string().allow(""),primary_color:a.string().allow(""),secondary_color:a.string().allow("")})}static CommonJS(){return a.object({link:a.string().allow("")})}static Config(){return a.object({current:a.string().allow("").required(),global_schema:n.GlobalSchema(),list:a.array().items(n.ThemeConfiguration()).required(),preset:n.Preset()})}static CSS(){return a.object({links:a.array().items(a.string().allow(""))})}static CustomConfig(){return a.object({props:n.CustomProps()})}static CustomProps(){return a.object({button_add_to_cart_color:a.string().allow(""),button_add_to_cart_label_color:a.string().allow(""),button_primary_color:a.string().allow(""),button_primary_label_color:a.string().allow(""),button_secondary_color:a.string().allow(""),button_secondary_label_color:a.string().allow(""),button_tertiary_color:a.string().allow(""),button_tertiary_hover_color:a.string().allow(""),button_tertiary_hover_text_color:a.string().allow(""),button_tertiary_label_color:a.string().allow(""),disable_cart:a.boolean(),footer_bg_color:a.string().allow(""),footer_border_color:a.string().allow(""),footer_nav_hover_color:a.string().allow(""),footer_text_color:a.string().allow(""),header_bg_color:a.string().allow(""),header_border_color:a.string().allow(""),header_cart_notification_bg_color:a.string().allow(""),header_cart_notification_text_color:a.string().allow(""),header_icon_color:a.string().allow(""),header_nav_hover_color:a.string().allow(""),header_text_color:a.string().allow(""),is_menu_below_logo:a.boolean(),menu_position:a.string().allow(""),text_body_color:a.string().allow(""),text_discount_color:a.string().allow(""),text_heading_link_color:a.string().allow(""),text_price_color:a.string().allow(""),text_sale_price_color:a.string().allow(""),text_strikethrough_price_color:a.string().allow("")})}static DividerStrokeHighlightSetting(){return a.object({divider_strokes:a.string().allow(""),highlight:a.string().allow("")})}static Font(){return a.object({family:a.string().allow("").required(),variants:n.FontVariants().required()})}static FontVariant(){return a.object({file:a.string().allow("").required(),name:a.string().allow("").required()})}static FontVariants(){return a.object({bold:n.FontVariant(),light:n.FontVariant(),medium:n.FontVariant(),regular:n.FontVariant(),semi_bold:n.FontVariant()})}static FooterSetting(){return a.object({footer_background:a.string().allow(""),footer_body_text:a.string().allow(""),footer_bottom_background:a.string().allow(""),footer_heading_text:a.string().allow(""),footer_icon:a.string().allow("")})}static GeneralSetting(){return a.object({button:n.ButtonSetting(),footer:n.FooterSetting(),header:n.HeaderSetting(),sale_discount:n.SaleDiscountSetting(),text:n.TextSetting(),theme:n.ThemeSetting()})}static GlobalConfig(){return a.object({custom:n.CustomConfig(),statics:n.StaticConfig()})}static GlobalSchema(){return a.object({props:a.array().items(n.Prop())})}static HeaderSetting(){return a.object({header_background:a.string().allow(""),header_icon:a.string().allow(""),header_nav:a.string().allow("")})}static ImagePickerProp(){return a.object({type:a.string().allow(""),value:a.string().allow("")})}static Images(){return a.object({desktop:a.string().allow(""),mobile:a.string().allow("")})}static Meta(){return a.object({description:a.string().allow(""),images:n.Images(),industry:a.array().items(a.string().allow("")),name:a.string().allow(""),payment:n.ThemePayment(),release:n.Release(),slug:a.string().allow("")})}static OverlayPopupSetting(){return a.object({dialog_backgroung:a.string().allow(""),overlay:a.string().allow("")})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static PaletteConfig(){return a.object({advance_setting:n.AdvanceSetting(),general_setting:n.GeneralSetting()})}static Predicate(){return a.object({route:n.Route(),screen:n.Screen(),user:n.ThemeUserSchema()})}static Preset(){return a.object({pages:a.array().items(n.Page())})}static Prop(){return a.object({category:a.string().allow(""),id:a.string().allow(""),info:a.string().allow(""),label:a.string().allow(""),type:a.string().allow("")})}static RangeProp(){return a.object({type:a.string().allow(""),value:a.number()})}static Release(){return a.object({notes:a.string().allow(""),version:a.string().allow("")})}static Route(){return a.object({exact_url:a.string().allow(""),selected:a.string().allow("")})}static SaleDiscountSetting(){return a.object({sale_badge_background:a.string().allow(""),sale_badge_text:a.string().allow(""),sale_discount_text:a.string().allow(""),sale_timer:a.string().allow("")})}static Screen(){return a.object({desktop:a.boolean(),mobile:a.boolean(),tablet:a.boolean()})}static Section(){return a.object({blocks:a.array().items(n.Block()),name:a.string().allow(""),predicate:n.Predicate(),preset:n.SectionPreset(),props:n.SectionProps()})}static SectionItem(){return a.object({blocks:a.array().items(a.any()),label:a.string().allow(""),name:a.string().allow(""),props:a.array().items(a.any())})}static SectionPreset(){return a.object({blocks:a.array().items(n.Block())})}static SectionProps(){return a.object({autoplay:n.CheckboxProp(),item_margin:n.TextProp(),slide_interval:n.RangeProp(),title:n.TextProp()})}static StaticConfig(){return a.object({props:n.StaticProps()})}static StaticProps(){return a.object({auth:n.AuthConfig(),colors:n.Colors(),palette:n.PaletteConfig()})}static TextProp(){return a.object({type:a.string().allow(""),value:a.string().allow("")})}static TextSetting(){return a.object({text_body:a.string().allow(""),text_heading:a.string().allow(""),text_label:a.string().allow(""),text_secondary:a.string().allow("")})}static ThemeConfiguration(){return a.object({global_config:a.any(),name:a.string().allow(""),page:a.array().items(a.string().allow(""))})}static ThemePayment(){return a.object({amount:a.number(),is_paid:a.boolean()})}static ThemeSetting(){return a.object({page_background:a.string().allow(""),theme_accent:a.string().allow("")})}static ThemesSchema(){return a.object({_id:a.string().allow(""),application_id:a.string().allow(""),applied:a.boolean(),assets:n.Assets(),available_sections:a.array().items(n.SectionItem()),config:n.Config(),created_at:a.string().allow(""),font:n.Font(),is_private:a.boolean(),marketplace_theme_id:a.string().allow(""),meta:n.Meta(),name:a.string().allow(""),styles:a.any(),tags:a.array().items(a.string().allow("")),template_theme_id:a.string().allow(""),updated_at:a.string().allow(""),version:a.string().allow("")})}static ThemeUserSchema(){return a.object({anonymous:a.boolean(),authenticated:a.boolean()})}static UMDJs(){return a.object({links:a.array().items(a.string().allow(""))})}static UrlProp(){return a.object({type:a.string().allow(""),value:a.string().allow("")})}static UserAlertsSetting(){return a.object({error_background:a.string().allow(""),error_text:a.string().allow(""),info_background:a.string().allow(""),info_text:a.string().allow(""),success_background:a.string().allow(""),success_text:a.string().allow("")})}}e.exports=n},1088:(e,t,r)=>{const a=r(2705);r(6377),e.exports=class{static getAllPages(){return a.object({themeId:a.string().allow("").required()}).required()}static getAppliedTheme(){return a.object({})}static getPage(){return a.object({themeId:a.string().allow("").required(),pageValue:a.string().allow("").required()}).required()}static getThemeForPreview(){return a.object({themeId:a.string().allow("").required()}).required()}}},9792:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(7727)),l=r(7022),{Logger:c}=r(7378);r(2705),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",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",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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.addEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.addEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > addEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"put",s({url:this._urls.addEmail,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.VerifyEmailOTPSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > addEmail \n ${w}`})}return m}async addMobileNumber({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.addMobileNumber().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.addMobileNumber().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > addMobileNumber \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"put",s({url:this._urls.addMobileNumber,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.VerifyMobileOTPSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > addMobileNumber \n ${w}`})}return m}async deleteEmail({active:e,primary:t,verified:r,email:u,platform:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.deleteEmail().validate({active:e,primary:t,verified:r,email:u,platform:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:f}=i.deleteEmail().validate({active:e,primary:t,verified:r,email:u,platform:d},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > deleteEmail \n ${f}`});const w={};w.platform=d,w.active=e,w.primary=t,w.verified=r,w.email=u;const y=await a.execute(this._conf,"delete",s({url:this._urls.deleteEmail,params:{}}),w,void 0,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.LoginSuccess().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > User > deleteEmail \n ${h}`})}return y}async deleteMobileNumber({active:e,primary:t,verified:r,countryCode:u,phone:d,platform:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:f}=i.deleteMobileNumber().validate({active:e,primary:t,verified:r,countryCode:u,phone:d,platform:p},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:w}=i.deleteMobileNumber().validate({active:e,primary:t,verified:r,countryCode:u,phone:d,platform:p},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > deleteMobileNumber \n ${w}`});const y={};y.platform=p,y.active=e,y.primary=t,y.verified=r,y.country_code=u,y.phone=d;const b=await a.execute(this._conf,"delete",s({url:this._urls.deleteMobileNumber,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.LoginSuccess().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > User > deleteMobileNumber \n ${_}`})}return b}async deleteUser({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.deleteUser().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.deleteUser().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > deleteUser \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.deleteUser,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.DeleteUserSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > deleteUser \n ${m}`})}return p}async forgotPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.forgotPassword().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.forgotPassword().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > forgotPassword \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.forgotPassword,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > forgotPassword \n ${m}`})}return p}async getListOfActiveSessions({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getListOfActiveSessions().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getListOfActiveSessions().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > getListOfActiveSessions \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getListOfActiveSessions,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.SessionListSuccess().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > User > getListOfActiveSessions \n ${g}`})}return d}async getLoggedInUser({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getLoggedInUser().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getLoggedInUser().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > getLoggedInUser \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getLoggedInUser,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.UserObjectSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > User > getLoggedInUser \n ${g}`})}return d}async getPlatformConfig({name:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPlatformConfig().validate({name:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPlatformConfig().validate({name:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > getPlatformConfig \n ${d}`});const p={};p.name=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getPlatformConfig,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:f}=l.PlatformSchema().validate(m,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > getPlatformConfig \n ${f}`})}return g}async hasPassword({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.hasPassword().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.hasPassword().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > hasPassword \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.hasPassword,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.HasPasswordSuccess().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > User > hasPassword \n ${g}`})}return d}async loginWithAppleIOS({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithAppleIOS().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithAppleIOS().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithAppleIOS \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithAppleIOS,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.AuthSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithAppleIOS \n ${w}`})}return m}async loginWithEmailAndPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.loginWithEmailAndPassword().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.loginWithEmailAndPassword().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithEmailAndPassword \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.loginWithEmailAndPassword,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithEmailAndPassword \n ${m}`})}return p}async loginWithFacebook({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithFacebook().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithFacebook().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithFacebook \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithFacebook,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.AuthSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithFacebook \n ${w}`})}return m}async loginWithGoogle({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithGoogle().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithGoogle().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithGoogle \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithGoogle,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.AuthSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithGoogle \n ${w}`})}return m}async loginWithGoogleAndroid({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithGoogleAndroid().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithGoogleAndroid().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithGoogleAndroid \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithGoogleAndroid,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.AuthSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithGoogleAndroid \n ${w}`})}return m}async loginWithGoogleIOS({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithGoogleIOS().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithGoogleIOS().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithGoogleIOS \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithGoogleIOS,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.AuthSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithGoogleIOS \n ${w}`})}return m}async loginWithOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithOTP,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.SendOtpResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithOTP \n ${w}`})}return m}async loginWithToken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.loginWithToken().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.loginWithToken().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithToken \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.loginWithToken,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithToken \n ${m}`})}return p}async logout({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.logout().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.logout().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > logout \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.logout,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.LogoutSuccess().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > User > logout \n ${g}`})}return d}async registerWithForm({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.registerWithForm().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.registerWithForm().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > registerWithForm \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.registerWithForm,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.RegisterFormSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > registerWithForm \n ${w}`})}return m}async resetForgotPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.resetForgotPassword().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.resetForgotPassword().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > resetForgotPassword \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.resetForgotPassword,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResetForgotPasswordSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > resetForgotPassword \n ${m}`})}return p}async sendForgotOTPOnEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendForgotOTPOnEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendForgotOTPOnEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendForgotOTPOnEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendForgotOTPOnEmail,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.EmailOtpSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > sendForgotOTPOnEmail \n ${w}`})}return m}async sendForgotOTPOnMobile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendForgotOTPOnMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendForgotOTPOnMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendForgotOTPOnMobile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendForgotOTPOnMobile,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.OtpSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > sendForgotOTPOnMobile \n ${w}`})}return m}async sendOTPOnEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendOTPOnEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendOTPOnEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendOTPOnEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendOTPOnEmail,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.EmailOtpSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > sendOTPOnEmail \n ${w}`})}return m}async sendOTPOnMobile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendOTPOnMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendOTPOnMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendOTPOnMobile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendOTPOnMobile,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.OtpSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > sendOTPOnMobile \n ${w}`})}return m}async sendResetPasswordEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendResetPasswordEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendResetPasswordEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendResetPasswordEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendResetPasswordEmail,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.ResetPasswordSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > sendResetPasswordEmail \n ${w}`})}return m}async sendResetPasswordMobile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendResetPasswordMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendResetPasswordMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendResetPasswordMobile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendResetPasswordMobile,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.ResetPasswordSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > sendResetPasswordMobile \n ${w}`})}return m}async sendResetToken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.sendResetToken().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.sendResetToken().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendResetToken \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.sendResetToken,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResetPasswordSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > sendResetToken \n ${m}`})}return p}async sendVerificationLinkToEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendVerificationLinkToEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendVerificationLinkToEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendVerificationLinkToEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendVerificationLinkToEmail,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.SendEmailVerifyLinkSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > sendVerificationLinkToEmail \n ${w}`})}return m}async sendVerificationLinkToMobile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendVerificationLinkToMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendVerificationLinkToMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendVerificationLinkToMobile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendVerificationLinkToMobile,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.SendMobileVerifyLinkSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > sendVerificationLinkToMobile \n ${w}`})}return m}async setEmailAsPrimary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.setEmailAsPrimary().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.setEmailAsPrimary().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > setEmailAsPrimary \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.setEmailAsPrimary,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > setEmailAsPrimary \n ${m}`})}return p}async setMobileNumberAsPrimary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.setMobileNumberAsPrimary().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.setMobileNumberAsPrimary().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > setMobileNumberAsPrimary \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.setMobileNumberAsPrimary,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > setMobileNumberAsPrimary \n ${m}`})}return p}async updatePassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.updatePassword().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.updatePassword().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > updatePassword \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.updatePassword,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.VerifyEmailSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > updatePassword \n ${m}`})}return p}async updateProfile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateProfile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateProfile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > updateProfile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.updateProfile,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.ProfileEditSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > updateProfile \n ${w}`})}return m}async verifyEmail({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyEmail().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyEmail().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyEmail \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyEmail,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.VerifyEmailSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyEmail \n ${m}`})}return p}async verifyEmailForgotOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.verifyEmailForgotOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.verifyEmailForgotOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyEmailForgotOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.verifyEmailForgotOTP,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.VerifyForgotOtpSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyEmailForgotOTP \n ${w}`})}return m}async verifyEmailOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.verifyEmailOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.verifyEmailOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyEmailOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.verifyEmailOTP,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.VerifyOtpSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyEmailOTP \n ${w}`})}return m}async verifyMobile({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyMobile().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyMobile().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyMobile \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyMobile,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.VerifyEmailSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyMobile \n ${m}`})}return p}async verifyMobileForgotOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.verifyMobileForgotOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.verifyMobileForgotOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyMobileForgotOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.verifyMobileForgotOTP,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.VerifyForgotOtpSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyMobileForgotOTP \n ${w}`})}return m}async verifyMobileOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.verifyMobileOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.verifyMobileOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyMobileOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.verifyMobileOTP,params:{}}),g,e,{...r},{responseHeaders:u});let f=m;u&&(f=m[0]);const{error:w}=l.VerifyOtpSuccess().validate(f,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyMobileOTP \n ${w}`})}return m}}},7022:(e,t,r)=>{const a=r(2705);class n{static Accountkit(){return a.object({app_id:a.string().allow("")})}static APIError(){return a.object({code:a.string().allow(""),info:a.string().allow(""),message:a.string().allow(""),meta:a.any(),request_id:a.string().allow("")})}static AuthenticationApiErrorSchema(){return a.object({message:a.string().allow("")})}static AuthenticationInternalServerErrorSchema(){return a.object({message:a.string().allow("")})}static AuthSuccess(){return a.object({register_token:a.string().allow(""),user:n.UserSchema(),user_exists:a.boolean()})}static CodeRequestBodySchema(){return a.object({code:a.string().allow("")})}static DeleteAccountConsent(){return a.object({consent_text:a.string().allow("")})}static DeleteAccountReasons(){return a.object({reason_id:a.string().allow(""),reason_text:a.string().allow(""),show_text_area:a.boolean()})}static DeleteApplicationUserRequestSchema(){return a.object({otp:a.string().allow(""),reason:a.string().allow(""),reason_id:a.string().allow(""),request_id:a.string().allow(""),user_id:a.string().allow("")})}static DeleteUserSuccess(){return a.object({success:a.boolean()})}static EditEmailRequestSchema(){return a.object({email:a.string().allow("")})}static EditMobileRequestSchema(){return a.object({country_code:a.string().allow(""),phone:a.string().allow("")})}static EditProfileMobileSchema(){return a.object({country_code:a.string().allow(""),phone:a.string().allow("")})}static EditProfileRequestSchema(){return a.object({android_hash:a.string().allow(""),country_code:a.string().allow(""),dob:a.string().allow(""),email:a.string().allow(""),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),mobile:n.EditProfileMobileSchema(),profile_pic_url:a.string().allow(""),register_token:a.string().allow(""),sender:a.string().allow("")})}static Email(){return a.object({active:a.boolean(),email:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static EmailOtpSuccess(){return a.object({success:a.boolean()})}static Facebook(){return a.object({app_id:a.string().allow("")})}static FlashCard(){return a.object({background_color:a.string().allow(""),text:a.string().allow(""),text_color:a.string().allow("")})}static ForgotPasswordRequestSchema(){return a.object({code:a.string().allow(""),password:a.string().allow("")})}static FormRegisterRequestSchema(){return a.object({email:a.string().allow(""),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),password:a.string().allow(""),phone:n.FormRegisterRequestSchemaPhone(),register_token:a.string().allow("")})}static FormRegisterRequestSchemaPhone(){return a.object({country_code:a.string().allow(""),mobile:a.string().allow("")})}static Google(){return a.object({app_id:a.string().allow("")})}static HasPasswordSuccess(){return a.object({result:a.boolean()})}static Login(){return a.object({otp:a.boolean(),password:a.boolean()})}static LoginSuccess(){return a.object({register_token:a.string().allow(""),request_id:a.string().allow(""),user:n.UserSchema()})}static LogoutSuccess(){return a.object({logout:a.boolean()})}static LookAndFeel(){return a.object({background_color:a.string().allow(""),card_position:a.string().allow("")})}static MetaSchema(){return a.object({fynd_default:a.boolean()})}static OAuthRequestAppleSchema(){return a.object({oauth:n.OAuthRequestAppleSchemaOauth(),profile:n.OAuthRequestAppleSchemaProfile(),user_identifier:a.string().allow("")})}static OAuthRequestAppleSchemaOauth(){return a.object({identity_token:a.string().allow("")})}static OAuthRequestAppleSchemaProfile(){return a.object({first_name:a.string().allow(""),full_name:a.string().allow(""),last_name:a.string().allow("")})}static OAuthRequestSchema(){return a.object({is_signed_in:a.boolean(),oauth2:n.OAuthRequestSchemaOauth2(),profile:n.OAuthRequestSchemaProfile()})}static OAuthRequestSchemaOauth2(){return a.object({access_token:a.string().allow(""),expiry:a.number(),refresh_token:a.string().allow("")})}static OAuthRequestSchemaProfile(){return a.object({email:a.string().allow(""),first_name:a.string().allow(""),full_name:a.string().allow(""),id:a.string().allow(""),image:a.string().allow(""),last_name:a.string().allow("")})}static OtpSuccess(){return a.object({country_code:a.string().allow(""),message:a.string().allow(""),mobile:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow(""),resend_timer:a.number(),resend_token:a.string().allow(""),success:a.boolean()})}static PasswordLoginRequestSchema(){return a.object({captcha_code:a.string().allow(""),password:a.string().allow(""),username:a.string().allow("")})}static PhoneNumber(){return a.object({active:a.boolean(),country_code:a.number(),phone:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static PlatformEmail(){return a.object({is_required:a.boolean(),level:a.string().allow("")})}static PlatformMobile(){return a.object({is_required:a.boolean(),level:a.string().allow("")})}static PlatformSchema(){return a.object({_id:a.string().allow(""),active:a.boolean(),created_at:a.string().allow(""),delete_account_consent:a.any(),delete_account_day:a.number(),delete_account_reasons:a.array().items(n.DeleteAccountReasons()),desktop_image:a.string().allow(""),display:a.string().allow(""),flash_card:n.FlashCard(),forgot_password:a.boolean(),login:n.Login(),look_and_feel:n.LookAndFeel(),meta:n.MetaSchema(),mobile_image:a.string().allow(""),name:a.string().allow(""),register:a.boolean(),register_required_fields:n.RegisterRequiredFields(),required_fields:n.RequiredFields(),session_config:a.any(),skip_captcha:a.boolean(),skip_login:a.boolean(),social:n.Social(),social_tokens:n.SocialTokens(),subtext:a.string().allow(""),updated_at:a.string().allow("")})}static ProfileEditSuccess(){return a.object({country_code:a.string().allow(""),email:a.string().allow(""),message:a.string().allow(""),mobile:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow(""),resend_email_token:a.string().allow(""),resend_timer:a.number(),resend_token:a.string().allow(""),success:a.boolean(),user:n.UserSchema(),user_exists:a.boolean(),verify_email_link:a.boolean(),verify_email_otp:a.boolean(),verify_mobile_otp:a.boolean()})}static RegisterFormSuccess(){return a.object({country_code:a.string().allow(""),email:a.string().allow(""),message:a.string().allow(""),mobile:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow(""),resend_email_token:a.string().allow(""),resend_timer:a.number(),resend_token:a.string().allow(""),success:a.boolean(),user_exists:a.boolean(),verify_email_otp:a.boolean(),verify_mobile_otp:a.boolean()})}static RegisterRequiredFields(){return a.object({email:n.RegisterRequiredFieldsEmail(),mobile:n.RegisterRequiredFieldsMobile()})}static RegisterRequiredFieldsEmail(){return a.object({is_required:a.boolean(),level:a.string().allow("")})}static RegisterRequiredFieldsMobile(){return a.object({is_required:a.boolean(),level:a.string().allow("")})}static RequiredFields(){return a.object({email:n.PlatformEmail(),mobile:n.PlatformMobile()})}static ResetForgotPasswordSuccess(){return a.object({success:a.boolean()})}static ResetPasswordSuccess(){return a.object({status:a.string().allow("")})}static SendEmailForgotOtpRequestSchema(){return a.object({action:a.string().allow(""),email:a.string().allow(""),token:a.string().allow("")})}static SendEmailOtpRequestSchema(){return a.object({action:a.string().allow(""),captcha_code:a.string().allow(""),email:a.string().allow(""),register_token:a.string().allow(""),token:a.string().allow("")})}static SendEmailVerifyLinkSuccess(){return a.object({verify_email_link:a.boolean()})}static SendMobileForgotOtpRequestSchema(){return a.object({action:a.string().allow(""),android_hash:a.string().allow(""),country_code:a.string().allow(""),mobile:a.string().allow(""),token:a.string().allow("")})}static SendMobileOtpRequestSchema(){return a.object({action:a.string().allow(""),android_hash:a.string().allow(""),captcha_code:a.string().allow(""),country_code:a.string().allow(""),force:a.string().allow(""),mobile:a.string().allow(""),token:a.string().allow("")})}static SendMobileVerifyLinkSuccess(){return a.object({verify_mobile_link:a.boolean()})}static SendOtpRequestSchema(){return a.object({android_hash:a.string().allow(""),captcha_code:a.string().allow(""),country_code:a.string().allow(""),mobile:a.string().allow("")})}static SendOtpResponse(){return a.object({country_code:a.string().allow(""),email:a.string().allow(""),message:a.string().allow(""),mobile:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow(""),resend_email_token:a.string().allow(""),resend_timer:a.number(),resend_token:a.string().allow(""),success:a.boolean(),user_exists:a.boolean(),verify_email_otp:a.boolean(),verify_mobile_otp:a.boolean()})}static SendResetPasswordEmailRequestSchema(){return a.object({captcha_code:a.string().allow(""),email:a.string().allow("")})}static SendResetPasswordMobileRequestSchema(){return a.object({captcha_code:a.string().allow(""),country_code:a.string().allow(""),mobile:a.string().allow("")})}static SendVerificationLinkMobileRequestSchema(){return a.object({active:a.boolean(),country_code:a.string().allow(""),phone:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static SessionExpiry(){return a.object({duration:a.number(),is_rolling:a.boolean(),type:a.string().allow("")})}static SessionListSuccess(){return a.object({sessions:a.array().items(a.string().allow(""))})}static Social(){return a.object({account_kit:a.boolean(),apple:a.boolean(),facebook:a.boolean(),google:a.boolean()})}static SocialTokens(){return a.object({account_kit:n.Accountkit(),facebook:n.Facebook(),google:n.Google()})}static TokenRequestBodySchema(){return a.object({token:a.string().allow("")})}static UpdatePasswordRequestSchema(){return a.object({new_password:a.string().allow(""),old_password:a.string().allow("")})}static UserObjectSchema(){return a.object({user:n.UserSchema()})}static UserSchema(){return a.object({_id:a.string().allow(""),account_type:a.string().allow(""),active:a.boolean(),application_id:a.string().allow(""),created_at:a.string().allow(""),dob:a.string().allow(""),emails:a.array().items(n.Email()),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),meta:a.any(),phone_numbers:a.array().items(n.PhoneNumber()),profile_pic_url:a.string().allow(""),updated_at:a.string().allow(""),user_id:a.string().allow(""),username:a.string().allow("")})}static VerifyEmailForgotOtpRequestSchema(){return a.object({email:a.string().allow(""),otp:a.string().allow("")})}static VerifyEmailOtpRequestSchema(){return a.object({action:a.string().allow(""),email:a.string().allow(""),otp:a.string().allow(""),register_token:a.string().allow("")})}static VerifyEmailOTPSuccess(){return a.object({user:n.UserSchema(),verify_email_link:a.boolean()})}static VerifyEmailSuccess(){return a.object({message:a.string().allow("")})}static VerifyForgotOtpSuccess(){return a.object({forgot_token:a.string().allow(""),success:a.boolean()})}static VerifyMobileForgotOtpRequestSchema(){return a.object({otp:a.string().allow(""),request_id:a.string().allow("")})}static VerifyMobileOTPSuccess(){return a.object({user:n.UserSchema(),verify_mobile_link:a.boolean()})}static VerifyOtpRequestSchema(){return a.object({otp:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow("")})}static VerifyOtpSuccess(){return a.object({register_token:a.string().allow(""),user:n.UserSchema(),user_exists:a.boolean()})}}e.exports=n},7727:(e,t,r)=>{const a=r(2705),n=r(7022);e.exports=class{static addEmail(){return a.object({platform:a.string().allow(""),body:n.EditEmailRequestSchema().required()}).required()}static addMobileNumber(){return a.object({platform:a.string().allow(""),body:n.EditMobileRequestSchema().required()}).required()}static deleteEmail(){return a.object({platform:a.string().allow(""),active:a.boolean().required(),primary:a.boolean().required(),verified:a.boolean().required(),email:a.string().allow("").required()}).required()}static deleteMobileNumber(){return a.object({platform:a.string().allow(""),active:a.boolean().required(),primary:a.boolean().required(),verified:a.boolean().required(),countryCode:a.string().allow("").required(),phone:a.string().allow("").required()}).required()}static deleteUser(){return a.object({body:n.DeleteApplicationUserRequestSchema().required()}).required()}static forgotPassword(){return a.object({body:n.ForgotPasswordRequestSchema().required()}).required()}static getListOfActiveSessions(){return a.object({})}static getLoggedInUser(){return a.object({})}static getPlatformConfig(){return a.object({name:a.string().allow("")})}static hasPassword(){return a.object({})}static loginWithAppleIOS(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestAppleSchema().required()}).required()}static loginWithEmailAndPassword(){return a.object({body:n.PasswordLoginRequestSchema().required()}).required()}static loginWithFacebook(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestSchema().required()}).required()}static loginWithGoogle(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestSchema().required()}).required()}static loginWithGoogleAndroid(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestSchema().required()}).required()}static loginWithGoogleIOS(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestSchema().required()}).required()}static loginWithOTP(){return a.object({platform:a.string().allow(""),body:n.SendOtpRequestSchema().required()}).required()}static loginWithToken(){return a.object({body:n.TokenRequestBodySchema().required()}).required()}static logout(){return a.object({})}static registerWithForm(){return a.object({platform:a.string().allow(""),body:n.FormRegisterRequestSchema().required()}).required()}static resetForgotPassword(){return a.object({body:n.ForgotPasswordRequestSchema().required()}).required()}static sendForgotOTPOnEmail(){return a.object({platform:a.string().allow(""),body:n.SendEmailForgotOtpRequestSchema().required()}).required()}static sendForgotOTPOnMobile(){return a.object({platform:a.string().allow(""),body:n.SendMobileForgotOtpRequestSchema().required()}).required()}static sendOTPOnEmail(){return a.object({platform:a.string().allow(""),body:n.SendEmailOtpRequestSchema().required()}).required()}static sendOTPOnMobile(){return a.object({platform:a.string().allow(""),body:n.SendMobileOtpRequestSchema().required()}).required()}static sendResetPasswordEmail(){return a.object({platform:a.string().allow(""),body:n.SendResetPasswordEmailRequestSchema().required()}).required()}static sendResetPasswordMobile(){return a.object({platform:a.string().allow(""),body:n.SendResetPasswordMobileRequestSchema().required()}).required()}static sendResetToken(){return a.object({body:n.CodeRequestBodySchema().required()}).required()}static sendVerificationLinkToEmail(){return a.object({platform:a.string().allow(""),body:n.EditEmailRequestSchema().required()}).required()}static sendVerificationLinkToMobile(){return a.object({platform:a.string().allow(""),body:n.SendVerificationLinkMobileRequestSchema().required()}).required()}static setEmailAsPrimary(){return a.object({body:n.EditEmailRequestSchema().required()}).required()}static setMobileNumberAsPrimary(){return a.object({body:n.SendVerificationLinkMobileRequestSchema().required()}).required()}static updatePassword(){return a.object({body:n.UpdatePasswordRequestSchema().required()}).required()}static updateProfile(){return a.object({platform:a.string().allow(""),body:n.EditProfileRequestSchema().required()}).required()}static verifyEmail(){return a.object({body:n.CodeRequestBodySchema().required()}).required()}static verifyEmailForgotOTP(){return a.object({platform:a.string().allow(""),body:n.VerifyEmailForgotOtpRequestSchema().required()}).required()}static verifyEmailOTP(){return a.object({platform:a.string().allow(""),body:n.VerifyEmailOtpRequestSchema().required()}).required()}static verifyMobile(){return a.object({body:n.CodeRequestBodySchema().required()}).required()}static verifyMobileForgotOTP(){return a.object({platform:a.string().allow(""),body:n.VerifyMobileForgotOtpRequestSchema().required()}).required()}static verifyMobileOTP(){return a.object({platform:a.string().allow(""),body:n.VerifyOtpRequestSchema().required()}).required()}}},7854:(e,t,r)=>{const a=r(3204);e.exports=({url:e,params:t})=>e.split("/").map((e=>("{"===e[0]&&"}"===e[e.length-1]&&(e=t[a(e.slice(1,e.length-1))]),e))).join("/")},911:(e,t,r)=>{e.exports={ApplicationConfig:r(6894),ApplicationClient:r(9007),ApplicationModel:{CartApplicationModel:r(7350),CatalogApplicationModel:r(5761),CommonApplicationModel:r(1844),CommunicationApplicationModel:r(4752),ConfigurationApplicationModel:r(4328),ContentApplicationModel:r(3377),FileStorageApplicationModel:r(5108),LeadApplicationModel:r(4535),LogisticApplicationModel:r(9541),OrderApplicationModel:r(2453),PaymentApplicationModel:r(8487),PosCartApplicationModel:r(6962),RewardsApplicationModel:r(2743),ShareApplicationModel:r(6734),ThemeApplicationModel:r(6377),UserApplicationModel:r(7022)}}},2638:(e,t,r)=>{const a=r(7303),n=r(1793),o=r(9669),s=r(7563),{sign:i}=r(5113),{FDKServerResponseError:l}=r(7208),{log:c,Logger:u,getLoggerLevel:d}=r(7378),p=r(6081),{version:g}=r(4147);o.defaults.withCredentials=!0;const m=o.create({paramsSerializer:e=>s.stringify(e)});m.interceptors.request.use((function(e){try{if(d()<=c.levels.DEBUG){const t=p(e);c.debug(t)}}catch(e){u({level:"ERROR",message:`Error Generating Curl: ${e}`})}finally{return e}}),(function(e){u({level:"ERROR",message:e.data||e.message,stack:e.data.stack||e.stack})})),m.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&&!n(e.url)&&(t=a(e.baseURL,e.url));const{host:r,pathname:o,search:l}=new URL(t),{data:c,headers:u,method:d,params:p}=e;u["x-fp-sdk-version"]=g;let m=s.parse(l);m={...m,...p};let f,w="";if(m&&Object.keys(m).length&&""!==s.stringify(m).trim()&&(w=`?${s.stringify(m)}`),"get"!=d){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(c,u)}const{common:y,delete:b,get:h,head:_,post:v,put:k,patch:R,...P}=u,C={method:d&&d.toUpperCase(),host:r,path:o+l+w,body:f,headers:P},j=i(C);return e.headers["x-fp-date"]=j["x-fp-date"],e.headers["x-fp-signature"]=j["x-fp-signature"],e})),m.interceptors.response.use((function(e){return"head"==e.config.method?e.headers:(u({level:"DEBUG",type:"RESPONSE",message:e.data,url:e.config.url}),e.config.responseHeaders?[e.data,e.headers]:e.data)}),(function(e){throw e.response?(u({level:"ERROR",message:e.response.data||e.message,stack:e.response.data.stack||e.stack,request:{method:e.config.method,url:e.config.url,headers:e.config.headers}}),new l(e.response.data.message||e.message,e.response.data.stack||e.stack,e.response.statusText,e.response.status,e.response.data)):e.request?(u({level:"ERROR",message:e.data||e.message,stack:e.data.stack||e.stack,request:{method:e.config.method,url:e.config.url,headers:e.config.headers}}),new l(e.message,e.stack,e.code,e.code)):(u({level:"ERROR",message:e.message}),new l(e.message,e.stack))})),e.exports={fdkAxios:m}},7208:e=>{class t extends Error{constructor(e,t,r=null,a=null,n=null){super(e),this.name="FDKServerResponseError",this.stackTrace=t,this.status=r,this.code=a,this.details=n}}class r extends Error{constructor(e){super(e.message),this.name="FDKClientValidationError",this.details=e.details}}class a extends Error{constructor(e){super(e.message),this.name="FDKResponseValidationError",this.details=JSON.parse(JSON.stringify(e.details))}}class n extends Error{constructor(e){super(e),this.name="FDKInvalidCredentialError"}}class o extends Error{constructor(e){super(e),this.name="FDKTokenIssueError"}}class s 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:r,FDKResponseValidationError:a,FDKInvalidCredentialError:n,FDKTokenIssueError:o,FDKOAuthCodeError:s,FDKException:i}},7378:(e,t,r)=>{const a=r(2043),n=r(4147).version;function o(){return(new Date).toString()}e.exports={log:a,Logger:function(e){const{level:t,message:r,...s}=e;"TRACE"===t&&a.trace(JSON.stringify({level:t,detail:r,...s,time:o(),version:n})),"DEBUG"===t&&a.debug(JSON.stringify({level:t,detail:r,...s,time:o(),version:n})),"INFO"===t&&a.info(JSON.stringify({level:t,detail:r,...s,time:o(),version:n})),"WARN"===t&&a.warn(JSON.stringify({level:t,detail:r,...s,time:o(),version:n})),"ERROR"===t&&a.error(JSON.stringify({level:t,detail:r,...s,time:o(),version:n}))},setLoggerLevel:function(e){a.setLevel(e)},getLoggerLevel:function(){return a.getLevel()}}},3589: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:r=1}){this.isNext=e,this.nextId=t,this.pageNo=r}next(){return this.callback()}}},6081:(e,t,r)=>{const a=r(7563),n=r(7303),o=r(1793);let s;e.exports=function(e){return s=e,`curl ${`--request ${s.method.toUpperCase()}`.trim()} "${function(){let e=s.url;s.baseURL&&!o(e)&&(e=n(s.baseURL,e).trim());let{search:t}=new URL(e);queryParamObject={...a.parse(t),...s.params};let r="";return queryParamObject&&Object.keys(queryParamObject).length&&""!==a.stringify(queryParamObject).trim()&&(r=`?${a.stringify(queryParamObject).trim()}`),`${e}${t.trim()}${r}`}()}" ${function(){let e=["common","delete","get","head","post","put","patch"],t={};s.headers[s.method]&&(t=s.headers[s.method]),t=Object.keys(t).reduce(((e,r)=>(e[r.toLowerCase()]=t[r],e)),{});for(let r in s.headers)e.includes(r)||(s.headers[r]instanceof Object?t[r.toLowerCase()]=JSON.stringify(s.headers[r]):t[r.toLowerCase()]=s.headers[r]);let r="";for(let e in t)r+=` --header '${e}: ${t[e]}'`;return r.trim()}()} ${"GET"!==s.method.toUpperCase()&&null!==s.data&&""!==s.data&&s.data?`--data-raw '${JSON.stringify(s.data)}'`.trim():""}`.trim()}},5860:(e,t,r)=>{const{FDKException:a}=r(7208),n=":::",o=e=>{let t="";for(const r in e)if("object"!=typeof e[r]&&e[r]){const a=encodeURIComponent(e[r]);t+=`${r}=${a}&`}else Array.isArray(e[r])?e[r].forEach((e=>{const a=encodeURIComponent(e);t+=`${r}=${a}&`})):"object"==typeof e[r]&&e[r]&&(t+=o(e[r]));return t?t.slice(0,-1):t},s=(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,l=()=>"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;e.exports={transformRequestOptions:o,getParamsFromItem:e=>{let t="";for(let r in e)if(Array.isArray(e[r])){for(let a=0;a{let t=e.split("?");if(t.length>1){const e=new URLSearchParams(t[1]);let r={};for(let t of e){let e=t[0],a=t[1];r[e]=r[e]?[...r[e],a]:[a]}return r}return{}},trimChar:s,generateUrlWithParams:(e={},t)=>{if(!e||!e.link)return"";if(!t)return`/${s(e.link.split(":")[0])}`;const r={};for(let e in t)if(Array.isArray(t[e])){let a="";for(let r=0;r{let r={value:"",params:{}};t=s(t);for(let a=0;a{if(l())return Buffer.from(e,"utf-8").toString("base64");if(i())return window.btoa(e);throw new a("Base64 conversion error: Unsupported environment")},isBrowser:i,isNode:l,NAV_TYPE:{PAGE:"page",POPUP:"popup"}}},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@gofynd/fdk-client-javascript","version":"1.3.11-beta.7","description":"","main":"index.js","scripts":{"test":"jest --coverage","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":"^0.27.2","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","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={},r=function r(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a].call(o.exports,o,o.exports,r),o.exports}(469),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={469:(e,t,r)=>{const{ApplicationConfig:a,ApplicationClient:n,ApplicationModel:o}=r(911);e.exports={ApplicationConfig:a,ApplicationClient:n,ApplicationModel:o}},5113:function(e){var t;"undefined"!=typeof self&&self,t=()=>(()=>{var e={249:function(e,t,r){var a;e.exports=(a=a||function(e,t){var a;if("undefined"!=typeof window&&window.crypto&&(a=window.crypto),"undefined"!=typeof self&&self.crypto&&(a=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(a=globalThis.crypto),!a&&"undefined"!=typeof window&&window.msCrypto&&(a=window.msCrypto),!a&&void 0!==r.g&&r.g.crypto&&(a=r.g.crypto),!a)try{a=r(480)}catch(e){}var n=function(){if(a){if("function"==typeof a.getRandomValues)try{return a.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof a.randomBytes)try{return a.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),s={},i=s.lib={},l=i.Base={extend:function(e){var t=o(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=i.WordArray=l.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,r=e.words,a=this.sigBytes,n=e.sigBytes;if(this.clamp(),a%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[a+o>>>2]|=s<<24-(a+o)%4*8}else for(var i=0;i>>2]=r[i>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-n%4*8&255;a.push((o>>>4).toString(16)),a.push((15&o).toString(16))}return a.join("")},parse:function(e){for(var t=e.length,r=[],a=0;a>>3]|=parseInt(e.substr(a,2),16)<<24-a%8*4;return new c.init(r,t/2)}},p=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,a=[],n=0;n>>2]>>>24-n%4*8&255;a.push(String.fromCharCode(o))}return a.join("")},parse:function(e){for(var t=e.length,r=[],a=0;a>>2]|=(255&e.charCodeAt(a))<<24-a%4*8;return new c.init(r,t)}},g=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},m=i.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=g.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,a=this._data,n=a.words,o=a.sigBytes,s=this.blockSize,i=o/(4*s),l=(i=t?e.ceil(i):e.max((0|i)-this._minBufferSize,0))*s,u=e.min(4*l,o);if(l){for(var d=0;da&&(t=e.finalize(t)),t.clamp();for(var n=this._oKey=t.clone(),s=this._iKey=t.clone(),i=n.words,l=s.words,c=0;c>>7)^(m<<14|m>>>18)^m>>>3,f=c[g-2],y=(f<<15|f>>>17)^(f<<13|f>>>19)^f>>>10;c[g]=w+c[g-7]+y+c[g-16]}var b=a&n^a&o^n&o,h=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),_=p+((i<<26|i>>>6)^(i<<21|i>>>11)^(i<<7|i>>>25))+(i&u^~i&d)+l[g]+c[g];p=d,d=u,u=i,i=s+_|0,s=o,o=n,n=a,a=_+(h+b)|0}r[0]=r[0]+a|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+i|0,r[5]=r[5]+u|0,r[6]=r[6]+d|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,a=8*this._nDataBytes,n=8*t.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(n+64>>>9<<4)]=e.floor(a/4294967296),r[15+(n+64>>>9<<4)]=a,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),a.SHA256)},335:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,a,n,o){a=a||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var i=/\+/g;e=e.split(a);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u=0?(d=w.substr(0,f),p=w.substr(f+1)):(d=w,p=""),g=decodeURIComponent(d),m=decodeURIComponent(p),t(s,g)?r(s[g])?s[g].push(m):s[g]=[s[g],m]:s[g]=m}return s};var r=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,o,s,i){return o=o||"&",s=s||"=",null===e&&(e=void 0),"object"==typeof e?a(n(e),(function(n){var i=encodeURIComponent(t(n))+s;return r(e[n])?a(e[n],(function(e){return i+encodeURIComponent(t(e))})).join(o):i+encodeURIComponent(t(e[n]))})).join(o):i?encodeURIComponent(t(i))+s+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var r=[],a=0;a{"use strict";t.decode=t.parse=r(335),t.encode=t.stringify=r(795)},832:function(e,t,r){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(735)),o=r(601),s=r(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 r=this.request.headers=this.request.headers||{};!this.request.method&&this.request.body&&(this.request.method="POST"),r.Host||r.host||(r.Host=this.request.host,this.request.port&&(r.Host+=":"+this.request.port)),this.request.host||(this.request.host=r.Host||r.host)}return e.prototype.prepareRequest=function(){this.parsePath();var e,t=this.request,r=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||(r["x-fp-date"]?this.datetime=r["x-fp-date"]||r["x-fp-date"]:r["x-fp-date"]=this.getDateTime()),delete r["x-fp-signature"],delete r["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,s.hmac)(this.secret,e,"hex"))},e.prototype.stringToSign=function(){return[this.getDateTime(),(0,s.hash)(this.canonicalString(),"hex")].join("\n")},e.prototype.canonicalString=function(){this.parsedPath||this.prepareRequest();var e=this.parsedPath.path,t=this.parsedPath.query,r=(this.request.headers,""),a=this.request.doNotEncodePath,n=(0,s.hash)(this.request.body||"","hex");if(t){var o=Object.keys(t).reduce((function(e,r){return r?(e[(0,s.encodeRfc3986Full)(r)]=(Array.isArray(t[r]),t[r]),e):e}),{}),i=[];Object.keys(o).sort().forEach((function(e){Array.isArray(o[e])?o[e].map(s.encodeRfc3986Full).sort().forEach((function(t){i.push(e+"="+t)})):i.push(e+"="+(0,s.encodeRfc3986Full)(o[e]))})),r=i.join("&")}return"/"!==e&&"/"!==(e=(e=e.replace(/\/{2,}/g,"/")).split("/").reduce((function(e,t){return".."===t?e.pop():"."!==t&&(a&&(t=decodeURIComponent(t.replace(/\+/g," "))),e.push((0,s.encodeRfc3986Full)(t))),e}),[]).join("/"))[0]&&(e="/"+e),[this.request.method||"GET",e,r,this.canonicalHeaders()+"\n",this.signedHeaders(),n].join("\n")},e.prototype.canonicalHeaders=function(){var e=this.request.headers;return Object.keys(e).filter((function(e){if(null==o.HEADERS_TO_IGNORE[e.toLowerCase()]){var t=!1;for(var r in o.HEADERS_TO_INCLUDE)t=t||new RegExp(o.HEADERS_TO_INCLUDE[r],"ig").test(e);return t}return!1})).sort((function(e,t){return e.toLowerCase()=0&&(delete(r=n.default.parse(e.slice(t+1)))["x-fp-signature"],delete r["X-Fp-Signature"],e=e.slice(0,t)),e=e.split("/").map((function(e){return encodeURIComponent(decodeURIComponent(e))})).join("/"),this.parsedPath={path:e,query:r}},e.prototype.formatPath=function(){var e=this.parsedPath.path,t=this.parsedPath.query;return t?(null!=t[""]&&delete t[""],e+"?"+(0,s.encodeRfc3986)(n.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,r){"use strict";var a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,r=1,a=arguments.length;r{}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a].call(o.exports,o,o.exports,r),o.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(607)})(),e.exports=t()},9669:(e,t,r)=>{e.exports=r(1609)},5448:(e,t,r)=>{"use strict";var a=r(4867),n=r(6026),o=r(4372),s=r(5327),i=r(4097),l=r(4109),c=r(7985),u=r(7874),d=r(2648),p=r(644),g=r(205);e.exports=function(e){return new Promise((function(t,r){var m,w=e.data,f=e.headers,y=e.responseType;function b(){e.cancelToken&&e.cancelToken.unsubscribe(m),e.signal&&e.signal.removeEventListener("abort",m)}a.isFormData(w)&&a.isStandardBrowserEnv()&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var _=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";f.Authorization="Basic "+btoa(_+":"+v)}var k=i(e.baseURL,e.url);function R(){if(h){var a="getAllResponseHeaders"in h?l(h.getAllResponseHeaders()):null,o={data:y&&"text"!==y&&"json"!==y?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:a,config:e,request:h};n((function(e){t(e),b()}),(function(e){r(e),b()}),o),h=null}}if(h.open(e.method.toUpperCase(),s(k,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=R:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(R)},h.onabort=function(){h&&(r(new d("Request aborted",d.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new d("Network Error",d.ERR_NETWORK,e,h,h)),h=null},h.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",a=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new d(t,a.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,h)),h=null},a.isStandardBrowserEnv()){var P=(e.withCredentials||c(k))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;P&&(f[e.xsrfHeaderName]=P)}"setRequestHeader"in h&&a.forEach(f,(function(e,t){void 0===w&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),a.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),y&&"json"!==y&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(m=function(e){h&&(r(!e||e&&e.type?new p:e),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(m),e.signal&&(e.signal.aborted?m():e.signal.addEventListener("abort",m))),w||(w=null);var j=g(k);j&&-1===["http","https","file"].indexOf(j)?r(new d("Unsupported protocol "+j+":",d.ERR_BAD_REQUEST,e)):h.send(w)}))}},1609:(e,t,r)=>{"use strict";var a=r(4867),n=r(1849),o=r(321),s=r(7185),i=function e(t){var r=new o(t),i=n(o.prototype.request,r);return a.extend(i,o.prototype,r),a.extend(i,r),i.create=function(r){return e(s(t,r))},i}(r(5546));i.Axios=o,i.CanceledError=r(644),i.CancelToken=r(4972),i.isCancel=r(6502),i.VERSION=r(7288).version,i.toFormData=r(7675),i.AxiosError=r(2648),i.Cancel=i.CanceledError,i.all=function(e){return Promise.all(e)},i.spread=r(8713),i.isAxiosError=r(6268),e.exports=i,e.exports.default=i},4972:(e,t,r)=>{"use strict";var a=r(644);function n(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,a=r._listeners.length;for(t=0;t{"use strict";var a=r(2648);function n(e){a.call(this,null==e?"canceled":e,a.ERR_CANCELED),this.name="CanceledError"}r(4867).inherits(n,a,{__CANCEL__:!0}),e.exports=n},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,r)=>{"use strict";var a=r(4867),n=r(5327),o=r(782),s=r(3572),i=r(7185),l=r(4097),c=r(4875),u=c.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=i(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&c.assertOptions(r,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var a=[],n=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(n=n&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!n){var d=[s,void 0];for(Array.prototype.unshift.apply(d,a),d=d.concat(l),o=Promise.resolve(t);d.length;)o=o.then(d.shift(),d.shift());return o}for(var p=t;a.length;){var g=a.shift(),m=a.shift();try{p=g(p)}catch(e){m(e);break}}try{o=s(p)}catch(e){return Promise.reject(e)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},d.prototype.getUri=function(e){e=i(this.defaults,e);var t=l(e.baseURL,e.url);return n(t,e.params,e.paramsSerializer)},a.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,r){return this.request(i(r||{},{method:e,url:t,data:(r||{}).data}))}})),a.forEach(["post","put","patch"],(function(e){function t(t){return function(r,a,n){return this.request(i(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},2648:(e,t,r)=>{"use strict";var a=r(4867);function n(e,t,r,a,n){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),a&&(this.request=a),n&&(this.response=n)}a.inherits(n,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=n.prototype,s={};["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"].forEach((function(e){s[e]={value:e}})),Object.defineProperties(n,s),Object.defineProperty(o,"isAxiosError",{value:!0}),n.from=function(e,t,r,s,i,l){var c=Object.create(o);return a.toFlatObject(e,c,(function(e){return e!==Error.prototype})),n.call(c,e.message,t,r,s,i),c.name=e.name,l&&Object.assign(c,l),c},e.exports=n},782:(e,t,r)=>{"use strict";var a=r(4867);function n(){this.handlers=[]}n.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){a.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=n},4097:(e,t,r)=>{"use strict";var a=r(1793),n=r(7303);e.exports=function(e,t){return e&&!a(t)?n(e,t):t}},3572:(e,t,r)=>{"use strict";var a=r(4867),n=r(8527),o=r(6502),s=r(5546),i=r(644);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new i}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=n.call(e,e.data,e.headers,e.transformRequest),e.headers=a.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),a.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return l(e),t.data=n.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=n.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},7185:(e,t,r)=>{"use strict";var a=r(4867);e.exports=function(e,t){t=t||{};var r={};function n(e,t){return a.isPlainObject(e)&&a.isPlainObject(t)?a.merge(e,t):a.isPlainObject(t)?a.merge({},t):a.isArray(t)?t.slice():t}function o(r){return a.isUndefined(t[r])?a.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function s(e){if(!a.isUndefined(t[e]))return n(void 0,t[e])}function i(r){return a.isUndefined(t[r])?a.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function l(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l};return a.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,n=t(e);a.isUndefined(n)&&t!==l||(r[e]=n)})),r}},6026:(e,t,r)=>{"use strict";var a=r(2648);e.exports=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new a("Request failed with status code "+r.status,[a.ERR_BAD_REQUEST,a.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}},8527:(e,t,r)=>{"use strict";var a=r(4867),n=r(5546);e.exports=function(e,t,r){var o=this||n;return a.forEach(r,(function(r){e=r.call(o,e,t)})),e}},5546:(e,t,r)=>{"use strict";var a=r(4867),n=r(6016),o=r(2648),s=r(7874),i=r(7675),l={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!a.isUndefined(e)&&a.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,d={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(5448)),u),transformRequest:[function(e,t){if(n(t,"Accept"),n(t,"Content-Type"),a.isFormData(e)||a.isArrayBuffer(e)||a.isBuffer(e)||a.isStream(e)||a.isFile(e)||a.isBlob(e))return e;if(a.isArrayBufferView(e))return e.buffer;if(a.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,o=a.isObject(e),s=t&&t["Content-Type"];if((r=a.isFileList(e))||o&&"multipart/form-data"===s){var l=this.env&&this.env.FormData;return i(r?{"files[]":e}:e,l&&new l)}return o||"application/json"===s?(c(t,"application/json"),function(e,t,r){if(a.isString(e))try{return(0,JSON.parse)(e),a.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||n&&a.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o.from(e,o.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:r(1623)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),a.forEach(["post","put","patch"],(function(e){d.headers[e]=a.merge(l)})),e.exports=d},7874:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:e=>{e.exports={version:"0.27.2"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),a=0;a{"use strict";var a=r(4867);function n(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(a.isURLSearchParams(t))o=t.toString();else{var s=[];a.forEach(t,(function(e,t){null!=e&&(a.isArray(e)?t+="[]":e=[e],a.forEach(e,(function(e){a.isDate(e)?e=e.toISOString():a.isObject(e)&&(e=JSON.stringify(e)),s.push(n(t)+"="+n(e))})))})),o=s.join("&")}if(o){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,r)=>{"use strict";var a=r(4867);e.exports=a.isStandardBrowserEnv()?{write:function(e,t,r,n,o,s){var i=[];i.push(e+"="+encodeURIComponent(t)),a.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),a.isString(n)&&i.push("path="+n),a.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},6268:(e,t,r)=>{"use strict";var a=r(4867);e.exports=function(e){return a.isObject(e)&&!0===e.isAxiosError}},7985:(e,t,r)=>{"use strict";var a=r(4867);e.exports=a.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var a=e;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=a.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},6016:(e,t,r)=>{"use strict";var a=r(4867);e.exports=function(e,t){a.forEach(e,(function(r,a){a!==t&&a.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[a])}))}},1623:e=>{e.exports=null},4109:(e,t,r)=>{"use strict";var a=r(4867),n=["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.exports=function(e){var t,r,o,s={};return e?(a.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=a.trim(e.substr(0,o)).toLowerCase(),r=a.trim(e.substr(o+1)),t){if(s[t]&&n.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},205:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},7675:(e,t,r)=>{"use strict";var a=r(4867);e.exports=function(e,t){t=t||new FormData;var r=[];function n(e){return null===e?"":a.isDate(e)?e.toISOString():a.isArrayBuffer(e)||a.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,s){if(a.isPlainObject(o)||a.isArray(o)){if(-1!==r.indexOf(o))throw Error("Circular reference detected in "+s);r.push(o),a.forEach(o,(function(r,o){if(!a.isUndefined(r)){var i,l=s?s+"."+o:o;if(r&&!s&&"object"==typeof r)if(a.endsWith(o,"{}"))r=JSON.stringify(r);else if(a.endsWith(o,"[]")&&(i=a.toArray(r)))return void i.forEach((function(e){!a.isUndefined(e)&&t.append(l,n(e))}));e(r,l)}})),r.pop()}else t.append(s,n(o))}(e),t}},4875:(e,t,r)=>{"use strict";var a=r(7288).version,n=r(2648),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var s={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+a+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,a,i){if(!1===e)throw new n(o(a," has been removed"+(t?" in "+t:"")),n.ERR_DEPRECATED);return t&&!s[a]&&(s[a]=!0,console.warn(o(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,a,i)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new n("options must be an object",n.ERR_BAD_OPTION_VALUE);for(var a=Object.keys(e),o=a.length;o-- >0;){var s=a[o],i=t[s];if(i){var l=e[s],c=void 0===l||i(l,s,e);if(!0!==c)throw new n("option "+s+" must be "+c,n.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new n("Unknown option "+s,n.ERR_BAD_OPTION)}},validators:o}},4867:(e,t,r)=>{"use strict";var a,n=r(1849),o=Object.prototype.toString,s=(a=Object.create(null),function(e){var t=o.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});function i(e){return e=e.toLowerCase(),function(t){return s(t)===e}}function l(e){return Array.isArray(e)}function c(e){return void 0===e}var u=i("ArrayBuffer");function d(e){return null!==e&&"object"==typeof e}function p(e){if("object"!==s(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var g=i("Date"),m=i("File"),w=i("Blob"),f=i("FileList");function y(e){return"[object Function]"===o.call(e)}var b=i("URLSearchParams");function h(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var r=0,a=e.length;r0;)s[o=a[n]]||(t[o]=e[o],s[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:i,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var a=e.indexOf(t,r);return-1!==a&&a===r},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:v,isFileList:f}},3204:e=>{"use strict";const t=/[\p{Lu}]/u,r=/[\p{Ll}]/u,a=/^[\p{Lu}](?![\p{Lu}])/gu,n=/([\p{Alpha}\p{N}_]|$)/u,o=/[_.\- ]+/,s=new RegExp("^"+o.source),i=new RegExp(o.source+n.source,"gu"),l=new RegExp("\\d+"+n.source,"gu"),c=(e,n)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(n={pascalCase:!1,preserveConsecutiveUppercase:!1,...n},0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length)return"";const o=!1===n.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(n.locale),c=!1===n.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(n.locale);return 1===e.length?n.pascalCase?c(e):o(e):(e!==o(e)&&(e=((e,a,n)=>{let o=!1,s=!1,i=!1;for(let l=0;l(a.lastIndex=0,e.replace(a,(e=>t(e)))))(e,o):o(e),n.pascalCase&&(e=c(e.charAt(0))+e.slice(1)),((e,t)=>(i.lastIndex=0,l.lastIndex=0,e.replace(i,((e,r)=>t(r))).replace(l,(e=>t(e)))))(e,c))};e.exports=c,e.exports.default=c},4020:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),a=new RegExp("("+t+")+","gi");function n(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),a=e.slice(t);return Array.prototype.concat.call([],n(r),n(a))}function o(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(r)||[],a=1;a{"use strict";e.exports=function(e,t){for(var r={},a=Object.keys(e),n=Array.isArray(t),o=0;o{var t;self,t=()=>{return e={7629:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(9474),s=r(1687),i=r(8652),l=r(8160),c=r(3292),u=r(6354),d=r(8901),p=r(9708),g=r(6914),m=r(2294),w=r(6133),f=r(1152),y=r(8863),b=r(2036),h={Base:class{constructor(e){this.type=e,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new m.Ids,this._preferences=null,this._refs=new w.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return a("function"==typeof p.describe,"Manifest functionality disabled"),p.describe(this)}allow(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return a(void 0!==e,"Missing example"),l.assertOptions(t,["override"]),this._inner("examples",e,{single:!0,override:t.override})}external(e,t){return"object"==typeof e&&(a(!t,"Cannot combine options with description"),t=e.description,e=e.method),a("function"==typeof e,"Method must be a function"),a(void 0===t||t&&"string"==typeof t,"Description must be a non-empty string"),this._inner("externals",{method:e,description:t},{single:!0})}failover(e,t){return this._default("failover",e,t)}forbidden(){return this.presence("forbidden")}id(e){return e?(a("string"==typeof e,"id must be a non-empty string"),a(/^[^\.]+$/.test(e),"id cannot contain period character"),this.$_setFlag("id",e)):this.$_setFlag("id",void 0)}invalid(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"Invalid mode:",e),this.$_setFlag("only",e)}optional(){return this.presence("optional")}prefs(e){a(e,"Missing preferences"),a(void 0===e.context,"Cannot override context"),a(void 0===e.externals,"Cannot override externals"),a(void 0===e.warnings,"Cannot override warnings"),a(void 0===e.debug,"Cannot override debug"),l.checkPreferences(e);const t=this.clone();return t._preferences=l.preferences(t._preferences,e),t}presence(e){return a(["optional","required","forbidden"].includes(e),"Unknown presence mode",e),this.$_setFlag("presence",e)}raw(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("result",e?"raw":void 0)}result(e){return a(["raw","strip"].includes(e),"Unknown result mode",e),this.$_setFlag("result",e)}required(){return this.presence("required")}strict(e){const t=this.clone(),r=void 0!==e&&!e;return t._preferences=l.preferences(t._preferences,{convert:r}),t}strip(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("result",e?"strip":void 0)}tag(){for(var e=arguments.length,t=new Array(e),r=0;re.keep||e.name!==r)),t._singleRules.delete(r));for(const r of e._rules)e._definition.rules[r.method].multi||t._singleRules.set(r.name,r),t._rules.push(r);if(t._flags.empty&&e._flags.empty){t._flags.empty=t._flags.empty.concat(e._flags.empty);const r=Object.assign({},e._flags);delete r.empty,s(t._flags,r)}else if(e._flags.empty){t._flags.empty=e._flags.empty;const r=Object.assign({},e._flags);delete r.empty,s(t._flags,r)}else s(t._flags,e._flags);for(const r in e.$_terms){const a=e.$_terms[r];a?t.$_terms[r]?t.$_terms[r]=t.$_terms[r].concat(a):t.$_terms[r]=a.slice():t.$_terms[r]||(t.$_terms[r]=a)}return this.$_root._tracer&&this.$_root._tracer._combine(t,[this,e]),t.$_mutateRebuild()}extend(e){return a(!e.base,"Cannot extend type with another base"),d.type(this,e)}extract(e){return e=Array.isArray(e)?e:e.split("."),this._ids.reach(e)}fork(e,t){a(!this._inRuleset(),"Cannot fork inside a ruleset");let r=this;for(let a of[].concat(e))a=Array.isArray(a)?a:a.split("."),r=r._ids.fork(a,t,r);return r.$_temp.ruleset=!1,r}rule(e){const t=this._definition;l.assertOptions(e,Object.keys(t.modifiers)),a(!1!==this.$_temp.ruleset,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const r=null===this.$_temp.ruleset?this._rules.length-1:this.$_temp.ruleset;a(r>=0&&rt.tailor(e),ref:!1}),t.$_temp.ruleset=!1,t.$_mutateRebuild()}tracer(){return f.location?f.location(this):this}validate(e,t){return y.entry(e,this,t)}validateAsync(e,t){return y.entryAsync(e,this,t)}$_addRule(e){"string"==typeof e&&(e={name:e}),a(e&&"object"==typeof e,"Invalid options"),a(e.name&&"string"==typeof e.name,"Invalid rule name");for(const t in e)a("_"!==t[0],"Cannot set private rule properties");const t=Object.assign({},e);t._resolve=[],t.method=t.method||t.name;const r=this._definition.rules[t.method],n=t.args;a(r,"Unknown rule",t.method);const o=this.clone();if(n){a(1===Object.keys(n).length||Object.keys(n).length===this._definition.rules[t.name].args.length,"Invalid rule definition for",this.type,t.name);for(const e in n){let s=n[e];if(r.argsByName){const i=r.argsByName.get(e);if(i.ref&&l.isResolvable(s))t._resolve.push(e),o.$_mutateRegister(s);else if(i.normalize&&(s=i.normalize(s),n[e]=s),i.assert){const t=l.validateArg(s,e,i);a(!t,t,"or reference")}}void 0!==s?n[e]=s:delete n[e]}}return r.multi||(o._ruleRemove(t.name,{clone:!1}),o._singleRules.set(t.name,t)),!1===o.$_temp.ruleset&&(o.$_temp.ruleset=null),r.priority?o._rules.unshift(t):o._rules.push(t),o}$_compile(e,t){return c.schema(this.$_root,e,t)}$_createError(e,t,r,a,n){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const s=!1!==o.flags?this._flags:{},i=o.messages?g.merge(this._definition.messages,o.messages):this._definition.messages;return new u.Report(e,t,r,s,i,a,n)}$_getFlag(e){return this._flags[e]}$_getRule(e){return this._singleRules.get(e)}$_mapLabels(e){return e=Array.isArray(e)?e:e.split("."),this._ids.labels(e)}$_match(e,t,r,a){(r=Object.assign({},r)).abortEarly=!0,r._externals=!1,t.snapshot();const n=!y.validate(e,this,t,r,a).errors;return t.restore(),n}$_modify(e){return l.assertOptions(e,["each","once","ref","schema"]),m.schema(this,e)||this}$_mutateRebuild(){return a(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(e,t)=>{let{source:r,name:a,path:n,key:o}=t;const s=this._definition[r][a]&&this._definition[r][a].register;!1!==s&&this.$_mutateRegister(e,{family:s,key:o})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(e){let{family:t,key:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._refs.register(e,t),this._ids.register(e,{key:r})}$_property(e){return this._definition.properties[e]}$_reach(e){return this._ids.reach(e)}$_rootReferences(){return this._refs.roots()}$_setFlag(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a("_"===e[0]||!this._inRuleset(),"Cannot set flag inside a ruleset");const n=this._definition.flags[e]||{};if(o(t,n.default)&&(t=void 0),o(t,this._flags[e]))return this;const s=!1!==r.clone?this.clone():this;return void 0!==t?(s._flags[e]=t,s.$_mutateRegister(t)):delete s._flags[e],"_"!==e[0]&&(s.$_temp.ruleset=!1),s}$_parent(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{};return l.assertOptions(r,"literal"),a(void 0!==t,"Missing",e,"value"),a("function"==typeof t||!r.literal,"Only function value supports literal option"),"function"==typeof t&&r.literal&&(t={[l.symbols.literal]:!0,literal:t}),this.$_setFlag(e,t)}_generate(e,t,r){if(!this.$_terms.whens)return{schema:this};const a=[],n=[];for(let o=0;oc)break}const o=n.join(", ");if(t.mainstay.tracer.debug(t,"rule","when",o),!o)return{schema:this};if(!t.mainstay.tracer.active&&this.$_temp.whens[o])return{schema:this.$_temp.whens[o],id:o};let s=this;this._definition.generate&&(s=this._definition.generate(this,e,t,r));for(const e of a)s=s.concat(e);return this.$_root._tracer&&this.$_root._tracer._combine(s,[this,...a]),this.$_temp.whens[o]=s,{schema:s,id:o}}_inner(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a(!this._inRuleset(),`Cannot set ${e} inside a ruleset`);const n=this.clone();return n.$_terms[e]&&!r.override||(n.$_terms[e]=[]),r.single?n.$_terms[e].push(t):n.$_terms[e].push(...t),n.$_temp.ruleset=!1,n}_inRuleset(){return null!==this.$_temp.ruleset&&!1!==this.$_temp.ruleset}_ruleRemove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this._singleRules.has(e))return this;const r=!1!==t.clone?this.clone():this;r._singleRules.delete(e);const a=[];for(let t=0;t{"use strict";const a=r(375),n=r(8571),o=r(8160),s={max:1e3,supported:new Set(["undefined","boolean","number","string"])};t.provider={provision:e=>new s.Cache(e)},s.Cache=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o.assertOptions(e,["max"]),a(void 0===e.max||e.max&&e.max>0&&isFinite(e.max),"Invalid max cache size"),this._max=e.max||s.max,this._map=new Map,this._list=new s.List}get length(){return this._map.size}set(e,t){if(null!==e&&!s.supported.has(typeof e))return;let r=this._map.get(e);if(r)return r.value=t,void this._list.first(r);r=this._list.unshift({key:e,value:t}),this._map.set(e,r),this._compact()}get(e){const t=this._map.get(e);if(t)return this._list.first(t),n(t.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},s.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:t,prev:r}=e;return t.prev=r,r&&(r.next=t),e===this.tail&&(this.tail=t),e.prev=null,e.next=null,e}}},8160:(e,t,r)=>{"use strict";const a=r(375),n=r(7916),o=r(5934);let s,i;const l={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};t.version=o.version,t.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},t.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},t.assertOptions=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Options";a(e&&"object"==typeof e&&!Array.isArray(e),"Options must be of type object");const n=Object.keys(e).filter((e=>!t.includes(e)));a(0===n.length,`${r} contain unknown keys: ${n}`)},t.checkPreferences=function(e){i=i||r(3378);const t=i.preferences.validate(e);if(t.error)throw new n([t.error.details[0].message])},t.compare=function(e,t,r){switch(r){case"=":return e===t;case">":return e>t;case"<":return e=":return e>=t;case"<=":return e<=t}},t.default=function(e,t){return void 0===e?t:e},t.isIsoDate=function(e){return l.isoDate.test(e)},t.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},t.isResolvable=function(e){return!!e&&(e[t.symbols.ref]||e[t.symbols.template])},t.isSchema=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e&&e[t.symbols.any];return!!n&&(a(r.legacy||n.version===t.version,"Cannot mix different versions of joi schemas"),!0)},t.isValues=function(e){return e[t.symbols.values]},t.limit=function(e){return Number.isSafeInteger(e)&&e>=0},t.preferences=function(e,a){s=s||r(6914),e=e||{},a=a||{};const n=Object.assign({},e,a);return a.errors&&e.errors&&(n.errors=Object.assign({},e.errors,a.errors),n.errors.wrap=Object.assign({},e.errors.wrap,a.errors.wrap)),a.messages&&(n.messages=s.compile(a.messages,e.messages)),delete n[t.symbols.prefs],n},t.tryWithPath=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{return e()}catch(e){throw void 0!==e.path?e.path=t+"."+e.path:e.path=t,r.append&&(e.message=`${e.message} (${e.path})`),e}},t.validateArg=function(e,r,a){let{assert:n,message:o}=a;if(t.isSchema(n)){const t=n.validate(e);if(!t.error)return;return t.error.message}if(!n(e))return r?`${r} ${o}`:o},t.verifyFlat=function(e,t){for(const r of e)a(!Array.isArray(r),"Method no longer accepts array arguments:",t)}},3292:(e,t,r)=>{"use strict";const a=r(375),n=r(8160),o=r(6133),s={};t.schema=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.assertOptions(r,["appendPath","override"]);try{return s.schema(e,t,r)}catch(e){throw r.appendPath&&void 0!==e.path&&(e.message=`${e.message} (${e.path})`),e}},s.schema=function(e,t,r){a(void 0!==t,"Invalid undefined schema"),Array.isArray(t)&&(a(t.length,"Invalid empty array schema"),1===t.length&&(t=t[0]));const o=function(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:{};n.assertOptions(o,["legacy"]);const i=r&&r[n.symbols.any];if(i)return a(o.legacy||i.version===n.version,"Cannot mix different versions of joi schemas:",i.version,n.version),r;if("object"!=typeof r||!o.legacy)return t.schema(e,r,{appendPath:!0});const l=s.walk(r);return l?l.compile(l.root,r):t.schema(e,r,{appendPath:!0})},s.walk=function(e){if("object"!=typeof e)return null;if(Array.isArray(e)){for(const t of e){const e=s.walk(t);if(e)return e}return null}const t=e[n.symbols.any];if(t)return{root:e[t.root],compile:t.compile};a(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const t in e){const r=s.walk(e[t]);if(r)return r}return null},s.simple=function(e){return null===e||["boolean","string","number"].includes(typeof e)},t.when=function(e,r,i){if(void 0===i&&(a(r&&"object"==typeof r,"Missing options"),i=r,r=o.create(".")),Array.isArray(i)&&(i={switch:i}),n.assertOptions(i,["is","not","then","otherwise","switch","break"]),n.isSchema(r))return a(void 0===i.is,'"is" can not be used with a schema condition'),a(void 0===i.not,'"not" can not be used with a schema condition'),a(void 0===i.switch,'"switch" can not be used with a schema condition'),s.condition(e,{is:r,then:i.then,otherwise:i.otherwise,break:i.break});if(a(o.isRef(r)||"string"==typeof r,"Invalid condition:",r),a(void 0===i.not||void 0===i.is,'Cannot combine "is" with "not"'),void 0===i.switch){let l=i;void 0!==i.not&&(l={is:i.not,then:i.otherwise,otherwise:i.then,break:i.break});let c=void 0!==l.is?e.$_compile(l.is):e.$_root.invalid(null,!1,0,"").required();return a(void 0!==l.then||void 0!==l.otherwise,'options must have at least one of "then", "otherwise", or "switch"'),a(void 0===l.break||void 0===l.then||void 0===l.otherwise,"Cannot specify then, otherwise, and break all together"),void 0===i.is||o.isRef(i.is)||n.isSchema(i.is)||(c=c.required()),s.condition(e,{ref:t.ref(r),is:c,then:l.then,otherwise:l.otherwise,break:l.break})}a(Array.isArray(i.switch),'"switch" must be an array'),a(void 0===i.is,'Cannot combine "switch" with "is"'),a(void 0===i.not,'Cannot combine "switch" with "not"'),a(void 0===i.then,'Cannot combine "switch" with "then"');const l={ref:t.ref(r),switch:[],break:i.break};for(let t=0;t{"use strict";const a=r(5688),n=r(8160),o=r(3328);t.Report=class{constructor(e,r,a,n,o,s,i){if(this.code=e,this.flags=n,this.messages=o,this.path=s.path,this.prefs=i,this.state=s,this.value=r,this.message=null,this.template=null,this.local=a||{},this.local.label=t.label(this.flags,this.state,this.prefs,this.messages),void 0===this.value||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const e=this.path[this.path.length-1];"object"!=typeof e&&(this.local.key=e)}}_setTemplate(e){if(this.template=e,!this.flags.label&&0===this.path.length){const e=this._template(this.template,"root");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const e=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return void 0===t?`Error code "${e}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(e,r){return t.template(this.value,e,r||this.code,this.state,this.prefs)}},t.path=function(e){let t="";for(const r of e)"object"!=typeof r&&("string"==typeof r?(t&&(t+="."),t+=r):t+=`[${r}]`);return t},t.template=function(e,t,r,a,s){if(!t)return;if(o.isTemplate(t))return"root"!==r?t:null;let i=s.errors.language;if(n.isResolvable(i)&&(i=i.resolve(e,a,s)),i&&t[i]){if(void 0!==t[i][r])return t[i][r];if(void 0!==t[i]["*"])return t[i]["*"]}return t[r]?t[r]:t["*"]},t.label=function(e,r,a,n){if(e.label)return e.label;if(!a.errors.label)return"";let o=r.path;return"key"===a.errors.label&&r.path.length>1&&(o=r.path.slice(-1)),t.path(o)||t.template(null,a.messages,"root",r,a)||n&&t.template(null,n,"root",r,a)||"value"},t.process=function(e,r,a){if(!e)return null;const{override:n,message:o,details:s}=t.details(e);if(n)return n;if(a.errors.stack)return new t.ValidationError(o,s,r);const i=Error.stackTraceLimit;Error.stackTraceLimit=0;const l=new t.ValidationError(o,s,r);return Error.stackTraceLimit=i,l},t.details=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const a=[];for(const n of e){if(n instanceof Error){if(!1!==t.override)return{override:n};const e=n.toString();r.push(e),a.push({message:e,type:"override",context:{error:n}});continue}const e=n.toString();r.push(e),a.push({message:e,path:n.path.filter((e=>"object"!=typeof e)),type:n.code,context:n.local})}return r.length>1&&(r=[...new Set(r)]),{message:r.join(". "),details:a}},t.ValidationError=class extends Error{constructor(e,t,r){super(e),this._original=r,this.details=t}static isError(e){return e instanceof t.ValidationError}},t.ValidationError.prototype.isJoi=!0,t.ValidationError.prototype.name="ValidationError",t.ValidationError.prototype.annotate=a.error},8901:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(8160),s=r(6914),i={};t.type=function(e,t){const r=Object.getPrototypeOf(e),l=n(r),c=e._assign(Object.create(l)),u=Object.assign({},t);delete u.base,l._definition=u;const d=r._definition||{};u.messages=s.merge(d.messages,u.messages),u.properties=Object.assign({},d.properties,u.properties),c.type=u.type,u.flags=Object.assign({},d.flags,u.flags);const p=Object.assign({},d.terms);if(u.terms)for(const e in u.terms){const t=u.terms[e];a(void 0===c.$_terms[e],"Invalid term override for",u.type,e),c.$_terms[e]=t.init,p[e]=t}u.terms=p,u.args||(u.args=d.args),u.prepare=i.prepare(u.prepare,d.prepare),u.coerce&&("function"==typeof u.coerce&&(u.coerce={method:u.coerce}),u.coerce.from&&!Array.isArray(u.coerce.from)&&(u.coerce={method:u.coerce.method,from:[].concat(u.coerce.from)})),u.coerce=i.coerce(u.coerce,d.coerce),u.validate=i.validate(u.validate,d.validate);const g=Object.assign({},d.rules);if(u.rules)for(const e in u.rules){const t=u.rules[e];a("object"==typeof t,"Invalid rule definition for",u.type,e);let r=t.method;if(void 0===r&&(r=function(){return this.$_addRule(e)}),r&&(a(!l[e],"Rule conflict in",u.type,e),l[e]=r),a(!g[e],"Rule conflict in",u.type,e),g[e]=t,t.alias){const e=[].concat(t.alias);for(const r of e)l[r]=t.method}t.args&&(t.argsByName=new Map,t.args=t.args.map((e=>("string"==typeof e&&(e={name:e}),a(!t.argsByName.has(e.name),"Duplicated argument name",e.name),o.isSchema(e.assert)&&(e.assert=e.assert.strict().label(e.name)),t.argsByName.set(e.name,e),e))))}u.rules=g;const m=Object.assign({},d.modifiers);if(u.modifiers)for(const e in u.modifiers){a(!l[e],"Rule conflict in",u.type,e);const t=u.modifiers[e];a("function"==typeof t,"Invalid modifier definition for",u.type,e);const r=function(t){return this.rule({[e]:t})};l[e]=r,m[e]=t}if(u.modifiers=m,u.overrides){l._super=r,c.$_super={};for(const e in u.overrides)a(r[e],"Cannot override missing",e),u.overrides[e][o.symbols.parent]=r[e],c.$_super[e]=r[e].bind(c);Object.assign(l,u.overrides)}u.cast=Object.assign({},d.cast,u.cast);const w=Object.assign({},d.manifest,u.manifest);return w.build=i.build(u.manifest&&u.manifest.build,d.manifest&&d.manifest.build),u.manifest=w,u.rebuild=i.rebuild(u.rebuild,d.rebuild),c},i.build=function(e,t){return e&&t?function(r,a){return t(e(r,a),a)}:e||t},i.coerce=function(e,t){return e&&t?{from:e.from&&t.from?[...new Set([...e.from,...t.from])]:null,method(r,a){let n;if((!t.from||t.from.includes(typeof r))&&(n=t.method(r,a),n)){if(n.errors||void 0===n.value)return n;r=n.value}if(!e.from||e.from.includes(typeof r)){const t=e.method(r,a);if(t)return t}return n}}:e||t},i.prepare=function(e,t){return e&&t?function(r,a){const n=e(r,a);if(n){if(n.errors||void 0===n.value)return n;r=n.value}return t(r,a)||n}:e||t},i.rebuild=function(e,t){return e&&t?function(r){t(r),e(r)}:e||t},i.validate=function(e,t){return e&&t?function(r,a){const n=t(r,a);if(n){if(n.errors&&(!Array.isArray(n.errors)||n.errors.length))return n;r=n.value}return e(r,a)||n}:e||t}},5107:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(8652),s=r(8160),i=r(3292),l=r(6354),c=r(8901),u=r(9708),d=r(6133),p=r(3328),g=r(1152);let m;const w={types:{alternatives:r(4946),any:r(8068),array:r(546),boolean:r(4937),date:r(7500),function:r(390),link:r(8785),number:r(3832),object:r(8966),string:r(7417),symbol:r(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const e={_types:new Set(Object.keys(w.types))};for(const t of e._types)e[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n2?r-2:0),n=2;n2?r-2:0),n=2;n{"use strict";const a=r(375),n=r(8571),o=r(3328);t.compile=function(e,t){if("string"==typeof e)return a(!t,"Cannot set single message string"),new o(e);if(o.isTemplate(e))return a(!t,"Cannot set single message template"),e;a("object"==typeof e&&!Array.isArray(e),"Invalid message options"),t=t?n(t):{};for(let r in e){const n=e[r];if("root"===r||o.isTemplate(n)){t[r]=n;continue}if("string"==typeof n){t[r]=new o(n);continue}a("object"==typeof n&&!Array.isArray(n),"Invalid message for",r);const s=r;for(r in t[s]=t[s]||{},n){const e=n[r];"root"===r||o.isTemplate(e)?t[s][r]=e:(a("string"==typeof e,"Invalid message for",r,"in",s),t[s][r]=new o(e))}}return t},t.decompile=function(e){const t={};for(let r in e){const a=e[r];if("root"===r){t.root=a;continue}if(o.isTemplate(a)){t[r]=a.describe({compact:!0});continue}const n=r;for(r in t[n]={},a){const e=a[r];"root"!==r?t[n][r]=e.describe({compact:!0}):t[n].root=e}}return t},t.merge=function(e,r){if(!e)return t.compile(r);if(!r)return e;if("string"==typeof r)return new o(r);if(o.isTemplate(r))return r;const s=n(e);for(let e in r){const t=r[e];if("root"===e||o.isTemplate(t)){s[e]=t;continue}if("string"==typeof t){s[e]=new o(t);continue}a("object"==typeof t&&!Array.isArray(t),"Invalid message for",e);const n=e;for(e in s[n]=s[n]||{},t){const r=t[e];"root"===e||o.isTemplate(r)?s[n][e]=r:(a("string"==typeof r,"Invalid message for",e,"in",n),s[n][e]=new o(r))}}return s}},2294:(e,t,r)=>{"use strict";const a=r(375),n=r(8160),o=r(6133),s={};t.Ids=s.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new s.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(const[t,r]of e._byId.entries())a(!this._byKey.has(t),"Schema id conflicts with existing key:",t),this._byId.set(t,r);for(const[t,r]of e._byKey.entries())a(!this._byId.has(t),"Schema key conflicts with existing id:",t),this._byKey.set(t,r)}fork(e,t,r){const o=this._collect(e);o.push({schema:r});const i=o.shift();let l={id:i.id,schema:t(i.schema)};a(n.isSchema(l.schema),"adjuster function failed to return a joi schema type");for(const e of o)l={id:e.id,schema:s.fork(e.schema,l.id,l.schema)};return l.schema}labels(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=e[0],a=this._get(r);if(!a)return[...t,...e].join(".");const n=e.slice(1);return t=[...t,a.schema._flags.label||r],n.length?a.schema._ids.labels(n,t):t.join(".")}reach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=e[0],n=this._get(r);a(n,"Schema does not contain path",[...t,...e].join("."));const o=e.slice(1);return o.length?n.schema._ids.reach(o,[...t,r]):n.schema}register(e){let{key:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||!n.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const r=e._flags.id;if(r){const t=this._byId.get(r);a(!t||t.schema===e,"Cannot add different schemas with the same id:",r),a(!this._byKey.has(r),"Schema id conflicts with existing key:",r),this._byId.set(r,{schema:e,id:r})}t&&(a(!this._byKey.has(t),"Schema already contains key:",t),a(!this._byId.has(t),"Schema key conflicts with existing id:",t),this._byKey.set(t,{schema:e,id:t}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=e[0],o=this._get(n);a(o,"Schema does not contain path",[...t,...e].join(".")),r=[o,...r];const s=e.slice(1);return s.length?o.schema._ids._collect(s,[...t,n],r):r}_get(e){return this._byId.get(e)||this._byKey.get(e)}},s.fork=function(e,r,a){const n=t.schema(e,{each:(e,t)=>{let{key:n}=t;if(r===(e._flags.id||n))return a},ref:!1});return n?n.$_mutateRebuild():e},t.schema=function(e,t){let r;for(const a in e._flags){if("_"===a[0])continue;const n=s.scan(e._flags[a],{source:"flags",name:a},t);void 0!==n&&(r=r||e.clone(),r._flags[a]=n)}for(let a=0;a{"use strict";const a=r(375),n=r(8571),o=r(9621),s=r(8160);let i;const l={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};t.create=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a("string"==typeof e,"Invalid reference key:",e),s.assertOptions(t,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),a(!t.prefix||"object"==typeof t.prefix,"options.prefix must be of type object");const r=Object.assign({},l.defaults,t);delete r.prefix;const n=r.separator,o=l.context(e,n,t.prefix);if(r.type=o.type,e=o.key,"value"===r.type)if(o.root&&(a(!n||e[0]!==n,"Cannot specify relative path with root prefix"),r.ancestor="root",e||(e=null)),n&&n===e)e=null,r.ancestor=0;else if(void 0!==r.ancestor)a(!n||!e||e[0]!==n,"Cannot combine prefix with ancestor option");else{const[t,a]=l.ancestor(e,n);a&&""===(e=e.slice(a))&&(e=null),r.ancestor=t}return r.path=n?null===e?[]:e.split(n):[e],new l.Ref(r)},t.in=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.create(e,{...r,in:!0})},t.isRef=function(e){return!!e&&!!e[s.symbols.ref]},l.Ref=class{constructor(e){a("object"==typeof e,"Invalid reference construction"),s.assertOptions(e,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),a([!1,void 0].includes(e.separator)||"string"==typeof e.separator&&1===e.separator.length,"Invalid separator"),a(!e.adjust||"function"==typeof e.adjust,"options.adjust must be a function"),a(!e.map||Array.isArray(e.map),"options.map must be an array"),a(!e.map||!e.adjust,"Cannot set both map and adjust options"),Object.assign(this,l.defaults,e),a("value"===this.type||void 0===this.ancestor,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return a(!this.in||o.in,"Invalid in() reference usage"),"global"===this.type?this._resolve(r.context,t,o):"local"===this.type?this._resolve(n,t,o):this.ancestor?"root"===this.ancestor?this._resolve(t.ancestors[t.ancestors.length-1],t,o):(a(this.ancestor<=t.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(t.ancestors[this.ancestor-1],t,o)):this._resolve(e,t,o)}_resolve(e,t,r){let a;if("value"===this.type&&t.mainstay.shadow&&!1!==r.shadow&&(a=t.mainstay.shadow.get(this.absolute(t))),void 0===a&&(a=o(e,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(a=this.adjust(a)),this.map){const e=this.map.get(a);void 0!==e&&(a=e)}return t.mainstay&&t.mainstay.tracer.resolve(t,this,a),a}toString(){return this.display}absolute(e){return[...e.path.slice(0,-this.ancestor),...this.path]}clone(){return new l.Ref(this)}describe(){const e={path:this.path};"value"!==this.type&&(e.type=this.type),"."!==this.separator&&(e.separator=this.separator),"value"===this.type&&1!==this.ancestor&&(e.ancestor=this.ancestor),this.map&&(e.map=[...this.map]);for(const t of["adjust","iterables","render"])null!==this[t]&&void 0!==this[t]&&(e[t]=this[t]);return!1!==this.in&&(e.in=!0),{ref:e}}updateDisplay(){const e=null!==this.key?this.key:"";if("value"!==this.type)return void(this.display=`ref:${this.type}:${e}`);if(!this.separator)return void(this.display=`ref:${e}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${e}`);if("root"===this.ancestor)return void(this.display=`ref:root:${e}`);if(1===this.ancestor)return void(this.display=`ref:${e||".."}`);const t=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${t}${e||""}`}},l.Ref.prototype[s.symbols.ref]=!0,t.build=function(e){return"value"===(e=Object.assign({},l.defaults,e)).type&&void 0===e.ancestor&&(e.ancestor=1),new l.Ref(e)},l.context=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e=e.trim(),r){const a=void 0===r.global?"$":r.global;if(a!==t&&e.startsWith(a))return{key:e.slice(a.length),type:"global"};const n=void 0===r.local?"#":r.local;if(n!==t&&e.startsWith(n))return{key:e.slice(n.length),type:"local"};const o=void 0===r.root?"/":r.root;if(o!==t&&e.startsWith(o))return{key:e.slice(o.length),type:"value",root:!0}}return{key:e,type:"value"}},l.ancestor=function(e,t){if(!t)return[1,0];if(e[0]!==t)return[1,0];if(e[1]!==t)return[0,1];let r=2;for(;e[r]===t;)++r;return[r-1,r]},t.toSibling=0,t.toParent=1,t.Manager=class{constructor(){this.refs=[]}register(e,a){if(e)if(a=void 0===a?t.toParent:a,Array.isArray(e))for(const t of e)this.register(t,a);else if(s.isSchema(e))for(const t of e._refs.refs)t.ancestor-a>=0&&this.refs.push({ancestor:t.ancestor-a,root:t.root});else t.isRef(e)&&"value"===e.type&&e.ancestor-a>=0&&this.refs.push({ancestor:e.ancestor-a,root:e.root}),i=i||r(3328),i.isTemplate(e)&&this.register(e.refs(),a)}get length(){return this.refs.length}clone(){const e=new t.Manager;return e.refs=n(this.refs),e}reset(){this.refs=[]}roots(){return this.refs.filter((e=>!e.ancestor)).map((e=>e.root))}}},3378:(e,t,r)=>{"use strict";const a=r(5107),n={};n.wrap=a.string().min(1).max(2).allow(!1),t.preferences=a.object({allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),context:a.object(),convert:a.boolean(),dateFormat:a.valid("date","iso","string","time","utc"),debug:a.boolean(),errors:{escapeHtml:a.boolean(),label:a.valid("path","key",!1),language:[a.string(),a.object().ref()],render:a.boolean(),stack:a.boolean(),wrap:{label:n.wrap,array:n.wrap,string:n.wrap}},externals:a.boolean(),messages:a.object(),noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:a.valid("required","optional","forbidden"),skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()}).strict(),n.nameRx=/^[a-zA-Z0-9]\w*$/,n.rule=a.object({alias:a.array().items(a.string().pattern(n.nameRx)).single(),args:a.array().items(a.string(),a.object({name:a.string().pattern(n.nameRx).required(),ref:a.boolean(),assert:a.alternatives([a.function(),a.object().schema()]).conditional("ref",{is:!0,then:a.required()}),normalize:a.function(),message:a.string().when("assert",{is:a.function(),then:a.required()})})),convert:a.boolean(),manifest:a.boolean(),method:a.function().allow(!1),multi:a.boolean(),validate:a.function()}),t.extension=a.object({type:a.alternatives([a.string(),a.object().regex()]).required(),args:a.function(),cast:a.object().pattern(n.nameRx,a.object({from:a.function().maxArity(1).required(),to:a.function().minArity(1).maxArity(2).required()})),base:a.object().schema().when("type",{is:a.object().regex(),then:a.forbidden()}),coerce:[a.function().maxArity(3),a.object({method:a.function().maxArity(3).required(),from:a.array().items(a.string()).single()})],flags:a.object().pattern(n.nameRx,a.object({setter:a.string(),default:a.any()})),manifest:{build:a.function().arity(2)},messages:[a.object(),a.string()],modifiers:a.object().pattern(n.nameRx,a.function().minArity(1).maxArity(2)),overrides:a.object().pattern(n.nameRx,a.function()),prepare:a.function().maxArity(3),rebuild:a.function().arity(1),rules:a.object().pattern(n.nameRx,n.rule),terms:a.object().pattern(n.nameRx,a.object({init:a.array().allow(null).required(),manifest:a.object().pattern(/.+/,[a.valid("schema","single"),a.object({mapped:a.object({from:a.string().required(),to:a.string().required()}).required()})])})),validate:a.function().maxArity(3)}).strict(),t.extensions=a.array().items(a.object(),a.function().arity(1)).strict(),n.desc={buffer:a.object({buffer:a.string()}),func:a.object({function:a.function().required(),options:{literal:!0}}),override:a.object({override:!0}),ref:a.object({ref:a.object({type:a.valid("value","global","local"),path:a.array().required(),separator:a.string().length(1).allow(!1),ancestor:a.number().min(0).integer().allow("root"),map:a.array().items(a.array().length(2)).min(1),adjust:a.function(),iterables:a.boolean(),in:a.boolean(),render:a.boolean()}).required()}),regex:a.object({regex:a.string().min(3)}),special:a.object({special:a.valid("deep").required()}),template:a.object({template:a.string().required(),options:a.object()}),value:a.object({value:a.alternatives([a.object(),a.array()]).required()})},n.desc.entity=a.alternatives([a.array().items(a.link("...")),a.boolean(),a.function(),a.number(),a.string(),n.desc.buffer,n.desc.func,n.desc.ref,n.desc.regex,n.desc.special,n.desc.template,n.desc.value,a.link("/")]),n.desc.values=a.array().items(null,a.boolean(),a.function(),a.number().allow(1/0,-1/0),a.string().allow(""),a.symbol(),n.desc.buffer,n.desc.func,n.desc.override,n.desc.ref,n.desc.regex,n.desc.template,n.desc.value),n.desc.messages=a.object().pattern(/.+/,[a.string(),n.desc.template,a.object().pattern(/.+/,[a.string(),n.desc.template])]),t.description=a.object({type:a.string().required(),flags:a.object({cast:a.string(),default:a.any(),description:a.string(),empty:a.link("/"),failover:n.desc.entity,id:a.string(),label:a.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:a.boolean(),unit:a.string()}).unknown(),preferences:{allowUnknown:a.boolean(),abortEarly:a.boolean(),artifacts:a.boolean(),cache:a.boolean(),convert:a.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:a.boolean(),label:["path","key"],language:[a.string(),n.desc.ref],wrap:{label:n.wrap,array:n.wrap}},externals:a.boolean(),messages:n.desc.messages,noDefaults:a.boolean(),nonEnumerables:a.boolean(),presence:["required","optional","forbidden"],skipFunctions:a.boolean(),stripUnknown:a.object({arrays:a.boolean(),objects:a.boolean()}).or("arrays","objects").allow(!0,!1),warnings:a.boolean()},allow:n.desc.values,invalid:n.desc.values,rules:a.array().min(1).items({name:a.string().required(),args:a.object().min(1),keep:a.boolean(),message:[a.string(),n.desc.messages],warn:a.boolean()}),keys:a.object().pattern(/.*/,a.link("/")),link:n.desc.ref}).pattern(/^[a-z]\w*$/,a.any())},493:(e,t,r)=>{"use strict";const a=r(8571),n=r(9621),o=r(8160),s={value:Symbol("value")};e.exports=s.State=class{constructor(e,t,r){this.path=e,this.ancestors=t,this.mainstay=r.mainstay,this.schemas=r.schemas,this.debug=null}localize(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const a=new s.State(e,t,this);return r&&a.schemas&&(a.schemas=[s.schemas(r),...a.schemas]),a}nest(e,t){const r=new s.State(this.path,this.ancestors,this);return r.schemas=r.schemas&&[s.schemas(e),...r.schemas],r.debug=t,r}shadow(e,t){this.mainstay.shadow=this.mainstay.shadow||new s.Shadow,this.mainstay.shadow.set(this.path,e,t)}snapshot(){this.mainstay.shadow&&(this._snapshot=a(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},s.schemas=function(e){return o.isSchema(e)?{schema:e}:e},s.Shadow=class{constructor(){this._values=null}set(e,t,r){if(!e.length)return;if("strip"===r&&"number"==typeof e[e.length-1])return;this._values=this._values||new Map;let a=this._values;for(let t=0;t{"use strict";const a=r(375),n=r(8571),o=r(5277),s=r(1447),i=r(8160),l=r(6354),c=r(6133),u={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};e.exports=u.Template=class{constructor(e,t){if(a("string"==typeof e,"Template source must be a string"),a(!e.includes("\0")&&!e.includes(""),"Template source cannot contain reserved control characters"),this.source=e,this.rendered=e,this._template=null,t){const{functions:e,...r}=t;this._settings=Object.keys(r).length?n(r):void 0,this._functions=e,this._functions&&(a(Object.keys(this._functions).every((e=>"string"==typeof e)),"Functions keys must be strings"),a(Object.values(this._functions).every((e=>"function"==typeof e)),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const e=u.encode(this.source),t=u.split(e);let r=!1;const a=[],n=t.shift();n&&a.push(n);for(const e of t){const t="{"!==e[0],n=t?"}":"}}",o=e.indexOf(n);if(-1===o||"{"===e[1]){a.push(`{${u.decode(e)}`);continue}let s=e.slice(t?0:1,o);const i=":"===s[0];i&&(s=s.slice(1));const l=this._ref(u.decode(s),{raw:t,wrapped:i});a.push(l),"string"!=typeof l&&(r=!0);const c=e.slice(o+n.length);c&&a.push(u.decode(c))}r?this._template=a:this.rendered=a.join("")}static date(e,t){return u.dateFormat[t.dateFormat].call(e)}describe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this._settings&&e.compact)return this.source;const t={template:this.source};return this._settings&&(t.options=this._settings),this._functions&&(t.functions=this._functions),t}static build(e){return new u.Template(e.template,e.options||e.functions?{...e.options,functions:e.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(e){return!!e&&!!e[i.symbols.template]}refs(){if(!this._template)return;const e=[];for(const t of this._template)"string"!=typeof t&&e.push(...t.refs);return e}resolve(e,t,r,a){return this._template&&1===this._template.length?this._part(this._template[0],e,t,r,a,{}):this.render(e,t,r,a)}_part(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a4&&void 0!==arguments[4]?arguments[4]:{};if(!this.isDynamic())return this.rendered;const s=[];for(const i of this._template)if("string"==typeof i)s.push(i);else{const l=this._part(i,e,t,r,a,n),c=u.stringify(l,e,t,r,a,n);if(void 0!==c){const e=i.raw||!1===(n.errors&&n.errors.escapeHtml)?c:o(c);s.push(u.wrap(e,i.wrapped&&r.errors.wrap.label))}}return s.join("")}_ref(e,t){let{raw:r,wrapped:a}=t;const n=[],o=e=>{const t=c.create(e,this._settings);return n.push(t),e=>{const r=t.resolve(...e);return void 0!==r?r:null}};try{const t=this._functions?{...u.functions,...this._functions}:u.functions;var i=new s.Parser(e,{reference:o,functions:t,constants:u.constants})}catch(t){throw t.message=`Invalid template variable "${e}" fails due to: ${t.message}`,t}if(i.single){if("reference"===i.single.type){const e=n[0];return{ref:e,raw:r,refs:n,wrapped:a||"local"===e.type&&"label"===e.key}}return u.stringify(i.single.value)}return{formula:i,raw:r,refs:n}}toString(){return this.source}},u.Template.prototype[i.symbols.template]=!0,u.Template.prototype.isImmutable=!0,u.encode=function(e){return e.replace(/\\(\{+)/g,((e,t)=>u.opens.slice(0,t.length))).replace(/\\(\}+)/g,((e,t)=>u.closes.slice(0,t.length)))},u.decode=function(e){return e.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},u.split=function(e){const t=[];let r="";for(let a=0;a5&&void 0!==arguments[5]?arguments[5]:{};const s=typeof e,i=a&&a.errors&&a.errors.wrap||{};let l=!1;if(c.isRef(e)&&e.render&&(l=e.in,e=e.resolve(t,r,a,n,{in:e.in,...o})),null===e)return"null";if("string"===s)return u.wrap(e,o.arrayItems&&i.string);if("number"===s||"function"===s||"symbol"===s)return e.toString();if("object"!==s)return JSON.stringify(e);if(e instanceof Date)return u.Template.date(e,a);if(e instanceof Map){const t=[];for(const[r,a]of e.entries())t.push(`${r.toString()} -> ${a.toString()}`);e=t}if(!Array.isArray(e))return e.toString();const d=[];for(const s of e)d.push(u.stringify(s,t,r,a,n,{arrayItems:!0,...o}));return u.wrap(d.join(", "),!l&&i.array)},u.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},u.functions={if:(e,t,r)=>e?t:r,length:e=>"string"==typeof e?e.length:e&&"object"==typeof e?Array.isArray(e)?e.length:Object.keys(e).length:null,msg(e){const[t,r,a,n,o]=this,s=o.messages;if(!s)return"";const i=l.template(t,s[0],e,r,a)||l.template(t,s[1],e,r,a);return i?i.render(t,r,a,n,o):""},number:e=>"number"==typeof e?e:"string"==typeof e?parseFloat(e):"boolean"==typeof e?e?1:0:e instanceof Date?e.getTime():null}},4946:(e,t,r)=>{"use strict";const a=r(375),n=r(1687),o=r(8068),s=r(8160),i=r(3292),l=r(6354),c=r(6133),u={};e.exports=o.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:c.toSibling}},args(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;al.details(e,{override:!1})))})};if("one"===r._flags.match)return 1===t.length?{value:t[0]}:{errors:a("alternatives.one")};if(t.length!==r.$_terms.matches.length)return{errors:a("alternatives.all",{details:i.map((e=>l.details(e,{override:!1})))})};const c=e=>e.$_terms.matches.some((e=>"object"===e.schema.type||"alternatives"===e.schema.type&&c(e.schema)));return c(r)?{value:t.reduce(((e,t)=>n(e,t,{mergeArrays:!1})))}:{value:t[t.length-1]}}const i=[];for(let t=0;t"is"!==r.path[0]?t.label(e):void 0,ref:!1})}},rebuild(e){e.$_modify({each:t=>{s.isSchema(t)&&"array"===t.type&&e.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(e,t){if(t.matches)for(const r of t.matches){const{schema:t,ref:a,is:n,not:o,then:s,otherwise:i}=r;e=t?e.try(t):a?e.conditional(a,{is:n,then:s,not:o,otherwise:i,switch:r.switch}):e.conditional(n,{then:s,otherwise:i})}return e}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),u.errors=function(e,t){let{error:r,state:a}=t;if(!e.length)return{errors:r("alternatives.any")};if(1===e.length)return{errors:e[0].reports};const n=new Set,o=[];for(const{reports:t,schema:s}of e){if(t.length>1)return u.unmatched(e,r);const i=t[0];if(i instanceof l.Report==0)return u.unmatched(e,r);if(i.state.path.length!==a.path.length){o.push({type:s.type,report:i});continue}if("any.only"===i.code){for(const e of i.local.valids)n.add(e);continue}const[c,d]=i.code.split(".");"base"===d?n.add(c):o.push({type:s.type,report:i})}return o.length?1===o.length?{errors:o[0].report}:u.unmatched(e,r):{errors:r("alternatives.types",{types:[...n]})}},u.unmatched=function(e,t){const r=[];for(const t of e)r.push(...t.reports);return{errors:t("alternatives.match",l.details(r,{override:!1}))}}},8068:(e,t,r)=>{"use strict";const a=r(375),n=r(7629),o=r(8160),s=r(6914);e.exports=n.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,t){return a("function"==typeof e,"Method must be a function"),a(void 0===t||t&&"string"==typeof t,"Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:t}})},validate(e,t,r){let{method:a}=r;try{return a(e,t)}catch(e){return t.error("any.custom",{error:e})}},args:["method","description"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){a(o.isSchema(e)&&e._flags.id,"Schema must be a schema with an id");const t=this.clone();return t.$_terms.shared=t.$_terms.shared||[],t.$_terms.shared.push(e),t.$_mutateRegister(e),t}},warning:{method(e,t){return a(e&&"string"==typeof e,"Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:t},warn:!0})},validate(e,t,r){let{code:a,local:n}=r;return t.error(a,n)},args:["code","local"],multi:!0}},modifiers:{keep(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.keep=t},message(e,t){e.message=s.compile(t)},warn(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.warn=t}},manifest:{build(e,t){for(const r in t){const a=t[r];if(["examples","externals","metas","notes","tags"].includes(r))for(const t of a)e=e[r.slice(0,-1)](t);else if("alterations"!==r)if("whens"!==r){if("shared"===r)for(const t of a)e=e.shared(t)}else for(const t of a){const{ref:r,is:a,not:n,then:o,otherwise:s,concat:i}=t;e=i?e.concat(i):r?e.when(r,{is:a,not:n,then:o,otherwise:s,switch:t.switch,break:t.break}):e.when(a,{then:o,otherwise:s,break:t.break})}else{const t={};for(const{target:e,adjuster:r}of a)t[e]=r;e=e.alter(t)}}return e}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(e,t,r)=>{"use strict";const a=r(375),n=r(9474),o=r(9621),s=r(8068),i=r(8160),l=r(3292),c={};e.exports=s.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(e,t){let{schema:r,state:a,prefs:n}=t;if(!Array.isArray(e))return;const o=r.$_getRule("sort");return o?c.sort(r,e,o.args.options,a,n):void 0}},validate(e,t){let{schema:r,error:a}=t;if(!Array.isArray(e)){if(r._flags.single){const t=[e];return t[i.symbols.arraySingle]=!0,{value:t}}return{errors:a("array.base")}}if(r.$_getRule("items")||r.$_terms.externals)return{value:e.slice()}},rules:{has:{method(e){e=this.$_compile(e,{appendPath:!0});const t=this.$_addRule({name:"has",args:{schema:e}});return t.$_mutateRegister(e),t},validate(e,t,r){let{state:a,prefs:n,error:o}=t,{schema:s}=r;const i=[e,...a.ancestors];for(let t=0;tthis.$_compile(t[e])),e,{append:!0});a.$_terms.items.push(r)}return a.$_mutateRebuild()},validate(e,t){let{schema:r,error:a,state:n,prefs:o,errorsArray:s}=t;const l=r.$_terms._requireds.slice(),u=r.$_terms.ordered.slice(),d=[...r.$_terms._inclusions,...l],p=!e[i.symbols.arraySingle];delete e[i.symbols.arraySingle];const g=s();let m=e.length;for(let t=0;t="})}},ordered:{method(){for(var e=arguments.length,t=new Array(e),r=0;rthis.$_compile(t[e])),e,{append:!0});c.validateSingle(r,a),a.$_mutateRegister(r),a.$_terms.ordered.push(r)}return a.$_mutateRebuild()}},single:{method(e){const t=void 0===e||!!e;return a(!t||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",t)}},sort:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.assertOptions(e,["by","order"]);const t={order:e.order||"ascending"};return e.by&&(t.by=l.ref(e.by,{ancestor:0}),a(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(e,t,r){let{error:a,state:n,prefs:o,schema:s}=t,{options:i}=r;const{value:l,errors:u}=c.sort(s,e,i,n,o);if(u)return u;for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{};a(!e||"function"==typeof e||"string"==typeof e,"comparator must be a function or a string"),i.assertOptions(t,["ignoreUndefined","separator"]);const r={name:"unique",args:{options:t,comparator:e}};if(e)if("string"==typeof e){const a=i.default(t.separator,".");r.path=a?e.split(a):[e]}else r.comparator=e;return this.$_addRule(r)},validate(e,t,r,s){let{state:i,error:l,schema:c}=t,{comparator:u,options:d}=r,{comparator:p,path:g}=s;const m={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},w=p||n,f=d.ignoreUndefined;for(let t=0;tnew Set(e)}},rebuild(e){e.$_terms._inclusions=[],e.$_terms._exclusions=[],e.$_terms._requireds=[];for(const t of e.$_terms.items)c.validateSingle(t,e),"required"===t._flags.presence?e.$_terms._requireds.push(t):"forbidden"===t._flags.presence?e.$_terms._exclusions.push(t):e.$_terms._inclusions.push(t);for(const t of e.$_terms.ordered)c.validateSingle(t,e)},manifest:{build:(e,t)=>(t.items&&(e=e.items(...t.items)),t.ordered&&(e=e.ordered(...t.ordered)),e)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),c.fillMissedErrors=function(e,t,r,a,n,o){const s=[];let i=0;for(const e of r){const t=e._flags.label;t?s.push(t):++i}s.length?i?t.push(e.$_createError("array.includesRequiredBoth",a,{knownMisses:s,unknownMisses:i},n,o)):t.push(e.$_createError("array.includesRequiredKnowns",a,{knownMisses:s},n,o)):t.push(e.$_createError("array.includesRequiredUnknowns",a,{unknownMisses:i},n,o))},c.fillOrderedErrors=function(e,t,r,a,n,o){const s=[];for(const e of r)"required"===e._flags.presence&&s.push(e);s.length&&c.fillMissedErrors(e,t,s,a,n,o)},c.fillDefault=function(e,t,r,a){const n=[];let o=!0;for(let s=e.length-1;s>=0;--s){const i=e[s],l=[t,...r.ancestors],c=i.$_validate(void 0,r.localize(r.path,l,i),a).value;if(o){if(void 0===c)continue;o=!1}n.unshift(c)}n.length&&t.push(...n)},c.fastSplice=function(e,t){let r=t;for(;r{let d=c.compare(l,u,s,i);if(null!==d)return d;if(r.by&&(l=r.by.resolve(l,a,n),u=r.by.resolve(u,a,n)),d=c.compare(l,u,s,i),null!==d)return d;const p=typeof l;if(p!==typeof u)throw e.$_createError("array.sort.mismatching",t,null,a,n);if("number"!==p&&"string"!==p)throw e.$_createError("array.sort.unsupported",t,{type:p},a,n);return"number"===p?(l-u)*o:l{"use strict";const a=r(375),n=r(8068),o=r(8160),s=r(2036),i={isBool:function(e){return"boolean"==typeof e}};e.exports=n.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(e,t){let{schema:r}=t;if("boolean"!=typeof e){if("string"==typeof e){const t=r._flags.sensitive?e:e.toLowerCase();e="true"===t||"false"!==t&&e}return"boolean"!=typeof e&&(e=r.$_terms.truthy&&r.$_terms.truthy.has(e,null,null,!r._flags.sensitive)||(!r.$_terms.falsy||!r.$_terms.falsy.has(e,null,null,!r._flags.sensitive))&&e),{value:e}}},validate(e,t){let{error:r}=t;if("boolean"!=typeof e)return{value:e,errors:r("boolean.base")}},rules:{truthy:{method(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("sensitive",e)}}},cast:{number:{from:i.isBool,to:(e,t)=>e?1:0},string:{from:i.isBool,to:(e,t)=>e?"true":"false"}},manifest:{build:(e,t)=>(t.truthy&&(e=e.truthy(...t.truthy)),t.falsy&&(e=e.falsy(...t.falsy)),e)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(e,t,r)=>{"use strict";const a=r(375),n=r(8068),o=r(8160),s=r(3328),i={isDate:function(e){return e instanceof Date}};e.exports=n.extend({type:"date",coerce:{from:["number","string"],method(e,t){let{schema:r}=t;return{value:i.parse(e,r._flags.format)||e}}},validate(e,t){let{schema:r,error:a,prefs:n}=t;if(e instanceof Date&&!isNaN(e.getTime()))return;const o=r._flags.format;return n.convert&&o&&"string"==typeof e?{value:e,errors:a("date.format",{format:o})}:{value:e,errors:a("date.base")}},rules:{compare:{method:!1,validate(e,t,r,a){let{date:n}=r,{name:s,operator:i,args:l}=a;const c="now"===n?Date.now():n.getTime();return o.compare(e.getTime(),c,i)?e:t.error("date."+s,{limit:l.date,value:e})},args:[{name:"date",ref:!0,normalize:e=>"now"===e?e:i.parse(e),assert:e=>null!==e,message:"must have a valid date format"}]},format:{method(e){return a(["iso","javascript","unix"].includes(e),"Unknown date format",e),this.$_setFlag("format",e)}},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{date:e},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{date:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{date:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{date:e},operator:">="})}},timestamp:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"javascript";return a(["javascript","unix"].includes(e),'"type" must be one of "javascript, unix"'),this.format(e)}}},cast:{number:{from:i.isDate,to:(e,t)=>e.getTime()},string:{from:i.isDate,to(e,t){let{prefs:r}=t;return s.date(e,r)}}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),i.parse=function(e,t){if(e instanceof Date)return e;if("string"!=typeof e&&(isNaN(e)||!isFinite(e)))return null;if(/^\s*$/.test(e))return null;if("iso"===t)return o.isIsoDate(e)?i.date(e.toString()):null;const r=e;if("string"==typeof e&&/^[+-]?\d+(\.\d+)?$/.test(e)&&(e=parseFloat(e)),t){if("javascript"===t)return i.date(1*e);if("unix"===t)return i.date(1e3*e);if("string"==typeof r)return null}return i.date(e)},i.date=function(e){const t=new Date(e);return isNaN(t.getTime())?null:t}},390:(e,t,r)=>{"use strict";const a=r(375),n=r(7824);e.exports=n.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(e){return a(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:e}})},validate(e,t,r){let{n:a}=r;return e.length===a?e:t.error("function.arity",{n:a})}},class:{method(){return this.$_addRule("class")},validate:(e,t)=>/^\s*class\s/.test(e.toString())?e:t.error("function.class",{value:e})},minArity:{method(e){return a(Number.isSafeInteger(e)&&e>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:e}})},validate(e,t,r){let{n:a}=r;return e.length>=a?e:t.error("function.minArity",{n:a})}},maxArity:{method(e){return a(Number.isSafeInteger(e)&&e>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:e}})},validate(e,t,r){let{n:a}=r;return e.length<=a?e:t.error("function.maxArity",{n:a})}}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(e,t,r)=>{"use strict";const a=r(978),n=r(375),o=r(8571),s=r(3652),i=r(8068),l=r(8160),c=r(3292),u=r(6354),d=r(6133),p=r(3328),g={renameDefaults:{alias:!1,multiple:!1,override:!1}};e.exports=i.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(e,t)=>e.keys(t),validate(e,t){let{schema:r,error:a,state:n,prefs:o}=t;if(!e||typeof e!==r.$_property("typeof")||Array.isArray(e))return{value:e,errors:a("object.base",{type:r.$_property("typeof")})};if(!(r.$_terms.renames||r.$_terms.dependencies||r.$_terms.keys||r.$_terms.patterns||r.$_terms.externals))return;e=g.clone(e,o);const s=[];if(r.$_terms.renames&&!g.rename(r,e,n,o,s))return{value:e,errors:s};if(!r.$_terms.keys&&!r.$_terms.patterns&&!r.$_terms.dependencies)return{value:e,errors:s};const i=new Set(Object.keys(e));if(r.$_terms.keys){const t=[e,...n.ancestors];for(const a of r.$_terms.keys){const r=a.key,l=e[r];i.delete(r);const c=n.localize([...n.path,r],t,a),u=a.schema.$_validate(l,c,o);if(u.errors){if(o.abortEarly)return{value:e,errors:u.errors};void 0!==u.value&&(e[r]=u.value),s.push(...u.errors)}else"strip"===a.schema._flags.result||void 0===u.value&&void 0!==l?delete e[r]:void 0!==u.value&&(e[r]=u.value)}}if(i.size||r._flags._hasPatternMatch){const t=g.unknown(r,e,i,s,n,o);if(t)return t}if(r.$_terms.dependencies)for(const t of r.$_terms.dependencies){if(null!==t.key&&!1===g.isPresent(t.options)(t.key.resolve(e,n,o,null,{shadow:!1})))continue;const a=g.dependencies[t.rel](r,t,e,n,o);if(a){const t=r.$_createError(a.code,e,a.context,n,o);if(o.abortEarly)return{value:e,errors:t};s.push(t)}}return{value:e,errors:s}},rules:{and:{method(){for(var e=arguments.length,t=new Array(e),r=0;r!e.hasOwnProperty(t.key))):new g.Keys;for(const r in e)l.tryWithPath((()=>t.$_terms.keys.push({key:r,schema:this.$_compile(e[r])})),r)}else t.$_terms.keys=new g.Keys;else t.$_terms.keys=null;return t.$_mutateRebuild()}},length:{method(e){return this.$_addRule({name:"length",args:{limit:e},operator:"="})},validate(e,t,r,a){let{limit:n}=r,{name:o,operator:s,args:i}=a;return l.compare(Object.keys(e).length,n,s)?e:t.error("object."+o,{limit:i.limit,value:e})},args:[{name:"limit",ref:!0,assert:l.limit,message:"must be a positive integer"}]},max:{method(e){return this.$_addRule({name:"max",method:"length",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"length",args:{limit:e},operator:">="})}},nand:{method(){for(var e=arguments.length,t=new Array(e),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};const a=e instanceof RegExp;a||(e=this.$_compile(e,{appendPath:!0})),n(void 0!==t,"Invalid rule"),l.assertOptions(r,["fallthrough","matches"]),a&&n(!e.flags.includes("g")&&!e.flags.includes("y"),"pattern should not use global or sticky mode"),t=this.$_compile(t,{appendPath:!0});const o=this.clone();o.$_terms.patterns=o.$_terms.patterns||[];const s={[a?"regex":"schema"]:e,rule:t};return r.matches&&(s.matches=this.$_compile(r.matches),"array"!==s.matches.type&&(s.matches=s.matches.$_root.array().items(s.matches)),o.$_mutateRegister(s.matches),o.$_setFlag("_hasPatternMatch",!0,{clone:!1})),r.fallthrough&&(s.fallthrough=!0),o.$_terms.patterns.push(s),o.$_mutateRegister(t),o}},ref:{method(){return this.$_addRule("ref")},validate:(e,t)=>d.isRef(e)?e:t.error("object.refType",{value:e})},regex:{method(){return this.$_addRule("regex")},validate:(e,t)=>e instanceof RegExp?e:t.error("object.regex",{value:e})},rename:{method(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n("string"==typeof e||e instanceof RegExp,"Rename missing the from argument"),n("string"==typeof t||t instanceof p,"Invalid rename to argument"),n(t!==e,"Cannot rename key to same name:",e),l.assertOptions(r,["alias","ignoreUndefined","override","multiple"]);const o=this.clone();o.$_terms.renames=o.$_terms.renames||[];for(const t of o.$_terms.renames)n(t.from!==e,"Cannot rename the same key multiple times");return t instanceof p&&o.$_mutateRegister(t),o.$_terms.renames.push({from:e,to:t,options:a(g.renameDefaults,r)}),o}},schema:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return this.$_addRule({name:"schema",args:{type:e}})},validate(e,t,r){let{type:a}=r;return!l.isSchema(e)||"any"!==a&&e.type!==a?t.error("object.schema",{type:a}):e}},unknown:{method(e){return this.$_setFlag("unknown",!1!==e)}},with:{method(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return g.dependency(this,"with",e,t,r)}},without:{method(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return g.dependency(this,"without",e,t,r)}},xor:{method(){for(var e=arguments.length,t=new Array(e),r=0;rt.add(r,{after:r.schema.$_rootReferences(),group:r.key})),r.key);e.$_terms.keys=new g.Keys(...t.nodes)}},manifest:{build(e,t){if(t.keys&&(e=e.keys(t.keys)),t.dependencies)for(const{rel:r,key:a=null,peers:n,options:o}of t.dependencies)e=g.dependency(e,r,a,n,o);if(t.patterns)for(const{regex:r,schema:a,rule:n,fallthrough:o,matches:s}of t.patterns)e=e.pattern(r||a,n,{fallthrough:o,matches:s});if(t.renames)for(const{from:r,to:a,options:n}of t.renames)e=e.rename(r,a,n);return e}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),g.clone=function(e,t){if("object"==typeof e){if(t.nonEnumerables)return o(e,{shallow:!0});const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e),r}const r=function(){for(var t=arguments.length,r=new Array(t),a=0;a1&&"object"==typeof a[a.length-1]?a.pop():{}),l.assertOptions(o,["separator","isPresent"]),a=[].concat(a);const s=l.default(o.separator,"."),i=[];for(const e of a)n("string"==typeof e,t,"peers must be strings"),i.push(c.ref(e,{separator:s,ancestor:0,prefix:!1}));null!==r&&(r=c.ref(r,{separator:s,ancestor:0,prefix:!1}));const u=e.clone();return u.$_terms.dependencies=u.$_terms.dependencies||[],u.$_terms.dependencies.push(new g.Dependency(t,r,i,a,o)),u},g.dependencies={and(e,t,r,a,n){const o=[],s=[],i=t.peers.length,l=g.isPresent(t.options);for(const e of t.peers)!1===l(e.resolve(r,a,n,null,{shadow:!1}))?o.push(e.key):s.push(e.key);if(o.length!==i&&s.length!==i)return{code:"object.and",context:{present:s,presentWithLabels:g.keysToLabels(e,s),missing:o,missingWithLabels:g.keysToLabels(e,o)}}},nand(e,t,r,a,n){const o=[],s=g.isPresent(t.options);for(const e of t.peers)s(e.resolve(r,a,n,null,{shadow:!1}))&&o.push(e.key);if(o.length!==t.peers.length)return;const i=t.paths[0],l=t.paths.slice(1);return{code:"object.nand",context:{main:i,mainWithLabel:g.keysToLabels(e,i),peers:l,peersWithLabels:g.keysToLabels(e,l)}}},or(e,t,r,a,n){const o=g.isPresent(t.options);for(const e of t.peers)if(o(e.resolve(r,a,n,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:t.paths,peersWithLabels:g.keysToLabels(e,t.paths)}}},oxor(e,t,r,a,n){const o=[],s=g.isPresent(t.options);for(const e of t.peers)s(e.resolve(r,a,n,null,{shadow:!1}))&&o.push(e.key);if(!o.length||1===o.length)return;const i={peers:t.paths,peersWithLabels:g.keysToLabels(e,t.paths)};return i.present=o,i.presentWithLabels=g.keysToLabels(e,o),{code:"object.oxor",context:i}},with(e,t,r,a,n){const o=g.isPresent(t.options);for(const s of t.peers)if(!1===o(s.resolve(r,a,n,null,{shadow:!1})))return{code:"object.with",context:{main:t.key.key,mainWithLabel:g.keysToLabels(e,t.key.key),peer:s.key,peerWithLabel:g.keysToLabels(e,s.key)}}},without(e,t,r,a,n){const o=g.isPresent(t.options);for(const s of t.peers)if(o(s.resolve(r,a,n,null,{shadow:!1})))return{code:"object.without",context:{main:t.key.key,mainWithLabel:g.keysToLabels(e,t.key.key),peer:s.key,peerWithLabel:g.keysToLabels(e,s.key)}}},xor(e,t,r,a,n){const o=[],s=g.isPresent(t.options);for(const e of t.peers)s(e.resolve(r,a,n,null,{shadow:!1}))&&o.push(e.key);if(1===o.length)return;const i={peers:t.paths,peersWithLabels:g.keysToLabels(e,t.paths)};return 0===o.length?{code:"object.missing",context:i}:(i.present=o,i.presentWithLabels=g.keysToLabels(e,o),{code:"object.xor",context:i})}},g.keysToLabels=function(e,t){return Array.isArray(t)?t.map((t=>e.$_mapLabels(t))):e.$_mapLabels(t)},g.isPresent=function(e){return"function"==typeof e.isPresent?e.isPresent:e=>void 0!==e},g.rename=function(e,t,r,a,n){const o={};for(const s of e.$_terms.renames){const i=[],l="string"!=typeof s.from;if(l)for(const e in t){if(void 0===t[e]&&s.options.ignoreUndefined)continue;if(e===s.to)continue;const r=s.from.exec(e);r&&i.push({from:e,to:s.to,match:r})}else!Object.prototype.hasOwnProperty.call(t,s.from)||void 0===t[s.from]&&s.options.ignoreUndefined||i.push(s);for(const c of i){const i=c.from;let u=c.to;if(u instanceof p&&(u=u.render(t,r,a,c.match)),i!==u){if(!s.options.multiple&&o[u]&&(n.push(e.$_createError("object.rename.multiple",t,{from:i,to:u,pattern:l},r,a)),a.abortEarly))return!1;if(Object.prototype.hasOwnProperty.call(t,u)&&!s.options.override&&!o[u]&&(n.push(e.$_createError("object.rename.override",t,{from:i,to:u,pattern:l},r,a)),a.abortEarly))return!1;void 0===t[i]?delete t[u]:t[u]=t[i],o[u]=!0,s.options.alias||delete t[i]}}}return!0},g.unknown=function(e,t,r,a,n,o){if(e.$_terms.patterns){let s=!1;const i=e.$_terms.patterns.map((e=>{if(e.matches)return s=!0,[]})),l=[t,...n.ancestors];for(const s of r){const c=t[s],u=[...n.path,s];for(let d=0;d{"use strict";const a=r(375),n=r(8068),o=r(8160),s=r(3292),i=r(6354),l={};e.exports=n.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(e,t)=>e.ref(t),validate(e,t){let{schema:r,state:n,prefs:o}=t;a(r.$_terms.link,"Uninitialized link schema");const s=l.generate(r,e,n,o),i=r.$_terms.link[0].ref;return s.$_validate(e,n.nest(s,`link:${i.display}:${s.type}`),o)},generate:(e,t,r,a)=>l.generate(e,t,r,a),rules:{ref:{method(e){a(!this.$_terms.link,"Cannot reinitialize schema"),e=s.ref(e),a("value"===e.type||"local"===e.type,"Invalid reference type:",e.type),a("local"===e.type||"root"===e.ancestor||e.ancestor>0,"Link cannot reference itself");const t=this.clone();return t.$_terms.link=[{ref:e}],t}},relative:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.$_setFlag("relative",e)}}},overrides:{concat(e){a(this.$_terms.link,"Uninitialized link schema"),a(o.isSchema(e),"Invalid schema object"),a("link"!==e.type,"Cannot merge type link with another link");const t=this.clone();return t.$_terms.whens||(t.$_terms.whens=[]),t.$_terms.whens.push({concat:e}),t.$_mutateRebuild()}},manifest:{build:(e,t)=>(a(t.link,"Invalid link description missing link"),e.ref(t.link))}}),l.generate=function(e,t,r,a){let n=r.mainstay.links.get(e);if(n)return n._generate(t,r,a).schema;const o=e.$_terms.link[0].ref,{perspective:s,path:i}=l.perspective(o,r);l.assert(s,"which is outside of schema boundaries",o,e,r,a);try{n=i.length?s.$_reach(i):s}catch(t){l.assert(!1,"to non-existing schema",o,e,r,a)}return l.assert("link"!==n.type,"which is another link",o,e,r,a),e._flags.relative||r.mainstay.links.set(e,n),n._generate(t,r,a).schema},l.perspective=function(e,t){if("local"===e.type){for(const{schema:r,key:a}of t.schemas){if((r._flags.id||a)===e.path[0])return{perspective:r,path:e.path.slice(1)};if(r.$_terms.shared)for(const t of r.$_terms.shared)if(t._flags.id===e.path[0])return{perspective:t,path:e.path.slice(1)}}return{perspective:null,path:null}}return"root"===e.ancestor?{perspective:t.schemas[t.schemas.length-1].schema,path:e.path}:{perspective:t.schemas[e.ancestor]&&t.schemas[e.ancestor].schema,path:e.path}},l.assert=function(e,t,r,n,o,s){e||a(!1,`"${i.label(n._flags,o,s)}" contains link reference "${r.display}" ${t}`)}},3832:(e,t,r)=>{"use strict";const a=r(375),n=r(8068),o=r(8160),s={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/};e.exports=n.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,t){let{schema:r,error:a}=t;if(!e.match(s.numberRx))return;e=e.trim();const n={value:parseFloat(e)};if(0===n.value&&(n.value=0),!r._flags.unsafe)if(e.match(/e/i)){if(s.extractSignificantDigits(e)!==s.extractSignificantDigits(String(n.value)))return n.errors=a("number.unsafe"),n}else{const t=n.value.toString();if(t.match(/e/i))return n;if(t!==s.normalizeDecimal(e))return n.errors=a("number.unsafe"),n}return n}},validate(e,t){let{schema:r,error:a,prefs:n}=t;if(e===1/0||e===-1/0)return{value:e,errors:a("number.infinity")};if(!o.isNumber(e))return{value:e,errors:a("number.base")};const s={value:e};if(n.convert){const e=r.$_getRule("precision");if(e){const t=Math.pow(10,e.args.limit);s.value=Math.round(s.value*t)/t}}return 0===s.value&&(s.value=0),!r._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e"})}},integer:{method(){return this.$_addRule("integer")},validate:(e,t)=>Math.trunc(e)-e==0?e:t.error("number.integer")},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{limit:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{limit:e},operator:">="})}},multiple:{method(e){return this.$_addRule({name:"multiple",args:{base:e}})},validate(e,t,r,a){let{base:n}=r;return e*(1/n)%1==0?e:t.error("number.multiple",{multiple:a.args.base,value:e})},args:[{name:"base",ref:!0,assert:e=>"number"==typeof e&&isFinite(e)&&e>0,message:"must be a positive number"}],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(e,t)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:t.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(e){return a(Number.isSafeInteger(e),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:e}})},validate(e,t,r){let{limit:a}=r;const n=e.toString().match(s.precisionRx);return Math.max((n[1]?n[1].length:0)-(n[2]?parseInt(n[2],10):0),0)<=a?e:t.error("number.precision",{limit:a,value:e})},convert:!0},sign:{method(e){return a(["negative","positive"].includes(e),"Invalid sign",e),this.$_addRule({name:"sign",args:{sign:e}})},validate(e,t,r){let{sign:a}=r;return"negative"===a&&e<0||"positive"===a&&e>0?e:t.error(`number.${a}`)}},unsafe:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"enabled must be a boolean"),this.$_setFlag("unsafe",e)}}},cast:{string:{from:e=>"number"==typeof e,to:(e,t)=>e.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),s.extractSignificantDigits=function(e){return e.replace(s.exponentialPartRegex,"").replace(s.dotRegex,"").replace(s.trailingZerosRegex,"").replace(s.leadingSignAndZerosRegex,"")},s.normalizeDecimal=function(e){return(e=e.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&e.endsWith("0")&&(e=e.replace(/0+$/,"")),"-0"===e?"0":e}},8966:(e,t,r)=>{"use strict";const a=r(7824);e.exports=a.extend({type:"object",cast:{map:{from:e=>e&&"object"==typeof e,to:(e,t)=>new Map(Object.entries(e))}}})},7417:(e,t,r)=>{"use strict";const a=r(375),n=r(5380),o=r(1745),s=r(9959),i=r(6064),l=r(9926),c=r(5752),u=r(8068),d=r(8160),p={tlds:l instanceof Set&&{tlds:{allow:l,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:s.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};e.exports=u.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(e,t){let{schema:r,state:a,prefs:n}=t;const o=r.$_getRule("normalize");o&&(e=e.normalize(o.args.form));const s=r.$_getRule("case");s&&(e="upper"===s.args.direction?e.toLocaleUpperCase():e.toLocaleLowerCase());const i=r.$_getRule("trim");if(i&&i.args.enabled&&(e=e.trim()),r.$_terms.replacements)for(const t of r.$_terms.replacements)e=e.replace(t.pattern,t.replacement);const l=r.$_getRule("hex");if(l&&l.args.options.byteAligned&&e.length%2!=0&&(e=`0${e}`),r.$_getRule("isoDate")){const t=p.isoDate(e);t&&(e=t)}if(r._flags.truncate){const t=r.$_getRule("max");if(t){let o=t.args.limit;if(d.isResolvable(o)&&(o=o.resolve(e,a,n),!d.limit(o)))return{value:e,errors:r.$_createError("any.ref",o,{ref:t.args.limit,arg:"limit",reason:"must be a positive integer"},a,n)};e=e.slice(0,o)}}return{value:e}}},validate(e,t){let{schema:r,error:a}=t;if("string"!=typeof e)return{value:e,errors:a("string.base")};if(""===e){const t=r.$_getRule("min");if(t&&0===t.args.limit)return;return{value:e,errors:a("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(e,t)=>/^[a-zA-Z0-9]+$/.test(e)?e:t.error("string.alphanum")},base64:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.assertOptions(e,["paddingRequired","urlSafe"]),e={urlSafe:!1,paddingRequired:!0,...e},a("boolean"==typeof e.paddingRequired,"paddingRequired must be boolean"),a("boolean"==typeof e.urlSafe,"urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:e}})},validate(e,t,r){let{options:a}=r;return p.base64Regex[a.paddingRequired][a.urlSafe].test(e)?e:t.error("string.base64")}},case:{method(e){return a(["lower","upper"].includes(e),"Invalid case:",e),this.$_addRule({name:"case",args:{direction:e}})},validate(e,t,r){let{direction:a}=r;return"lower"===a&&e===e.toLocaleLowerCase()||"upper"===a&&e===e.toLocaleUpperCase()?e:t.error(`string.${a}case`)},convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(e,t){let r=e.length,a=0,n=1;for(;r--;){const t=e.charAt(r)*n;a+=t-9*(t>9),n^=3}return a>0&&a%10==0?e:t.error("string.creditCard")}},dataUri:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.assertOptions(e,["paddingRequired"]),e={paddingRequired:!0,...e},a("boolean"==typeof e.paddingRequired,"paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:e}})},validate(e,t,r){let{options:a}=r;const n=e.match(p.dataUriRegex);if(n){if(!n[2])return e;if("base64"!==n[2])return e;if(p.base64Regex[a.paddingRequired].false.test(n[3]))return e}return t.error("string.dataUri")}},domain:{method(e){e&&d.assertOptions(e,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const t=p.addressOptions(e);return this.$_addRule({name:"domain",args:{options:e},address:t})},validate(e,t,r,a){let{address:o}=a;return n.isValid(e,o)?e:t.error("string.domain")}},email:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),a(void 0===e.multiple||"boolean"==typeof e.multiple,"multiple option must be an boolean");const t=p.addressOptions(e),r=new RegExp(`\\s*[${e.separator?i(e.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:e},regex:r,address:t})},validate(e,t,r,a){let{options:n}=r,{regex:s,address:i}=a;const l=n.multiple?e.split(s):[e],c=[];for(const e of l)o.isValid(e,i)||c.push(e);return c.length?t.error("string.email",{value:e,invalids:c}):e}},guid:{alias:"uuid",method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["version","separator"]);let t="";if(e.version){const r=[].concat(e.version);a(r.length>=1,"version must have at least 1 valid version specified");const n=new Set;for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return d.assertOptions(e,["byteAligned"]),e={byteAligned:!1,...e},a("boolean"==typeof e.byteAligned,"byteAligned must be boolean"),this.$_addRule({name:"hex",args:{options:e}})},validate(e,t,r){let{options:a}=r;return p.hexRegex.test(e)?a.byteAligned&&e.length%2!=0?t.error("string.hexAlign"):e:t.error("string.hex")}},hostname:{method(){return this.$_addRule("hostname")},validate:(e,t)=>n.isValid(e,{minDomainSegments:1})||p.ipRegex.test(e)?e:t.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["cidr","version"]);const{cidr:t,versions:r,regex:a}=s.regex(e),n=e.version?r:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:t,version:n}},regex:a})},validate(e,t,r,a){let{options:n}=r,{regex:o}=a;return o.test(e)?e:n.version?t.error("string.ipVersion",{value:e,cidr:n.cidr,version:n.version}):t.error("string.ip",{value:e,cidr:n.cidr})}},isoDate:{method(){return this.$_addRule("isoDate")},validate(e,t){let{error:r}=t;return p.isoDate(e)?e:r("string.isoDate")}},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(e,t)=>p.isoDurationRegex.test(e)?e:t.error("string.isoDuration")},length:{method(e,t){return p.length(this,"length",e,"=",t)},validate(e,t,r,a){let{limit:n,encoding:o}=r,{name:s,operator:i,args:l}=a;const c=!o&&e.length;return d.compare(c,n,i)?e:t.error("string."+s,{limit:l.limit,value:e,encoding:o})},args:[{name:"limit",ref:!0,assert:d.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(e,t){return p.length(this,"max",e,"<=",t)},args:["limit","encoding"]},min:{method(e,t){return p.length(this,"min",e,">=",t)},args:["limit","encoding"]},normalize:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"NFC";return a(p.normalizationForms.includes(e),"normalization form must be one of "+p.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:e}})},validate(e,t,r){let{error:a}=t,{form:n}=r;return e===e.normalize(n)?e:a("string.normalize",{value:e,form:n})},convert:!0},pattern:{alias:"regex",method(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(e instanceof RegExp,"regex must be a RegExp"),a(!e.flags.includes("g")&&!e.flags.includes("y"),"regex should not use global or sticky mode"),"string"==typeof t&&(t={name:t}),d.assertOptions(t,["invert","name"]);const r=["string.pattern",t.invert?".invert":"",t.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:e,options:t},errorCode:r})},validate(e,t,r,a){let{regex:n,options:o}=r,{errorCode:s}=a;return n.test(e)^o.invert?e:t.error(s,{name:o.name,regex:n,value:e})},args:["regex","options"],multi:!0},replace:{method(e,t){"string"==typeof e&&(e=new RegExp(i(e),"g")),a(e instanceof RegExp,"pattern must be a RegExp"),a("string"==typeof t,"replacement must be a String");const r=this.clone();return r.$_terms.replacements||(r.$_terms.replacements=[]),r.$_terms.replacements.push({pattern:e,replacement:t}),r}},token:{method(){return this.$_addRule("token")},validate:(e,t)=>/^\w+$/.test(e)?e:t.error("string.token")},trim:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:e}})},validate(e,t,r){let{enabled:a}=r;return a&&e!==e.trim()?t.error("string.trim"):e},convert:!0},truncate:{method(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return a("boolean"==typeof e,"enabled must be a boolean"),this.$_setFlag("truncate",e)}},uppercase:{method(){return this.case("upper")}},uri:{method(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d.assertOptions(e,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),e.domain&&d.assertOptions(e.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:t,scheme:r}=c.regex(e),a=e.domain?p.addressOptions(e.domain):null;return this.$_addRule({name:"uri",args:{options:e},regex:t,domain:a,scheme:r})},validate(e,t,r,a){let{options:o}=r,{regex:s,domain:i,scheme:l}=a;if(["http:/","https:/"].includes(e))return t.error("string.uri");const c=s.exec(e);if(c){const r=c[1]||c[2];return!i||o.allowRelative&&!r||n.isValid(r,i)?e:t.error("string.domain",{value:r})}return o.relativeOnly?t.error("string.uriRelativeOnly"):o.scheme?t.error("string.uriCustomScheme",{scheme:l,value:e}):t.error("string.uri")}}},manifest:{build(e,t){if(t.replacements)for(const{pattern:r,replacement:a}of t.replacements)e=e.replace(r,a);return e}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),p.addressOptions=function(e){if(!e)return e;if(a(void 0===e.minDomainSegments||Number.isSafeInteger(e.minDomainSegments)&&e.minDomainSegments>0,"minDomainSegments must be a positive integer"),a(void 0===e.maxDomainSegments||Number.isSafeInteger(e.maxDomainSegments)&&e.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),!1===e.tlds)return e;if(!0===e.tlds||void 0===e.tlds)return a(p.tlds,"Built-in TLD list disabled"),Object.assign({},e,p.tlds);a("object"==typeof e.tlds,"tlds must be true, false, or an object");const t=e.tlds.deny;if(t)return Array.isArray(t)&&(e=Object.assign({},e,{tlds:{deny:new Set(t)}})),a(e.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),a(!e.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),p.validateTlds(e.tlds.deny,"tlds.deny"),e;const r=e.tlds.allow;return r?!0===r?(a(p.tlds,"Built-in TLD list disabled"),Object.assign({},e,p.tlds)):(Array.isArray(r)&&(e=Object.assign({},e,{tlds:{allow:new Set(r)}})),a(e.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),p.validateTlds(e.tlds.allow,"tlds.allow"),e):e},p.validateTlds=function(e,t){for(const r of e)a(n.isValid(r,{minDomainSegments:1,maxDomainSegments:1}),`${t} must contain valid top level domain names`)},p.isoDate=function(e){if(!d.isIsoDate(e))return null;/.*T.*[+-]\d\d$/.test(e)&&(e+="00");const t=new Date(e);return isNaN(t.getTime())?null:t.toISOString()},p.length=function(e,t,r,n,o){return a(!o||!1,"Invalid encoding:",o),e.$_addRule({name:t,method:"length",args:{limit:r,encoding:o},operator:n})}},8826:(e,t,r)=>{"use strict";const a=r(375),n=r(8068),o={};o.Map=class extends Map{slice(){return new o.Map(this)}},e.exports=n.extend({type:"symbol",terms:{map:{init:new o.Map}},coerce:{method(e,t){let{schema:r,error:a}=t;const n=r.$_terms.map.get(e);return n&&(e=n),r._flags.only&&"symbol"!=typeof e?{value:e,errors:a("symbol.map",{map:r.$_terms.map})}:{value:e}}},validate(e,t){let{error:r}=t;if("symbol"!=typeof e)return{value:e,errors:r("symbol.base")}},rules:{map:{method(e){e&&!e[Symbol.iterator]&&"object"==typeof e&&(e=Object.entries(e)),a(e&&e[Symbol.iterator],"Iterable must be an iterable or object");const t=this.clone(),r=[];for(const n of e){a(n&&n[Symbol.iterator],"Entry must be an iterable");const[e,o]=n;a("object"!=typeof e&&"function"!=typeof e&&"symbol"!=typeof e,"Key must not be of type object, function, or Symbol"),a("symbol"==typeof o,"Value must be a Symbol"),t.$_terms.map.set(e,o),r.push(o)}return t.valid(...r)}}},manifest:{build:(e,t)=>(t.map&&(e=e.map(t.map)),e)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(738),s=r(9621),i=r(8160),l=r(6354),c=r(493),u={result:Symbol("result")};t.entry=function(e,t,r){let n=i.defaults;r&&(a(void 0===r.warnings,"Cannot override warnings preference in synchronous validation"),a(void 0===r.artifacts,"Cannot override artifacts preference in synchronous validation"),n=i.preferences(i.defaults,r));const o=u.entry(e,t,n);a(!o.mainstay.externals.length,"Schema with external rules must use validateAsync()");const s={value:o.value};return o.error&&(s.error=o.error),o.mainstay.warnings.length&&(s.warning=l.details(o.mainstay.warnings)),o.mainstay.debug&&(s.debug=o.mainstay.debug),o.mainstay.artifacts&&(s.artifacts=o.mainstay.artifacts),s},t.entryAsync=async function(e,t,r){let a=i.defaults;r&&(a=i.preferences(i.defaults,r));const n=u.entry(e,t,a),o=n.mainstay;if(n.error)throw o.debug&&(n.error.debug=o.debug),n.error;if(o.externals.length){let t=n.value;const c=[];for(const n of o.externals){const d=n.state.path,p="link"===n.schema.type?o.links.get(n.schema):null;let g,m,w=t;const f=d.length?[t]:[],y=d.length?s(e,d):e;if(d.length){g=d[d.length-1];let e=t;for(const t of d.slice(0,-1))e=e[t],f.unshift(e);m=f[0],w=m[g]}try{const e=(e,t)=>(p||n.schema).$_createError(e,w,t,n.state,a),s=await n.method(w,{schema:n.schema,linked:p,state:n.state,prefs:r,original:y,error:e,errorsArray:u.errorsArray,warn:(e,t)=>o.warnings.push((p||n.schema).$_createError(e,w,t,n.state,a)),message:(e,t)=>(p||n.schema).$_createError("external",w,t,n.state,a,{messages:e})});if(void 0===s||s===w)continue;if(s instanceof l.Report){if(o.tracer.log(n.schema,n.state,"rule","external","error"),c.push(s),a.abortEarly)break;continue}if(Array.isArray(s)&&s[i.symbols.errors]){if(o.tracer.log(n.schema,n.state,"rule","external","error"),c.push(...s),a.abortEarly)break;continue}m?(o.tracer.value(n.state,"rule",w,s,"external"),m[g]=s):(o.tracer.value(n.state,"rule",t,s,"external"),t=s)}catch(e){throw a.errors.label&&(e.message+=` (${n.label})`),e}}if(n.value=t,c.length)throw n.error=l.process(c,e,a),o.debug&&(n.error.debug=o.debug),n.error}if(!a.warnings&&!a.debug&&!a.artifacts)return n.value;const c={value:n.value};return o.warnings.length&&(c.warning=l.details(o.warnings)),o.debug&&(c.debug=o.debug),o.artifacts&&(c.artifacts=o.artifacts),c},u.Mainstay=class{constructor(e,t,r){this.externals=[],this.warnings=[],this.tracer=e,this.debug=t,this.links=r,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const e=this._snapshots.pop();this.externals=e.externals,this.warnings=e.warnings}commit(){this._snapshots.pop()}},u.entry=function(e,r,a){const{tracer:n,cleanup:o}=u.tracer(r,a),s=a.debug?[]:null,i=r._ids._schemaChain?new Map:null,d=new u.Mainstay(n,s,i),p=r._ids._schemaChain?[{schema:r}]:null,g=new c([],[],{mainstay:d,schemas:p}),m=t.validate(e,r,g,a);o&&r.$_root.untrace();const w=l.process(m.errors,e,a);return{value:m.value,error:w,mainstay:d}},u.tracer=function(e,t){return e.$_root._tracer?{tracer:e.$_root._tracer._register(e)}:t.debug?(a(e.$_root.trace,"Debug mode not supported"),{tracer:e.$_root.trace()._register(e),cleanup:!0}):{tracer:u.ignore}},t.validate=function(e,t,r,a){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(t.$_terms.whens&&(t=t._generate(e,r,a).schema),t._preferences&&(a=u.prefs(t,a)),t._cache&&a.cache){const a=t._cache.get(e);if(r.mainstay.tracer.debug(r,"validate","cached",!!a),a)return a}const o=(n,o,s)=>t.$_createError(n,e,o,s||r,a),s={original:e,prefs:a,schema:t,state:r,error:o,errorsArray:u.errorsArray,warn:(e,t,a)=>r.mainstay.warnings.push(o(e,t,a)),message:(n,o)=>t.$_createError("custom",e,o,r,a,{messages:n})};r.mainstay.tracer.entry(t,r);const l=t._definition;if(l.prepare&&void 0!==e&&a.convert){const t=l.prepare(e,s);if(t){if(r.mainstay.tracer.value(r,"prepare",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),s);e=t.value}}if(l.coerce&&void 0!==e&&a.convert&&(!l.coerce.from||l.coerce.from.includes(typeof e))){const t=l.coerce.method(e,s);if(t){if(r.mainstay.tracer.value(r,"coerced",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),s);e=t.value}}const c=t._flags.empty;c&&c.$_match(u.trim(e,t),r.nest(c),i.defaults)&&(r.mainstay.tracer.value(r,"empty",e,void 0),e=void 0);const d=n.presence||t._flags.presence||(t._flags._endedSwitch?null:a.presence);if(void 0===e){if("forbidden"===d)return u.finalize(e,null,s);if("required"===d)return u.finalize(e,[t.$_createError("any.required",e,null,r,a)],s);if("optional"===d){if(t._flags.default!==i.symbols.deepDefault)return u.finalize(e,null,s);r.mainstay.tracer.value(r,"default",e,{}),e={}}}else if("forbidden"===d)return u.finalize(e,[t.$_createError("any.unknown",e,null,r,a)],s);const p=[];if(t._valids){const n=t._valids.get(e,r,a,t._flags.insensitive);if(n)return a.convert&&(r.mainstay.tracer.value(r,"valids",e,n.value),e=n.value),r.mainstay.tracer.filter(t,r,"valid",n),u.finalize(e,null,s);if(t._flags.only){const n=t.$_createError("any.only",e,{valids:t._valids.values({display:!0})},r,a);if(a.abortEarly)return u.finalize(e,[n],s);p.push(n)}}if(t._invalids){const n=t._invalids.get(e,r,a,t._flags.insensitive);if(n){r.mainstay.tracer.filter(t,r,"invalid",n);const o=t.$_createError("any.invalid",e,{invalids:t._invalids.values({display:!0})},r,a);if(a.abortEarly)return u.finalize(e,[o],s);p.push(o)}}if(l.validate){const t=l.validate(e,s);if(t&&(r.mainstay.tracer.value(r,"base",e,t.value),e=t.value,t.errors)){if(!Array.isArray(t.errors))return p.push(t.errors),u.finalize(e,p,s);if(t.errors.length)return p.push(...t.errors),u.finalize(e,p,s)}}return t._rules.length?u.rules(e,p,s):u.finalize(e,p,s)},u.rules=function(e,t,r){const{schema:a,state:n,prefs:o}=r;for(const s of a._rules){const l=a._definition.rules[s.method];if(l.convert&&o.convert){n.mainstay.tracer.log(a,n,"rule",s.name,"full");continue}let c,d=s.args;if(s._resolve.length){d=Object.assign({},d);for(const t of s._resolve){const r=l.argsByName.get(t),s=d[t].resolve(e,n,o),u=r.normalize?r.normalize(s):s,p=i.validateArg(u,null,r);if(p){c=a.$_createError("any.ref",s,{arg:t,ref:d[t],reason:p},n,o);break}d[t]=u}}c=c||l.validate(e,r,d,s);const p=u.rule(c,s);if(p.errors){if(n.mainstay.tracer.log(a,n,"rule",s.name,"error"),s.warn){n.mainstay.warnings.push(...p.errors);continue}if(o.abortEarly)return u.finalize(e,p.errors,r);t.push(...p.errors)}else n.mainstay.tracer.log(a,n,"rule",s.name,"pass"),n.mainstay.tracer.value(n,"rule",e,p.value,s.name),e=p.value}return u.finalize(e,t,r)},u.rule=function(e,t){return e instanceof l.Report?(u.error(e,t),{errors:[e],value:null}):Array.isArray(e)&&e[i.symbols.errors]?(e.forEach((e=>u.error(e,t))),{errors:e,value:null}):{errors:null,value:e}},u.error=function(e,t){return t.message&&e._setTemplate(t.message),e},u.finalize=function(e,t,r){t=t||[];const{schema:n,state:o,prefs:s}=r;if(t.length){const a=u.default("failover",void 0,t,r);void 0!==a&&(o.mainstay.tracer.value(o,"failover",e,a),e=a,t=[])}if(t.length&&n._flags.error)if("function"==typeof n._flags.error){t=n._flags.error(t),Array.isArray(t)||(t=[t]);for(const e of t)a(e instanceof Error||e instanceof l.Report,"error() must return an Error object")}else t=[n._flags.error];if(void 0===e){const a=u.default("default",e,t,r);o.mainstay.tracer.value(o,"default",e,a),e=a}if(n._flags.cast&&void 0!==e){const t=n._definition.cast[n._flags.cast];if(t.from(e)){const a=t.to(e,r);o.mainstay.tracer.value(o,"cast",e,a,n._flags.cast),e=a}}if(n.$_terms.externals&&s.externals&&!1!==s._externals)for(const{method:e}of n.$_terms.externals)o.mainstay.externals.push({method:e,schema:n,state:o,label:l.label(n._flags,o,s)});const i={value:e,errors:t.length?t:null};return n._flags.result&&(i.value="strip"===n._flags.result?void 0:r.original,o.mainstay.tracer.value(o,n._flags.result,e,i.value),o.shadow(e,n._flags.result)),n._cache&&!1!==s.cache&&!n._refs.length&&n._cache.set(r.original,i),void 0===e||i.errors||void 0===n._flags.artifact||(o.mainstay.artifacts=o.mainstay.artifacts||new Map,o.mainstay.artifacts.has(n._flags.artifact)||o.mainstay.artifacts.set(n._flags.artifact,[]),o.mainstay.artifacts.get(n._flags.artifact).push(o.path)),i},u.prefs=function(e,t){const r=t===i.defaults;return r&&e._preferences[i.symbols.prefs]?e._preferences[i.symbols.prefs]:(t=i.preferences(t,e._preferences),r&&(e._preferences[i.symbols.prefs]=t),t)},u.default=function(e,t,r,a){const{schema:o,state:s,prefs:l}=a,c=o._flags[e];if(l.noDefaults||void 0===c)return t;if(s.mainstay.tracer.log(o,s,"rule",e,"full"),!c)return c;if("function"==typeof c){const i=c.length?[n(s.ancestors[0]),a]:[];try{return c(...i)}catch(t){return void r.push(o.$_createError(`any.${e}`,null,{error:t},s,l))}}return"object"!=typeof c?c:c[i.symbols.literal]?c.literal:i.isResolvable(c)?c.resolve(t,s,l):n(c)},u.trim=function(e,t){if("string"!=typeof e)return e;const r=t.$_getRule("trim");return r&&r.args.enabled?e.trim():e},u.ignore={active:!1,debug:o,entry:o,filter:o,log:o,resolve:o,value:o},u.errorsArray=function(){const e=[];return e[i.symbols.errors]=!0,e}},2036:(e,t,r)=>{"use strict";const a=r(375),n=r(9474),o=r(8160),s={};e.exports=s.Values=class{constructor(e,t){this._values=new Set(e),this._refs=new Set(t),this._lowercase=s.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,t){o.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),t&&t.register(e)):this.has(e,null,null,!1)||(this._values.add(e),"string"==typeof e&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,t,r){if(e=e||new s.Values,t){if(t._override)return t.clone();for(const r of[...t._values,...t._refs])e.add(r)}if(r)for(const t of[...r._values,...r._refs])e.remove(t);return e.length?e:null}remove(e){o.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),"string"==typeof e&&this._lowercase.delete(e.toLowerCase()))}has(e,t,r,a){return!!this.get(e,t,r,a)}get(e,t,r,a){if(!this.length)return!1;if(this._values.has(e))return{value:e};if("string"==typeof e&&e&&a){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&"object"!=typeof e)return!1;if("object"==typeof e)for(const t of this._values)if(n(t,e))return{value:t};if(t)for(const o of this._refs){const s=o.resolve(e,t,r,null,{in:!0});if(void 0===s)continue;const i=o.in&&"object"==typeof s?Array.isArray(s)?s:Object.keys(s):[s];for(const t of i)if(typeof t==typeof e)if(a&&e&&"string"==typeof e){if(t.toLowerCase()===e.toLowerCase())return{value:t,ref:o}}else if(n(t,e))return{value:t,ref:o}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const e=[];for(const t of[...this._values,...this._refs])void 0!==t&&e.push(t);return e}return Array.from([...this._values,...this._refs])}clone(){const e=new s.Values(this._values,this._refs);return e._override=this._override,e}concat(e){a(!e._override,"Cannot concat override set of values");const t=new s.Values([...this._values,...e._values],[...this._refs,...e._refs]);return t._override=this._override,t}describe(){const e=[];this._override&&e.push({override:!0});for(const t of this._values.values())e.push(t&&"object"==typeof t?{value:t}:t);for(const t of this._refs.values())e.push(t.describe());return e}},s.Values.prototype[o.symbols.values]=!0,s.Values.prototype.slice=s.Values.prototype.clone,s.lowercases=function(e){const t=new Map;if(e)for(const r of e)"string"==typeof r&&t.set(r.toLowerCase(),r);return t}},978:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(1687),s=r(9621),i={};e.exports=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(a(e&&"object"==typeof e,"Invalid defaults value: must be an object"),a(!t||!0===t||"object"==typeof t,"Invalid source value: must be true, falsy or an object"),a("object"==typeof r,"Invalid options: must be an object"),!t)return null;if(r.shallow)return i.applyToDefaultsWithShallow(e,t,r);const s=n(e);if(!0===t)return s;const l=void 0!==r.nullOverride&&r.nullOverride;return o(s,t,{nullOverride:l,mergeArrays:!1})},i.applyToDefaultsWithShallow=function(e,t,r){const l=r.shallow;a(Array.isArray(l),"Invalid keys");const c=new Map,u=!0===t?null:new Set;for(let r of l){r=Array.isArray(r)?r:r.split(".");const a=s(e,r);a&&"object"==typeof a?c.set(a,u&&s(t,r)||a):u&&u.add(r)}const d=n(e,{},c);if(!u)return d;for(const e of u)i.reachCopy(d,t,e);const p=void 0!==r.nullOverride&&r.nullOverride;return o(d,t,{nullOverride:p,mergeArrays:!1})},i.reachCopy=function(e,t,r){for(const e of r){if(!(e in t))return;const r=t[e];if("object"!=typeof r||null===r)return;t=r}const a=t;let n=e;for(let e=0;e{"use strict";const a=r(7916);e.exports=function(e){if(!e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n{"use strict";const a=r(9621),n=r(4277),o=r(7043),s={needsProtoHack:new Set([n.set,n.map,n.weakSet,n.weakMap])};e.exports=s.clone=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("object"!=typeof e||null===e)return e;let a=s.clone,i=r;if(t.shallow){if(!0!==t.shallow)return s.cloneWithShallow(e,t);a=e=>e}else if(i){const t=i.get(e);if(t)return t}else i=new Map;const l=n.getInternalProto(e);if(l===n.buffer)return!1;if(l===n.date)return new Date(e.getTime());if(l===n.regex)return new RegExp(e);const c=s.base(e,l,t);if(c===e)return e;if(i&&i.set(e,c),l===n.set)for(const r of e)c.add(a(r,t,i));else if(l===n.map)for(const[r,n]of e)c.set(r,a(n,t,i));const u=o.keys(e,t);for(const r of u){if("__proto__"===r)continue;if(l===n.array&&"length"===r){c.length=e.length;continue}const o=Object.getOwnPropertyDescriptor(e,r);o?o.get||o.set?Object.defineProperty(c,r,o):o.enumerable?c[r]=a(e[r],t,i):Object.defineProperty(c,r,{enumerable:!1,writable:!0,configurable:!0,value:a(e[r],t,i)}):Object.defineProperty(c,r,{enumerable:!0,writable:!0,configurable:!0,value:a(e[r],t,i)})}return c},s.cloneWithShallow=function(e,t){const r=t.shallow;(t=Object.assign({},t)).shallow=!1;const n=new Map;for(const t of r){const r=a(e,t);"object"!=typeof r&&"function"!=typeof r||n.set(r,r)}return s.clone(e,t,n)},s.base=function(e,t,r){if(!1===r.prototype)return s.needsProtoHack.has(t)?new t.constructor:t===n.array?[]:{};const a=Object.getPrototypeOf(e);if(a&&a.isImmutable)return e;if(t===n.array){const e=[];return a!==t&&Object.setPrototypeOf(e,a),e}if(s.needsProtoHack.has(t)){const e=new a.constructor;return a!==t&&Object.setPrototypeOf(e,a),e}return Object.create(a)}},9474:(e,t,r)=>{"use strict";const a=r(4277),n={mismatched:null};e.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!n.isDeepEqual(e,t,r,[])},n.isDeepEqual=function(e,t,r,o){if(e===t)return 0!==e||1/e==1/t;const s=typeof e;if(s!==typeof t)return!1;if(null===e||null===t)return!1;if("function"===s){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if("object"!==s)return e!=e&&t!=t;const i=n.getSharedType(e,t,!!r.prototype);switch(i){case a.buffer:return!1;case a.promise:return e===t;case a.regex:return e.toString()===t.toString();case n.mismatched:return!1}for(let r=o.length-1;r>=0;--r)if(o[r].isSame(e,t))return!0;o.push(new n.SeenEntry(e,t));try{return!!n.isDeepEqualObj(i,e,t,r,o)}finally{o.pop()}},n.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?n.mismatched:a.getInternalProto(e);const o=a.getInternalProto(e);return o!==a.getInternalProto(t)?n.mismatched:o},n.valueOf=function(e){const t=e.valueOf;if(void 0===t)return e;try{return t.call(e)}catch(e){return e}},n.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)},n.isSetSimpleEqual=function(e,t){for(const r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0},n.isDeepEqualObj=function(e,t,r,o,s){const{isDeepEqual:i,valueOf:l,hasOwnEnumerableProperty:c}=n,{keys:u,getOwnPropertySymbols:d}=Object;if(e===a.array){if(!o.part){if(t.length!==r.length)return!1;for(let e=0;e{"use strict";const a=r(8761);e.exports=class extends Error{constructor(e){super(e.filter((e=>""!==e)).map((e=>"string"==typeof e?e:e instanceof Error?e.message:a(e))).join(" ")||"Unknown error"),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t.assert)}}},5277:e=>{"use strict";const t={};e.exports=function(e){if(!e)return"";let r="";for(let a=0;a=256?"&#"+e+";":`&#x${e.toString(16).padStart(2,"0")};`)},t.isSafe=function(e){return t.safeCharCodes.has(e)},t.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),t.safeCharCodes=function(){const e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||32===t||46===t||44===t||45===t||58===t||95===t)&&e.add(t);return e}()},6064:e=>{"use strict";e.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:e=>{"use strict";e.exports=function(){}},1687:(e,t,r)=>{"use strict";const a=r(375),n=r(8571),o=r(7043),s={};e.exports=s.merge=function(e,t,r){if(a(e&&"object"==typeof e,"Invalid target value: must be an object"),a(null==t||"object"==typeof t,"Invalid source value: must be null, undefined, or an object"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){a(Array.isArray(e),"Cannot merge array onto an object"),r.mergeArrays||(e.length=0);for(let a=0;a{"use strict";const a=r(375),n={};e.exports=function(e,t,r){if(!1===t||null==t)return e;"string"==typeof(r=r||{})&&(r={separator:r});const o=Array.isArray(t);a(!o||!r.separator,"Separator option is not valid for array-based chain");const s=o?t:t.split(r.separator||".");let i=e;for(let e=0;e{"use strict";e.exports=function(){try{return JSON.stringify(...arguments)}catch(e){return"[Cannot display object: "+e.message+"]"}}},4277:(e,t)=>{"use strict";const r={};t=e.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},r.typeMap=new Map([["[object Error]",t.error],["[object Map]",t.map],["[object Promise]",t.promise],["[object Set]",t.set],["[object WeakMap]",t.weakMap],["[object WeakSet]",t.weakSet]]),t.getInternalProto=function(e){if(Array.isArray(e))return t.array;if(e instanceof Date)return t.date;if(e instanceof RegExp)return t.regex;if(e instanceof Error)return t.error;const a=Object.prototype.toString.call(e);return r.typeMap.get(a)||t.generic}},7043:(e,t)=>{"use strict";t.keys=function(e){return!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).symbols?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}},3652:(e,t,r)=>{"use strict";const a=r(375),n={};t.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(e,t){const r=[].concat((t=t||{}).before||[]),n=[].concat(t.after||[]),o=t.group||"?",s=t.sort||0;a(!r.includes(o),`Item cannot come before itself: ${o}`),a(!r.includes("?"),"Item cannot come before unassociated items"),a(!n.includes(o),`Item cannot come after itself: ${o}`),a(!n.includes("?"),"Item cannot come after unassociated items"),Array.isArray(e)||(e=[e]);for(const t of e){const e={seq:this._items.length,sort:s,before:r,after:n,group:o,node:t};this._items.push(e)}if(!t.manual){const e=this._sort();a(e,"item","?"!==o?`added into group ${o}`:"","created a dependencies error")}return this.nodes}merge(e){Array.isArray(e)||(e=[e]);for(const t of e)if(t)for(const e of t._items)this._items.push(Object.assign({},e));this._items.sort(n.mergeSort);for(let e=0;ee.sort===t.sort?0:e.sort{"use strict";const a=r(443),n=r(2178),o={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:a.URL||URL};t.analyze=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return n.code("DOMAIN_NON_EMPTY_STRING");if("string"!=typeof e)throw new Error("Invalid input: domain must be a string");if(e.length>256)return n.code("DOMAIN_TOO_LONG");if(o.nonAsciiRx.test(e)){if(!1===t.allowUnicode)return n.code("DOMAIN_INVALID_UNICODE_CHARS");e=e.normalize("NFC")}if(o.domainControlRx.test(e))return n.code("DOMAIN_INVALID_CHARS");e=o.punycode(e),t.allowFullyQualified&&"."===e[e.length-1]&&(e=e.slice(0,-1));const r=t.minDomainSegments||o.minDomainSegments,a=e.split(".");if(a.lengtht.maxDomainSegments)return n.code("DOMAIN_SEGMENTS_COUNT_MAX");const s=t.tlds;if(s){const e=a[a.length-1].toLowerCase();if(s.deny&&s.deny.has(e)||s.allow&&!s.allow.has(e))return n.code("DOMAIN_FORBIDDEN_TLDS")}for(let e=0;e63)return n.code("DOMAIN_LONG_SEGMENT");if(e{"use strict";const a=r(9848),n=r(5380),o=r(2178),s={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(a.TextEncoder||TextEncoder)};t.analyze=function(e,t){return s.email(e,t)},t.isValid=function(e,t){return!s.email(e,t)},s.email=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw new Error("Invalid input: email must be a string");if(!e)return o.code("EMPTY_STRING");const r=!s.nonAsciiRx.test(e);if(!r){if(!1===t.allowUnicode)return o.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const a=e.split("@");if(2!==a.length)return a.length>2?o.code("MULTIPLE_AT_CHAR"):o.code("MISSING_AT_CHAR");const[i,l]=a;if(!i)return o.code("EMPTY_LOCAL");if(!t.ignoreLength){if(e.length>254)return o.code("ADDRESS_TOO_LONG");if(s.encoder.encode(i).length>64)return o.code("LOCAL_TOO_LONG")}return s.local(i,r)||n.analyze(l,t)},s.local=function(e,t){const r=e.split(".");for(const e of r){if(!e.length)return o.code("EMPTY_LOCAL_SEGMENT");if(t){if(!s.atextRx.test(e))return o.code("INVALID_LOCAL_CHARS")}else for(const t of e){if(s.atextRx.test(t))continue;const e=s.binary(t);if(!s.atomRx.test(e))return o.code("INVALID_LOCAL_CHARS")}}},s.binary=function(e){return Array.from(s.encoder.encode(e)).map((e=>String.fromCharCode(e))).join("")},s.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,s.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(e,t)=>{"use strict";t.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},t.code=function(e){return{code:e,error:t.codes[e]}}},9959:(e,t,r)=>{"use strict";const a=r(375),n=r(5752);t.regex=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(void 0===e.cidr||"string"==typeof e.cidr,"options.cidr must be a string");const t=e.cidr?e.cidr.toLowerCase():"optional";a(["required","optional","forbidden"].includes(t),"options.cidr must be one of required, optional, forbidden"),a(void 0===e.version||"string"==typeof e.version||Array.isArray(e.version),"options.version must be a string or an array of string");let r=e.version||["ipv4","ipv6","ipvfuture"];Array.isArray(r)||(r=[r]),a(r.length>=1,"options.version must have at least 1 version specified");for(let e=0;e{if("forbidden"===t)return n.ip[e];const r=`\\/${"ipv4"===e?n.ip.v4Cidr:n.ip.v6Cidr}`;return"required"===t?`${n.ip[e]}${r}`:`${n.ip[e]}(?:${r})?`})).join("|")})`,s=new RegExp(`^${o}$`);return{cidr:t,versions:r,regex:s,raw:o}}},5752:(e,t,r)=>{"use strict";const a=r(375),n=r(6064),o={generate:function(){const e={},t="\\dA-Fa-f",r="["+t+"]",a="\\w-\\.~",n="!\\$&'\\(\\)\\*\\+,;=",o="%"+t,s=a+o+n+":@",i="["+s+"]",l="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";e.ipv4address="(?:"+l+"\\.){3}"+l;const c=r+"{1,4}",u="(?:"+c+":"+c+"|"+e.ipv4address+")",d="(?:"+c+":){6}"+u,p="::(?:"+c+":){5}"+u,g="(?:"+c+")?::(?:"+c+":){4}"+u,m="(?:(?:"+c+":){0,1}"+c+")?::(?:"+c+":){3}"+u,w="(?:(?:"+c+":){0,2}"+c+")?::(?:"+c+":){2}"+u,f="(?:(?:"+c+":){0,3}"+c+")?::"+c+":"+u,y="(?:(?:"+c+":){0,4}"+c+")?::"+u,b="(?:(?:"+c+":){0,5}"+c+")?::"+c,h="(?:(?:"+c+":){0,6}"+c+")?::";e.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",e.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",e.ipv6address="(?:"+d+"|"+p+"|"+g+"|"+m+"|"+w+"|"+f+"|"+y+"|"+b+"|"+h+")",e.ipvFuture="v"+r+"+\\.["+a+n+":]+",e.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",e.schemeRegex=new RegExp(e.scheme);const _="["+a+o+n+":]*",v="["+a+o+n+"]{1,255}",k="(?:\\[(?:"+e.ipv6address+"|"+e.ipvFuture+")\\]|"+e.ipv4address+"|"+v+")",R="(?:"+_+"@)?"+k+"(?::\\d*)?",P="(?:"+_+"@)?("+k+")(?::\\d*)?",j=i+"*",C=i+"+",q="(?:\\/"+j+")*",S="\\/(?:"+C+q+")?",A=C+q,E="["+a+o+n+"@]+"+q,H="(?:\\/\\/\\/"+j+q+")";return e.hierPart="(?:(?:\\/\\/"+R+q+")|"+S+"|"+A+"|"+H+")",e.hierPartCapture="(?:(?:\\/\\/"+P+q+")|"+S+"|"+A+")",e.relativeRef="(?:(?:\\/\\/"+R+q+")|"+S+"|"+E+"|)",e.relativeRefCapture="(?:(?:\\/\\/"+P+q+")|"+S+"|"+E+"|)",e.query="["+s+"\\/\\?]*(?=#|$)",e.queryWithSquareBrackets="["+s+"\\[\\]\\/\\?]*(?=#|$)",e.fragment="["+s+"\\/\\?]*",e}};o.rfc3986=o.generate(),t.ip={v4Cidr:o.rfc3986.ipv4Cidr,v6Cidr:o.rfc3986.ipv6Cidr,ipv4:o.rfc3986.ipv4address,ipv6:o.rfc3986.ipv6address,ipvfuture:o.rfc3986.ipvFuture},o.createRegex=function(e){const t=o.rfc3986,r="(?:\\?"+(e.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+")?(?:#"+t.fragment+")?",s=e.domain?t.relativeRefCapture:t.relativeRef;if(e.relativeOnly)return o.wrap(s+r);let i="";if(e.scheme){a(e.scheme instanceof RegExp||"string"==typeof e.scheme||Array.isArray(e.scheme),"scheme must be a RegExp, String, or Array");const r=[].concat(e.scheme);a(r.length>=1,"scheme must have at least 1 scheme specified");const o=[];for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return e.scheme||e.allowRelative||e.relativeOnly||e.allowQuerySquareBrackets||e.domain?o.createRegex(e):o.uriRegex}},1447:(e,t)=>{"use strict";const r={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};t.Parser=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t[r.settings]&&t.constants)for(const e in t.constants){const r=t.constants[e];if(null!==r&&!["boolean","number","string"].includes(typeof r))throw new Error(`Formula constant ${e} contains invalid ${typeof r} value type`)}this.settings=t[r.settings]?t:Object.assign({[r.settings]:!0,constants:{},functions:{}},t),this.single=null,this._parts=null,this._parse(e)}_parse(e){let a=[],n="",o=0,s=!1;const i=e=>{if(o)throw new Error("Formula missing closing parenthesis");const i=a.length?a[a.length-1]:null;if(s||n||e){if(i&&"reference"===i.type&&")"===e)return i.type="function",i.value=this._subFormula(n,i.value),void(n="");if(")"===e){const e=new t.Parser(n,this.settings);a.push({type:"segment",value:e})}else if(s){if("]"===s)return a.push({type:"reference",value:n}),void(n="");a.push({type:"literal",value:n})}else if(r.operatorCharacters.includes(n))i&&"operator"===i.type&&r.operators.includes(i.value+n)?i.value+=n:a.push({type:"operator",value:n});else if(n.match(r.numberRx))a.push({type:"constant",value:parseFloat(n)});else if(void 0!==this.settings.constants[n])a.push({type:"constant",value:this.settings.constants[n]});else{if(!n.match(r.tokenRx))throw new Error(`Formula contains invalid token: ${n}`);a.push({type:"reference",value:n})}n=""}};for(const t of e)s?t===s?(i(),s=!1):n+=t:o?"("===t?(n+=t,++o):")"===t?(--o,o?n+=t:i(t)):n+=t:t in r.literals?s=r.literals[t]:"("===t?(i(),++o):r.operatorCharacters.includes(t)?(i(),n=t,i()):" "!==t?n+=t:i();i(),a=a.map(((e,t)=>"operator"!==e.type||"-"!==e.value||t&&"operator"!==a[t-1].type?e:{type:"operator",value:"n"}));let l=!1;for(const e of a){if("operator"===e.type){if(r.operatorsPrefix.includes(e.value))continue;if(!l)throw new Error("Formula contains an operator in invalid position");if(!r.operators.includes(e.value))throw new Error(`Formula contains an unknown operator ${e.value}`)}else if(l)throw new Error("Formula missing expected operator");l=!l}if(!l)throw new Error("Formula contains invalid trailing operator");1===a.length&&["reference","literal","constant"].includes(a[0].type)&&(this.single={type:"reference"===a[0].type?"reference":"value",value:a[0].value}),this._parts=a.map((e=>{if("operator"===e.type)return r.operatorsPrefix.includes(e.value)?e:e.value;if("reference"!==e.type)return e.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(e.value))throw new Error(`Formula contains invalid reference ${e.value}`);return this.settings.reference?this.settings.reference(e.value):r.reference(e.value)}))}_subFormula(e,a){const n=this.settings.functions[a];if("function"!=typeof n)throw new Error(`Formula contains unknown function ${a}`);let o=[];if(e){let t="",n=0,s=!1;const i=()=>{if(!t)throw new Error(`Formula contains function ${a} with invalid arguments ${e}`);o.push(t),t=""};for(let a=0;anew t.Parser(e,this.settings))),function(e){const t=[];for(const r of o)t.push(r.evaluate(e));return n.call(e,...t)}}evaluate(e){const t=this._parts.slice();for(let a=t.length-2;a>=0;--a){const n=t[a];if(n&&"operator"===n.type){const o=t[a+1];t.splice(a+1,1);const s=r.evaluate(o,e);t[a]=r.single(n.value,s)}}return r.operatorsOrder.forEach((a=>{for(let n=1;n":return t>a;case">=":return t>=a;case"==":return t===a;case"!=":return t!==a;case"&&":return t&&a;case"||":return t||a}return null},r.exists=function(e){return null!=e}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:e=>{"use strict";e.exports=JSON.parse('{"version":"17.11.0"}')}},t={},function r(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,r),o.exports}(5107);var e,t},e.exports=t()},2043:function(e,t,r){var a,n;!function(o,s){"use strict";a=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"];function n(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(t,r){for(var n=0;n=0&&r<=i.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==n&&function(e){var r=(a[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),s.call(i,r,e),typeof console===t&&r{"use strict";const a=r(610),n=r(4020),o=r(500),s=r(2806),i=Symbol("encodeFragmentIdentifier");function l(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,t){return t.encode?t.strict?a(e):encodeURIComponent(e):e}function u(e,t){return t.decode?n(e):e}function d(e){return Array.isArray(e)?e.sort():"object"==typeof e?d(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 m(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 w(e,t){l((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,a)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===a[e]&&(a[e]={}),a[e][t[1]]=r):a[e]=r};case"bracket":return(e,r,a)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==a[e]?a[e]=[].concat(a[e],r):a[e]=[r]:a[e]=r};case"colon-list-separator":return(e,r,a)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==a[e]?a[e]=[].concat(a[e],r):a[e]=[r]:a[e]=r};case"comma":case"separator":return(t,r,a)=>{const n="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!n&&u(r,e).includes(e.arrayFormatSeparator);r=o?u(r,e):r;const s=n||o?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);a[t]=s};case"bracket-separator":return(t,r,a)=>{const n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n)return void(a[t]=r?u(r,e):r);const o=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==a[t]?a[t]=[].concat(a[t],o):a[t]=o};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),a=Object.create(null);if("string"!=typeof e)return a;if(!(e=e.trim().replace(/^[?#&]/,"")))return a;for(const n of e.split("&")){if(""===n)continue;let[e,s]=o(t.decode?n.replace(/\+/g," "):n,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:u(s,t),r(u(e,t),s,a)}for(const e of Object.keys(a)){const r=a[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=m(r[e],t);else a[e]=m(r,t)}return!1===t.sort?a:(!0===t.sort?Object.keys(a).sort():Object.keys(a).sort(t.sort)).reduce(((e,t)=>{const r=a[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=d(r):e[t]=r,e}),Object.create(null))}t.extract=g,t.parse=w,t.stringify=(e,t)=>{if(!e)return"";l((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],a=function(e){switch(e.arrayFormat){case"index":return t=>(r,a)=>{const n=r.length;return void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[c(t,e),"[",n,"]"].join("")]:[...r,[c(t,e),"[",c(n,e),"]=",c(a,e)].join("")]};case"bracket":return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[c(t,e),"[]"].join("")]:[...r,[c(t,e),"[]=",c(a,e)].join("")];case"colon-list-separator":return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[c(t,e),":list="].join("")]:[...r,[c(t,e),":list=",c(a,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(a,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?a:(n=null===n?"":n,0===a.length?[[c(r,e),t,c(n,e)].join("")]:[[a,c(n,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,c(t,e)]:[...r,[c(t,e),"=",c(a,e)].join("")]}}(t),n={};for(const t of Object.keys(e))r(t)||(n[t]=e[t]);const o=Object.keys(n);return!1!==t.sort&&o.sort(t.sort),o.map((r=>{const n=e[r];return void 0===n?"":null===n?c(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?c(r,t)+"[]":n.reduce(a(r),[]).join("&"):c(r,t)+"="+c(n,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,a]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:w(g(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:u(a,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[i]:!0},r);const a=p(e.url).split("?")[0]||"",n=t.extract(e.url),o=t.parse(n,{sort:!1}),s=Object.assign(o,e.query);let l=t.stringify(s,r);l&&(l=`?${l}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[i]?c(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${a}${l}${u}`},t.pick=(e,r,a)=>{a=Object.assign({parseFragmentIdentifier:!0,[i]:!1},a);const{url:n,query:o,fragmentIdentifier:l}=t.parseUrl(e,a);return t.stringifyUrl({url:n,query:s(o,r),fragmentIdentifier:l},a)},t.exclude=(e,r,a)=>{const n=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,n,a)}},500: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 r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},610:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},7886:(e,t,r)=>{const{fdkAxios:a}=r(2638),{convertStringToBase64:n}=r(5860);e.exports=class{static execute(e,t,r,o,s,i,l){let c={Authorization:"Bearer "+n(`${e.applicationID}:${e.applicationToken}`)};e.cookie&&(c={...c,cookie:e.cookie}),e.locationDetails&&(c={...c,"x-location-detail":JSON.stringify(e.locationDetails)}),e.currencyCode&&(c={...c,"x-currency-code":e.currencyCode});const u=e.extraHeaders.reduce(((e,t)=>({...e,...t})),{});let d={method:t,url:r,params:o,data:s,headers:{...c,...u,...i},responseHeaders:l.responseHeaders};return d=JSON.parse(JSON.stringify(d)),a.request(d)}}},9007:(e,t,r)=>{const a=r(2403),n=r(4196),o=r(737),s=r(4113),i=r(5970),l=r(4976),c=r(8568),u=r(562),d=r(4203),p=r(9171),g=r(3242),m=r(4823),w=r(4107),f=r(3740),y=r(4683),b=r(9792),{FDKClientValidationError:h}=r(7208);e.exports=class{constructor(e){this.config=e,this.cart=new a(e),this.catalog=new n(e),this.common=new o(e),this.communication=new s(e),this.configuration=new i(e),this.content=new l(e),this.fileStorage=new c(e),this.lead=new u(e),this.logistic=new d(e),this.order=new p(e),this.payment=new g(e),this.posCart=new m(e),this.rewards=new w(e),this.share=new f(e),this.theme=new y(e),this.user=new b(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 h("Currency code should be string only");this.config.currencyCode=e}setExtraHeaders(e){if("object"!=typeof e)throw new h("Context value should be an object");this.config.extraHeaders.push(e)}}},6894:(e,t,r)=>{const{FDKInvalidCredentialError:a}=r(7208),{Logger:n,setLoggerLevel:o}=r(7378);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){o(e.toUpperCase()),this.logLevel=e.toUpperCase()}setCookie(e){this.cookie=e}validate(){if(!this.applicationID)throw n({level:"ERROR",message:"No Application ID Present"}),new a("No Application ID Present");if(!this.applicationToken)throw n({level:"ERROR",message:"No Application Token Present"}),new a("No Application Token Present");if(this.applicationToken.length<5)throw n({level:"ERROR",message:"Invalid Application Token"}),new a("Invalid Application Token");if("boolean"!=typeof this.options.strictResponseCheck)throw n({level:"ERROR",message:"Invalid Application Token"}),n({level:"ERROR",message:"Invalid Value for options.strictResponseCheck, provide boolean value"}),new a("Invalid Value for options.strictResponseCheck, provide boolean value")}}},2403:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(6206)),l=r(7350),{Logger:c}=r(7378),u=r(2705);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",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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addAddress({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.addAddress().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.addAddress().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > addAddress \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.addAddress,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SaveAddressResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Cart > addAddress \n ${m}`})}return p}async addItems({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.addItems().validate({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.addItems().validate({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > addItems \n ${f}`});const y={};y.i=t,y.b=r,y.area_code=u,y.buy_now=d,y.id=p;const b=await a.execute(this._conf,"post",s({url:this._urls.addItems,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.AddCartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > addItems \n ${_}`})}return b}async applyCoupon({body:e,i:t,b:r,p:u,id:d,buyNow:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.applyCoupon().validate({body:e,i:t,b:r,p:u,id:d,buyNow:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.applyCoupon().validate({body:e,i:t,b:r,p:u,id:d,buyNow:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > applyCoupon \n ${f}`});const y={};y.i=t,y.b=r,y.p=u,y.id=d,y.buy_now=p;const b=await a.execute(this._conf,"post",s({url:this._urls.applyCoupon,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.CartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > applyCoupon \n ${_}`})}return b}async applyRewardPoints({body:e,id:t,i:r,b:u,buyNow:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.applyRewardPoints().validate({body:e,id:t,i:r,b:u,buyNow:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:w}=i.applyRewardPoints().validate({body:e,id:t,i:r,b:u,buyNow:d},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > applyRewardPoints \n ${w}`});const f={};f.id=t,f.i=r,f.b=u,f.buy_now=d;const y=await a.execute(this._conf,"post",s({url:this._urls.applyRewardPoints,params:{}}),f,e,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.CartDetailResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > Cart > applyRewardPoints \n ${h}`})}return y}async checkoutCart({body:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.checkoutCart().validate({body:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.checkoutCart().validate({body:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > checkoutCart \n ${p}`});const g={};g.buy_now=t;const m=await a.execute(this._conf,"post",s({url:this._urls.checkoutCart,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.CartCheckoutResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Cart > checkoutCart \n ${f}`})}return m}async checkoutCartV2({body:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.checkoutCartV2().validate({body:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.checkoutCartV2().validate({body:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > checkoutCartV2 \n ${p}`});const g={};g.buy_now=t;const m=await a.execute(this._conf,"post",s({url:this._urls.checkoutCartV2,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.CartCheckoutResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Cart > checkoutCartV2 \n ${f}`})}return m}async deleteCart({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.deleteCart().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.deleteCart().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > deleteCart \n ${d}`});const p={};p.id=e;const g=await a.execute(this._conf,"put",s({url:this._urls.deleteCart,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.DeleteCartDetailResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Cart > deleteCart \n ${w}`})}return g}async getAddressById({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:f}=i.getAddressById().validate({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:y}=i.getAddressById().validate({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getAddressById \n ${y}`});const b={};b.cart_id=t,b.buy_now=r,b.mobile_no=u,b.checkout_mode=d,b.tags=p,b.is_default=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getAddressById,params:{id:e}}),b,void 0,{...m},{responseHeaders:w});let _=h;w&&(_=h[0]);const{error:v}=l.Address().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getAddressById \n ${v}`})}return h}async getAddresses({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.getAddresses().validate({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.getAddresses().validate({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getAddresses \n ${f}`});const y={};y.cart_id=e,y.buy_now=t,y.mobile_no=r,y.checkout_mode=u,y.tags=d,y.is_default=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getAddresses,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.GetAddressesResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getAddresses \n ${_}`})}return b}async getBulkDiscountOffers({itemId:e,articleId:t,uid:r,slug:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getBulkDiscountOffers().validate({itemId:e,articleId:t,uid:r,slug:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getBulkDiscountOffers().validate({itemId:e,articleId:t,uid:r,slug:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getBulkDiscountOffers \n ${m}`});const w={};w.item_id=e,w.article_id=t,w.uid=r,w.slug=u;const f=await a.execute(this._conf,"get",s({url:this._urls.getBulkDiscountOffers,params:{}}),w,void 0,{...d},{responseHeaders:p});let y=f;p&&(y=f[0]);const{error:b}=l.BulkPriceResponse().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getBulkDiscountOffers \n ${b}`})}return f}async getCart({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:f}=i.getCart().validate({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:y}=i.getCart().validate({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCart \n ${y}`});const b={};b.id=e,b.i=t,b.b=r,b.c=u,b.assign_card_id=d,b.area_code=p,b.buy_now=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getCart,params:{}}),b,void 0,{...m},{responseHeaders:w});let _=h;w&&(_=h[0]);const{error:v}=l.CartDetailResponse().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCart \n ${v}`})}return h}async getCartLastModified({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:l}=i.getCartLastModified().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(l)return Promise.reject(new n(l));const{error:d}=i.getCartLastModified().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCartLastModified \n ${d}`});const p={};p.id=e;const g=await a.execute(this._conf,"head",s({url:this._urls.getCartLastModified,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=u.string().allow("").validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCartLastModified \n ${w}`})}return g}async getCartShareLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCartShareLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCartShareLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCartShareLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getCartShareLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetShareCartLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCartShareLink \n ${m}`})}return p}async getCartSharedItems({token:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCartSharedItems().validate({token:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCartSharedItems().validate({token:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCartSharedItems \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCartSharedItems,params:{token:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SharedCartResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCartSharedItems \n ${m}`})}return p}async getCoupons({id:e,buyNow:t,slug:r,storeId:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getCoupons().validate({id:e,buyNow:t,slug:r,storeId:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getCoupons().validate({id:e,buyNow:t,slug:r,storeId:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getCoupons \n ${m}`});const w={};w.id=e,w.buy_now=t,w.slug=r,w.store_id=u;const f=await a.execute(this._conf,"get",s({url:this._urls.getCoupons,params:{}}),w,void 0,{...d},{responseHeaders:p});let y=f;p&&(y=f[0]);const{error:b}=l.GetCouponResponse().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getCoupons \n ${b}`})}return f}async getItemCount({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getItemCount().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getItemCount().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getItemCount \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getItemCount,params:{}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.CartItemCountResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getItemCount \n ${f}`})}return m}async getLadderOffers({slug:e,storeId:t,promotionId:r,pageSize:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getLadderOffers().validate({slug:e,storeId:t,promotionId:r,pageSize:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getLadderOffers().validate({slug:e,storeId:t,promotionId:r,pageSize:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getLadderOffers \n ${m}`});const w={};w.slug=e,w.store_id=t,w.promotion_id=r,w.page_size=u;const f=await a.execute(this._conf,"get",s({url:this._urls.getLadderOffers,params:{}}),w,void 0,{...d},{responseHeaders:p});let y=f;p&&(y=f[0]);const{error:b}=l.LadderPriceOffers().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getLadderOffers \n ${b}`})}return f}async getPromotionOffers({slug:e,pageSize:t,promotionGroup:r,storeId:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getPromotionOffers().validate({slug:e,pageSize:t,promotionGroup:r,storeId:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getPromotionOffers().validate({slug:e,pageSize:t,promotionGroup:r,storeId:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getPromotionOffers \n ${m}`});const w={};w.slug=e,w.page_size=t,w.promotion_group=r,w.store_id=u;const f=await a.execute(this._conf,"get",s({url:this._urls.getPromotionOffers,params:{}}),w,void 0,{...d},{responseHeaders:p});let y=f;p&&(y=f[0]);const{error:b}=l.PromotionOffersResponse().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getPromotionOffers \n ${b}`})}return f}async getShipments({p:e,id:t,buyNow:r,addressId:u,areaCode:d,orderType:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.getShipments().validate({p:e,id:t,buyNow:r,addressId:u,areaCode:d,orderType:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.getShipments().validate({p:e,id:t,buyNow:r,addressId:u,areaCode:d,orderType:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > getShipments \n ${f}`});const y={};y.p=e,y.id=t,y.buy_now=r,y.address_id=u,y.area_code=d,y.order_type=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getShipments,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.CartShipmentsResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > getShipments \n ${_}`})}return b}async removeAddress({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.removeAddress().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.removeAddress().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > removeAddress \n ${d}`});const p=await a.execute(this._conf,"delete",s({url:this._urls.removeAddress,params:{id:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.DeleteAddressResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Cart > removeAddress \n ${m}`})}return p}async removeCoupon({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.removeCoupon().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.removeCoupon().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > removeCoupon \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"delete",s({url:this._urls.removeCoupon,params:{}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.CartDetailResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Cart > removeCoupon \n ${f}`})}return m}async selectAddress({body:e,cartId:t,buyNow:r,i:u,b:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.selectAddress().validate({body:e,cartId:t,buyNow:r,i:u,b:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:w}=i.selectAddress().validate({body:e,cartId:t,buyNow:r,i:u,b:d},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > selectAddress \n ${w}`});const f={};f.cart_id=t,f.buy_now=r,f.i=u,f.b=d;const y=await a.execute(this._conf,"post",s({url:this._urls.selectAddress,params:{}}),f,e,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.CartDetailResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > Cart > selectAddress \n ${h}`})}return y}async selectPaymentMode({body:e,id:t,buyNow:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.selectPaymentMode().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.selectPaymentMode().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > selectPaymentMode \n ${g}`});const m={};m.id=t,m.buy_now=r;const w=await a.execute(this._conf,"put",s({url:this._urls.selectPaymentMode,params:{}}),m,e,{...u},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=l.CartDetailResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > Cart > selectPaymentMode \n ${y}`})}return w}async updateAddress({id:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateAddress().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateAddress().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > updateAddress \n ${p}`});const g=await a.execute(this._conf,"put",s({url:this._urls.updateAddress,params:{id:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.UpdateAddressResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Cart > updateAddress \n ${w}`})}return g}async updateCart({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.updateCart().validate({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.updateCart().validate({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > updateCart \n ${f}`});const y={};y.id=t,y.i=r,y.b=u,y.area_code=d,y.buy_now=p;const b=await a.execute(this._conf,"put",s({url:this._urls.updateCart,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.UpdateCartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > Cart > updateCart \n ${_}`})}return b}async updateCartMeta({body:e,id:t,buyNow:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.updateCartMeta().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.updateCartMeta().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > updateCartMeta \n ${g}`});const m={};m.id=t,m.buy_now=r;const w=await a.execute(this._conf,"put",s({url:this._urls.updateCartMeta,params:{}}),m,e,{...u},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=l.CartMetaResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > Cart > updateCartMeta \n ${y}`})}return w}async updateCartWithSharedItems({token:e,action:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateCartWithSharedItems().validate({token:e,action:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateCartWithSharedItems().validate({token:e,action:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > updateCartWithSharedItems \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.updateCartWithSharedItems,params:{token:e,action:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.SharedCartResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Cart > updateCartWithSharedItems \n ${w}`})}return g}async validateCouponForPayment({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:w,type:f,cardId:y,requestHeaders:b}={requestHeaders:{}},{responseHeaders:h}={responseHeaders:!1}){const{error:_}=i.validateCouponForPayment().validate({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:w,type:f,cardId:y},{abortEarly:!1,allowUnknown:!0});if(_)return Promise.reject(new n(_));const{error:v}=i.validateCouponForPayment().validate({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:w,type:f,cardId:y},{abortEarly:!1,allowUnknown:!1});v&&c({level:"WARN",message:`Parameter Validation warrnings for application > Cart > validateCouponForPayment \n ${v}`});const k={};k.id=e,k.buy_now=t,k.address_id=r,k.payment_mode=u,k.payment_identifier=d,k.aggregator_name=p,k.merchant_code=g,k.iin=m,k.network=w,k.type=f,k.card_id=y;const R=await a.execute(this._conf,"get",s({url:this._urls.validateCouponForPayment,params:{}}),k,void 0,{...b},{responseHeaders:h});let P=R;h&&(P=R[0]);const{error:j}=l.PaymentCouponValidate().validate(P,{abortEarly:!1,allowUnknown:!0});if(j){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(j));c({level:"WARN",message:`Response Validation Warnings for application > Cart > validateCouponForPayment \n ${j}`})}return R}}},7350:(e,t,r)=>{const a=r(2705);class n{static ActionQuery(){return a.object({product_slug:a.array().items(a.string().allow(""))})}static AddCartDetailResponse(){return a.object({cart:n.CartDetailResponse(),message:a.string().allow(""),partial:a.boolean(),success:a.boolean()})}static AddCartRequest(){return a.object({items:a.array().items(n.AddProductCart()),new_cart:a.boolean()})}static AddProductCart(){return a.object({_custom_json:a.any(),article_assignment:a.any(),article_id:a.string().allow(""),display:a.string().allow(""),extra_meta:a.any(),item_id:a.number(),item_size:a.string().allow(""),meta:a.any(),parent_item_identifiers:a.array().items(a.object().pattern(/\S/,a.string().allow(""))),pos:a.boolean(),product_group_tags:a.array().items(a.string().allow("").allow(null)),quantity:a.number(),seller_id:a.number(),seller_identifier:a.string().allow(""),store_id:a.number()})}static Address(){return a.object({_custom_json:a.any(),address:a.string().allow(""),address_type:a.string().allow(""),area:a.string().allow(""),area_code:a.string().allow(""),area_code_slug:a.string().allow(""),checkout_mode:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),country_code:a.string().allow(""),country_iso_code:a.string().allow(""),country_phone_code:a.string().allow(""),created_by_user_id:a.string().allow(""),email:a.string().allow(""),geo_location:n.GeoLocation(),google_map_point:a.any(),id:a.string().allow(""),is_active:a.boolean(),is_default_address:a.boolean(),landmark:a.string().allow(""),meta:a.any(),name:a.string().allow(""),phone:a.string().allow(""),sector:a.string().allow(""),state:a.string().allow(""),state_code:a.string().allow(""),tags:a.array().items(a.string().allow("")),user_id:a.string().allow("")})}static AppliedFreeArticles(){return a.object({article_id:a.string().allow(""),free_gift_item_details:n.FreeGiftItem(),parent_item_identifier:a.string().allow(""),quantity:a.number()})}static AppliedPromotion(){return a.object({amount:a.number(),applied_free_articles:a.array().items(n.AppliedFreeArticles()),article_quantity:a.number(),buy_rules:a.array().items(n.BuyRules()),discount_rules:a.array().items(n.DiscountRulesApp()),mrp_promotion:a.boolean(),offer_text:a.string().allow(""),ownership:n.Ownership(),promo_id:a.string().allow(""),promotion_group:a.string().allow(""),promotion_name:a.string().allow(""),promotion_type:a.string().allow("")})}static ApplyCouponRequest(){return a.object({coupon_code:a.string().allow("").required()})}static ArticleGiftDetail(){return a.object({article_id:n.GiftDetail()})}static ArticlePriceInfo(){return a.object({base:n.BasePrice(),converted:n.BasePrice()})}static BaseInfo(){return a.object({name:a.string().allow(""),uid:a.number()})}static BasePrice(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number()})}static BulkPriceOffer(){return a.object({offers:a.array().items(n.OfferItem()),seller:n.OfferSeller()})}static BulkPriceResponse(){return a.object({data:a.array().items(n.BulkPriceOffer())})}static BuyRules(){return a.object({cart_conditions:a.any(),item_criteria:a.any()})}static CartBreakup(){return a.object({coupon:n.CouponBreakup(),display:a.array().items(n.DisplayBreakup()),loyalty_points:n.LoyaltyPoints(),raw:n.RawBreakup()})}static CartCheckoutCustomMeta(){return a.object({key:a.string().allow("").required(),value:a.string().allow("").required()})}static CartCheckoutDetailRequest(){return a.object({address_id:a.string().allow(""),aggregator:a.string().allow(""),billing_address:a.any(),billing_address_id:a.string().allow(""),callback_url:a.string().allow(""),custom_meta:a.array().items(n.CartCheckoutCustomMeta()),customer_details:a.any(),delivery_address:a.any(),extra_meta:a.any(),id:a.string().allow(""),merchant_code:a.string().allow(""),meta:a.any(),order_type:a.string().allow(""),ordering_store:a.number(),payment_auto_confirm:a.boolean(),payment_extra_identifiers:a.any(),payment_identifier:a.string().allow(""),payment_mode:a.string().allow("").required(),payment_params:a.any(),staff:n.StaffCheckout()})}static CartCheckoutDetailV2Request(){return a.object({address_id:a.string().allow(""),aggregator:a.string().allow(""),billing_address:a.any(),billing_address_id:a.string().allow(""),callback_url:a.string().allow("").allow(null),cart_id:a.string().allow(""),custom_meta:a.any(),customer_details:a.any().allow(null),delivery_address:a.any(),extra_meta:a.any(),id:a.string().allow("").allow(null),merchant_code:a.string().allow(""),meta:a.any(),order_type:a.string().allow(""),ordering_store:a.number().allow(null),payment_auto_confirm:a.boolean(),payment_identifier:a.string().allow("").allow(null),payment_methods:a.array().items(n.PaymentMethod()).required(),payment_mode:a.string().allow("").required(),payment_params:a.any().allow(null),staff:n.StaffCheckout()})}static CartCheckoutResponse(){return a.object({app_intercept_url:a.string().allow(""),callback_url:a.string().allow(""),cart:n.CheckCart(),data:a.any(),message:a.string().allow(""),order_id:a.string().allow(""),payment_confirm_url:a.string().allow(""),success:a.boolean()})}static CartCommonConfig(){return a.object({delivery_charges_config:n.DeliveryChargesConfig()})}static CartCurrency(){return a.object({code:a.string().allow(""),symbol:a.string().allow("")})}static CartDetailCoupon(){return a.object({cashback_amount:a.number(),cashback_message_primary:a.string().allow(""),cashback_message_secondary:a.string().allow(""),coupon_code:a.string().allow(""),coupon_description:a.string().allow(""),coupon_id:a.string().allow(""),coupon_subtitle:a.string().allow(""),coupon_title:a.string().allow(""),coupon_type:a.string().allow(""),coupon_value:a.number(),discount:a.number(),is_applied:a.boolean(),is_valid:a.boolean(),maximum_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number()})}static CartDetailResponse(){return a.object({applied_promo_details:a.array().items(n.AppliedPromotion()),breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),common_config:n.CartCommonConfig(),coupon:n.CartDetailCoupon(),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),notification:a.any(),pan_config:a.any(),pan_no:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),staff_user_id:a.string().allow(""),success:a.boolean(),uid:a.string().allow("")})}static CartItemCountResponse(){return a.object({user_cart_items_count:a.number()})}static CartMetaMissingResponse(){return a.object({errors:a.array().items(a.string().allow(""))})}static CartMetaRequest(){return a.object({checkout_mode:a.string().allow(""),comment:a.string().allow(""),delivery_slots:a.any(),gift_details:n.ArticleGiftDetail(),gstin:a.string().allow(""),pick_up_customer_details:a.any()})}static CartMetaResponse(){return a.object({is_valid:a.boolean(),message:a.string().allow("")})}static CartProduct(){return a.object({_custom_json:a.any(),action:n.ProductAction(),attributes:a.any(),brand:n.BaseInfo(),categories:a.array().items(n.CategoryInfo()),images:a.array().items(n.ProductImage()),item_code:a.string().allow("").allow(null),name:a.string().allow(""),slug:a.string().allow(""),tags:a.array().items(a.string().allow("")),teaser_tag:n.Tags(),type:a.string().allow(""),uid:a.number()})}static CartProductIdentifer(){return a.object({identifier:a.string().allow("")})}static CartProductInfo(){return a.object({article:n.ProductArticle(),availability:n.ProductAvailability(),bulk_offer:a.any(),charges:a.array().items(n.Charges()),coupon:n.CouponDetails(),coupon_message:a.string().allow(""),custom_order:a.any(),delivery_promise:n.ShipmentPromise(),discount:a.string().allow(""),identifiers:n.CartProductIdentifer().required(),is_set:a.boolean(),key:a.string().allow(""),message:a.string().allow(""),moq:a.any(),parent_item_identifiers:a.any(),price:n.ProductPriceInfo(),price_per_unit:n.ProductPricePerUnitInfo(),product:n.CartProduct(),product_ean_id:a.string().allow(""),promo_meta:n.PromoMeta(),promotions_applied:a.array().items(n.AppliedPromotion()),quantity:a.number()})}static CartShipmentsResponse(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),error:a.boolean(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),last_modified:a.string().allow(""),message:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),shipments:a.array().items(n.ShipmentResponse()),uid:a.string().allow("")})}static CategoryInfo(){return a.object({name:a.string().allow(""),uid:a.number()})}static Charges(){return a.object({allow_refund:a.boolean(),amount:n.ChargesAmount(),code:a.string().allow(""),meta:a.any(),name:a.string().allow(""),type:a.string().allow("")})}static ChargesAmount(){return a.object({currency:a.string().allow(""),value:a.number()})}static ChargesThreshold(){return a.object({charges:a.number(),threshold:a.number()})}static CheckCart(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),cod_available:a.boolean(),cod_charges:a.number(),cod_message:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_charge_order_value:a.number(),delivery_charges:a.number(),delivery_promise:n.ShipmentPromise(),error_message:a.string().allow(""),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),order_id:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),store_code:a.string().allow(""),store_emps:a.array().items(a.any()),success:a.boolean(),uid:a.string().allow(""),user_type:a.string().allow("")})}static Coupon(){return a.object({coupon_amount:a.number(),coupon_applicable_message:a.string().allow(""),coupon_code:a.string().allow(""),coupon_type:a.string().allow("").allow(null),coupon_value:a.number(),description:a.string().allow("").allow(null),end_date:a.string().allow("").allow(null),expires_on:a.string().allow(""),is_applicable:a.boolean(),is_applied:a.boolean(),max_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number(),start_date:a.string().allow("").allow(null),sub_title:a.string().allow(""),title:a.string().allow("")})}static CouponBreakup(){return a.object({code:a.string().allow(""),coupon_type:a.string().allow("").allow(null),coupon_value:a.number(),description:a.string().allow("").allow(null),is_applied:a.boolean(),max_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number(),sub_title:a.string().allow("").allow(null),title:a.string().allow("").allow(null),type:a.string().allow(""),uid:a.string().allow(""),value:a.number()})}static CouponDetails(){return a.object({code:a.string().allow(""),discount_single_quantity:a.number(),discount_total_quantity:a.number()})}static CouponValidity(){return a.object({code:a.string().allow("").allow(null),discount:a.number(),display_message_en:a.string().allow("").allow(null),next_validation_required:a.boolean().allow(null),title:a.string().allow(""),valid:a.boolean()})}static CurrencyInfo(){return a.object({code:a.string().allow(""),symbol:a.string().allow("")})}static CustomerDetails(){return a.object({email:a.string().allow(""),mobile:a.string().allow("").required(),name:a.string().allow("")})}static DeleteAddressResponse(){return a.object({id:a.string().allow(""),is_deleted:a.boolean()})}static DeleteCartDetailResponse(){return a.object({message:a.string().allow(""),success:a.boolean()})}static DeliveryChargesConfig(){return a.object({charges:a.array().items(n.ChargesThreshold()),enabled:a.boolean()})}static DiscountRulesApp(){return a.object({item_criteria:a.any(),matched_buy_rules:a.array().items(a.string().allow("")),offer:a.any(),raw_offer:a.any()})}static DisplayBreakup(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),display:a.string().allow(""),key:a.string().allow(""),message:a.array().items(a.string().allow("")),value:a.number()})}static FreeGiftItem(){return a.object({item_brand_name:a.string().allow(""),item_id:a.number(),item_images_url:a.array().items(a.string().allow("")),item_name:a.string().allow(""),item_price_details:a.any(),item_slug:a.string().allow("")})}static FreeGiftItems(){return a.object({item_brand_name:a.string().allow(""),item_id:a.number(),item_images_url:a.array().items(a.string().allow("")),item_name:a.string().allow(""),item_price_details:a.any(),item_slug:a.string().allow("")})}static GeoLocation(){return a.object({latitude:a.number(),longitude:a.number()})}static GetAddressesResponse(){return a.object({address:a.array().items(n.Address()),pii_masking:a.boolean()})}static GetCouponResponse(){return a.object({available_coupon_list:a.array().items(n.Coupon()),page:n.PageCoupon()})}static GetShareCartLinkRequest(){return a.object({id:a.string().allow(""),meta:a.any()})}static GetShareCartLinkResponse(){return a.object({share_url:a.string().allow(""),token:a.string().allow("")})}static GiftDetail(){return a.object({gift_message:a.string().allow(""),is_gift_applied:a.boolean()})}static LadderOfferItem(){return a.object({margin:a.number(),max_quantity:a.number(),min_quantity:a.number(),price:n.LadderPrice(),type:a.string().allow("")})}static LadderPrice(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),offer_price:a.number()})}static LadderPriceOffer(){return a.object({buy_rules:a.any(),calculate_on:a.string().allow(""),description:a.string().allow(""),discount_rules:a.array().items(a.any()),free_gift_items:a.array().items(n.FreeGiftItems()),id:a.string().allow(""),offer_prices:a.array().items(n.LadderOfferItem()),offer_text:a.string().allow(""),promotion_group:a.string().allow(""),valid_till:a.string().allow("")})}static LadderPriceOffers(){return a.object({available_offers:a.array().items(n.LadderPriceOffer()),currency:n.CurrencyInfo()})}static LoyaltyPoints(){return a.object({applicable:a.number(),description:a.string().allow(""),is_applied:a.boolean(),total:a.number()})}static OfferItem(){return a.object({auto_applied:a.boolean(),best:a.boolean(),margin:a.number(),price:n.OfferPrice(),quantity:a.number(),total:a.number(),type:a.string().allow("")})}static OfferPrice(){return a.object({bulk_effective:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number()})}static OfferSeller(){return a.object({name:a.string().allow(""),uid:a.number()})}static OperationErrorResponse(){return a.object({message:a.string().allow(""),success:a.boolean()})}static Ownership(){return a.object({payable_by:a.string().allow(""),payable_category:a.string().allow("")})}static PageCoupon(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),total:a.number(),total_item_count:a.number()})}static PaymentCouponValidate(){return a.object({coupon_validity:n.CouponValidity(),message:a.string().allow(""),success:a.boolean().required()})}static PaymentMeta(){return a.object({merchant_code:a.string().allow(""),payment_gateway:a.string().allow(""),payment_identifier:a.string().allow("").allow(null),type:a.string().allow("")})}static PaymentMethod(){return a.object({amount:a.number().allow(null),mode:a.string().allow("").required(),name:a.string().allow(""),payment:a.string().allow(""),payment_extra_identifiers:a.any(),payment_meta:n.PaymentMeta().required()})}static PaymentSelectionLock(){return a.object({default_options:a.string().allow(""),enabled:a.boolean(),payment_identifier:a.string().allow("")})}static ProductAction(){return a.object({query:n.ActionQuery(),type:a.string().allow(""),url:a.string().allow("")})}static ProductArticle(){return a.object({_custom_json:a.any(),cart_item_meta:a.any(),extra_meta:a.any(),gift_card:a.any(),identifier:a.any(),is_gift_visible:a.boolean(),meta:a.any(),mto_quantity:a.number(),parent_item_identifiers:a.any(),price:n.ArticlePriceInfo(),product_group_tags:a.array().items(a.string().allow("")),quantity:a.number(),seller:n.BaseInfo(),seller_identifier:a.string().allow(""),size:a.string().allow(""),store:n.StoreInfo(),tags:a.array().items(a.string().allow("")),type:a.string().allow(""),uid:a.string().allow("")})}static ProductAvailability(){return a.object({available_sizes:a.array().items(n.ProductAvailabilitySize()),deliverable:a.boolean(),is_valid:a.boolean(),other_store_quantity:a.number(),out_of_stock:a.boolean(),sizes:a.array().items(a.string().allow(""))})}static ProductAvailabilitySize(){return a.object({display:a.string().allow(""),is_available:a.boolean(),value:a.string().allow("")})}static ProductImage(){return a.object({aspect_ratio:a.string().allow(""),secure_url:a.string().allow(""),url:a.string().allow("")})}static ProductPrice(){return a.object({add_on:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),selling:a.number()})}static ProductPriceInfo(){return a.object({base:n.ProductPrice(),converted:n.ProductPrice()})}static ProductPricePerUnit(){return a.object({add_on:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),selling_price:a.number()})}static ProductPricePerUnitInfo(){return a.object({base:n.ProductPricePerUnit(),converted:n.ProductPricePerUnit()})}static PromiseFormatted(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static PromiseISOFormat(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static PromiseTimestamp(){return a.object({max:a.number(),min:a.number()})}static PromoMeta(){return a.object({message:a.string().allow("")})}static PromotionOffer(){return a.object({buy_rules:a.any(),description:a.string().allow(""),discount_rules:a.array().items(a.any()),free_gift_items:a.array().items(n.FreeGiftItems()),id:a.string().allow(""),offer_text:a.string().allow(""),promotion_group:a.string().allow(""),valid_till:a.string().allow("")})}static PromotionOffersResponse(){return a.object({available_promotions:a.array().items(n.PromotionOffer())})}static RawBreakup(){return a.object({cod_charge:a.number(),convenience_fee:a.number(),coupon:a.number(),delivery_charge:a.number(),discount:a.number(),fynd_cash:a.number(),gift_card:a.number(),gst_charges:a.number(),mop_total:a.number(),mrp_total:a.number(),subtotal:a.number(),total:a.number(),total_charge:a.number(),vog:a.number(),you_saved:a.number()})}static RewardPointRequest(){return a.object({points:a.boolean().required()})}static SaveAddressResponse(){return a.object({id:a.string().allow(""),is_default_address:a.boolean(),success:a.boolean()})}static SelectCartAddressRequest(){return a.object({billing_address_id:a.string().allow(""),cart_id:a.string().allow(""),id:a.string().allow("")})}static SharedCart(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),shared_cart_details:n.SharedCartDetails(),uid:a.string().allow("")})}static SharedCartDetails(){return a.object({created_on:a.string().allow(""),meta:a.any(),source:a.any(),token:a.string().allow(""),user:a.any()})}static SharedCartResponse(){return a.object({cart:n.SharedCart(),error:a.string().allow("")})}static ShipmentPromise(){return a.object({formatted:n.PromiseFormatted(),iso:n.PromiseISOFormat(),timestamp:n.PromiseTimestamp()})}static ShipmentResponse(){return a.object({box_type:a.string().allow("").allow(null),dp_id:a.string().allow("").allow(null),dp_options:a.any().allow(null),fulfillment_id:a.number(),fulfillment_type:a.string().allow(""),items:a.array().items(n.CartProductInfo()),order_type:a.string().allow(""),promise:n.ShipmentPromise(),shipment_type:a.string().allow(""),shipments:a.number()})}static StaffCheckout(){return a.object({_id:a.string().allow("").required(),employee_code:a.string().allow(""),first_name:a.string().allow("").required(),last_name:a.string().allow("").required(),user:a.string().allow("").required()})}static StoreInfo(){return a.object({name:a.string().allow(""),store_code:a.string().allow(""),uid:a.number()})}static Tags(){return a.object({tags:a.any()})}static UpdateAddressResponse(){return a.object({id:a.string().allow(""),is_default_address:a.boolean(),is_updated:a.boolean(),success:a.boolean()})}static UpdateCartDetailResponse(){return a.object({cart:n.CartDetailResponse(),message:a.string().allow(""),success:a.boolean()})}static UpdateCartPaymentRequest(){return a.object({address_id:a.string().allow(""),aggregator_name:a.string().allow(""),id:a.string().allow(""),merchant_code:a.string().allow(""),payment_identifier:a.string().allow("").allow(null),payment_mode:a.string().allow("")})}static UpdateCartRequest(){return a.object({items:a.array().items(n.UpdateProductCart()),operation:a.string().allow("").required()})}static UpdateProductCart(){return a.object({_custom_json:a.any(),article_id:a.string().allow(""),extra_meta:a.any(),identifiers:n.CartProductIdentifer().required(),item_id:a.number(),item_index:a.number(),item_size:a.string().allow(""),meta:a.any(),parent_item_identifiers:a.any(),quantity:a.number()})}}e.exports=n},6206:(e,t,r)=>{const a=r(2705),n=r(7350);e.exports=class{static addAddress(){return a.object({body:n.Address().required()}).required()}static addItems(){return a.object({i:a.boolean(),b:a.boolean(),areaCode:a.string().allow(""),buyNow:a.boolean(),id:a.string().allow(""),body:n.AddCartRequest().required()}).required()}static applyCoupon(){return a.object({i:a.boolean(),b:a.boolean(),p:a.boolean(),id:a.string().allow(""),buyNow:a.boolean(),body:n.ApplyCouponRequest().required()}).required()}static applyRewardPoints(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),buyNow:a.boolean(),body:n.RewardPointRequest().required()}).required()}static checkoutCart(){return a.object({buyNow:a.boolean(),body:n.CartCheckoutDetailRequest().required()}).required()}static checkoutCartV2(){return a.object({buyNow:a.boolean(),body:n.CartCheckoutDetailV2Request().required()}).required()}static deleteCart(){return a.object({id:a.string().allow("")})}static getAddressById(){return a.object({id:a.string().allow("").required(),cartId:a.string().allow(""),buyNow:a.boolean(),mobileNo:a.string().allow(""),checkoutMode:a.string().allow(""),tags:a.string().allow(""),isDefault:a.boolean()}).required()}static getAddresses(){return a.object({cartId:a.string().allow(""),buyNow:a.boolean(),mobileNo:a.string().allow(""),checkoutMode:a.string().allow(""),tags:a.string().allow(""),isDefault:a.boolean()})}static getBulkDiscountOffers(){return a.object({itemId:a.number(),articleId:a.string().allow(""),uid:a.number(),slug:a.string().allow("")})}static getCart(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),c:a.boolean(),assignCardId:a.number(),areaCode:a.string().allow(""),buyNow:a.boolean()})}static getCartLastModified(){return a.object({id:a.string().allow("")})}static getCartShareLink(){return a.object({body:n.GetShareCartLinkRequest().required()}).required()}static getCartSharedItems(){return a.object({token:a.string().allow("").required()}).required()}static getCoupons(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),slug:a.string().allow(""),storeId:a.string().allow("")})}static getItemCount(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static getLadderOffers(){return a.object({slug:a.string().allow("").required(),storeId:a.string().allow(""),promotionId:a.string().allow(""),pageSize:a.number()}).required()}static getPromotionOffers(){return a.object({slug:a.string().allow(""),pageSize:a.number(),promotionGroup:a.string().allow(""),storeId:a.number()})}static getShipments(){return a.object({p:a.boolean(),id:a.string().allow(""),buyNow:a.boolean(),addressId:a.string().allow(""),areaCode:a.string().allow(""),orderType:a.string().allow("")})}static removeAddress(){return a.object({id:a.string().allow("").required()}).required()}static removeCoupon(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static selectAddress(){return a.object({cartId:a.string().allow(""),buyNow:a.boolean(),i:a.boolean(),b:a.boolean(),body:n.SelectCartAddressRequest().required()}).required()}static selectPaymentMode(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),body:n.UpdateCartPaymentRequest().required()}).required()}static updateAddress(){return a.object({id:a.string().allow("").required(),body:n.Address().required()}).required()}static updateCart(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),areaCode:a.string().allow(""),buyNow:a.boolean(),body:n.UpdateCartRequest().required()}).required()}static updateCartMeta(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),body:n.CartMetaRequest().required()}).required()}static updateCartWithSharedItems(){return a.object({token:a.string().allow("").required(),action:a.string().allow("").required()}).required()}static validateCouponForPayment(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),addressId:a.string().allow(""),paymentMode:a.string().allow(""),paymentIdentifier:a.string().allow(""),aggregatorName:a.string().allow(""),merchantCode:a.string().allow(""),iin:a.string().allow(""),network:a.string().allow(""),type:a.string().allow(""),cardId:a.string().allow("")})}}},4196:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=r(3589),l=r(3853),c=r(5761),{Logger:u}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async followById({collectionType:e,collectionId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.followById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.followById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > followById \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.followById,params:{collectionType:e,collectionId:t}}),{},void 0,{...r},{responseHeaders:i});let m=g;i&&(m=g[0]);const{error:w}=c.FollowPostResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > followById \n ${w}`})}return g}async getBrandDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getBrandDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getBrandDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getBrandDetailBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getBrandDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.BrandDetailResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getBrandDetailBySlug \n ${m}`})}return p}async getBrands({department:e,pageNo:t,pageSize:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getBrands().validate({department:e,pageNo:t,pageSize:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getBrands().validate({department:e,pageNo:t,pageSize:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getBrands \n ${g}`});const m={};m.department=e,m.page_no=t,m.page_size=r;const w=await a.execute(this._conf,"get",s({url:this._urls.getBrands,params:{}}),m,void 0,{...i},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=c.BrandListingResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getBrands \n ${y}`})}return w}getBrandsPaginator({department:e,pageSize:t}={}){const r=new i;return r.setCallback((async()=>{r.nextId;const a=r.pageNo,n=await this.getBrands({department:e,pageNo:a,pageSize:t});return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getCategories({department:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getCategories().validate({department:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getCategories().validate({department:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCategories \n ${d}`});const p={};p.department=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getCategories,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=c.CategoryListingResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCategories \n ${w}`})}return g}async getCategoryDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getCategoryDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getCategoryDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCategoryDetailBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCategoryDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.CategoryMetaResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCategoryDetailBySlug \n ${m}`})}return p}async getCollectionDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getCollectionDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getCollectionDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCollectionDetailBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCollectionDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.CollectionDetailResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCollectionDetailBySlug \n ${m}`})}return p}async getCollectionItemsBySlug({slug:e,f:t,q:r,filters:i,sortOn:d,pageId:p,pageSize:g,pageNo:m,pageType:w,requestHeaders:f}={requestHeaders:{}},{responseHeaders:y}={responseHeaders:!1}){const{error:b}=l.getCollectionItemsBySlug().validate({slug:e,f:t,q:r,filters:i,sortOn:d,pageId:p,pageSize:g,pageNo:m,pageType:w},{abortEarly:!1,allowUnknown:!0});if(b)return Promise.reject(new n(b));const{error:h}=l.getCollectionItemsBySlug().validate({slug:e,f:t,q:r,filters:i,sortOn:d,pageId:p,pageSize:g,pageNo:m,pageType:w},{abortEarly:!1,allowUnknown:!1});h&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCollectionItemsBySlug \n ${h}`});const _={};_.f=t,_.q=r,_.filters=i,_.sort_on=d,_.page_id=p,_.page_size=g,_.page_no=m,_.page_type=w;const v=await a.execute(this._conf,"get",s({url:this._urls.getCollectionItemsBySlug,params:{slug:e}}),_,void 0,{...f},{responseHeaders:y});let k=v;y&&(k=v[0]);const{error:R}=c.ProductListingResponse().validate(k,{abortEarly:!1,allowUnknown:!0});if(R){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(R));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCollectionItemsBySlug \n ${R}`})}return v}getCollectionItemsBySlugPaginator({slug:e,f:t,q:r,filters:a,sortOn:n,pageSize:o}={}){const s=new i;return s.setCallback((async()=>{const i=s.nextId,l=s.pageNo,c=await this.getCollectionItemsBySlug({slug:e,f:t,q:r,filters:a,sortOn:n,pageId:i,pageSize:o,pageNo:l,pageType:"cursor"});return s.setPaginator({hasNext:!!c.page.has_next,nextId:c.page.next_id}),c}).bind(this)),s}async getCollections({pageNo:e,pageSize:t,tag:r,q:i,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=l.getCollections().validate({pageNo:e,pageSize:t,tag:r,q:i},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=l.getCollections().validate({pageNo:e,pageSize:t,tag:r,q:i},{abortEarly:!1,allowUnknown:!1});m&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getCollections \n ${m}`});const w={};w.page_no=e,w.page_size=t,w.tag=r,w.q=i;const f=await a.execute(this._conf,"get",s({url:this._urls.getCollections,params:{}}),w,void 0,{...d},{responseHeaders:p});let y=f;p&&(y=f[0]);const{error:b}=c.GetCollectionListingResponse().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getCollections \n ${b}`})}return f}getCollectionsPaginator({pageSize:e,tag:t,q:r}={}){const a=new i;return a.setCallback((async()=>{a.nextId;const n=a.pageNo,o=await this.getCollections({pageNo:n,pageSize:e,tag:t,q:r});return a.setPaginator({hasNext:!!o.page.has_next,nextId:o.page.next_id}),o}).bind(this)),a}async getComparedFrequentlyProductBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getComparedFrequentlyProductBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getComparedFrequentlyProductBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getComparedFrequentlyProductBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.ProductFrequentlyComparedSimilarResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getComparedFrequentlyProductBySlug \n ${m}`})}return p}async getDepartments({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getDepartments().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getDepartments().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getDepartments \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getDepartments,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.DepartmentResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getDepartments \n ${g}`})}return d}async getFollowIds({collectionType:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getFollowIds().validate({collectionType:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getFollowIds().validate({collectionType:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getFollowIds \n ${d}`});const p={};p.collection_type=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getFollowIds,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=c.FollowIdsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getFollowIds \n ${w}`})}return g}async getFollowedListing({collectionType:e,pageId:t,pageSize:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getFollowedListing().validate({collectionType:e,pageId:t,pageSize:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getFollowedListing().validate({collectionType:e,pageId:t,pageSize:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getFollowedListing \n ${g}`});const m={};m.page_id=t,m.page_size=r;const w=await a.execute(this._conf,"get",s({url:this._urls.getFollowedListing,params:{collectionType:e}}),m,void 0,{...i},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=c.GetFollowListingResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getFollowedListing \n ${y}`})}return w}getFollowedListingPaginator({collectionType:e,pageSize:t}={}){const r=new i;return r.setCallback((async()=>{const a=r.nextId,n=(r.pageNo,await this.getFollowedListing({collectionType:e,pageId:a,pageSize:t}));return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getFollowerCountById({collectionType:e,collectionId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getFollowerCountById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getFollowerCountById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getFollowerCountById \n ${p}`});const g=await a.execute(this._conf,"get",s({url:this._urls.getFollowerCountById,params:{collectionType:e,collectionId:t}}),{},void 0,{...r},{responseHeaders:i});let m=g;i&&(m=g[0]);const{error:w}=c.FollowerCountResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getFollowerCountById \n ${w}`})}return g}async getHomeProducts({sortOn:e,pageId:t,pageSize:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getHomeProducts().validate({sortOn:e,pageId:t,pageSize:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getHomeProducts().validate({sortOn:e,pageId:t,pageSize:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getHomeProducts \n ${g}`});const m={};m.sort_on=e,m.page_id=t,m.page_size=r;const w=await a.execute(this._conf,"get",s({url:this._urls.getHomeProducts,params:{}}),m,void 0,{...i},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=c.HomeListingResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getHomeProducts \n ${y}`})}return w}getHomeProductsPaginator({sortOn:e,pageSize:t}={}){const r=new i;return r.setCallback((async()=>{const a=r.nextId,n=(r.pageNo,await this.getHomeProducts({sortOn:e,pageId:a,pageSize:t}));return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getInStockLocations({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:f}=l.getInStockLocations().validate({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:y}=l.getInStockLocations().validate({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g},{abortEarly:!1,allowUnknown:!1});y&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getInStockLocations \n ${y}`});const b={};b.page_no=e,b.page_size=t,b.q=r,b.city=i,b.range=d,b.latitude=p,b.longitude=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getInStockLocations,params:{}}),b,void 0,{...m},{responseHeaders:w});let _=h;w&&(_=h[0]);const{error:v}=c.ApplicationStoreListing().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getInStockLocations \n ${v}`})}return h}getInStockLocationsPaginator({pageSize:e,q:t,city:r,range:a,latitude:n,longitude:o}={}){const s=new i;return s.setCallback((async()=>{s.nextId;const i=s.pageNo,l=await this.getInStockLocations({pageNo:i,pageSize:e,q:t,city:r,range:a,latitude:n,longitude:o});return s.setPaginator({hasNext:!!l.page.has_next,nextId:l.page.next_id}),l}).bind(this)),s}async getLocationDetailsById({locationId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getLocationDetailsById().validate({locationId:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getLocationDetailsById().validate({locationId:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getLocationDetailsById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getLocationDetailsById,params:{locationId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.StoreDetails().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getLocationDetailsById \n ${m}`})}return p}async getProductBundlesBySlug({slug:e,id:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getProductBundlesBySlug().validate({slug:e,id:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getProductBundlesBySlug().validate({slug:e,id:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductBundlesBySlug \n ${p}`});const g={};g.slug=e,g.id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getProductBundlesBySlug,params:{}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.ProductBundle().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductBundlesBySlug \n ${f}`})}return m}async getProductComparisonBySlugs({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getProductComparisonBySlugs().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getProductComparisonBySlugs().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductComparisonBySlugs \n ${d}`});const p={};p.slug=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getProductComparisonBySlugs,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=c.ProductsComparisonResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductComparisonBySlugs \n ${w}`})}return g}async getProductDetailBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getProductDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getProductDetailBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductDetailBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getProductDetailBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.ProductDetail().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductDetailBySlug \n ${m}`})}return p}async getProductPriceBySlug({slug:e,size:t,storeId:r,moq:i,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=l.getProductPriceBySlug().validate({slug:e,size:t,storeId:r,moq:i},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=l.getProductPriceBySlug().validate({slug:e,size:t,storeId:r,moq:i},{abortEarly:!1,allowUnknown:!1});m&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductPriceBySlug \n ${m}`});const w={};w.store_id=r,w.moq=i;const f=await a.execute(this._conf,"get",s({url:this._urls.getProductPriceBySlug,params:{slug:e,size:t}}),w,void 0,{...d},{responseHeaders:p});let y=f;p&&(y=f[0]);const{error:b}=c.ProductSizePriceResponseV3().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductPriceBySlug \n ${b}`})}return f}async getProductSellersBySlug({slug:e,size:t,strategy:r,pageNo:i,pageSize:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=l.getProductSellersBySlug().validate({slug:e,size:t,strategy:r,pageNo:i,pageSize:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:w}=l.getProductSellersBySlug().validate({slug:e,size:t,strategy:r,pageNo:i,pageSize:d},{abortEarly:!1,allowUnknown:!1});w&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductSellersBySlug \n ${w}`});const f={};f.strategy=r,f.page_no=i,f.page_size=d;const y=await a.execute(this._conf,"get",s({url:this._urls.getProductSellersBySlug,params:{slug:e,size:t}}),f,void 0,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=c.ProductSizeSellersResponseV3().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductSellersBySlug \n ${h}`})}return y}getProductSellersBySlugPaginator({slug:e,size:t,strategy:r,pageSize:a}={}){const n=new i;return n.setCallback((async()=>{n.nextId;const o=n.pageNo,s=await this.getProductSellersBySlug({slug:e,size:t,strategy:r,pageNo:o,pageSize:a});return n.setPaginator({hasNext:!!s.page.has_next,nextId:s.page.next_id}),s}).bind(this)),n}async getProductSizesBySlug({slug:e,storeId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getProductSizesBySlug().validate({slug:e,storeId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getProductSizesBySlug().validate({slug:e,storeId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductSizesBySlug \n ${p}`});const g={};g.store_id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getProductSizesBySlug,params:{slug:e}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.ProductSizes().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductSizesBySlug \n ${f}`})}return m}async getProductStockByIds({itemId:e,alu:t,skuCode:r,ean:i,upc:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=l.getProductStockByIds().validate({itemId:e,alu:t,skuCode:r,ean:i,upc:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:w}=l.getProductStockByIds().validate({itemId:e,alu:t,skuCode:r,ean:i,upc:d},{abortEarly:!1,allowUnknown:!1});w&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductStockByIds \n ${w}`});const f={};f.item_id=e,f.alu=t,f.sku_code=r,f.ean=i,f.upc=d;const y=await a.execute(this._conf,"get",s({url:this._urls.getProductStockByIds,params:{}}),f,void 0,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=c.ProductStockStatusResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductStockByIds \n ${h}`})}return y}async getProductStockForTimeByIds({timestamp:e,pageSize:t,pageId:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getProductStockForTimeByIds().validate({timestamp:e,pageSize:t,pageId:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getProductStockForTimeByIds().validate({timestamp:e,pageSize:t,pageId:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductStockForTimeByIds \n ${g}`});const m={};m.timestamp=e,m.page_size=t,m.page_id=r;const w=await a.execute(this._conf,"get",s({url:this._urls.getProductStockForTimeByIds,params:{}}),m,void 0,{...i},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=c.ProductStockPolling().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductStockForTimeByIds \n ${y}`})}return w}getProductStockForTimeByIdsPaginator({timestamp:e,pageSize:t}={}){const r=new i;return r.setCallback((async()=>{const a=r.nextId,n=(r.pageNo,await this.getProductStockForTimeByIds({timestamp:e,pageSize:t,pageId:a}));return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getProductVariantsBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getProductVariantsBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getProductVariantsBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProductVariantsBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getProductVariantsBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.ProductVariantsResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProductVariantsBySlug \n ${m}`})}return p}async getProducts({q:e,f:t,filters:r,sortOn:i,pageId:d,pageSize:p,pageNo:g,pageType:m,requestHeaders:w}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:y}=l.getProducts().validate({q:e,f:t,filters:r,sortOn:i,pageId:d,pageSize:p,pageNo:g,pageType:m},{abortEarly:!1,allowUnknown:!0});if(y)return Promise.reject(new n(y));const{error:b}=l.getProducts().validate({q:e,f:t,filters:r,sortOn:i,pageId:d,pageSize:p,pageNo:g,pageType:m},{abortEarly:!1,allowUnknown:!1});b&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getProducts \n ${b}`});const h={};h.q=e,h.f=t,h.filters=r,h.sort_on=i,h.page_id=d,h.page_size=p,h.page_no=g,h.page_type=m;const _=await a.execute(this._conf,"get",s({url:this._urls.getProducts,params:{}}),h,void 0,{...w},{responseHeaders:f});let v=_;f&&(v=_[0]);const{error:k}=c.ProductListingResponse().validate(v,{abortEarly:!1,allowUnknown:!0});if(k){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(k));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getProducts \n ${k}`})}return _}getProductsPaginator({q:e,f:t,filters:r,sortOn:a,pageSize:n}={}){const o=new i;return o.setCallback((async()=>{const s=o.nextId,i=o.pageNo,l=await this.getProducts({q:e,f:t,filters:r,sortOn:a,pageId:s,pageSize:n,pageNo:i,pageType:"cursor"});return o.setPaginator({hasNext:!!l.page.has_next,nextId:l.page.next_id}),l}).bind(this)),o}async getSearchResults({q:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getSearchResults().validate({q:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getSearchResults().validate({q:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getSearchResults \n ${d}`});const p={};p.q=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getSearchResults,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=c.AutoCompleteResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getSearchResults \n ${w}`})}return g}async getSimilarComparisonProductBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getSimilarComparisonProductBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getSimilarComparisonProductBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getSimilarComparisonProductBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getSimilarComparisonProductBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.ProductCompareResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getSimilarComparisonProductBySlug \n ${m}`})}return p}async getStores({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g,tags:m,requestHeaders:w}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:y}=l.getStores().validate({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g,tags:m},{abortEarly:!1,allowUnknown:!0});if(y)return Promise.reject(new n(y));const{error:b}=l.getStores().validate({pageNo:e,pageSize:t,q:r,city:i,range:d,latitude:p,longitude:g,tags:m},{abortEarly:!1,allowUnknown:!1});b&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > getStores \n ${b}`});const h={};h.page_no=e,h.page_size=t,h.q=r,h.city=i,h.range=d,h.latitude=p,h.longitude=g,h.tags=m;const _=await a.execute(this._conf,"get",s({url:this._urls.getStores,params:{}}),h,void 0,{...w},{responseHeaders:f});let v=_;f&&(v=_[0]);const{error:k}=c.StoreListingResponse().validate(v,{abortEarly:!1,allowUnknown:!0});if(k){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(k));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > getStores \n ${k}`})}return _}getStoresPaginator({pageSize:e,q:t,city:r,range:a,latitude:n,longitude:o,tags:s}={}){const l=new i;return l.setCallback((async()=>{l.nextId;const i=l.pageNo,c=await this.getStores({pageNo:i,pageSize:e,q:t,city:r,range:a,latitude:n,longitude:o,tags:s});return l.setPaginator({hasNext:!!c.page.has_next,nextId:c.page.next_id}),c}).bind(this)),l}async unfollowById({collectionType:e,collectionId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.unfollowById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.unfollowById().validate({collectionType:e,collectionId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Catalog > unfollowById \n ${p}`});const g=await a.execute(this._conf,"delete",s({url:this._urls.unfollowById,params:{collectionType:e,collectionId:t}}),{},void 0,{...r},{responseHeaders:i});let m=g;i&&(m=g[0]);const{error:w}=c.FollowPostResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Catalog > unfollowById \n ${w}`})}return g}}},5761:(e,t,r)=>{const a=r(2705);class n{static ApplicationItemMOQ(){return a.object({increment_unit:a.number(),maximum:a.number(),minimum:a.number()})}static ApplicationItemSEO(){return a.object({description:a.any(),title:a.any()})}static ApplicationStoreListing(){return a.object({filters:a.array().items(a.any()),items:a.array().items(n.AppStore()),page:n.Page()})}static AppStore(){return a.object({address:n.StoreAddressSerializer(),company:n.CompanyStore(),contact_numbers:a.array().items(n.SellerPhoneNumber()),departments:a.array().items(n.StoreDepartments()),manager:n.StoreManagerSerializer(),name:a.string().allow(""),store_code:a.string().allow(""),uid:a.number()})}static ArticleAssignmentV3(){return a.object({level:a.string().allow(""),strategy:a.string().allow("")})}static AttributeDetail(){return a.object({description:a.string().allow(""),display:a.string().allow(""),key:a.string().allow(""),logo:a.string().allow("")})}static AttributeMetadata(){return a.object({details:a.array().items(n.AttributeDetail()),title:a.string().allow("")})}static AutocompleteItem(){return a.object({_custom_json:a.any(),action:n.ProductListingAction(),display:a.string().allow(""),logo:n.Media(),type:a.string().allow("")})}static AutoCompleteResponse(){return a.object({items:a.array().items(n.AutocompleteItem())})}static BrandDetailResponse(){return a.object({_custom_json:a.any(),banners:n.ImageUrls(),description:a.string().allow(""),logo:n.Media(),name:a.string().allow(""),uid:a.number()})}static BrandItem(){return a.object({action:n.ProductListingAction(),banners:n.ImageUrls(),departments:a.array().items(a.string().allow("")),description:a.string().allow(""),discount:a.string().allow(""),logo:n.Media(),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static BrandListingResponse(){return a.object({items:a.array().items(n.BrandItem()),page:n.Page().required()})}static CategoryBanner(){return a.object({landscape:n.Media().required(),portrait:n.Media().required()})}static CategoryItems(){return a.object({action:n.ProductListingAction().required(),banners:n.CategoryBanner().required(),childs:a.array().items(n.Child()),name:a.string().allow("").required(),slug:a.string().allow("").required(),uid:a.number().required()})}static CategoryListingResponse(){return a.object({data:a.array().items(n.DepartmentCategoryTree()),departments:a.array().items(n.DepartmentIdentifier())})}static CategoryMetaResponse(){return a.object({_custom_json:a.any(),banners:n.ImageUrls(),logo:n.Media(),name:a.string().allow(""),uid:a.number()})}static Child(){return a.object({_custom_json:a.any(),action:n.ProductListingAction(),banners:n.ImageUrls(),childs:a.array().items(n.SecondLevelChild()),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static CollectionDetailResponse(){return a.object({_custom_json:a.any(),_schedule:a.any(),allow_facets:a.boolean(),allow_sort:a.boolean(),app_id:a.string().allow(""),badge:a.any(),banners:n.ImageUrls(),cron:a.any(),description:a.string().allow(""),is_active:a.boolean(),logo:n.Media(),meta:a.any(),name:a.string().allow(""),priority:a.number(),query:a.array().items(n.CollectionQuery()),slug:a.string().allow(""),sort_on:a.string().allow(""),tag:a.array().items(a.string().allow("")),type:a.string().allow(""),visible_facets_keys:a.array().items(a.string().allow(""))})}static CollectionListingFilter(){return a.object({tags:a.array().items(n.CollectionListingFilterTag()),type:a.array().items(n.CollectionListingFilterType())})}static CollectionListingFilterTag(){return a.object({display:a.string().allow(""),is_selected:a.boolean(),name:a.string().allow("")})}static CollectionListingFilterType(){return a.object({display:a.string().allow(""),is_selected:a.boolean(),name:a.string().allow("")})}static CollectionQuery(){return a.object({attribute:a.string().allow("").required(),op:a.string().allow("").required(),value:a.array().items(a.any()).required()})}static ColumnHeader(){return a.object({convertable:a.boolean(),value:a.string().allow("")})}static ColumnHeaders(){return a.object({col_1:n.ColumnHeader(),col_2:n.ColumnHeader(),col_3:n.ColumnHeader(),col_4:n.ColumnHeader(),col_5:n.ColumnHeader(),col_6:n.ColumnHeader()})}static CompanyDetail(){return a.object({id:a.number(),name:a.string().allow("")})}static CompanyStore(){return a.object({business_type:a.string().allow(""),company_type:a.string().allow(""),name:a.string().allow(""),uid:a.number()})}static CustomMetaFields(){return a.object({key:a.string().allow("").required(),value:a.string().allow("").required()})}static Department(){return a.object({logo:n.Media(),name:a.string().allow(""),priority_order:a.number(),slug:a.string().allow(""),uid:a.number()})}static DepartmentCategoryTree(){return a.object({department:a.string().allow("").required(),items:a.array().items(n.CategoryItems())})}static DepartmentIdentifier(){return a.object({slug:a.string().allow(""),uid:a.number()})}static DepartmentResponse(){return a.object({items:a.array().items(n.Department())})}static DetailsSchemaV3(){return a.object({key:a.string().allow(""),type:a.string().allow(""),value:a.string().allow("")})}static Dimension(){return a.object({height:a.number().required(),is_default:a.boolean().required(),length:a.number().required(),unit:a.string().allow("").required(),width:a.number().required()})}static DiscountMeta(){return a.object({end:a.string().allow(""),start:a.string().allow(""),start_timer_in_minutes:a.number(),timer:a.boolean().required()})}static ErrorResponse(){return a.object({error:a.string().allow("")})}static FollowerCountResponse(){return a.object({count:a.number()})}static FollowIdsData(){return a.object({brands:a.array().items(a.number()),collections:a.array().items(a.number()),products:a.array().items(a.number())})}static FollowIdsResponse(){return a.object({data:n.FollowIdsData()})}static FollowPostResponse(){return a.object({id:a.string().allow("").required(),message:a.string().allow("").required()})}static GetCollectionDetailNest(){return a.object({_custom_json:a.any(),_schedule:a.any(),action:n.ProductListingAction(),allow_facets:a.boolean(),allow_sort:a.boolean(),app_id:a.string().allow(""),badge:a.any(),banners:n.ImageUrls(),cron:a.any(),description:a.string().allow(""),is_active:a.boolean(),logo:n.Media(),meta:a.any(),name:a.string().allow(""),priority:a.number(),query:a.array().items(n.CollectionQuery()),slug:a.string().allow(""),sort_on:a.string().allow(""),tags:a.array().items(a.string().allow("")),type:a.string().allow(""),uid:a.string().allow(""),visible_facets_keys:a.array().items(a.string().allow(""))})}static GetCollectionListingResponse(){return a.object({filters:n.CollectionListingFilter(),items:a.array().items(n.GetCollectionDetailNest()),page:n.Page().required()})}static GetFollowListingResponse(){return a.object({items:a.array().items(n.ProductListingDetail()).required(),page:n.Page().required()})}static HomeListingResponse(){return a.object({items:a.array().items(n.ProductListingDetail()),message:a.string().allow(""),page:n.Page().required()})}static ImageUrls(){return a.object({landscape:n.Media(),portrait:n.Media()})}static LatLong(){return a.object({coordinates:a.array().items(a.number()),type:a.string().allow("")})}static MarketPlaceSttributesSchemaV3(){return a.object({details:a.array().items(n.DetailsSchemaV3()),title:a.string().allow("")})}static Media(){return a.object({alt:a.string().allow(""),meta:n.Meta(),type:a.string().allow(""),url:a.string().allow("")})}static Meta(){return a.object({source:a.string().allow("")})}static NetQuantity(){return a.object({unit:a.any(),value:a.number()})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static Price(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),max:a.number(),min:a.number()})}static ProductBrand(){return a.object({action:n.ProductListingAction(),description:a.string().allow(""),logo:n.Media(),name:a.string().allow(""),uid:a.number()})}static ProductBundle(){return a.object({items:a.array().items(n.ProductGroupingModel())})}static ProductCategoryMap(){return a.object({l1:n.ProductBrand(),l2:n.ProductBrand(),l3:n.ProductBrand()})}static ProductCompareResponse(){return a.object({attributes_metadata:a.array().items(n.AttributeMetadata()),items:a.array().items(n.ProductDetail()),subtitle:a.string().allow(""),title:a.string().allow("")})}static ProductDepartment(){return a.object({logo:n.Media(),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static ProductDetail(){return a.object({_custom_json:a.any(),_custom_meta:a.array().items(n.CustomMetaFields()),action:n.ProductListingAction(),attributes:a.any(),brand:n.ProductBrand(),categories:a.array().items(n.ProductBrand()),category_map:n.ProductCategoryMap(),color:a.string().allow(""),custom_order:n.ProductDetailCustomOrder(),department:n.ProductDepartment(),description:a.string().allow(""),discount:a.string().allow(""),grouped_attributes:a.array().items(n.ProductDetailGroupedAttribute()),has_variant:a.boolean(),highlights:a.array().items(a.string().allow("")),image_nature:a.string().allow(""),is_dependent:a.boolean(),item_code:a.string().allow(""),item_type:a.string().allow(""),medias:a.array().items(n.Media()),moq:n.ApplicationItemMOQ(),name:a.string().allow(""),net_quantity:n.NetQuantity(),price:n.ProductListingPrice(),product_group_tag:a.array().items(a.string().allow("")),product_online_date:a.string().allow(""),rating:a.number(),rating_count:a.number(),seo:n.ApplicationItemSEO(),short_description:a.string().allow(""),similars:a.array().items(a.string().allow("")),slug:a.string().allow("").required(),tags:a.array().items(a.string().allow("")),teaser_tag:a.string().allow(""),tryouts:a.array().items(a.string().allow("")),type:a.string().allow(""),uid:a.number()})}static ProductDetailAttribute(){return a.object({key:a.string().allow(""),type:a.string().allow(""),value:a.string().allow("")})}static ProductDetailCustomOrder(){return a.object({is_custom_order:a.boolean(),manufacturing_time:a.number(),manufacturing_time_unit:a.string().allow("")})}static ProductDetailGroupedAttribute(){return a.object({details:a.array().items(n.ProductDetailAttribute()),title:a.string().allow("")})}static ProductDetails(){return a.object({attributes:a.any(),brand_uid:a.number(),country_of_origin:a.any(),description:a.any(),grouped_attributes:a.any(),has_variant:a.boolean(),highlights:a.array().items(a.any()),hsn_code:a.number(),identifier:a.any(),image_nature:a.any(),images:a.array().items(a.any()),is_set:a.boolean(),item_code:a.any(),media:a.array().items(a.any()),name:a.any(),out_of_stock:a.boolean(),rating:a.number(),rating_count:a.number(),short_description:a.any(),slug:a.any(),template_tag:a.any()})}static ProductFilters(){return a.object({key:n.ProductFiltersKey().required(),values:a.array().items(n.ProductFiltersValue()).required()})}static ProductFiltersKey(){return a.object({display:a.string().allow("").required(),kind:a.string().allow(""),logo:a.string().allow(""),name:a.string().allow("").required()})}static ProductFiltersValue(){return a.object({count:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),display:a.string().allow("").required(),display_format:a.string().allow(""),is_selected:a.boolean().required(),max:a.number(),min:a.number(),query_format:a.string().allow(""),selected_max:a.number(),selected_min:a.number(),value:a.string().allow("")})}static ProductFrequentlyComparedSimilarResponse(){return a.object({similars:n.ProductCompareResponse()})}static ProductGroupingModel(){return a.object({_id:a.any(),choice:a.any(),company_id:a.number(),created_by:n.UserDetail(),created_on:a.string().allow("").required(),is_active:a.boolean(),logo:a.string().allow("").allow(null),meta:a.any(),modified_by:n.UserDetail(),modified_on:a.string().allow("").required(),name:a.any().required(),page_visibility:a.array().items(a.any()),products:a.array().items(n.ProductInGroup()).required(),same_store_assignment:a.boolean(),slug:a.any(),verified_by:n.UserDetail(),verified_on:a.string().allow("")})}static ProductGroupPrice(){return a.object({currency:a.any(),max_effective:a.number(),max_marked:a.number(),min_effective:a.number(),min_marked:a.number()})}static ProductInGroup(){return a.object({allow_remove:a.boolean(),auto_add_to_cart:a.boolean(),auto_select:a.boolean(),max_quantity:a.number().required(),min_quantity:a.number(),price:n.ProductGroupPrice(),product_details:n.ProductDetails(),product_uid:a.number().required(),sizes:a.array().items(n.Size())})}static ProductListingAction(){return a.object({page:n.ProductListingActionPage(),type:a.string().allow("")})}static ProductListingActionPage(){return a.object({params:a.any(),query:a.any(),type:a.string().allow("")})}static ProductListingDetail(){return a.object({_custom_json:a.any(),_custom_meta:a.array().items(n.CustomMetaFields()),action:n.ProductListingAction(),attributes:a.any(),brand:n.ProductBrand(),categories:a.array().items(n.ProductBrand()),category_map:n.ProductCategoryMap(),color:a.string().allow(""),custom_order:n.ProductDetailCustomOrder(),description:a.string().allow(""),discount:a.string().allow(""),grouped_attributes:a.array().items(n.ProductDetailGroupedAttribute()),has_variant:a.boolean(),highlights:a.array().items(a.string().allow("")),identifiers:a.array().items(a.string().allow("")),image_nature:a.string().allow(""),is_dependent:a.boolean(),item_code:a.string().allow(""),item_type:a.string().allow(""),medias:a.array().items(n.Media()),moq:n.ApplicationItemMOQ(),name:a.string().allow(""),net_quantity:n.NetQuantity(),price:n.ProductListingPrice(),product_group_tag:a.array().items(a.string().allow("")),product_online_date:a.string().allow(""),rating:a.number(),rating_count:a.number(),sellable:a.boolean(),seo:n.ApplicationItemSEO(),short_description:a.string().allow(""),similars:a.array().items(a.string().allow("")),sizes:a.array().items(a.string().allow("")),slug:a.string().allow("").required(),tags:a.array().items(a.string().allow("")),teaser_tag:a.string().allow(""),tryouts:a.array().items(a.string().allow("")),type:a.string().allow(""),uid:a.number(),variants:a.array().items(n.ProductVariantListingResponse())})}static ProductListingPrice(){return a.object({effective:n.Price(),marked:n.Price()})}static ProductListingResponse(){return a.object({filters:a.array().items(n.ProductFilters()),items:a.array().items(n.ProductListingDetail()),page:n.Page().required(),sort_on:a.array().items(n.ProductSortOn())})}static ProductsComparisonResponse(){return a.object({attributes_metadata:a.array().items(n.AttributeMetadata()),items:a.array().items(n.ProductDetail())})}static ProductSetDistributionSizeV3(){return a.object({pieces:a.number(),size:a.string().allow("")})}static ProductSetDistributionV3(){return a.object({sizes:a.array().items(n.ProductSetDistributionSizeV3())})}static ProductSetV3(){return a.object({quantity:a.number(),size_distribution:n.ProductSetDistributionV3()})}static ProductSize(){return a.object({dimension:n.Dimension(),display:a.string().allow(""),is_available:a.boolean(),quantity:a.number(),seller_identifiers:a.array().items(a.string().allow("")),value:a.string().allow(""),weight:n.Weight()})}static ProductSizePriceResponseV3(){return a.object({article_assignment:n.ArticleAssignmentV3(),article_id:a.string().allow(""),delivery_promise:n.PromiseSchema(),discount:a.string().allow(""),discount_meta:n.DiscountMeta(),grouped_attributes:a.array().items(n.SellerGroupAttributes()),is_cod:a.boolean(),is_gift:a.boolean(),item_type:a.string().allow(""),long_lat:a.array().items(a.number()),marketplace_attributes:a.array().items(n.MarketPlaceSttributesSchemaV3()),pincode:a.number(),price:n.ProductStockPriceV3(),price_per_piece:n.ProductStockPriceV3(),price_per_unit:n.ProductStockUnitPriceV3(),quantity:a.number(),return_config:n.ReturnConfigSchemaV3(),seller:n.SellerV3(),seller_count:a.number(),set:n.ProductSetV3(),special_badge:a.string().allow(""),store:n.StoreV3(),strategy_wise_listing:a.array().items(n.StrategyWiseListingSchemaV3())})}static ProductSizes(){return a.object({discount:a.string().allow(""),discount_meta:n.DiscountMeta(),multi_size:a.boolean(),price:n.ProductSizesPrice(),sellable:a.boolean(),size_chart:n.SizeChart(),sizes:a.array().items(n.ProductSize()),stores:n.ProductSizeStores()})}static ProductSizeSellerFilterSchemaV3(){return a.object({is_selected:a.boolean(),name:a.string().allow(""),value:a.string().allow("")})}static ProductSizeSellersResponseV3(){return a.object({items:a.array().items(n.ProductSizePriceResponseV3()),page:n.Page().required(),sort_on:a.array().items(n.ProductSizeSellerFilterSchemaV3())})}static ProductSizesPrice(){return a.object({effective:n.Price(),marked:n.Price(),selling:n.Price()})}static ProductSizeStores(){return a.object({count:a.number()})}static ProductSortOn(){return a.object({display:a.string().allow(""),is_selected:a.boolean(),logo:a.string().allow(""),name:a.string().allow(""),value:a.string().allow("")})}static ProductStockPolling(){return a.object({items:a.array().items(n.ProductStockStatusItem()),page:n.Page().required()})}static ProductStockPrice(){return a.object({currency:a.string().allow(""),effective:a.number(),marked:a.number()})}static ProductStockPriceV3(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),selling:a.number()})}static ProductStockStatusItem(){return a.object({company:n.CompanyDetail(),identifier:a.any(),item_id:a.number(),price:n.ProductStockPrice(),quantity:a.number(),seller:n.Seller(),size:a.string().allow(""),store:n.StoreDetail(),uid:a.string().allow("")})}static ProductStockStatusResponse(){return a.object({items:a.array().items(n.ProductStockStatusItem())})}static ProductStockUnitPriceV3(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),price:a.number(),unit:a.string().allow("")})}static ProductVariantItemResponse(){return a.object({_custom_meta:a.array().items(n.CustomMetaFields()),action:n.ProductListingAction(),color:a.string().allow(""),color_name:a.string().allow(""),is_available:a.boolean(),medias:a.array().items(n.Media()),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number(),value:a.string().allow("")})}static ProductVariantListingResponse(){return a.object({display_type:a.string().allow(""),header:a.string().allow(""),items:a.array().items(n.ProductVariantItemResponse()),key:a.string().allow(""),total:a.number()})}static ProductVariantResponse(){return a.object({display_type:a.string().allow(""),header:a.string().allow(""),items:a.array().items(n.ProductVariantItemResponse()),key:a.string().allow("")})}static ProductVariantsResponse(){return a.object({variants:a.array().items(n.ProductVariantResponse())})}static PromiseSchema(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static ReturnConfigSchemaV3(){return a.object({returnable:a.boolean(),time:a.number(),unit:a.string().allow("")})}static SecondLevelChild(){return a.object({_custom_json:a.any(),action:n.ProductListingAction(),banners:n.ImageUrls(),childs:a.array().items(n.ThirdLevelChild()),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static Seller(){return a.object({count:a.number(),name:a.string().allow(""),uid:a.number()})}static SellerGroupAttributes(){return a.object({details:a.array().items(n.DetailsSchemaV3()),title:a.string().allow("")})}static SellerPhoneNumber(){return a.object({country_code:a.number().required(),number:a.string().allow("").required()})}static SellerV3(){return a.object({count:a.number(),name:a.string().allow(""),uid:a.number()})}static Size(){return a.object({display:a.any(),is_available:a.boolean(),quantity:a.number(),value:a.any()})}static SizeChart(){return a.object({description:a.string().allow(""),headers:n.ColumnHeaders(),image:a.string().allow(""),size_tip:a.string().allow(""),sizes:a.array().items(n.SizeChartValues()),title:a.string().allow(""),unit:a.string().allow("")})}static SizeChartValues(){return a.object({col_1:a.string().allow(""),col_2:a.string().allow(""),col_3:a.string().allow(""),col_4:a.string().allow(""),col_5:a.string().allow(""),col_6:a.string().allow("")})}static Store(){return a.object({address:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),lat_long:n.LatLong(),name:a.string().allow(""),pincode:a.number(),state:a.string().allow(""),store_code:a.string().allow(""),store_email:a.string().allow(""),tags:a.array().items(a.string().allow("")),uid:a.number()})}static StoreAddressSerializer(){return a.object({address1:a.string().allow(""),address2:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),landmark:a.string().allow(""),latitude:a.number(),longitude:a.number(),pincode:a.number(),state:a.string().allow("")})}static StoreDepartments(){return a.object({logo:a.any(),name:a.string().allow(""),priority_order:a.number(),slug:a.string().allow(""),uid:a.number()})}static StoreDetail(){return a.object({city:a.string().allow(""),code:a.string().allow(""),id:a.number(),name:a.string().allow("")})}static StoreDetails(){return a.object({_custom_json:a.any(),address:n.StoreAddressSerializer(),company:n.CompanyStore(),contact_numbers:a.array().items(n.SellerPhoneNumber()),departments:a.array().items(n.StoreDepartments()),manager:n.StoreManagerSerializer(),name:a.string().allow(""),store_code:a.string().allow(""),timing:a.array().items(n.StoreTiming()),uid:a.number()})}static StoreListingResponse(){return a.object({items:a.array().items(n.Store()).required(),page:n.Page().required()})}static StoreManagerSerializer(){return a.object({email:a.string().allow(""),mobile_no:n.SellerPhoneNumber(),name:a.string().allow("")})}static StoreTiming(){return a.object({closing:n.Time(),open:a.boolean(),opening:n.Time(),weekday:a.string().allow("")})}static StoreV3(){return a.object({count:a.number(),name:a.string().allow(""),uid:a.number()})}static StrategyWiseListingSchemaV3(){return a.object({distance:a.number(),pincode:a.number(),quantity:a.number(),tat:a.number()})}static ThirdLevelChild(){return a.object({_custom_json:a.any(),action:n.ProductListingAction(),banners:n.ImageUrls(),childs:a.array().items(a.any()),name:a.string().allow(""),slug:a.string().allow(""),uid:a.number()})}static Time(){return a.object({hour:a.number(),minute:a.number()})}static UserDetail(){return a.object({contact:a.string().allow(""),super_user:a.boolean(),user_id:a.string().allow("").required(),username:a.string().allow("").required()})}static Weight(){return a.object({is_default:a.boolean().required(),shipping:a.number().required(),unit:a.string().allow("").required()})}}e.exports=n},3853:(e,t,r)=>{const a=r(2705);r(5761),e.exports=class{static followById(){return a.object({collectionType:a.string().allow("").required(),collectionId:a.string().allow("").required()}).required()}static getBrandDetailBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getBrands(){return a.object({department:a.string().allow(""),pageNo:a.number(),pageSize:a.number()})}static getCategories(){return a.object({department:a.string().allow("")})}static getCategoryDetailBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getCollectionDetailBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getCollectionItemsBySlug(){return a.object({slug:a.string().allow("").required(),f:a.string().allow(""),q:a.string().allow(""),filters:a.boolean(),sortOn:a.string().allow(""),pageId:a.string().allow(""),pageSize:a.number(),pageNo:a.number(),pageType:a.string().allow("")}).required()}static getCollections(){return a.object({pageNo:a.number(),pageSize:a.number(),tag:a.array().items(a.string().allow("")),q:a.string().allow("")})}static getComparedFrequentlyProductBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getDepartments(){return a.object({})}static getFollowIds(){return a.object({collectionType:a.string().allow("")})}static getFollowedListing(){return a.object({collectionType:a.string().allow("").required(),pageId:a.string().allow(""),pageSize:a.number()}).required()}static getFollowerCountById(){return a.object({collectionType:a.string().allow("").required(),collectionId:a.string().allow("").required()}).required()}static getHomeProducts(){return a.object({sortOn:a.string().allow(""),pageId:a.string().allow(""),pageSize:a.number()})}static getInStockLocations(){return a.object({pageNo:a.number(),pageSize:a.number(),q:a.string().allow(""),city:a.string().allow(""),range:a.number(),latitude:a.number(),longitude:a.number()})}static getLocationDetailsById(){return a.object({locationId:a.number().required()}).required()}static getProductBundlesBySlug(){return a.object({slug:a.string().allow(""),id:a.string().allow("")})}static getProductComparisonBySlugs(){return a.object({slug:a.array().items(a.string().allow("")).required()}).required()}static getProductDetailBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getProductPriceBySlug(){return a.object({slug:a.string().allow("").required(),size:a.string().allow("").required(),storeId:a.number(),moq:a.number()}).required()}static getProductSellersBySlug(){return a.object({slug:a.string().allow("").required(),size:a.string().allow("").required(),strategy:a.string().allow(""),pageNo:a.number(),pageSize:a.number()}).required()}static getProductSizesBySlug(){return a.object({slug:a.string().allow("").required(),storeId:a.number()}).required()}static getProductStockByIds(){return a.object({itemId:a.string().allow(""),alu:a.string().allow(""),skuCode:a.string().allow(""),ean:a.string().allow(""),upc:a.string().allow("")})}static getProductStockForTimeByIds(){return a.object({timestamp:a.string().allow("").required(),pageSize:a.number(),pageId:a.string().allow("")}).required()}static getProductVariantsBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getProducts(){return a.object({q:a.string().allow(""),f:a.string().allow(""),filters:a.boolean(),sortOn:a.string().allow(""),pageId:a.string().allow(""),pageSize:a.number(),pageNo:a.number(),pageType:a.string().allow("")})}static getSearchResults(){return a.object({q:a.string().allow("").required()}).required()}static getSimilarComparisonProductBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getStores(){return a.object({pageNo:a.number(),pageSize:a.number(),q:a.string().allow(""),city:a.string().allow(""),range:a.number(),latitude:a.number(),longitude:a.number(),tags:a.string().allow("")})}static unfollowById(){return a.object({collectionType:a.string().allow("").required(),collectionId:a.string().allow("").required()}).required()}}},737:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(9692)),l=r(1844),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getLocations({locationType:e,id:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getLocations().validate({locationType:e,id:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getLocations().validate({locationType:e,id:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Common > getLocations \n ${p}`});const g={};g.location_type=e,g.id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getLocations,params:{}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.Locations().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Common > getLocations \n ${f}`})}return m}async searchApplication({authorization:e,query:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.searchApplication().validate({authorization:e,query:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.searchApplication().validate({authorization:e,query:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Common > searchApplication \n ${p}`});const g={};g.query=t;const m={};m.authorization=e;const w=await a.execute(this._conf,"get",s({url:this._urls.searchApplication,params:{}}),g,void 0,{...m,...r},{responseHeaders:u});let f=w;u&&(f=w[0]);const{error:y}=l.ApplicationResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > Common > searchApplication \n ${y}`})}return w}}},1844:(e,t,r)=>{const a=r(2705);class n{static Application(){return a.object({__v:a.number(),_id:a.string().allow(""),app_type:a.string().allow(""),auth:n.ApplicationAuth(),banner:n.SecureUrl(),cache_ttl:a.number(),channel_type:a.string().allow(""),company_id:a.number(),cors:n.ApplicationCors(),created_at:a.string().allow(""),description:a.string().allow(""),domain:n.Domain(),domains:a.array().items(n.Domain()),favicon:n.SecureUrl(),is_active:a.boolean(),is_internal:a.boolean(),logo:n.SecureUrl(),meta:a.array().items(n.ApplicationMeta()),mobile_logo:n.SecureUrl(),name:a.string().allow(""),owner:a.string().allow(""),redirections:a.array().items(n.ApplicationRedirections()),token:a.string().allow(""),updated_at:a.string().allow(""),website:n.ApplicationWebsite()})}static ApplicationAuth(){return a.object({enabled:a.boolean()})}static ApplicationCors(){return a.object({domains:a.array().items(a.string().allow(""))})}static ApplicationMeta(){return a.object({name:a.string().allow(""),value:a.string().allow("")})}static ApplicationRedirections(){return a.object({redirect_from:a.string().allow(""),redirect_to:a.string().allow(""),type:a.string().allow("")})}static ApplicationResponse(){return a.object({application:n.Application()})}static ApplicationWebsite(){return a.object({basepath:a.string().allow(""),enabled:a.boolean()})}static BadRequest(){return a.object({message:a.string().allow("")})}static Domain(){return a.object({_id:a.string().allow(""),is_predefined:a.boolean(),is_primary:a.boolean(),is_shortlink:a.boolean(),name:a.string().allow(""),verified:a.boolean()})}static LocationCountry(){return a.object({__v:a.number(),_id:a.string().allow(""),capital:a.string().allow(""),country_code:a.string().allow(""),currency:a.string().allow(""),default_currency:n.LocationDefaultCurrency(),default_language:n.LocationDefaultLanguage(),iso2:a.string().allow(""),iso3:a.string().allow(""),latitude:a.string().allow(""),longitude:a.string().allow(""),name:a.string().allow(""),parent:a.string().allow(""),phone_code:a.string().allow(""),state_code:a.string().allow(""),type:a.string().allow(""),uid:a.number()})}static LocationDefaultCurrency(){return a.object({code:a.string().allow(""),name:a.string().allow(""),symbol:a.string().allow("")})}static LocationDefaultLanguage(){return a.object({code:a.string().allow(""),name:a.string().allow("")})}static Locations(){return a.object({items:a.array().items(n.LocationCountry())})}static NotFound(){return a.object({message:a.string().allow("")})}static SecureUrl(){return a.object({secure_url:a.string().allow("")})}}e.exports=n},9692:(e,t,r)=>{const a=r(2705);r(1844),e.exports=class{static getLocations(){return a.object({locationType:a.string().allow(""),id:a.string().allow("")})}static searchApplication(){return a.object({authorization:a.string().allow(""),query:a.string().allow("")})}}},4113:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(5471)),l=r(4752),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getCommunicationConsent({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getCommunicationConsent().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getCommunicationConsent().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Communication > getCommunicationConsent \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getCommunicationConsent,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.CommunicationConsent().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Communication > getCommunicationConsent \n ${g}`})}return d}async upsertAppPushtoken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.upsertAppPushtoken().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.upsertAppPushtoken().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Communication > upsertAppPushtoken \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.upsertAppPushtoken,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PushtokenRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Communication > upsertAppPushtoken \n ${m}`})}return p}async upsertCommunicationConsent({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.upsertCommunicationConsent().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.upsertCommunicationConsent().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Communication > upsertCommunicationConsent \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.upsertCommunicationConsent,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CommunicationConsentRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Communication > upsertCommunicationConsent \n ${m}`})}return p}}},4752:(e,t,r)=>{const a=r(2705);class n{static BadRequestSchema(){return a.object({message:a.string().allow(""),status:a.string().allow("")})}static CommunicationConsent(){return a.object({app_id:a.string().allow(""),channels:n.CommunicationConsentChannels(),user_id:a.string().allow("")})}static CommunicationConsentChannels(){return a.object({email:n.CommunicationConsentChannelsEmail(),sms:n.CommunicationConsentChannelsSms(),whatsapp:n.CommunicationConsentChannelsWhatsapp()})}static CommunicationConsentChannelsEmail(){return a.object({display_name:a.string().allow(""),response:a.string().allow("")})}static CommunicationConsentChannelsSms(){return a.object({display_name:a.string().allow(""),response:a.string().allow("")})}static CommunicationConsentChannelsWhatsapp(){return a.object({country_code:a.string().allow(""),display_name:a.string().allow(""),phone_number:a.string().allow(""),response:a.string().allow("")})}static CommunicationConsentReq(){return a.object({action:a.string().allow(""),channel:a.string().allow(""),response:a.string().allow("")})}static CommunicationConsentRes(){return a.object({app_id:a.string().allow(""),channels:n.CommunicationConsentChannels(),user_id:a.string().allow("")})}static PushtokenReq(){return a.object({action:a.string().allow(""),bundle_identifier:a.string().allow(""),push_token:a.string().allow(""),type:a.string().allow(""),unique_device_id:a.string().allow("")})}static PushtokenRes(){return a.object({_id:a.string().allow(""),application_id:a.string().allow(""),bundle_identifier:a.string().allow(""),created_at:a.string().allow(""),expired_at:a.string().allow(""),platform:a.string().allow(""),push_token:a.string().allow(""),type:a.string().allow(""),unique_device_id:a.string().allow(""),updated_at:a.string().allow(""),user_id:a.string().allow("")})}}e.exports=n},5471:(e,t,r)=>{const a=r(2705),n=r(4752);e.exports=class{static getCommunicationConsent(){return a.object({})}static upsertAppPushtoken(){return a.object({body:n.PushtokenReq().required()}).required()}static upsertCommunicationConsent(){return a.object({body:n.CommunicationConsentReq().required()}).required()}}},5970:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=r(3589),l=r(473),c=r(4328),{Logger:u}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAppCurrencies({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getAppCurrencies().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getAppCurrencies().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getAppCurrencies \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getAppCurrencies,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.AppCurrencyResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getAppCurrencies \n ${g}`})}return d}async getAppStaffList({pageNo:e,pageSize:t,orderIncent:r,orderingStore:i,user:d,userName:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=l.getAppStaffList().validate({pageNo:e,pageSize:t,orderIncent:r,orderingStore:i,user:d,userName:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=l.getAppStaffList().validate({pageNo:e,pageSize:t,orderIncent:r,orderingStore:i,user:d,userName:p},{abortEarly:!1,allowUnknown:!1});f&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getAppStaffList \n ${f}`});const y={};y.page_no=e,y.page_size=t,y.order_incent=r,y.ordering_store=i,y.user=d,y.user_name=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getAppStaffList,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=c.AppStaffListResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getAppStaffList \n ${_}`})}return b}getAppStaffListPaginator({pageSize:e,orderIncent:t,orderingStore:r,user:a,userName:n}={}){const o=new i;return o.setCallback((async()=>{o.nextId;const s=o.pageNo,i=await this.getAppStaffList({pageNo:s,pageSize:e,orderIncent:t,orderingStore:r,user:a,userName:n});return o.setPaginator({hasNext:!!i.page.has_next,nextId:i.page.next_id}),i}).bind(this)),o}async getAppStaffs({orderIncent:e,orderingStore:t,user:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getAppStaffs().validate({orderIncent:e,orderingStore:t,user:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getAppStaffs().validate({orderIncent:e,orderingStore:t,user:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getAppStaffs \n ${g}`});const m={};m.order_incent=e,m.ordering_store=t,m.user=r;const w=await a.execute(this._conf,"get",s({url:this._urls.getAppStaffs,params:{}}),m,void 0,{...i},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=c.AppStaffResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getAppStaffs \n ${y}`})}return w}async getApplication({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getApplication().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getApplication().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getApplication \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getApplication,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.Application().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getApplication \n ${g}`})}return d}async getBasicDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getBasicDetails().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getBasicDetails().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getBasicDetails \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getBasicDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ApplicationDetail().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getBasicDetails \n ${g}`})}return d}async getContactInfo({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getContactInfo().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getContactInfo().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getContactInfo \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getContactInfo,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ApplicationInformation().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getContactInfo \n ${g}`})}return d}async getCurrencies({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getCurrencies().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getCurrencies().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getCurrencies \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getCurrencies,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.CurrenciesResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getCurrencies \n ${g}`})}return d}async getCurrencyById({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getCurrencyById().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getCurrencyById().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getCurrencyById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCurrencyById,params:{id:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.Currency().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getCurrencyById \n ${m}`})}return p}async getFeatures({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getFeatures().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getFeatures().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getFeatures \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getFeatures,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.AppFeatureResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getFeatures \n ${g}`})}return d}async getIntegrationTokens({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getIntegrationTokens().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getIntegrationTokens().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getIntegrationTokens \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getIntegrationTokens,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.AppTokenResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getIntegrationTokens \n ${g}`})}return d}async getLanguages({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getLanguages().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getLanguages().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getLanguages \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getLanguages,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.LanguageResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getLanguages \n ${g}`})}return d}async getOrderingStoreCookie({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getOrderingStoreCookie().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getOrderingStoreCookie().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getOrderingStoreCookie \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getOrderingStoreCookie,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.SuccessMessageResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getOrderingStoreCookie \n ${m}`})}return p}async getOrderingStores({pageNo:e,pageSize:t,q:r,requestHeaders:i}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=l.getOrderingStores().validate({pageNo:e,pageSize:t,q:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=l.getOrderingStores().validate({pageNo:e,pageSize:t,q:r},{abortEarly:!1,allowUnknown:!1});g&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getOrderingStores \n ${g}`});const m={};m.page_no=e,m.page_size=t,m.q=r;const w=await a.execute(this._conf,"get",s({url:this._urls.getOrderingStores,params:{}}),m,void 0,{...i},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=c.OrderingStores().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getOrderingStores \n ${y}`})}return w}getOrderingStoresPaginator({pageSize:e,q:t}={}){const r=new i;return r.setCallback((async()=>{r.nextId;const a=r.pageNo,n=await this.getOrderingStores({pageNo:a,pageSize:e,q:t});return r.setPaginator({hasNext:!!n.page.has_next,nextId:n.page.next_id}),n}).bind(this)),r}async getOwnerInfo({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getOwnerInfo().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getOwnerInfo().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getOwnerInfo \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getOwnerInfo,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ApplicationAboutResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getOwnerInfo \n ${g}`})}return d}async getStoreDetailById({storeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getStoreDetailById().validate({storeId:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getStoreDetailById().validate({storeId:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > getStoreDetailById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getStoreDetailById,params:{storeId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.OrderingStore().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > getStoreDetailById \n ${m}`})}return p}async removeOrderingStoreCookie({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.removeOrderingStoreCookie().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.removeOrderingStoreCookie().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Configuration > removeOrderingStoreCookie \n ${i}`});const d=await a.execute(this._conf,"delete",s({url:this._urls.removeOrderingStoreCookie,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.SuccessMessageResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Configuration > removeOrderingStoreCookie \n ${g}`})}return d}}},4328:(e,t,r)=>{const a=r(2705);class n{static Android(){return a.object({api_key:a.string().allow(""),application_id:a.string().allow("")})}static AppCurrencyResponse(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),created_at:a.string().allow(""),default_currency:n.DefaultCurrency(),modified_at:a.string().allow(""),supported_currency:a.array().items(n.Currency())})}static AppFeature(){return a.object({__v:a.number(),_id:a.string().allow(""),app:a.string().allow(""),cart:n.CartFeature(),common:n.CommonFeature(),created_at:a.string().allow(""),home_page:n.HomePageFeature(),landing_page:n.LandingPageFeature(),modified_at:a.string().allow(""),order:n.OrderFeature(),pcr:n.PcrFeature(),product_detail:n.ProductDetailFeature(),qr:n.QrFeature(),registration_page:n.RegistrationPageFeature()})}static AppFeatureResponse(){return a.object({feature:n.AppFeature()})}static Application(){return a.object({__v:a.number(),_id:a.string().allow(""),app_type:a.string().allow(""),auth:n.ApplicationAuth(),banner:n.SecureUrl(),cache_ttl:a.number(),channel_type:a.string().allow(""),company_id:a.number(),cors:n.ApplicationCors(),created_at:a.string().allow(""),description:a.string().allow(""),domain:n.Domain(),domains:a.array().items(n.Domain()),favicon:n.SecureUrl(),is_active:a.boolean(),is_internal:a.boolean(),logo:n.SecureUrl(),meta:a.array().items(n.ApplicationMeta()),mobile_logo:n.SecureUrl(),mode:a.string().allow(""),modified_at:a.string().allow(""),name:a.string().allow(""),owner:a.string().allow(""),redirections:a.array().items(n.ApplicationRedirections()),slug:a.string().allow(""),status:a.string().allow(""),token:a.string().allow(""),tokens:a.array().items(n.TokenSchema()),website:n.ApplicationWebsite()})}static ApplicationAboutResponse(){return a.object({application_info:n.ApplicationInfo()})}static ApplicationAuth(){return a.object({enabled:a.boolean()})}static ApplicationCors(){return a.object({domains:a.array().items(a.string().allow(""))})}static ApplicationDetail(){return a.object({_id:a.string().allow(""),banner:n.SecureUrl(),company_id:a.number(),description:a.string().allow(""),domain:n.Domain(),domains:a.array().items(n.Domain()),favicon:n.SecureUrl(),logo:n.SecureUrl(),mobile_logo:n.SecureUrl(),name:a.string().allow("").required(),slug:a.string().allow("")})}static ApplicationInfo(){return a.object({_id:a.string().allow(""),banner:n.SecureUrl(),company_info:n.CompanyInfo(),cors:n.ApplicationCors(),created_at:a.string().allow(""),description:a.string().allow(""),domain:n.Domain(),domains:a.array().items(n.Domain()),favicon:n.SecureUrl(),is_active:a.boolean(),logo:n.SecureUrl(),meta:a.array().items(n.ApplicationMeta()),mobile_logo:n.SecureUrl(),mode:a.string().allow(""),name:a.string().allow(""),owner_info:n.OwnerInfo(),secret:a.string().allow(""),slug:a.string().allow(""),token:a.string().allow(""),tokens:a.array().items(n.TokenSchema()),website:n.ApplicationWebsite()})}static ApplicationInformation(){return a.object({__v:a.number(),_id:a.string().allow(""),address:n.InformationAddress(),application:a.string().allow(""),business_highlights:a.array().items(n.BusinessHighlights()),copyright_text:a.string().allow(""),created_at:a.string().allow(""),links:a.array().items(n.Links()),modified_at:a.string().allow(""),social_links:n.SocialLinks(),support:n.InformationSupport()})}static ApplicationMeta(){return a.object({name:a.string().allow(""),value:a.string().allow("")})}static ApplicationRedirections(){return a.object({redirect_from:a.string().allow(""),redirect_to:a.string().allow(""),type:a.string().allow("")})}static ApplicationWebsite(){return a.object({basepath:a.string().allow(""),enabled:a.boolean()})}static AppStaff(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),employee_code:a.string().allow(""),first_name:a.string().allow(""),last_name:a.string().allow(""),order_incent:a.boolean(),profile_pic_url:a.string().allow(""),stores:a.array().items(a.number()),title:a.string().allow(""),user:a.string().allow("")})}static AppStaffListResponse(){return a.object({items:a.array().items(n.AppStaff()),page:n.Page()})}static AppStaffResponse(){return a.object({staff_users:a.array().items(n.AppStaff())})}static AppTokenResponse(){return a.object({__v:a.number(),_id:a.string().allow(""),application:a.string().allow(""),created_at:a.string().allow(""),modified_at:a.string().allow(""),tokens:n.Tokens()})}static BlogLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static BusinessHighlights(){return a.object({_id:a.string().allow(""),icon:a.string().allow(""),sub_title:a.string().allow(""),title:a.string().allow("")})}static CartFeature(){return a.object({google_map:a.boolean(),gst_input:a.boolean(),placing_for_customer:a.boolean(),revenue_engine_coupon:a.boolean(),staff_selection:a.boolean()})}static CommonFeature(){return a.object({communication_optin_dialog:n.CommunicationOptinDialogFeature(),compare_products:n.CompareProductsFeature(),currency:n.CurrencyFeature(),deployment_store_selection:n.DeploymentStoreSelectionFeature(),feedback:n.FeedbackFeature(),international_shipping:n.InternationalShipping(),listing_page:n.ListingPageFeature(),listing_price:n.ListingPriceFeature(),revenue_engine:n.RevenueEngineFeature(),reward_points:n.RewardPointsConfig()})}static CommunicationOptinDialogFeature(){return a.object({visibility:a.boolean()})}static CompanyAboutAddress(){return a.object({address_type:a.string().allow(""),address1:a.string().allow(""),address2:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),pincode:a.number(),state:a.string().allow("")})}static CompanyInfo(){return a.object({_id:a.string().allow(""),addresses:a.array().items(n.CompanyAboutAddress()),created_on:a.string().allow(""),is_active:a.boolean(),name:a.string().allow(""),notification_emails:a.array().items(a.string().allow("")),uid:a.number()})}static CompareProductsFeature(){return a.object({enabled:a.boolean()})}static Credentials(){return a.object({android:n.Android(),api_key:a.string().allow(""),application_id:a.string().allow(""),gcm_sender_id:a.string().allow(""),ios:n.Ios(),project_id:a.string().allow("")})}static Credit(){return a.object({enabled:a.boolean()})}static CurrenciesResponse(){return a.object({items:a.array().items(n.Currency())})}static Currency(){return a.object({_id:a.string().allow(""),code:a.string().allow(""),country_code:a.string().allow(""),country_name:a.string().allow(""),created_at:a.string().allow(""),decimal_digits:a.number(),is_active:a.boolean(),modified_at:a.string().allow(""),name:a.string().allow(""),symbol:a.string().allow("")})}static CurrencyFeature(){return a.object({default_currency:a.string().allow(""),type:a.string().allow(""),value:a.array().items(a.string().allow(""))})}static Debit(){return a.object({auto_apply:a.boolean(),enabled:a.boolean(),strategy_channel:a.string().allow("")})}static DefaultCurrency(){return a.object({code:a.string().allow(""),ref:a.string().allow("")})}static DeploymentStoreSelectionFeature(){return a.object({enabled:a.boolean(),type:a.string().allow("")})}static Domain(){return a.object({_id:a.string().allow(""),is_predefined:a.boolean(),is_primary:a.boolean(),is_shortlink:a.boolean(),name:a.string().allow(""),verified:a.boolean()})}static FacebookLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static FeedbackFeature(){return a.object({enabled:a.boolean()})}static Firebase(){return a.object({credentials:n.Credentials(),enabled:a.boolean()})}static Freshchat(){return a.object({credentials:n.FreshchatCredentials(),enabled:a.boolean()})}static FreshchatCredentials(){return a.object({app_id:a.string().allow(""),app_key:a.string().allow(""),web_token:a.string().allow("")})}static FyndRewards(){return a.object({credentials:n.FyndRewardsCredentials()})}static FyndRewardsCredentials(){return a.object({public_key:a.string().allow("")})}static GoogleMap(){return a.object({credentials:n.GoogleMapCredentials()})}static GoogleMapCredentials(){return a.object({api_key:a.string().allow("")})}static GooglePlusLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static Gtm(){return a.object({credentials:n.GtmCredentials(),enabled:a.boolean()})}static GtmCredentials(){return a.object({api_key:a.string().allow("")})}static HomePageFeature(){return a.object({order_processing:a.boolean()})}static InformationAddress(){return a.object({address_line:a.array().items(a.string().allow("")),city:a.string().allow(""),country:a.string().allow(""),loc:n.InformationLoc(),phone:a.array().items(n.InformationPhone()),pincode:a.number()})}static InformationLoc(){return a.object({coordinates:a.array().items(a.number()),type:a.string().allow("")})}static InformationPhone(){return a.object({code:a.string().allow(""),number:a.string().allow("")})}static InformationSupport(){return a.object({email:a.array().items(n.InformationSupportEmail()),phone:a.array().items(n.InformationSupportPhone()),timing:a.string().allow("")})}static InformationSupportEmail(){return a.object({key:a.string().allow(""),value:a.string().allow("")})}static InformationSupportPhone(){return a.object({code:a.string().allow(""),key:a.string().allow(""),number:a.string().allow("")})}static InstagramLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static InternationalShipping(){return a.object({enabled:a.boolean()})}static InvalidPayloadRequest(){return a.object({message:a.string().allow("")})}static Ios(){return a.object({api_key:a.string().allow(""),application_id:a.string().allow("")})}static LandingPageFeature(){return a.object({continue_as_guest:a.boolean(),launch_page:n.LaunchPage(),login_btn_text:a.string().allow(""),show_domain_textbox:a.boolean(),show_register_btn:a.boolean()})}static LanguageResponse(){return a.object({items:a.array().items(n.SupportedLanguage())})}static LaunchPage(){return a.object({page_type:a.string().allow(""),params:a.any(),query:a.any()})}static LinkedInLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static Links(){return a.object({link:a.string().allow(""),title:a.string().allow("")})}static ListingPageFeature(){return a.object({sort_on:a.string().allow("")})}static ListingPriceFeature(){return a.object({sort:a.string().allow(""),value:a.string().allow("")})}static Moengage(){return a.object({credentials:n.MoengageCredentials(),enabled:a.boolean()})}static MoengageCredentials(){return a.object({app_id:a.string().allow("")})}static NotFound(){return a.object({message:a.string().allow("")})}static OptedStoreAddress(){return a.object({address1:a.string().allow(""),address2:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),lat_long:n.StoreLatLong(),pincode:a.number(),state:a.string().allow("")})}static OrderFeature(){return a.object({buy_again:a.boolean()})}static OrderingStore(){return a.object({_id:a.string().allow(""),address:n.OptedStoreAddress(),code:a.string().allow(""),display_name:a.string().allow(""),name:a.string().allow(""),pincode:a.number(),store_code:a.string().allow(""),store_type:a.string().allow(""),uid:a.number()})}static OrderingStores(){return a.object({__v:a.number(),_id:a.string().allow(""),all_stores:a.boolean(),app:a.string().allow(""),deployed_stores:a.array().items(a.number()),enabled:a.boolean(),items:a.array().items(n.OrderingStore()),page:n.Page(),type:a.string().allow("")})}static OrderingStoreSelect(){return a.object({uid:a.number().required()})}static OrderingStoreSelectRequest(){return a.object({ordering_store:n.OrderingStoreSelect().required()})}static OwnerInfo(){return a.object({_id:a.string().allow(""),emails:a.array().items(n.UserEmail()),first_name:a.string().allow(""),last_name:a.string().allow(""),phone_numbers:a.array().items(n.UserPhoneNumber()),profile_pic:a.string().allow("")})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static PcrFeature(){return a.object({staff_selection:a.boolean()})}static PinterestLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static ProductDetailFeature(){return a.object({request_product:a.boolean(),seller_selection:a.boolean(),similar:a.array().items(a.string().allow("")),update_product_meta:a.boolean()})}static QrFeature(){return a.object({application:a.boolean(),collections:a.boolean(),products:a.boolean()})}static RegistrationPageFeature(){return a.object({ask_store_address:a.boolean()})}static RevenueEngineFeature(){return a.object({enabled:a.boolean()})}static RewardPointsConfig(){return a.object({credit:n.Credit(),debit:n.Debit()})}static Safetynet(){return a.object({credentials:n.SafetynetCredentials(),enabled:a.boolean()})}static SafetynetCredentials(){return a.object({api_key:a.string().allow("")})}static SecureUrl(){return a.object({secure_url:a.string().allow("")})}static Segment(){return a.object({credentials:n.SegmentCredentials(),enabled:a.boolean()})}static SegmentCredentials(){return a.object({write_key:a.string().allow("")})}static SocialLinks(){return a.object({blog_link:n.BlogLink(),facebook:n.FacebookLink(),google_plus:n.GooglePlusLink(),instagram:n.InstagramLink(),linked_in:n.LinkedInLink(),pinterest:n.PinterestLink(),twitter:n.TwitterLink(),vimeo:n.VimeoLink(),youtube:n.YoutubeLink()})}static StoreLatLong(){return a.object({coordinates:a.array().items(a.number()),type:a.string().allow("")})}static SuccessMessageResponse(){return a.object({message:a.string().allow("")})}static SupportedLanguage(){return a.object({code:a.string().allow(""),name:a.string().allow("")})}static Tokens(){return a.object({firebase:n.Firebase(),freshchat:n.Freshchat(),fynd_rewards:n.FyndRewards(),google_map:n.GoogleMap(),gtm:n.Gtm(),moengage:n.Moengage(),safetynet:n.Safetynet(),segment:n.Segment()})}static TokenSchema(){return a.object({created_at:a.string().allow(""),created_by:a.object().pattern(/\S/,a.any()),token:a.string().allow("")})}static TwitterLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static UnhandledError(){return a.object({message:a.string().allow("")})}static UserEmail(){return a.object({active:a.boolean(),email:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static UserPhoneNumber(){return a.object({active:a.boolean(),country_code:a.number(),phone:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static VimeoLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}static YoutubeLink(){return a.object({icon:a.string().allow(""),link:a.string().allow(""),title:a.string().allow("")})}}e.exports=n},473:(e,t,r)=>{const a=r(2705),n=r(4328);e.exports=class{static getAppCurrencies(){return a.object({})}static getAppStaffList(){return a.object({pageNo:a.number(),pageSize:a.number(),orderIncent:a.boolean(),orderingStore:a.number(),user:a.string().allow(""),userName:a.string().allow("")})}static getAppStaffs(){return a.object({orderIncent:a.boolean(),orderingStore:a.number(),user:a.string().allow("")})}static getApplication(){return a.object({})}static getBasicDetails(){return a.object({})}static getContactInfo(){return a.object({})}static getCurrencies(){return a.object({})}static getCurrencyById(){return a.object({id:a.string().allow("").required()}).required()}static getFeatures(){return a.object({})}static getIntegrationTokens(){return a.object({})}static getLanguages(){return a.object({})}static getOrderingStoreCookie(){return a.object({body:n.OrderingStoreSelectRequest().required()}).required()}static getOrderingStores(){return a.object({pageNo:a.number(),pageSize:a.number(),q:a.string().allow("")})}static getOwnerInfo(){return a.object({})}static getStoreDetailById(){return a.object({storeId:a.number().required()}).required()}static removeOrderingStoreCookie(){return a.object({})}}},4976:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=r(3589),l=r(8207),c=r(3377),{Logger:u}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAnnouncements({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getAnnouncements().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getAnnouncements().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getAnnouncements \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getAnnouncements,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.AnnouncementsResponseSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getAnnouncements \n ${g}`})}return d}async getBlog({slug:e,rootId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getBlog().validate({slug:e,rootId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getBlog().validate({slug:e,rootId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getBlog \n ${p}`});const g={};g.root_id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getBlog,params:{slug:e}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.BlogSchema().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Content > getBlog \n ${f}`})}return m}async getBlogs({pageNo:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getBlogs().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getBlogs().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getBlogs \n ${p}`});const g={};g.page_no=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getBlogs,params:{}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.BlogGetResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Content > getBlogs \n ${f}`})}return m}getBlogsPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{t.nextId;const r=t.pageNo,a=await this.getBlogs({pageNo:r,pageSize:e});return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getCustomFields({resource:e,resourceId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getCustomFields().validate({resource:e,resourceId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getCustomFields().validate({resource:e,resourceId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getCustomFields \n ${p}`});const g=await a.execute(this._conf,"get",s({url:this._urls.getCustomFields,params:{resource:e,resourceId:t}}),{},void 0,{...r},{responseHeaders:i});let m=g;i&&(m=g[0]);const{error:w}=c.CustomFieldsResponseByResourceIdSchema().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));u({level:"WARN",message:`Response Validation Warnings for application > Content > getCustomFields \n ${w}`})}return g}async getCustomObject({metaobjectId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getCustomObject().validate({metaobjectId:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getCustomObject().validate({metaobjectId:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getCustomObject \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCustomObject,params:{metaobjectId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.CustomObjectByIdSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Content > getCustomObject \n ${m}`})}return p}async getDataLoaders({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getDataLoaders().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getDataLoaders().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getDataLoaders \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getDataLoaders,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.DataLoadersSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getDataLoaders \n ${g}`})}return d}async getFaqBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getFaqBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getFaqBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getFaqBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.FaqSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqBySlug \n ${m}`})}return p}async getFaqCategories({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getFaqCategories().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getFaqCategories().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqCategories \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getFaqCategories,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.GetFaqCategoriesSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqCategories \n ${g}`})}return d}async getFaqCategoryBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getFaqCategoryBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getFaqCategoryBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqCategoryBySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getFaqCategoryBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.GetFaqCategoryBySlugSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqCategoryBySlug \n ${m}`})}return p}async getFaqs({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getFaqs().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getFaqs().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqs \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getFaqs,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.FaqResponseSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqs \n ${g}`})}return d}async getFaqsByCategorySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getFaqsByCategorySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getFaqsByCategorySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getFaqsByCategorySlug \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getFaqsByCategorySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.GetFaqSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Content > getFaqsByCategorySlug \n ${m}`})}return p}async getLandingPage({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getLandingPage().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getLandingPage().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getLandingPage \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getLandingPage,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.LandingPageSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getLandingPage \n ${g}`})}return d}async getLegalInformation({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getLegalInformation().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getLegalInformation().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getLegalInformation \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getLegalInformation,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ApplicationLegal().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getLegalInformation \n ${g}`})}return d}async getNavigations({pageNo:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getNavigations().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getNavigations().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getNavigations \n ${p}`});const g={};g.page_no=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getNavigations,params:{}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.NavigationGetResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Content > getNavigations \n ${f}`})}return m}getNavigationsPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{t.nextId;const r=t.pageNo,a=await this.getNavigations({pageNo:r,pageSize:e});return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getPage({slug:e,rootId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getPage().validate({slug:e,rootId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getPage().validate({slug:e,rootId:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getPage \n ${p}`});const g={};g.root_id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getPage,params:{slug:e}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.PageSchema().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Content > getPage \n ${f}`})}return m}async getPages({pageNo:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getPages().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getPages().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getPages \n ${p}`});const g={};g.page_no=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getPages,params:{}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.PageGetResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Content > getPages \n ${f}`})}return m}getPagesPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{t.nextId;const r=t.pageNo,a=await this.getPages({pageNo:r,pageSize:e});return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getSEOConfiguration({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getSEOConfiguration().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getSEOConfiguration().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getSEOConfiguration \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getSEOConfiguration,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.SeoComponent().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getSEOConfiguration \n ${g}`})}return d}async getSEOMarkupSchemas({pageType:e,active:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getSEOMarkupSchemas().validate({pageType:e,active:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getSEOMarkupSchemas().validate({pageType:e,active:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getSEOMarkupSchemas \n ${p}`});const g={};g.page_type=e,g.active=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getSEOMarkupSchemas,params:{}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.SeoSchemaComponent().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Content > getSEOMarkupSchemas \n ${f}`})}return m}async getSlideshow({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getSlideshow().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getSlideshow().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getSlideshow \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getSlideshow,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.SlideshowSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Content > getSlideshow \n ${m}`})}return p}async getSlideshows({pageNo:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getSlideshows().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getSlideshows().validate({pageNo:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getSlideshows \n ${p}`});const g={};g.page_no=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getSlideshows,params:{}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.SlideshowGetResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Content > getSlideshows \n ${f}`})}return m}getSlideshowsPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{t.nextId;const r=t.pageNo,a=await this.getSlideshows({pageNo:r,pageSize:e});return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getSupportInformation({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getSupportInformation().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getSupportInformation().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getSupportInformation \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getSupportInformation,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.Support().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getSupportInformation \n ${g}`})}return d}async getTags({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getTags().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getTags().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Content > getTags \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getTags,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.TagsSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Content > getTags \n ${g}`})}return d}}},3377:(e,t,r)=>{const a=r(2705);class n{static Action(){return a.object({page:n.ActionPage(),popup:n.ActionPage(),type:a.string().allow("")})}static ActionPage(){return a.object({params:a.object().pattern(/\S/,a.array().items(a.string().allow(""))),query:a.object().pattern(/\S/,a.array().items(a.string().allow(""))),type:n.PageType().required(),url:a.string().allow("")})}static AnnouncementSchema(){return a.object({announcement:a.string().allow(""),schedule:n.ScheduleStartSchema()})}static AnnouncementsResponseSchema(){return a.object({announcements:a.object().pattern(/\S/,a.array().items(n.AnnouncementSchema())),refresh_pages:a.array().items(a.string().allow("")),refresh_rate:a.number()})}static ApplicationLegal(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),created_at:a.string().allow(""),faq:a.array().items(n.ApplicationLegalFAQ()),policy:a.string().allow(""),returns:a.string().allow(""),shipping:a.string().allow(""),tnc:a.string().allow(""),updated_at:a.string().allow("")})}static ApplicationLegalFAQ(){return a.object({answer:a.string().allow(""),question:a.string().allow("")})}static Asset(){return a.object({aspect_ratio:a.string().allow(""),id:a.string().allow(""),secure_url:a.string().allow("")})}static Author(){return a.object({designation:a.string().allow(""),id:a.string().allow(""),name:a.string().allow("")})}static BlogGetResponse(){return a.object({items:a.array().items(n.BlogSchema()),page:n.Page()})}static BlogSchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),_schedule:n.CronSchedule(),application:a.string().allow(""),archived:a.boolean(),author:n.Author(),content:a.array().items(n.ResourceContent()),date_meta:n.DateMeta(),feature_image:n.Asset(),published:a.boolean(),reading_time:a.string().allow(""),seo:n.SEO(),slug:a.string().allow(""),tags:a.array().items(a.string().allow("")),title:a.string().allow("")})}static CategorySchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),application:a.string().allow(""),children:a.array().items(a.string().allow("")),description:a.string().allow(""),icon_url:a.string().allow(""),index:a.number(),slug:a.string().allow(""),title:a.string().allow("")})}static ChildrenSchema(){return a.object({_id:a.string().allow(""),answer:a.string().allow(""),application:a.string().allow(""),question:a.string().allow(""),slug:a.string().allow("")})}static CommonError(){return a.object({message:a.string().allow("")})}static ConfigurationSchema(){return a.object({duration:a.number(),sleep_time:a.number(),slide_direction:a.string().allow(""),start_on_launch:a.boolean()})}static ContactSchema(){return a.object({email:n.EmailSchema(),phone:n.PhoneSchema()})}static ContentAPIError(){return a.object({code:a.string().allow(""),exception:a.string().allow(""),info:a.string().allow(""),message:a.string().allow(""),meta:a.any(),request_id:a.string().allow(""),stack_trace:a.string().allow(""),status:a.number()})}static CreatedBySchema(){return a.object({id:a.string().allow("")})}static CronSchedule(){return a.object({cron:a.string().allow(""),duration:a.number(),end:a.string().allow(""),start:a.string().allow("")})}static CustomFieldSchema(){return a.object({_id:a.string().allow(""),application_id:a.string().allow(""),company_id:a.string().allow(""),created_at:a.string().allow(""),created_by:a.string().allow(""),creator:a.string().allow(""),definition_id:a.string().allow(""),has_invalid_values:a.boolean(),invalid_value_errors:a.array().items(a.any()),is_deleted:a.boolean(),key:a.string().allow(""),multi_value:a.boolean(),namespace:a.string().allow(""),resource:a.string().allow(""),resource_id:a.string().allow(""),type:a.string().allow(""),updated_at:a.string().allow(""),value:a.array().items(n.CustomFieldValue())})}static CustomFieldsResponseByResourceIdSchema(){return a.object({items:a.array().items(n.CustomFieldSchema())})}static CustomFieldValue(){return a.object({value:a.any()})}static CustomMetaTag(){return a.object({_id:a.string().allow(""),content:a.string().allow(""),name:a.string().allow("")})}static CustomObjectByIdSchema(){return a.object({_id:a.string().allow(""),definition:n.CustomObjectListItemDefinationSchema(),display_name:a.string().allow(""),fields:a.array().items(n.CustomObjectFieldSchema()),references:a.array().items(a.any()),status:a.string().allow("")})}static CustomObjectFieldSchema(){return a.object({_id:a.string().allow(""),definition_id:a.string().allow(""),key:a.string().allow(""),type:a.string().allow(""),value:a.array().items(n.CustomObjectFieldValue())})}static CustomObjectFieldValue(){return a.object({value:a.any()})}static CustomObjectListItemDefinationSchema(){return a.object({_id:a.string().allow(""),name:a.string().allow(""),type:a.string().allow("")})}static DataLoaderSchema(){return a.object({__source:n.DataLoaderSourceSchema(),_id:a.string().allow(""),content:a.string().allow(""),name:a.string().allow(""),operation_id:a.string().allow(""),service:a.string().allow(""),type:a.string().allow(""),url:a.string().allow("")})}static DataLoaderSourceSchema(){return a.object({id:a.string().allow(""),type:a.string().allow("")})}static DataLoadersSchema(){return a.object({items:a.array().items(n.DataLoaderSchema())})}static DateMeta(){return a.object({created_on:a.string().allow(""),modified_on:a.string().allow("")})}static Detail(){return a.object({description:a.string().allow(""),image_url:a.string().allow(""),title:a.string().allow("")})}static EmailProperties(){return a.object({key:a.string().allow(""),value:a.string().allow("")})}static EmailSchema(){return a.object({active:a.boolean(),email:a.array().items(n.EmailProperties())})}static FAQCategorySchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),application:a.string().allow(""),children:a.array().items(n.ChildrenSchema()),description:a.string().allow(""),icon_url:a.string().allow(""),index:a.number(),slug:a.string().allow(""),title:a.string().allow("")})}static FaqResponseSchema(){return a.object({faqs:a.array().items(n.FaqSchema())})}static FaqSchema(){return a.object({_id:a.string().allow(""),answer:a.string().allow(""),application:a.string().allow(""),question:a.string().allow(""),slug:a.string().allow(""),tags:a.array().items(a.string().allow(""))})}static GetFaqCategoriesSchema(){return a.object({categories:a.array().items(n.CategorySchema())})}static GetFaqCategoryBySlugSchema(){return a.object({category:n.FAQCategorySchema()})}static GetFaqSchema(){return a.object({faqs:a.array().items(n.FaqSchema())})}static LandingPageSchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),action:n.Action(),application:a.string().allow(""),archived:a.boolean(),created_by:n.CreatedBySchema(),date_meta:n.DateMeta(),platform:a.array().items(a.string().allow("")),slug:a.string().allow("")})}static Language(){return a.object({display:a.string().allow("")})}static LocaleLanguage(){return a.object({ar:n.Language(),en_us:n.Language(),hi:n.Language()})}static NavigationGetResponse(){return a.object({items:a.array().items(n.NavigationSchema()),page:n.Page()})}static NavigationReference(){return a.object({_locale_language:n.LocaleLanguage(),acl:a.array().items(a.string().allow("")),action:n.Action(),active:a.boolean(),display:a.string().allow(""),image:a.string().allow(""),sort_order:a.number(),sub_navigation:a.array().items(a.link("#NavigationReference")),tags:a.array().items(a.string().allow("")),type:a.string().allow("")}).id("NavigationReference")}static NavigationSchema(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),archived:a.boolean(),created_by:n.CreatedBySchema(),date_meta:n.DateMeta(),name:a.string().allow(""),navigation:a.array().items(n.NavigationReference()),orientation:n.Orientation(),platform:a.array().items(a.string().allow("")),slug:a.string().allow(""),version:a.number()})}static NextSchedule(){return a.object({end:a.string().allow(""),start:a.string().allow("")})}static Orientation(){return a.object({landscape:a.array().items(a.string().allow("")),portrait:a.array().items(a.string().allow(""))})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static PageGetResponse(){return a.object({items:a.array().items(n.PageSchema()),page:n.Page()})}static PageSchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),_schedule:n.ScheduleSchema(),application:a.string().allow(""),archived:a.boolean(),component_ids:a.array().items(a.string().allow("")),content:a.array().items(a.any()),content_path:a.string().allow(""),created_by:n.CreatedBySchema(),date_meta:n.DateMeta(),description:a.string().allow(""),feature_image:n.Asset(),orientation:a.string().allow(""),page_meta:a.array().items(a.any()),platform:a.string().allow(""),published:a.boolean(),seo:n.SEO(),slug:a.string().allow(""),tags:a.array().items(a.string().allow("")),title:a.string().allow(""),type:a.string().allow(""),visibility:a.any()})}static PhoneProperties(){return a.object({code:a.string().allow(""),key:a.string().allow(""),number:a.string().allow("")})}static PhoneSchema(){return a.object({active:a.boolean(),phone:a.array().items(n.PhoneProperties())})}static ResourceContent(){return a.object({type:a.string().allow(""),value:a.string().allow("")})}static ScheduleSchema(){return a.object({cron:a.string().allow(""),duration:a.number(),end:a.string().allow(""),next_schedule:a.array().items(n.NextSchedule()),start:a.string().allow("")})}static ScheduleStartSchema(){return a.object({end:a.string().allow(""),start:a.string().allow("")})}static SEO(){return a.object({breadcrumb:a.array().items(n.SEObreadcrumb()),canonical_url:a.string().allow(""),description:a.string().allow(""),image:n.SEOImage(),meta_tags:a.array().items(n.SEOMetaItem()),sitemap:n.SEOSitemap(),title:a.string().allow("")})}static SEObreadcrumb(){return a.object({action:n.Action(),url:a.string().allow("")})}static SeoComponent(){return a.object({seo:n.SeoSchema()})}static SEOImage(){return a.object({url:a.string().allow("")})}static SEOMetaItem(){return a.object({items:a.array().items(n.SEOMetaItems()),title:a.string().allow("")})}static SEOMetaItems(){return a.object({key:a.string().allow(""),value:a.string().allow("")})}static SeoSchema(){return a.object({_id:a.string().allow(""),additonal_sitemap:a.string().allow(""),app:a.string().allow(""),cannonical_enabled:a.boolean(),created_at:a.string().allow(""),custom_meta_tags:a.array().items(n.CustomMetaTag()),details:n.Detail(),robots_txt:a.string().allow(""),sitemap_enabled:a.boolean(),updated_at:a.string().allow("")})}static SeoSchemaComponent(){return a.object({items:a.array().items(n.SEOSchemaMarkupTemplate())})}static SEOSchemaMarkupTemplate(){return a.object({active:a.boolean(),application:a.string().allow(""),created_at:a.string().allow(""),description:a.string().allow(""),id:a.string().allow(""),page_type:a.string().allow(""),schema:a.string().allow(""),title:a.string().allow(""),updated_at:a.string().allow("")})}static SEOSitemap(){return a.object({frequency:a.string().allow(""),priority:a.number()})}static SlideshowGetResponse(){return a.object({items:a.array().items(n.SlideshowSchema()),page:n.Page()})}static SlideshowMedia(){return a.object({action:n.Action(),auto_decide_duration:a.boolean(),bg_color:a.string().allow(""),duration:a.number(),type:a.string().allow(""),url:a.string().allow("")})}static SlideshowSchema(){return a.object({_custom_json:a.any(),_id:a.string().allow(""),active:a.boolean(),application:a.string().allow(""),archived:a.boolean(),configuration:n.ConfigurationSchema(),date_meta:n.DateMeta(),media:a.array().items(n.SlideshowMedia()),platform:a.string().allow(""),slug:a.string().allow("")})}static Support(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),config_type:a.string().allow(""),contact:n.ContactSchema(),created:a.boolean(),created_at:a.string().allow(""),updated_at:a.string().allow("")})}static TagSchema(){return a.object({__source:n.TagSourceSchema(),_id:a.string().allow(""),attributes:a.any(),content:a.string().allow(""),name:a.string().allow(""),pages:a.array().items(a.any()),position:a.string().allow(""),sub_type:a.string().allow(""),type:a.string().allow(""),url:a.string().allow("")})}static TagSourceSchema(){return a.object({id:a.string().allow(""),type:a.string().allow("")})}static TagsSchema(){return a.object({_id:a.string().allow(""),application:a.string().allow(""),tags:a.array().items(n.TagSchema())})}static PageType(){return a.string().valid("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")}}e.exports=n},8207:(e,t,r)=>{const a=r(2705);r(3377),e.exports=class{static getAnnouncements(){return a.object({})}static getBlog(){return a.object({slug:a.string().allow("").required(),rootId:a.string().allow("")}).required()}static getBlogs(){return a.object({pageNo:a.number(),pageSize:a.number()})}static getCustomFields(){return a.object({resource:a.string().allow("").required(),resourceId:a.string().allow("").required()}).required()}static getCustomObject(){return a.object({metaobjectId:a.string().allow("").required()}).required()}static getDataLoaders(){return a.object({})}static getFaqBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getFaqCategories(){return a.object({})}static getFaqCategoryBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getFaqs(){return a.object({})}static getFaqsByCategorySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getLandingPage(){return a.object({})}static getLegalInformation(){return a.object({})}static getNavigations(){return a.object({pageNo:a.number(),pageSize:a.number()})}static getPage(){return a.object({slug:a.string().allow("").required(),rootId:a.string().allow("")}).required()}static getPages(){return a.object({pageNo:a.number(),pageSize:a.number()})}static getSEOConfiguration(){return a.object({})}static getSEOMarkupSchemas(){return a.object({pageType:a.string().allow(""),active:a.boolean()})}static getSlideshow(){return a.object({slug:a.string().allow("").required()}).required()}static getSlideshows(){return a.object({pageNo:a.number(),pageSize:a.number()})}static getSupportInformation(){return a.object({})}static getTags(){return a.object({})}}},8568:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(2601)),l=r(5108),{Logger:c}=r(7378),u=(r(2705),r(9669));class d{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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async completeUpload({namespace:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.completeUpload().validate({namespace:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.completeUpload().validate({namespace:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > FileStorage > completeUpload \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.completeUpload,params:{namespace:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.CompleteResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > FileStorage > completeUpload \n ${w}`})}return g}async signUrls({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.signUrls().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.signUrls().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > FileStorage > signUrls \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.signUrls,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SignUrlResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > FileStorage > signUrls \n ${m}`})}return p}async startUpload({namespace:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.startUpload().validate({namespace:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.startUpload().validate({namespace:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > FileStorage > startUpload \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.startUpload,params:{namespace:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.StartResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > FileStorage > startUpload \n ${w}`})}return g}}d.prototype.upload=function({data:e,file_name:t,content_type:r,namespace:a,size:n,tags:o}={}){return new Promise((async(s,i)=>{try{const l=await this.startUpload({namespace:a,body:{file_name:t,content_type:r,size:n,tags:o}});l.upload&&l.upload.url?await u.put(l.upload.url,e,{withCredentials:!1,headers:{"Content-Type":r}}):i({message:"Failed to upload file"}),delete l.tags,s(await this.completeUpload({namespace:a,body:l}))}catch(e){i(e)}}))},e.exports=d},5108:(e,t,r)=>{const a=r(2705);class n{static CDN(){return a.object({absolute_url:a.string().allow("").required(),relative_url:a.string().allow("").required(),url:a.string().allow("").required()})}static CompleteResponse(){return a.object({_id:a.string().allow("").required(),cdn:n.CDN().required(),content_type:a.string().allow("").required(),created_by:n.CreatedBy(),created_on:a.string().allow("").required(),file_name:a.string().allow("").required(),file_path:a.string().allow("").required(),modified_on:a.string().allow("").required(),namespace:a.string().allow("").required(),operation:a.string().allow("").required(),size:a.number().required(),success:a.boolean().required(),tags:a.array().items(a.string().allow("")),upload:n.Upload().required()})}static CreatedBy(){return a.object({username:a.string().allow("")})}static Params(){return a.object({subpath:a.string().allow("")})}static SignUrlRequest(){return a.object({expiry:a.number().required(),urls:a.array().items(a.string().allow("")).required()})}static SignUrlResponse(){return a.object({urls:a.array().items(n.Urls()).required()})}static StartRequest(){return a.object({content_type:a.string().allow("").required(),file_name:a.string().allow("").required(),params:n.Params(),size:a.number().required(),tags:a.array().items(a.string().allow(""))})}static StartResponse(){return a.object({cdn:n.CDN().required(),content_type:a.string().allow("").required(),file_name:a.string().allow("").required(),file_path:a.string().allow("").required(),method:a.string().allow(""),namespace:a.string().allow("").required(),operation:a.string().allow("").required(),size:a.number().required(),tags:a.array().items(a.string().allow("")),upload:n.Upload().required()})}static Upload(){return a.object({expiry:a.number().required(),url:a.string().allow("").required()})}static Urls(){return a.object({expiry:a.number().required(),signed_url:a.string().allow("").required(),url:a.string().allow("").required()})}}e.exports=n},2601:(e,t,r)=>{const a=r(2705),n=r(5108);e.exports=class{static completeUpload(){return a.object({namespace:a.string().allow("").required(),body:n.StartResponse().required()}).required()}static signUrls(){return a.object({body:n.SignUrlRequest().required()}).required()}static startUpload(){return a.object({namespace:a.string().allow("").required(),body:n.StartRequest().required()}).required()}}},562:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(2821)),l=r(4535),{Logger:c}=r(7378);r(2705),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}",getParticipantsInsideVideoRoom:"/service/application/lead/v1.0/video/room/{unique_name}/participants",getTicket:"/service/application/lead/v1.0/ticket/{id}",getTokenForVideoRoom:"/service/application/lead/v1.0/video/room/{unique_name}/token",submitCustomForm:"/service/application/lead/v1.0/form/{slug}/submit"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async createHistory({id:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.createHistory().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.createHistory().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > createHistory \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.createHistory,params:{id:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.TicketHistory().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Lead > createHistory \n ${w}`})}return g}async createTicket({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.createTicket().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.createTicket().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > createTicket \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.createTicket,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.Ticket().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > createTicket \n ${m}`})}return p}async getCustomForm({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCustomForm().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCustomForm().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > getCustomForm \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCustomForm,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CustomForm().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > getCustomForm \n ${m}`})}return p}async getParticipantsInsideVideoRoom({uniqueName:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getParticipantsInsideVideoRoom().validate({uniqueName:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getParticipantsInsideVideoRoom().validate({uniqueName:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > getParticipantsInsideVideoRoom \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getParticipantsInsideVideoRoom,params:{uniqueName:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetParticipantsInsideVideoRoomResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > getParticipantsInsideVideoRoom \n ${m}`})}return p}async getTicket({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getTicket().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getTicket().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > getTicket \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getTicket,params:{id:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.Ticket().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > getTicket \n ${m}`})}return p}async getTokenForVideoRoom({uniqueName:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getTokenForVideoRoom().validate({uniqueName:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getTokenForVideoRoom().validate({uniqueName:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > getTokenForVideoRoom \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getTokenForVideoRoom,params:{uniqueName:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetTokenForVideoRoomResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Lead > getTokenForVideoRoom \n ${m}`})}return p}async submitCustomForm({slug:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.submitCustomForm().validate({slug:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.submitCustomForm().validate({slug:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Lead > submitCustomForm \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.submitCustomForm,params:{slug:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.SubmitCustomFormResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Lead > submitCustomForm \n ${w}`})}return g}}},4535:(e,t,r)=>{const a=r(2705);class n{static AddTicketPayload(){return a.object({_custom_json:a.any(),category:a.string().allow("").required(),content:n.TicketContent().required(),created_by:a.any(),priority:n.PriorityEnum(),status:a.string().allow(""),subscribers:a.array().items(a.string().allow(""))})}static CreatedOn(){return a.object({user_agent:a.string().allow("").required()})}static CustomForm(){return a.object({_id:a.string().allow("").required(),application_id:a.string().allow("").required(),created_on:n.CreatedOn(),description:a.string().allow(""),header_image:a.string().allow(""),inputs:a.array().items(a.any()).required(),login_required:a.boolean().required(),poll_for_assignment:n.PollForAssignment(),priority:n.Priority().required(),should_notify:a.boolean().required(),slug:a.string().allow("").required(),submit_button:n.SubmitButton(),success_message:a.string().allow(""),title:a.string().allow("").required()})}static CustomFormSubmissionPayload(){return a.object({attachments:a.array().items(n.TicketAsset()),response:a.array().items(a.any()).required()})}static Debug(){return a.object({platform:a.string().allow(""),source:a.string().allow("")})}static Email(){return a.object({active:a.boolean(),email:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static FeedbackForm(){return a.object({inputs:a.any(),timestamps:a.any(),title:a.string().allow("")})}static GetParticipantsInsideVideoRoomResponse(){return a.object({participants:a.array().items(n.Participant()).required()})}static GetTokenForVideoRoomResponse(){return a.object({access_token:a.string().allow("").required()})}static Participant(){return a.object({identity:a.string().allow(""),status:a.string().allow(""),user:n.UserSchema()})}static PhoneNumber(){return a.object({active:a.boolean(),country_code:a.number(),phone:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static PollForAssignment(){return a.object({duration:a.number().required(),failure_message:a.string().allow("").required(),message:a.string().allow("").required(),success_message:a.string().allow("").required()})}static Priority(){return a.object({color:a.string().allow("").required(),display:a.string().allow("").required(),key:n.PriorityEnum().required()})}static Status(){return a.object({color:a.string().allow("").required(),display:a.string().allow("").required(),key:a.string().allow("").required()})}static SubmitButton(){return a.object({background_color:a.string().allow("").required(),title:a.string().allow("").required(),title_color:a.string().allow("").required()})}static SubmitCustomFormResponse(){return a.object({message:a.string().allow("").required(),ticket:n.Ticket()})}static Ticket(){return a.object({_custom_json:a.any(),_id:a.string().allow("").required(),assigned_to:a.any(),category:n.TicketCategory().required(),content:n.TicketContent(),context:n.TicketContext(),created_at:a.string().allow(""),created_by:a.any(),created_on:n.CreatedOn(),integration:a.any(),is_feedback_pending:a.boolean(),priority:n.Priority().required(),response_id:a.string().allow(""),source:n.TicketSourceEnum().required(),status:n.Status().required(),sub_category:a.string().allow(""),tags:a.array().items(a.string().allow("")),updated_at:a.string().allow("")})}static TicketAsset(){return a.object({display:a.string().allow(""),type:n.TicketAssetTypeEnum().required(),value:a.string().allow("").required()})}static TicketCategory(){return a.object({display:a.string().allow("").required(),feedback_form:n.FeedbackForm(),group_id:a.number(),key:a.string().allow("").required(),sub_categories:a.link("#TicketCategory")}).id("TicketCategory")}static TicketContent(){return a.object({attachments:a.array().items(n.TicketAsset()),description:a.string().allow(""),title:a.string().allow("").required()})}static TicketContext(){return a.object({application_id:a.string().allow(""),company_id:a.string().allow("").required()})}static TicketHistory(){return a.object({_id:a.string().allow("").required(),created_at:a.string().allow(""),created_by:a.any(),created_on:n.CreatedOn(),ticket_id:a.string().allow("").required(),type:a.string().allow("").required(),updated_at:a.string().allow(""),value:a.any().required()})}static TicketHistoryPayload(){return a.object({type:n.HistoryTypeEnum().required(),value:a.any().required()})}static UserSchema(){return a.object({_id:a.string().allow(""),account_type:a.string().allow(""),active:a.boolean(),application_id:a.string().allow(""),created_at:a.string().allow(""),dob:a.string().allow(""),emails:a.array().items(n.Email()),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),meta:a.any(),phone_numbers:a.array().items(n.PhoneNumber()),profile_pic_url:a.string().allow(""),updated_at:a.string().allow(""),user_id:a.string().allow(""),username:a.string().allow("")})}static HistoryTypeEnum(){return a.string().valid("rating","log","comment","thread")}static PriorityEnum(){return a.string().valid("low","medium","high","urgent")}static TicketAssetTypeEnum(){return a.string().valid("image","video","file","youtube","product","collection","brand","shipment","order")}static TicketSourceEnum(){return a.string().valid("platform_panel","sales_channel")}}e.exports=n},2821:(e,t,r)=>{const a=r(2705),n=r(4535);e.exports=class{static createHistory(){return a.object({id:a.string().allow("").required(),body:n.TicketHistoryPayload().required()}).required()}static createTicket(){return a.object({body:n.AddTicketPayload().required()}).required()}static getCustomForm(){return a.object({slug:a.string().allow("").required()}).required()}static getParticipantsInsideVideoRoom(){return a.object({uniqueName:a.string().allow("").required()}).required()}static getTicket(){return a.object({id:a.string().allow("").required()}).required()}static getTokenForVideoRoom(){return a.object({uniqueName:a.string().allow("").required()}).required()}static submitCustomForm(){return a.object({slug:a.string().allow("").required(),body:n.CustomFormSubmissionPayload().required()}).required()}}},4203:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(8745)),l=r(9541),{Logger:c}=r(7378);r(2705),e.exports=class{constructor(e){this._conf=e,this._relativeUrls={getAllCountries:"/service/application/logistics/v1.0/country-list",getCountries:"/service/application/logistics/v1.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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAllCountries({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getAllCountries().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getAllCountries().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getAllCountries \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getAllCountries,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.CountryListResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getAllCountries \n ${g}`})}return d}async getCountries({onboarding:e,pageNo:t,pageSize:r,q:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getCountries().validate({onboarding:e,pageNo:t,pageSize:r,q:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getCountries().validate({onboarding:e,pageNo:t,pageSize:r,q:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getCountries \n ${m}`});const w={};w.onboarding=e,w.page_no=t,w.page_size=r,w.q=u;const f=await a.execute(this._conf,"get",s({url:this._urls.getCountries,params:{}}),w,void 0,{...d},{responseHeaders:p});let y=f;p&&(y=f[0]);const{error:b}=l.GetCountries().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getCountries \n ${b}`})}return f}async getCountry({countryIsoCode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCountry().validate({countryIsoCode:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCountry().validate({countryIsoCode:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getCountry \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCountry,params:{countryIsoCode:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetCountry().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getCountry \n ${m}`})}return p}async getLocalities({localityType:e,country:t,state:r,city:u,pageNo:d,pageSize:p,q:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:f}=i.getLocalities().validate({localityType:e,country:t,state:r,city:u,pageNo:d,pageSize:p,q:g},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:y}=i.getLocalities().validate({localityType:e,country:t,state:r,city:u,pageNo:d,pageSize:p,q:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getLocalities \n ${y}`});const b={};b.country=t,b.state=r,b.city=u,b.page_no=d,b.page_size=p,b.q=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getLocalities,params:{localityType:e}}),b,void 0,{...m},{responseHeaders:w});let _=h;w&&(_=h[0]);const{error:v}=l.GetLocalities().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getLocalities \n ${v}`})}return h}async getLocality({localityType:e,localityValue:t,country:r,state:u,city:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.getLocality().validate({localityType:e,localityValue:t,country:r,state:u,city:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:w}=i.getLocality().validate({localityType:e,localityValue:t,country:r,state:u,city:d},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getLocality \n ${w}`});const f={};f.country=r,f.state=u,f.city=d;const y=await a.execute(this._conf,"get",s({url:this._urls.getLocality,params:{localityType:e,localityValue:t}}),f,void 0,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.GetLocality().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getLocality \n ${h}`})}return y}async getLocations({xApplicationId:e,xApplicationData:t,country:r,state:u,city:d,pincode:p,sector:g,pageNo:m,pageSize:w,requestHeaders:f}={requestHeaders:{}},{responseHeaders:y}={responseHeaders:!1}){const{error:b}=i.getLocations().validate({xApplicationId:e,xApplicationData:t,country:r,state:u,city:d,pincode:p,sector:g,pageNo:m,pageSize:w},{abortEarly:!1,allowUnknown:!0});if(b)return Promise.reject(new n(b));const{error:h}=i.getLocations().validate({xApplicationId:e,xApplicationData:t,country:r,state:u,city:d,pincode:p,sector:g,pageNo:m,pageSize:w},{abortEarly:!1,allowUnknown:!1});h&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getLocations \n ${h}`});const _={};_["x-application-id"]=e,_["x-application-data"]=t,_.country=r,_.state=u,_.city=d,_.pincode=p,_.sector=g,_.page_no=m,_.page_size=w;const v=await a.execute(this._conf,"get",s({url:this._urls.getLocations,params:{}}),_,void 0,{...f},{responseHeaders:y});let k=v;y&&(k=v[0]);const{error:R}=l.GetStoreResponse().validate(k,{abortEarly:!1,allowUnknown:!0});if(R){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(R));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getLocations \n ${R}`})}return v}async getOptimalLocations({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getOptimalLocations().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getOptimalLocations().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getOptimalLocations \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getOptimalLocations,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ReAssignStoreResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getOptimalLocations \n ${m}`})}return p}async getPincodeCity({pincode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPincodeCity().validate({pincode:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPincodeCity().validate({pincode:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getPincodeCity \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getPincodeCity,params:{pincode:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PincodeApiResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getPincodeCity \n ${m}`})}return p}async getPincodeZones({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPincodeZones().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPincodeZones().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getPincodeZones \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getPincodeZones,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetZoneFromPincodeViewResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getPincodeZones \n ${m}`})}return p}async getTatProduct({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getTatProduct().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getTatProduct().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > getTatProduct \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getTatProduct,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.TATViewResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > getTatProduct \n ${m}`})}return p}async validateAddress({countryIsoCode:e,templateName:t,body:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.validateAddress().validate({countryIsoCode:e,templateName:t,body:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.validateAddress().validate({countryIsoCode:e,templateName:t,body:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > Logistic > validateAddress \n ${g}`});const m=await a.execute(this._conf,"post",s({url:this._urls.validateAddress,params:{countryIsoCode:e,templateName:t}}),{},r,{...u},{responseHeaders:d});let w=m;d&&(w=m[0]);const{error:f}=l.ValidateAddressRequest().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Logistic > validateAddress \n ${f}`})}return m}}},9541:(e,t,r)=>{const a=r(2705);class n{static CountryEntityResponse(){return a.object({display_name:a.string().allow(""),is_active:a.boolean(),logistics:n.LogisticsResponse(),meta:n.CountryMetaResponse(),name:a.string().allow(""),parent_id:a.string().allow(""),sub_type:a.string().allow(""),type:a.string().allow(""),uid:a.string().allow("")})}static CountryHierarchy(){return a.object({name:a.string().allow(""),slug:a.string().allow("")})}static CountryListResponse(){return a.object({results:a.array().items(n.CountryEntityResponse())})}static CountryMetaResponse(){return a.object({country_code:a.string().allow(""),isd_code:a.string().allow("")})}static CountryObject(){return a.object({currency:n.CurrencyObject(),display_name:a.string().allow(""),hierarchy:a.array().items(n.CountryHierarchy()),id:a.string().allow(""),iso2:a.string().allow(""),iso3:a.string().allow(""),latitude:a.string().allow(""),longitude:a.string().allow(""),name:a.string().allow(""),phone_code:a.string().allow(""),timezones:a.array().items(a.string().allow("")),type:a.string().allow("")})}static CurrencyObject(){return a.object({code:a.string().allow(""),name:a.string().allow(""),symbol:a.string().allow("")})}static DP(){return a.object({area_code:a.string().allow("").allow(null),assign_dp_from_sb:a.boolean(),external_account_id:a.string().allow("").allow(null),fm_priority:a.number().required(),internal_account_id:a.string().allow(""),lm_priority:a.number().required(),operations:a.array().items(a.string().allow("")).required(),payment_mode:a.string().allow("").required(),rvp_priority:a.number().required(),transport_mode:a.string().allow("")})}static ErrorResponse(){return a.object({error:a.string().allow("")})}static FieldValidation(){return a.object({regex:n.FieldValidationRegex(),type:a.string().allow("")})}static FieldValidationRegex(){return a.object({length:n.LengthValidation(),value:a.string().allow("")})}static GetCountries(){return a.object({items:a.array().items(n.CountryObject()),page:n.Page()})}static GetCountry(){return a.object({currency:n.CurrencyObject(),display_name:a.string().allow(""),fields:n.GetCountryFields(),hierarchy:a.array().items(n.CountryHierarchy()),id:a.string().allow(""),iso2:a.string().allow(""),iso3:a.string().allow(""),latitude:a.string().allow(""),longitude:a.string().allow(""),name:a.string().allow(""),phone_code:a.string().allow(""),timezones:a.array().items(a.string().allow("")),type:a.string().allow("")})}static GetCountryFields(){return a.object({address:a.array().items(n.GetCountryFieldsAddress()).required(),address_template:n.GetCountryFieldsAddressTemplate().required(),serviceability_fields:a.array().items(a.string().allow("")).required()})}static GetCountryFieldsAddress(){return a.object({display_name:a.string().allow("").required(),edit:a.boolean(),error_text:a.string().allow("").allow(null),input:a.string().allow("").required(),required:a.boolean().required(),slug:a.string().allow("").required(),validation:n.FieldValidation(),values:n.GetCountryFieldsAddressValues()})}static GetCountryFieldsAddressTemplate(){return a.object({checkout_form:a.string().allow("").required(),default_display:a.string().allow("").required(),store_os_form:a.string().allow("").required()})}static GetCountryFieldsAddressValues(){return a.object({get_all:n.GetOneOrAll(),get_one:n.GetOneOrAll()})}static GetLocalities(){return a.object({items:a.array().items(n.Localities()),page:n.Page()})}static GetLocality(){return a.object({display_name:a.string().allow(""),id:a.string().allow(""),localities:a.array().items(n.LocalityParent()),name:a.string().allow(""),parent_ids:a.array().items(a.string().allow("")),type:a.string().allow("")})}static GetOneOrAll(){return a.object({operation_id:a.string().allow(""),params:n.GetOneOrAllParams()})}static GetOneOrAllParams(){return a.object({path:n.GetOneOrAllPath(),query:n.GetOneOrAllQuery()})}static GetOneOrAllPath(){return a.object({locality_type:a.string().allow(""),locality_value:a.string().allow("")})}static GetOneOrAllQuery(){return a.object({city:a.string().allow("").allow(null),country:a.string().allow("").allow(null),sector:a.string().allow("").allow(null),state:a.string().allow("").allow(null)})}static GetStoreResponse(){return a.object({items:a.array().items(n.StoreItemResponse()),page:n.Page()})}static GetZoneFromPincodeViewRequest(){return a.object({country:a.string().allow("").required(),pincode:a.string().allow("").required()})}static GetZoneFromPincodeViewResponse(){return a.object({serviceability_type:a.string().allow("").required(),zones:a.array().items(a.string().allow("")).required()})}static LengthValidation(){return a.object({max:a.number().allow(null),min:a.number().allow(null)})}static Localities(){return a.object({display_name:a.string().allow(""),id:a.string().allow(""),name:a.string().allow(""),parent_ids:a.array().items(a.string().allow("")),type:a.string().allow("")})}static LocalityParent(){return a.object({display_name:a.string().allow(""),id:a.string().allow(""),name:a.string().allow(""),parent_ids:a.array().items(a.string().allow("")),type:a.string().allow("")})}static LogisticsResponse(){return a.object({dp:a.object().pattern(/\S/,n.DP())})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static PincodeApiResponse(){return a.object({data:a.array().items(n.PincodeDataResponse()),error:n.PincodeErrorSchemaResponse().required(),success:a.boolean().required()})}static PincodeDataResponse(){return a.object({display_name:a.string().allow(""),error:n.PincodeErrorSchemaResponse().required(),lat_long:n.PincodeLatLongData(),meta:n.PincodeMetaResponse(),meta_code:n.CountryMetaResponse(),name:a.string().allow(""),parents:a.array().items(n.PincodeParentsResponse()),sub_type:a.string().allow(""),uid:a.string().allow("")})}static PincodeErrorSchemaResponse(){return a.object({message:a.string().allow("").allow(null),type:a.string().allow("").allow(null),value:a.string().allow("").allow(null)})}static PincodeLatLongData(){return a.object({coordinates:a.array().items(a.string().allow("")),type:a.string().allow("")})}static PincodeMetaResponse(){return a.object({internal_zone_id:a.number(),zone:a.string().allow("")})}static PincodeParentsResponse(){return a.object({display_name:a.string().allow(""),name:a.string().allow(""),sub_type:a.string().allow(""),uid:a.string().allow("")})}static ReAssignStoreRequest(){return a.object({articles:a.array().items(a.any()).required(),configuration:a.any().required(),identifier:a.string().allow("").required(),ignored_locations:a.array().items(a.number()).required(),to_pincode:a.string().allow("").required()})}static ReAssignStoreResponse(){return a.object({assigned_stores:a.array().items(a.any()),error:a.any().required(),pystormbreaker_uuid:a.string().allow("").required(),success:a.boolean().required(),to_pincode:a.string().allow("").required()})}static StoreItemResponse(){return a.object({company_id:a.number(),fulfillment_type:a.string().allow(""),id:a.number(),latitude:a.number(),longitude:a.number(),processing_time:a.number(),store_type:a.string().allow(""),tags:a.array().items(a.string().allow(""))})}static TATArticlesRequest(){return a.object({category:n.TATCategoryRequest(),manufacturing_time:a.number(),manufacturing_time_unit:a.string().allow("")})}static TATArticlesResponse(){return a.object({_manufacturing_time_seconds:a.number(),category:n.TATCategoryRequest(),error:n.TATErrorSchemaResponse(),is_cod_available:a.boolean(),manufacturing_time:a.number(),manufacturing_time_unit:a.string().allow(""),promise:n.TATPromiseResponse()})}static TATCategoryRequest(){return a.object({id:a.number(),level:a.string().allow("")})}static TATErrorSchemaResponse(){return a.object({message:a.string().allow("").allow(null),type:a.string().allow("").allow(null),value:a.string().allow("").allow(null)})}static TATFormattedResponse(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static TATLocationDetailsRequest(){return a.object({articles:a.array().items(n.TATArticlesRequest()),from_pincode:a.string().allow(""),fulfillment_id:a.number()})}static TATLocationDetailsResponse(){return a.object({articles:a.array().items(n.TATArticlesResponse()),from_pincode:a.string().allow(""),fulfillment_id:a.number()})}static TATPromiseResponse(){return a.object({formatted:n.TATFormattedResponse(),timestamp:n.TATTimestampResponse()})}static TATTimestampResponse(){return a.object({max:a.number(),min:a.number()})}static TATViewRequest(){return a.object({action:a.string().allow(""),identifier:a.string().allow(""),journey:a.string().allow(""),location_details:a.array().items(n.TATLocationDetailsRequest()),source:a.string().allow(""),to_pincode:a.string().allow("")})}static TATViewResponse(){return a.object({action:a.string().allow(""),error:n.TATErrorSchemaResponse(),identifier:a.string().allow(""),is_cod_available:a.boolean(),journey:a.string().allow(""),location_details:a.array().items(n.TATLocationDetailsResponse()),payment_mode:a.string().allow(""),request_uuid:a.string().allow(""),source:a.string().allow(""),stormbreaker_uuid:a.string().allow(""),success:a.boolean(),to_city:a.string().allow(""),to_pincode:a.string().allow("")})}static ValidateAddressRequest(){return a.object({address:a.string().allow(""),address1:a.string().allow(""),address2:a.string().allow(""),area:a.string().allow(""),city:a.string().allow(""),email:a.string().allow(""),landmark:a.string().allow(""),name:a.string().allow(""),phone:a.string().allow(""),pincode:a.string().allow(""),sector:a.string().allow(""),state:a.string().allow("")})}}e.exports=n},8745:(e,t,r)=>{const a=r(2705),n=r(9541);e.exports=class{static getAllCountries(){return a.object({})}static getCountries(){return a.object({onboarding:a.boolean(),pageNo:a.number(),pageSize:a.number(),q:a.string().allow("")})}static getCountry(){return a.object({countryIsoCode:a.string().allow("").required()}).required()}static getLocalities(){return a.object({localityType:a.string().allow("").required(),country:a.string().allow(""),state:a.string().allow(""),city:a.string().allow(""),pageNo:a.number(),pageSize:a.number(),q:a.string().allow("")}).required()}static getLocality(){return a.object({localityType:a.string().allow("").required(),localityValue:a.string().allow("").required(),country:a.string().allow(""),state:a.string().allow(""),city:a.string().allow("")}).required()}static getLocations(){return a.object({xApplicationId:a.string().allow("").required(),xApplicationData:a.string().allow("").required(),country:a.string().allow(""),state:a.string().allow(""),city:a.string().allow(""),pincode:a.number(),sector:a.string().allow(""),pageNo:a.number(),pageSize:a.number()}).required()}static getOptimalLocations(){return a.object({body:n.ReAssignStoreRequest().required()}).required()}static getPincodeCity(){return a.object({pincode:a.string().allow("").required()}).required()}static getPincodeZones(){return a.object({body:n.GetZoneFromPincodeViewRequest().required()}).required()}static getTatProduct(){return a.object({body:n.TATViewRequest().required()}).required()}static validateAddress(){return a.object({countryIsoCode:a.string().allow("").required(),templateName:a.string().allow("").required(),body:n.ValidateAddressRequest().required()}).required()}}},9171:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(8174)),l=r(2453),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getCustomerDetailsByShipmentId({orderId:e,shipmentId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getCustomerDetailsByShipmentId().validate({orderId:e,shipmentId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getCustomerDetailsByShipmentId().validate({orderId:e,shipmentId:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getCustomerDetailsByShipmentId \n ${p}`});const g=await a.execute(this._conf,"get",s({url:this._urls.getCustomerDetailsByShipmentId,params:{orderId:e,shipmentId:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.CustomerDetailsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Order > getCustomerDetailsByShipmentId \n ${w}`})}return g}async getInvoiceByShipmentId({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getInvoiceByShipmentId().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getInvoiceByShipmentId().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getInvoiceByShipmentId \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getInvoiceByShipmentId,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResponseGetInvoiceShipment().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > getInvoiceByShipmentId \n ${m}`})}return p}async getOrderById({orderId:e,allowInactive:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getOrderById().validate({orderId:e,allowInactive:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getOrderById().validate({orderId:e,allowInactive:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getOrderById \n ${p}`});const g={};g.allow_inactive=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getOrderById,params:{orderId:e}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.OrderById().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Order > getOrderById \n ${f}`})}return m}async getOrders({status:e,pageNo:t,pageSize:r,fromDate:u,toDate:d,startDate:p,endDate:g,customMeta:m,requestHeaders:w}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:y}=i.getOrders().validate({status:e,pageNo:t,pageSize:r,fromDate:u,toDate:d,startDate:p,endDate:g,customMeta:m},{abortEarly:!1,allowUnknown:!0});if(y)return Promise.reject(new n(y));const{error:b}=i.getOrders().validate({status:e,pageNo:t,pageSize:r,fromDate:u,toDate:d,startDate:p,endDate:g,customMeta:m},{abortEarly:!1,allowUnknown:!1});b&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getOrders \n ${b}`});const h={};h.status=e,h.page_no=t,h.page_size=r,h.from_date=u,h.to_date=d,h.start_date=p,h.end_date=g,h.custom_meta=m;const _=await a.execute(this._conf,"get",s({url:this._urls.getOrders,params:{}}),h,void 0,{...w},{responseHeaders:f});let v=_;f&&(v=_[0]);const{error:k}=l.OrderList().validate(v,{abortEarly:!1,allowUnknown:!0});if(k){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(k));c({level:"WARN",message:`Response Validation Warnings for application > Order > getOrders \n ${k}`})}return _}async getPosOrderById({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPosOrderById().validate({orderId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPosOrderById().validate({orderId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getPosOrderById \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getPosOrderById,params:{orderId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.OrderById().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > getPosOrderById \n ${m}`})}return p}async getShipmentBagReasons({shipmentId:e,bagId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getShipmentBagReasons().validate({shipmentId:e,bagId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getShipmentBagReasons().validate({shipmentId:e,bagId:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getShipmentBagReasons \n ${p}`});const g=await a.execute(this._conf,"get",s({url:this._urls.getShipmentBagReasons,params:{shipmentId:e,bagId:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.ShipmentBagReasons().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Order > getShipmentBagReasons \n ${w}`})}return g}async getShipmentById({shipmentId:e,allowInactive:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getShipmentById().validate({shipmentId:e,allowInactive:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getShipmentById().validate({shipmentId:e,allowInactive:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getShipmentById \n ${p}`});const g={};g.allow_inactive=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getShipmentById,params:{shipmentId:e}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.ShipmentById().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Order > getShipmentById \n ${f}`})}return m}async getShipmentReasons({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getShipmentReasons().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getShipmentReasons().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > getShipmentReasons \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getShipmentReasons,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShipmentReasons().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > getShipmentReasons \n ${m}`})}return p}async sendOtpToShipmentCustomer({orderId:e,shipmentId:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendOtpToShipmentCustomer().validate({orderId:e,shipmentId:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendOtpToShipmentCustomer().validate({orderId:e,shipmentId:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > sendOtpToShipmentCustomer \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.sendOtpToShipmentCustomer,params:{orderId:e,shipmentId:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.SendOtpToCustomerResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Order > sendOtpToShipmentCustomer \n ${w}`})}return g}async trackShipment({shipmentId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.trackShipment().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.trackShipment().validate({shipmentId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > trackShipment \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.trackShipment,params:{shipmentId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShipmentTrack().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Order > trackShipment \n ${m}`})}return p}async updateShipmentStatus({shipmentId:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateShipmentStatus().validate({shipmentId:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateShipmentStatus().validate({shipmentId:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > updateShipmentStatus \n ${p}`});const g=await a.execute(this._conf,"put",s({url:this._urls.updateShipmentStatus,params:{shipmentId:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.ShipmentApplicationStatusResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Order > updateShipmentStatus \n ${w}`})}return g}async verifyOtpShipmentCustomer({orderId:e,shipmentId:t,body:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.verifyOtpShipmentCustomer().validate({orderId:e,shipmentId:t,body:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.verifyOtpShipmentCustomer().validate({orderId:e,shipmentId:t,body:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > Order > verifyOtpShipmentCustomer \n ${g}`});const m=await a.execute(this._conf,"post",s({url:this._urls.verifyOtpShipmentCustomer,params:{orderId:e,shipmentId:t}}),{},r,{...u},{responseHeaders:d});let w=m;d&&(w=m[0]);const{error:f}=l.VerifyOtpResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Order > verifyOtpShipmentCustomer \n ${f}`})}return m}}},2453:(e,t,r)=>{const a=r(2705);class n{static ApefaceApiError(){return a.object({message:a.string().allow(""),success:a.boolean()})}static AppliedFreeArticles(){return a.object({article_id:a.string().allow(""),free_gift_item_details:a.any(),parent_item_identifier:a.string().allow(""),quantity:a.number()})}static AppliedPromos(){return a.object({amount:a.number(),applied_free_articles:a.array().items(n.AppliedFreeArticles()),article_quantity:a.number(),mrp_promotion:a.boolean(),promo_id:a.string().allow(""),promotion_name:a.string().allow(""),promotion_type:a.string().allow("")})}static BagReasonMeta(){return a.object({show_text_area:a.boolean()})}static BagReasons(){return a.object({display_name:a.string().allow(""),id:a.number(),meta:n.BagReasonMeta(),qc_type:a.array().items(a.string().allow("")),question_set:a.array().items(n.QuestionSet()),reasons:a.array().items(a.link("#BagReasons"))}).id("BagReasons")}static Bags(){return a.object({applied_promos:a.array().items(n.AppliedPromos()),can_cancel:a.boolean(),can_return:a.boolean(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),current_status:n.CurrentStatus(),delivery_date:a.string().allow("").allow(null),financial_breakup:a.array().items(n.FinancialBreakup()),id:a.number(),item:n.Item(),line_number:a.number(),meta:a.any(),parent_promo_bags:a.any(),prices:n.Prices(),quantity:a.number(),returnable_date:a.string().allow("").allow(null),seller_identifier:a.string().allow("")})}static BagsForReorder(){return a.object({article_assignment:n.BagsForReorderArticleAssignment(),item_id:a.number(),item_size:a.string().allow(""),quantity:a.number(),seller_id:a.number(),store_id:a.number()})}static BagsForReorderArticleAssignment(){return a.object({level:a.string().allow(""),strategy:a.string().allow("")})}static BreakupValues(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),display:a.string().allow(""),name:a.string().allow(""),value:a.number()})}static CurrentStatus(){return a.object({journey_type:a.string().allow("").allow(null),name:a.string().allow(""),status:a.string().allow(""),updated_at:a.string().allow("")})}static CustomerDetailsResponse(){return a.object({country:a.string().allow(""),name:a.string().allow(""),order_id:a.string().allow(""),phone:a.string().allow(""),shipment_id:a.string().allow("")})}static DataUpdates(){return a.object({entities:a.array().items(n.EntitiesDataUpdates()),products:a.array().items(n.ProductsDataUpdates())})}static DeliveryAddress(){return a.object({address:a.string().allow(""),address_category:a.string().allow(""),address_type:a.string().allow(""),address1:a.string().allow(""),address2:a.string().allow(""),area:a.string().allow(""),city:a.string().allow(""),contact_person:a.string().allow(""),country:a.string().allow(""),country_iso_code:a.string().allow(""),country_phone_code:a.string().allow(""),created_at:a.string().allow(""),email:a.string().allow(""),landmark:a.string().allow(""),latitude:a.number().allow(null),longitude:a.number().allow(null),name:a.string().allow(""),phone:a.string().allow(""),pincode:a.string().allow(""),state:a.string().allow(""),updated_at:a.string().allow(""),version:a.string().allow("")})}static EntitiesDataUpdates(){return a.object({data:a.any(),filters:a.array().items(a.any())})}static EntitiesReasons(){return a.object({data:n.EntityReasonData(),filters:a.array().items(a.any())})}static EntityReasonData(){return a.object({reason_id:a.number(),reason_text:a.string().allow("")})}static ErrorResponse(){return a.object({code:a.string().allow("").allow(null),exception:a.string().allow("").allow(null),message:a.string().allow("").allow(null),stack_trace:a.string().allow("").allow(null),status:a.number()})}static FinancialBreakup(){return a.object({added_to_fynd_cash:a.boolean(),amount_paid:a.number(),amount_paid_roundoff:a.number(),brand_calculated_amount:a.number(),cashback:a.number(),cashback_applied:a.number(),cod_charges:a.number(),coupon_effective_discount:a.number(),coupon_value:a.number(),delivery_charge:a.number(),discount:a.number(),fynd_credits:a.number(),gst_fee:a.number(),gst_tag:a.string().allow(""),gst_tax_percentage:a.number(),hsn_code:a.string().allow(""),identifiers:n.Identifiers(),item_name:a.string().allow(""),price_effective:a.number(),price_marked:a.number(),promotion_effective_discount:a.number(),refund_amount:a.number(),refund_credit:a.number(),size:a.string().allow(""),total_units:a.number(),transfer_price:a.number(),value_of_good:a.number()})}static FulfillingCompany(){return a.object({id:a.number(),name:a.string().allow("")})}static FulfillingStore(){return a.object({code:a.string().allow(""),company_id:a.number(),company_name:a.string().allow(""),id:a.number(),name:a.string().allow("")})}static Identifiers(){return a.object({ean:a.string().allow(""),sku_code:a.string().allow("")})}static Invoice(){return a.object({invoice_url:a.string().allow(""),label_url:a.string().allow(""),updated_date:a.string().allow("")})}static Item(){return a.object({attributes:a.object().pattern(/\S/,a.any()),brand:n.ItemBrand(),code:a.string().allow(""),id:a.number(),image:a.array().items(a.string().allow("")),l1_categories:a.array().items(a.string().allow("")),l2_categories:a.array().items(a.string().allow("")),l3_category_name:a.string().allow(""),name:a.string().allow(""),seller_identifier:a.string().allow(""),size:a.string().allow(""),slug_key:a.string().allow("")})}static ItemBrand(){return a.object({logo:a.string().allow(""),name:a.string().allow("")})}static NestedTrackingDetails(){return a.object({is_current:a.boolean(),is_passed:a.boolean(),status:a.string().allow(""),time:a.string().allow("")})}static OrderById(){return a.object({order:n.OrderSchema()})}static OrderFilters(){return a.object({statuses:a.array().items(n.OrderStatuses())})}static OrderList(){return a.object({filters:n.OrderFilters(),items:a.array().items(n.OrderSchema()),page:n.OrderPage()})}static OrderPage(){return a.object({current:a.number(),has_next:a.boolean(),item_total:a.number(),size:a.number(),type:a.string().allow("")})}static OrderSchema(){return a.object({bags_for_reorder:a.array().items(n.BagsForReorder()),breakup_values:a.array().items(n.BreakupValues()),order_created_time:a.string().allow(""),order_created_ts:a.string().allow(""),order_id:a.string().allow(""),shipments:a.array().items(n.Shipments()),total_shipments_in_order:a.number(),user_info:n.UserInfo()})}static OrderStatuses(){return a.object({display:a.string().allow(""),is_selected:a.boolean(),value:a.number()})}static Prices(){return a.object({added_to_fynd_cash:a.boolean(),amount_paid:a.number(),amount_paid_roundoff:a.number(),brand_calculated_amount:a.number(),cashback:a.number(),cashback_applied:a.number(),cod_charges:a.number(),coupon_effective_discount:a.number(),coupon_value:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),delivery_charge:a.number(),discount:a.number(),fynd_credits:a.number(),gst_tax_percentage:a.number(),price_effective:a.number(),price_marked:a.number(),promotion_effective_discount:a.number(),refund_amount:a.number(),refund_credit:a.number(),transfer_price:a.number(),value_of_good:a.number()})}static Products(){return a.object({identifier:a.string().allow(""),line_number:a.number(),quantity:a.number()})}static ProductsDataUpdates(){return a.object({data:a.any(),filters:a.array().items(n.ProductsDataUpdatesFilters())})}static ProductsDataUpdatesFilters(){return a.object({identifier:a.string().allow(""),line_number:a.number()})}static ProductsReasons(){return a.object({data:n.ProductsReasonsData(),filters:a.array().items(n.ProductsReasonsFilters())})}static ProductsReasonsData(){return a.object({reason_id:a.number(),reason_text:a.string().allow("")})}static ProductsReasonsFilters(){return a.object({identifier:a.string().allow(""),line_number:a.number(),quantity:a.number()})}static Promise(){return a.object({show_promise:a.boolean(),timestamp:n.TimeStampData()})}static QuestionSet(){return a.object({display_name:a.string().allow(""),id:a.number()})}static ReasonsData(){return a.object({entities:a.array().items(n.EntitiesReasons()),products:a.array().items(n.ProductsReasons())})}static ResponseGetInvoiceShipment(){return a.object({presigned_type:a.string().allow("").required(),presigned_url:a.string().allow("").required(),shipment_id:a.string().allow("").required(),success:a.boolean().required()})}static SendOtpToCustomerResponse(){return a.object({message:a.string().allow(""),request_id:a.string().allow(""),resend_timer:a.number(),success:a.boolean()})}static ShipmentApplicationStatusResponse(){return a.object({statuses:a.array().items(n.StatusesBodyResponse())})}static ShipmentBagReasons(){return a.object({reasons:a.array().items(n.BagReasons()),success:a.boolean()})}static ShipmentById(){return a.object({shipment:n.Shipments()})}static ShipmentPayment(){return a.object({display_name:a.string().allow(""),logo:a.string().allow(""),mode:a.string().allow(""),mop:a.string().allow(""),payment_mode:a.string().allow(""),status:a.string().allow("")})}static ShipmentReason(){return a.object({feedback_type:a.string().allow(""),flow:a.string().allow(""),priority:a.number(),reason_id:a.number(),reason_text:a.string().allow(""),show_text_area:a.boolean()})}static ShipmentReasons(){return a.object({reasons:a.array().items(n.ShipmentReason())})}static Shipments(){return a.object({awb_no:a.string().allow(""),bags:a.array().items(n.Bags()),beneficiary_details:a.boolean(),breakup_values:a.array().items(n.BreakupValues()),can_break:a.any(),can_cancel:a.boolean(),can_return:a.boolean(),comment:a.string().allow(""),custom_meta:a.array().items(a.any()),delivery_address:n.DeliveryAddress(),delivery_date:a.string().allow("").allow(null),dp_name:a.string().allow(""),fulfilling_company:n.FulfillingCompany(),fulfilling_store:n.FulfillingStore(),invoice:n.Invoice(),need_help_url:a.string().allow(""),order_id:a.string().allow(""),order_type:a.string().allow("").allow(null),payment:n.ShipmentPayment(),prices:n.Prices(),promise:n.Promise(),refund_details:a.any(),return_meta:a.any(),returnable_date:a.string().allow("").allow(null),shipment_created_at:a.string().allow(""),shipment_created_ts:a.string().allow(""),shipment_id:a.string().allow(""),shipment_status:n.ShipmentStatus(),show_download_invoice:a.boolean(),show_track_link:a.boolean(),size_info:a.any(),total_bags:a.number(),total_details:n.ShipmentTotalDetails(),track_url:a.string().allow(""),tracking_details:a.array().items(n.TrackingDetails()),traking_no:a.string().allow(""),user_info:n.ShipmentUserInfo()})}static ShipmentsRequest(){return a.object({data_updates:n.DataUpdates(),identifier:a.string().allow("").required(),products:a.array().items(n.Products()),reasons:n.ReasonsData()})}static ShipmentStatus(){return a.object({hex_code:a.string().allow(""),title:a.string().allow(""),value:a.string().allow("").allow(null)})}static ShipmentTotalDetails(){return a.object({pieces:a.number(),sizes:a.number(),total_price:a.number()})}static ShipmentTrack(){return a.object({results:a.array().items(n.Track())})}static ShipmentUserInfo(){return a.object({email:a.string().allow(""),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),mobile:a.string().allow(""),name:a.string().allow("")})}static StatuesRequest(){return a.object({exclude_bags_next_state:a.string().allow(""),shipments:a.array().items(n.ShipmentsRequest()),status:a.string().allow("")})}static StatusesBodyResponse(){return a.object({shipments:a.array().items(a.any())})}static TimeStampData(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static Track(){return a.object({account_name:a.string().allow(""),awb:a.string().allow(""),last_location_recieved_at:a.string().allow(""),reason:a.string().allow(""),shipment_type:a.string().allow(""),status:a.string().allow(""),updated_at:a.string().allow(""),updated_time:a.string().allow("")})}static TrackingDetails(){return a.object({created_ts:a.string().allow(""),is_current:a.boolean(),is_passed:a.boolean(),status:a.string().allow(""),time:a.string().allow(""),tracking_details:a.array().items(n.NestedTrackingDetails()),value:a.string().allow("").allow(null)})}static UpdateShipmentStatusRequest(){return a.object({force_transition:a.boolean(),lock_after_transition:a.boolean(),statuses:a.array().items(n.StatuesRequest()),task:a.boolean(),unlock_before_transition:a.boolean()})}static UserInfo(){return a.object({email:a.string().allow(""),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),mobile:a.string().allow(""),name:a.string().allow("")})}static VerifyOtp(){return a.object({otp_code:a.string().allow(""),request_id:a.string().allow("")})}static VerifyOtpResponse(){return a.object({success:a.boolean()})}}e.exports=n},8174:(e,t,r)=>{const a=r(2705),n=r(2453);e.exports=class{static getCustomerDetailsByShipmentId(){return a.object({orderId:a.string().allow("").required(),shipmentId:a.string().allow("").required()}).required()}static getInvoiceByShipmentId(){return a.object({shipmentId:a.string().allow("").required()}).required()}static getOrderById(){return a.object({orderId:a.string().allow("").required(),allowInactive:a.boolean()}).required()}static getOrders(){return a.object({status:a.number(),pageNo:a.number(),pageSize:a.number(),fromDate:a.string().allow(""),toDate:a.string().allow(""),startDate:a.string().allow(""),endDate:a.string().allow(""),customMeta:a.string().allow("")})}static getPosOrderById(){return a.object({orderId:a.string().allow("").required()}).required()}static getShipmentBagReasons(){return a.object({shipmentId:a.string().allow("").required(),bagId:a.string().allow("").required()}).required()}static getShipmentById(){return a.object({shipmentId:a.string().allow("").required(),allowInactive:a.boolean()}).required()}static getShipmentReasons(){return a.object({shipmentId:a.string().allow("").required()}).required()}static sendOtpToShipmentCustomer(){return a.object({orderId:a.string().allow("").required(),shipmentId:a.string().allow("").required()}).required()}static trackShipment(){return a.object({shipmentId:a.string().allow("").required()}).required()}static updateShipmentStatus(){return a.object({shipmentId:a.string().allow("").required(),body:n.UpdateShipmentStatusRequest().required()}).required()}static verifyOtpShipmentCustomer(){return a.object({orderId:a.string().allow("").required(),shipmentId:a.string().allow("").required(),body:n.VerifyOtp().required()}).required()}}},3242:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(174)),l=r(8487),{Logger:c}=r(7378);r(2705),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",walletLinkInitate:"/service/application/payment/v1.0/payment/options/wallet/link"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addBeneficiaryDetails({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.addBeneficiaryDetails().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.addBeneficiaryDetails().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > addBeneficiaryDetails \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.addBeneficiaryDetails,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.RefundAccountResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > addBeneficiaryDetails \n ${m}`})}return p}async addRefundBankAccountUsingOTP({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.addRefundBankAccountUsingOTP().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.addRefundBankAccountUsingOTP().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > addRefundBankAccountUsingOTP \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.addRefundBankAccountUsingOTP,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.RefundAccountResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > addRefundBankAccountUsingOTP \n ${m}`})}return p}async attachCardToCustomer({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.attachCardToCustomer().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.attachCardToCustomer().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > attachCardToCustomer \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.attachCardToCustomer,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.AttachCardsResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > attachCardToCustomer \n ${m}`})}return p}async cancelPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.cancelPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.cancelPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > cancelPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.cancelPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CancelPaymentLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > cancelPaymentLink \n ${m}`})}return p}async cardDetails({cardInfo:e,aggregator:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.cardDetails().validate({cardInfo:e,aggregator:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.cardDetails().validate({cardInfo:e,aggregator:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > cardDetails \n ${p}`});const g={};g.aggregator=t;const m=await a.execute(this._conf,"get",s({url:this._urls.cardDetails,params:{cardInfo:e}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.CardDetailsResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > cardDetails \n ${f}`})}return m}async checkAndUpdatePaymentStatus({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.checkAndUpdatePaymentStatus().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.checkAndUpdatePaymentStatus().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > checkAndUpdatePaymentStatus \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.checkAndUpdatePaymentStatus,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PaymentStatusUpdateResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > checkAndUpdatePaymentStatus \n ${m}`})}return p}async checkAndUpdatePaymentStatusPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.checkAndUpdatePaymentStatusPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.checkAndUpdatePaymentStatusPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > checkAndUpdatePaymentStatusPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.checkAndUpdatePaymentStatusPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PaymentStatusUpdateResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > checkAndUpdatePaymentStatusPaymentLink \n ${m}`})}return p}async checkCredit({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.checkCredit().validate({aggregator:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.checkCredit().validate({aggregator:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > checkCredit \n ${d}`});const p={};p.aggregator=e;const g=await a.execute(this._conf,"get",s({url:this._urls.checkCredit,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.CheckCreditResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > checkCredit \n ${w}`})}return g}async createOrderHandlerPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.createOrderHandlerPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.createOrderHandlerPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > createOrderHandlerPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.createOrderHandlerPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CreateOrderUserResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > createOrderHandlerPaymentLink \n ${m}`})}return p}async createPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.createPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.createPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > createPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.createPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CreatePaymentLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > createPaymentLink \n ${m}`})}return p}async createPaymentOrder({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.createPaymentOrder().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.createPaymentOrder().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > createPaymentOrder \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.createPaymentOrder,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PaymentOrderResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > createPaymentOrder \n ${m}`})}return p}async customerCreditSummary({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.customerCreditSummary().validate({aggregator:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.customerCreditSummary().validate({aggregator:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > customerCreditSummary \n ${d}`});const p={};p.aggregator=e;const g=await a.execute(this._conf,"get",s({url:this._urls.customerCreditSummary,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.CustomerCreditSummaryResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > customerCreditSummary \n ${w}`})}return g}async customerOnboard({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.customerOnboard().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.customerOnboard().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > customerOnboard \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.customerOnboard,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.CustomerOnboardingResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > customerOnboard \n ${m}`})}return p}async deleteUserCard({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.deleteUserCard().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.deleteUserCard().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > deleteUserCard \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.deleteUserCard,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.DeleteCardsResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > deleteUserCard \n ${m}`})}return p}async delinkWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.delinkWallet().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.delinkWallet().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > delinkWallet \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.delinkWallet,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.WalletResponseSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > delinkWallet \n ${m}`})}return p}async enableOrDisableRefundTransferMode({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.enableOrDisableRefundTransferMode().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.enableOrDisableRefundTransferMode().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > enableOrDisableRefundTransferMode \n ${d}`});const p=await a.execute(this._conf,"put",s({url:this._urls.enableOrDisableRefundTransferMode,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.UpdateRefundTransferModeResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > enableOrDisableRefundTransferMode \n ${m}`})}return p}async getActiveCardAggregator({refresh:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getActiveCardAggregator().validate({refresh:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getActiveCardAggregator().validate({refresh:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getActiveCardAggregator \n ${d}`});const p={};p.refresh=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getActiveCardAggregator,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.ActiveCardPaymentGatewayResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getActiveCardAggregator \n ${w}`})}return g}async getActiveRefundTransferModes({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getActiveRefundTransferModes().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getActiveRefundTransferModes().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getActiveRefundTransferModes \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getActiveRefundTransferModes,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.TransferModeResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getActiveRefundTransferModes \n ${g}`})}return d}async getActiveUserCards({forceRefresh:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getActiveUserCards().validate({forceRefresh:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getActiveUserCards().validate({forceRefresh:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getActiveUserCards \n ${d}`});const p={};p.force_refresh=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getActiveUserCards,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.ListCardsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getActiveUserCards \n ${w}`})}return g}async getAggregatorsConfig({xApiToken:e,refresh:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getAggregatorsConfig().validate({xApiToken:e,refresh:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getAggregatorsConfig().validate({xApiToken:e,refresh:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getAggregatorsConfig \n ${p}`});const g={};g.refresh=t;const m={};m["x-api-token"]=e;const w=await a.execute(this._conf,"get",s({url:this._urls.getAggregatorsConfig,params:{}}),g,void 0,{...m,...r},{responseHeaders:u});let f=w;u&&(f=w[0]);const{error:y}=l.AggregatorsConfigDetailResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getAggregatorsConfig \n ${y}`})}return w}async getEpaylaterBannerDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getEpaylaterBannerDetails().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getEpaylaterBannerDetails().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getEpaylaterBannerDetails \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getEpaylaterBannerDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.EpaylaterBannerResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getEpaylaterBannerDetails \n ${g}`})}return d}async getOrderBeneficiariesDetail({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getOrderBeneficiariesDetail().validate({orderId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getOrderBeneficiariesDetail().validate({orderId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getOrderBeneficiariesDetail \n ${d}`});const p={};p.order_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getOrderBeneficiariesDetail,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.OrderBeneficiaryResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getOrderBeneficiariesDetail \n ${w}`})}return g}async getPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getPaymentLink \n ${d}`});const p={};p.payment_link_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getPaymentLink,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.GetPaymentLinkResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getPaymentLink \n ${w}`})}return g}async getPaymentModeRoutes({amount:e,cartId:t,checkoutMode:r,refresh:u,orderId:d,cardReference:p,userDetails:g,displaySplit:m,advancePayment:w,shipmentId:f,requestHeaders:y}={requestHeaders:{}},{responseHeaders:b}={responseHeaders:!1}){const{error:h}=i.getPaymentModeRoutes().validate({amount:e,cartId:t,checkoutMode:r,refresh:u,orderId:d,cardReference:p,userDetails:g,displaySplit:m,advancePayment:w,shipmentId:f},{abortEarly:!1,allowUnknown:!0});if(h)return Promise.reject(new n(h));const{error:_}=i.getPaymentModeRoutes().validate({amount:e,cartId:t,checkoutMode:r,refresh:u,orderId:d,cardReference:p,userDetails:g,displaySplit:m,advancePayment:w,shipmentId:f},{abortEarly:!1,allowUnknown:!1});_&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getPaymentModeRoutes \n ${_}`});const v={};v.amount=e,v.cart_id=t,v.checkout_mode=r,v.refresh=u,v.order_id=d,v.card_reference=p,v.user_details=g,v.display_split=m,v.advance_payment=w,v.shipment_id=f;const k=await a.execute(this._conf,"get",s({url:this._urls.getPaymentModeRoutes,params:{}}),v,void 0,{...y},{responseHeaders:b});let R=k;b&&(R=k[0]);const{error:P}=l.PaymentModeRouteResponse().validate(R,{abortEarly:!1,allowUnknown:!0});if(P){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(P));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getPaymentModeRoutes \n ${P}`})}return k}async getPaymentModeRoutesPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPaymentModeRoutesPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPaymentModeRoutesPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getPaymentModeRoutesPaymentLink \n ${d}`});const p={};p.payment_link_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getPaymentModeRoutesPaymentLink,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.PaymentModeRouteResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getPaymentModeRoutesPaymentLink \n ${w}`})}return g}async getPosPaymentModeRoutes({amount:e,pincode:t,orderType:r,cartId:u,checkoutMode:d,refresh:p,cardReference:g,userDetails:m,requestHeaders:w}={requestHeaders:{}},{responseHeaders:f}={responseHeaders:!1}){const{error:y}=i.getPosPaymentModeRoutes().validate({amount:e,pincode:t,orderType:r,cartId:u,checkoutMode:d,refresh:p,cardReference:g,userDetails:m},{abortEarly:!1,allowUnknown:!0});if(y)return Promise.reject(new n(y));const{error:b}=i.getPosPaymentModeRoutes().validate({amount:e,pincode:t,orderType:r,cartId:u,checkoutMode:d,refresh:p,cardReference:g,userDetails:m},{abortEarly:!1,allowUnknown:!1});b&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getPosPaymentModeRoutes \n ${b}`});const h={};h.amount=e,h.cart_id=u,h.pincode=t,h.checkout_mode=d,h.refresh=p,h.card_reference=g,h.order_type=r,h.user_details=m;const _=await a.execute(this._conf,"get",s({url:this._urls.getPosPaymentModeRoutes,params:{}}),h,void 0,{...w},{responseHeaders:f});let v=_;f&&(v=_[0]);const{error:k}=l.PaymentModeRouteResponse().validate(v,{abortEarly:!1,allowUnknown:!0});if(k){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(k));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getPosPaymentModeRoutes \n ${k}`})}return _}async getRupifiBannerDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getRupifiBannerDetails().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getRupifiBannerDetails().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getRupifiBannerDetails \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getRupifiBannerDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.RupifiBannerResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getRupifiBannerDetails \n ${g}`})}return d}async getUserBeneficiariesDetail({orderId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getUserBeneficiariesDetail().validate({orderId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getUserBeneficiariesDetail().validate({orderId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > getUserBeneficiariesDetail \n ${d}`});const p={};p.order_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getUserBeneficiariesDetail,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.OrderBeneficiaryResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > getUserBeneficiariesDetail \n ${w}`})}return g}async initialisePayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.initialisePayment().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.initialisePayment().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > initialisePayment \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.initialisePayment,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PaymentInitializationResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > initialisePayment \n ${m}`})}return p}async initialisePaymentPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.initialisePaymentPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.initialisePaymentPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > initialisePaymentPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.initialisePaymentPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.PaymentInitializationResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > initialisePaymentPaymentLink \n ${m}`})}return p}async linkWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.linkWallet().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.linkWallet().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > linkWallet \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.linkWallet,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.WalletResponseSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > linkWallet \n ${m}`})}return p}async outstandingOrderDetails({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.outstandingOrderDetails().validate({aggregator:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.outstandingOrderDetails().validate({aggregator:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > outstandingOrderDetails \n ${d}`});const p={};p.aggregator=e;const g=await a.execute(this._conf,"get",s({url:this._urls.outstandingOrderDetails,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.OutstandingOrderDetailsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > outstandingOrderDetails \n ${w}`})}return g}async paidOrderDetails({aggregator:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.paidOrderDetails().validate({aggregator:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.paidOrderDetails().validate({aggregator:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > paidOrderDetails \n ${d}`});const p={};p.aggregator=e;const g=await a.execute(this._conf,"get",s({url:this._urls.paidOrderDetails,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.PaidOrderDetailsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > paidOrderDetails \n ${w}`})}return g}async pollingPaymentLink({paymentLinkId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.pollingPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.pollingPaymentLink().validate({paymentLinkId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > pollingPaymentLink \n ${d}`});const p={};p.payment_link_id=e;const g=await a.execute(this._conf,"get",s({url:this._urls.pollingPaymentLink,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.PollingPaymentLinkResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > pollingPaymentLink \n ${w}`})}return g}async redirectToAggregator({source:e,aggregator:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.redirectToAggregator().validate({source:e,aggregator:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.redirectToAggregator().validate({source:e,aggregator:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > redirectToAggregator \n ${p}`});const g={};g.source=e,g.aggregator=t;const m=await a.execute(this._conf,"get",s({url:this._urls.redirectToAggregator,params:{}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.RedirectToAggregatorResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > Payment > redirectToAggregator \n ${f}`})}return m}async renderHTML({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.renderHTML().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.renderHTML().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > renderHTML \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.renderHTML,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.renderHTMLResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > renderHTML \n ${m}`})}return p}async resendOrCancelPayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.resendOrCancelPayment().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.resendOrCancelPayment().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > resendOrCancelPayment \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.resendOrCancelPayment,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResendOrCancelPaymentResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > resendOrCancelPayment \n ${m}`})}return p}async resendPaymentLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.resendPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.resendPaymentLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > resendPaymentLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.resendPaymentLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResendPaymentLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > resendPaymentLink \n ${m}`})}return p}async updateDefaultBeneficiary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.updateDefaultBeneficiary().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.updateDefaultBeneficiary().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > updateDefaultBeneficiary \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.updateDefaultBeneficiary,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SetDefaultBeneficiaryResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > updateDefaultBeneficiary \n ${m}`})}return p}async validateVPA({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.validateVPA().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.validateVPA().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > validateVPA \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.validateVPA,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ValidateVPAResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > validateVPA \n ${m}`})}return p}async verifyAndChargePayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyAndChargePayment().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyAndChargePayment().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyAndChargePayment \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyAndChargePayment,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ChargeCustomerResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyAndChargePayment \n ${m}`})}return p}async verifyCustomerForPayment({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyCustomerForPayment().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyCustomerForPayment().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyCustomerForPayment \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyCustomerForPayment,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ValidateCustomerResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyCustomerForPayment \n ${m}`})}return p}async verifyIfscCode({ifscCode:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyIfscCode().validate({ifscCode:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyIfscCode().validate({ifscCode:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyIfscCode \n ${d}`});const p={};p.ifsc_code=e;const g=await a.execute(this._conf,"get",s({url:this._urls.verifyIfscCode,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.IfscCodeResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyIfscCode \n ${w}`})}return g}async verifyOtpAndAddBeneficiaryForBank({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyOtpAndAddBeneficiaryForBank().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyOtpAndAddBeneficiaryForBank().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyOtpAndAddBeneficiaryForBank \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyOtpAndAddBeneficiaryForBank,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.AddBeneficiaryViaOtpVerificationResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyOtpAndAddBeneficiaryForBank \n ${m}`})}return p}async verifyOtpAndAddBeneficiaryForWallet({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyOtpAndAddBeneficiaryForWallet().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyOtpAndAddBeneficiaryForWallet().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > verifyOtpAndAddBeneficiaryForWallet \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyOtpAndAddBeneficiaryForWallet,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.WalletOtpResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > verifyOtpAndAddBeneficiaryForWallet \n ${m}`})}return p}async walletLinkInitate({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.walletLinkInitate().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.walletLinkInitate().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Payment > walletLinkInitate \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.walletLinkInitate,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.WalletResponseSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Payment > walletLinkInitate \n ${m}`})}return p}}},8487:(e,t,r)=>{const a=r(2705);class n{static ActiveCardPaymentGatewayResponse(){return a.object({cards:n.CardPaymentGateway().required(),message:a.string().allow("").required(),success:a.boolean().required()})}static AddBeneficiaryDetailsOTPRequest(){return a.object({details:n.BankDetailsForOTP().required(),order_id:a.string().allow("").required()})}static AddBeneficiaryDetailsRequest(){return a.object({delights:a.boolean().required(),details:n.BeneficiaryModeDetails().required(),order_id:a.string().allow("").required(),otp:a.string().allow(""),request_id:a.string().allow(""),shipment_id:a.string().allow("").required(),transfer_mode:a.string().allow("").required()})}static AddBeneficiaryViaOtpVerificationRequest(){return a.object({hash_key:a.string().allow("").required(),otp:a.string().allow("").required(),request_id:a.string().allow("").required()})}static AddBeneficiaryViaOtpVerificationResponse(){return a.object({message:a.string().allow("").required(),success:a.boolean()})}static AdvanceObject(){return a.object({all_prepayment_type:a.array().items(a.string().allow("").allow(null)),allow_custom_advance_amount:a.boolean().allow(null),amount:a.number(),cancellation_type:a.string().allow("").allow(null),description:a.string().allow("").allow(null),display_name:a.string().allow("").allow(null),is_active:a.boolean().allow(null),prepayment_type:a.string().allow("").allow(null),prepayment_value:a.number().allow(null),refund_time_limit:a.number().allow(null),time_unit:a.string().allow("").allow(null)})}static AdvancePaymentObject(){return a.object({advance:n.AdvanceObject(),display_name:a.string().allow("").allow(null),display_priority:a.number().allow(null),list:a.array().items(n.PaymentModeList()),name:a.string().allow("").allow(null),payment_mode_id:a.number().allow(null),split:n.SplitObject()})}static AggregatorConfigDetail(){return a.object({api:a.string().allow("").allow(null),config_type:a.string().allow("").required(),key:a.string().allow("").required(),merchant_id:a.string().allow("").allow(null),merchant_key:a.string().allow("").allow(null),pin:a.string().allow("").allow(null),sdk:a.boolean().allow(null),secret:a.string().allow("").required(),user_id:a.string().allow("").allow(null),verify_api:a.string().allow("").allow(null)})}static AggregatorRoute(){return a.object({api_link:a.string().allow("").allow(null),data:a.any().allow(null),payment_flow:a.string().allow("").allow(null),payment_flow_data:a.string().allow("").allow(null)})}static AggregatorsConfigDetailResponse(){return a.object({ccavenue:n.AggregatorConfigDetail(),env:a.string().allow("").required(),juspay:n.AggregatorConfigDetail(),mswipe:n.AggregatorConfigDetail(),payumoney:n.AggregatorConfigDetail(),razorpay:n.AggregatorConfigDetail(),rupifi:n.AggregatorConfigDetail(),simpl:n.AggregatorConfigDetail(),stripe:n.AggregatorConfigDetail(),success:a.boolean().required()})}static AttachCardRequest(){return a.object({card_id:a.string().allow("").allow(null).required(),name_on_card:a.string().allow(""),nickname:a.string().allow(""),refresh:a.boolean().allow(null)})}static AttachCardsResponse(){return a.object({data:a.any().required(),message:a.string().allow(""),success:a.boolean().required()})}static BalanceDetails(){return a.object({currency:a.string().allow("").allow(null),formatted_value:a.string().allow("").allow(null),value:a.number().allow(null)})}static BankDetailsForOTP(){return a.object({account_holder:a.string().allow("").required(),account_no:a.string().allow("").required(),bank_name:a.string().allow("").required(),branch_name:a.string().allow("").required(),ifsc_code:a.string().allow("").required()})}static BeneficiaryModeDetails(){return a.object({account_holder:a.string().allow("").required(),account_no:a.string().allow("").required(),address:a.string().allow(""),bank_name:a.string().allow("").required(),branch_name:a.string().allow("").required(),comment:a.string().allow(""),email:a.string().allow("").required(),ifsc_code:a.string().allow("").required(),mobile:a.string().allow("").required(),vpa:a.string().allow("").allow(null),wallet:a.string().allow("").allow(null)})}static BusinessDetails(){return a.object({address:n.KYCAddress(),business_ownership_type:a.string().allow("").allow(null),business_type:a.string().allow("").allow(null),entity_type:a.string().allow("").allow(null),fda:a.string().allow("").allow(null),fssai:a.string().allow("").allow(null),gstin:a.string().allow("").allow(null),name:a.string().allow("").allow(null),pan:a.string().allow("").allow(null),shop_and_establishment:a.any(),vintage:a.string().allow("").allow(null)})}static CancelOrResendPaymentLinkRequest(){return a.object({payment_link_id:a.string().allow("").required()})}static CancelPaymentLinkResponse(){return a.object({message:a.string().allow("").required(),status_code:a.number().required(),success:a.boolean().required()})}static Card(){return a.object({aggregator_name:a.string().allow("").required(),card_brand:a.string().allow("").allow(null),card_brand_image:a.string().allow("").allow(null),card_fingerprint:a.string().allow("").allow(null),card_id:a.string().allow("").allow(null),card_isin:a.string().allow("").allow(null),card_issuer:a.string().allow("").allow(null),card_name:a.string().allow("").allow(null),card_number:a.string().allow("").allow(null),card_reference:a.string().allow("").allow(null),card_token:a.string().allow("").allow(null),card_type:a.string().allow("").allow(null),compliant_with_tokenisation_guidelines:a.boolean().allow(null),exp_month:a.number().allow(null),exp_year:a.number().allow(null),expired:a.boolean().allow(null),nickname:a.string().allow("").allow(null)})}static CardDetails(){return a.object({bank:a.string().allow("").required(),bank_code:a.string().allow("").allow(null).required(),card_brand:a.string().allow("").required(),card_exp_month:a.string().allow(""),card_exp_year:a.string().allow(""),card_object:a.string().allow("").required(),card_sub_type:a.string().allow("").allow(null).required(),card_token:a.string().allow(""),country:a.string().allow("").required(),extended_card_type:a.string().allow("").required(),id:a.string().allow("").required(),is_domestic_card:a.boolean().required(),name_on_card:a.string().allow(""),status:a.boolean().required(),type:a.string().allow("").required(),user:a.string().allow("")})}static CardDetailsResponse(){return a.object({data:n.CardDetails().required(),success:a.boolean().required()})}static CardPaymentGateway(){return a.object({aggregator:a.string().allow("").required(),api:a.string().allow("").allow(null),customer_id:a.string().allow("").allow(null)})}static ChargeCustomerRequest(){return a.object({aggregator:a.string().allow("").required(),amount:a.number().allow(null).required(),order_id:a.string().allow("").required(),transaction_token:a.string().allow("").allow(null),verified:a.boolean().allow(null)})}static ChargeCustomerResponse(){return a.object({aggregator:a.string().allow("").required(),cart_id:a.string().allow("").allow(null),delivery_address_id:a.string().allow("").allow(null),message:a.string().allow("").required(),order_id:a.string().allow("").required(),status:a.string().allow("").required(),success:a.boolean().required()})}static CheckCreditResponse(){return a.object({data:n.CreditDetail().required(),success:a.boolean().required()})}static CreateOrderUserData(){return a.object({aggregator:a.string().allow("").allow(null),amount:a.number().allow(null),callback_url:a.string().allow("").allow(null),contact:a.string().allow("").allow(null),currency:a.string().allow("").allow(null),customer_id:a.string().allow("").allow(null),email:a.string().allow("").allow(null),merchant_order_id:a.string().allow("").allow(null),method:a.string().allow("").allow(null),order_id:a.string().allow("").allow(null)})}static CreateOrderUserPaymentMethods(){return a.object({meta:n.PaymentMethodsMeta().required(),mode:a.string().allow("").required(),name:a.string().allow("").required()})}static CreateOrderUserRequest(){return a.object({currency:a.string().allow("").required(),failure_callback_url:a.string().allow("").required(),meta:a.any().allow(null),payment_link_id:a.string().allow("").required(),payment_methods:n.CreateOrderUserPaymentMethods().required(),success_callback_url:a.string().allow("").required()})}static CreateOrderUserResponse(){return a.object({callback_url:a.string().allow("").allow(null),data:n.CreateOrderUserData(),message:a.string().allow("").required(),order_id:a.string().allow("").allow(null),payment_confirm_url:a.string().allow("").allow(null),status_code:a.number().required(),success:a.boolean().required()})}static CreatePaymentLinkMeta(){return a.object({amount:a.string().allow("").required(),assign_card_id:a.string().allow("").allow(null),cart_id:a.string().allow("").required(),checkout_mode:a.string().allow("").required()})}static CreatePaymentLinkRequest(){return a.object({amount:a.number().required(),description:a.string().allow("").allow(null),email:a.string().allow("").required(),external_order_id:a.string().allow("").required(),meta:n.CreatePaymentLinkMeta().required(),mobile_number:a.string().allow("").required()})}static CreatePaymentLinkResponse(){return a.object({message:a.string().allow("").required(),payment_link_id:a.string().allow("").allow(null),payment_link_url:a.string().allow("").allow(null),polling_timeout:a.number().allow(null),status_code:a.number().required(),success:a.boolean().required()})}static CreditDetail(){return a.object({is_registered:a.boolean().required(),signup_url:a.string().allow("").required(),status:a.boolean().required()})}static CreditSummary(){return a.object({activation_url:a.string().allow("").allow(null),amount_available:n.BalanceDetails(),balance:n.BalanceDetails(),buyer_status:a.string().allow("").allow(null),credit_line_id:a.string().allow("").allow(null),due_amount:n.BalanceDetails(),due_date:a.string().allow("").allow(null),is_eligible_for_txn:a.boolean().allow(null),limit:n.BalanceDetails(),merchant_customer_ref_id:a.string().allow("").allow(null),repayment_url:a.string().allow("").allow(null),soa_url:a.string().allow("").allow(null),status:a.string().allow("").allow(null),status_message:a.string().allow("").allow(null),total_due_amount:n.BalanceDetails()})}static CustomerCreditSummaryResponse(){return a.object({data:n.CreditSummary(),success:a.boolean().required()})}static CustomerOnboardingRequest(){return a.object({aggregator:a.string().allow("").required(),business_info:n.BusinessDetails(),device:n.DeviceDetails(),marketplace_info:n.MarketplaceInfo(),mcc:a.string().allow("").allow(null),personal_info:n.UserPersonalInfoInDetails(),source:a.string().allow("").required()})}static CustomerOnboardingResponse(){return a.object({data:n.OnboardSummary().required(),success:a.boolean().required()})}static DeleteCardsResponse(){return a.object({message:a.string().allow("").allow(null),success:a.boolean().required()})}static DeletehCardRequest(){return a.object({card_id:a.string().allow("").allow(null).required()})}static DeviceDetails(){return a.object({device_make:a.string().allow("").allow(null),device_model:a.string().allow("").allow(null),device_type:a.string().allow("").allow(null),identification_number:a.string().allow("").allow(null),identifier_type:a.string().allow("").allow(null),os:a.string().allow("").allow(null),os_version:a.string().allow("").allow(null)})}static EpaylaterBannerData(){return a.object({display:a.boolean().required(),message:a.string().allow(""),status:a.string().allow("")})}static EpaylaterBannerResponse(){return a.object({data:n.EpaylaterBannerData().required(),success:a.boolean().required()})}static ErrorCodeAndDescription(){return a.object({code:a.string().allow("").required(),description:a.string().allow("").required()})}static ErrorCodeDescription(){return a.object({code:a.string().allow("").required(),description:a.string().allow("").required(),success:a.boolean().required()})}static ErrorDescription(){return a.object({amount:a.number().allow(null),cancelled:a.boolean().allow(null),expired:a.boolean().allow(null),invalid_id:a.boolean().allow(null),merchant_name:a.string().allow("").allow(null),merchant_order_id:a.string().allow("").allow(null),msg:a.string().allow("").allow(null),payment_transaction_id:a.string().allow("").allow(null)})}static ErrorResponse(){return a.object({error:n.ErrorDescription(),message:a.string().allow("").required(),status_code:a.number().required(),success:a.boolean().required()})}static GetPaymentLinkResponse(){return a.object({amount:a.number().allow(null),external_order_id:a.string().allow("").allow(null),merchant_name:a.string().allow("").allow(null),message:a.string().allow("").required(),payment_link_current_status:a.string().allow("").allow(null),payment_link_url:a.string().allow("").allow(null),polling_timeout:a.number().allow(null),status_code:a.number().required(),success:a.boolean().required()})}static HttpErrorCodeAndResponse(){return a.object({error:n.ErrorCodeAndDescription(),success:a.boolean().required()})}static IfscCodeResponse(){return a.object({bank_name:a.string().allow("").required(),branch_name:a.string().allow("").required(),success:a.boolean()})}static IntentApp(){return a.object({code:a.string().allow("").allow(null),display_name:a.string().allow("").allow(null),logos:n.PaymentModeLogo(),package_name:a.string().allow("").allow(null)})}static IntentAppErrorList(){return a.object({code:a.string().allow("").allow(null),package_name:a.string().allow("").allow(null)})}static KYCAddress(){return a.object({addressline1:a.string().allow("").required(),addressline2:a.string().allow("").allow(null),city:a.string().allow("").required(),land_mark:a.string().allow("").allow(null),ownership_type:a.string().allow("").allow(null),pincode:a.string().allow("").required(),state:a.string().allow("").required()})}static LinkStatus(){return a.object({message:a.string().allow("").required(),status:a.boolean().required()})}static ListCardsResponse(){return a.object({data:a.array().items(n.Card()),message:a.string().allow("").required(),success:a.boolean().required()})}static MarketplaceInfo(){return a.object({date_of_joining:a.string().allow("").allow(null),membership_id:a.string().allow("").required(),name:a.string().allow("").required()})}static NotFoundResourceError(){return a.object({code:a.string().allow("").required(),description:a.string().allow("").required(),success:a.boolean().required()})}static OnboardSummary(){return a.object({activation_url:a.string().allow(""),is_eligible_for_txn:a.boolean(),merchant_customer_ref_id:a.string().allow(""),redirect_url:a.string().allow(""),session:a.any(),status:a.boolean().required(),status_remark:a.string().allow("")})}static OrderBeneficiaryDetails(){return a.object({account_holder:a.string().allow("").required(),account_no:a.string().allow("").required(),address:a.string().allow("").required(),bank_name:a.string().allow("").required(),beneficiary_id:a.string().allow("").required(),branch_name:a.string().allow(""),comment:a.string().allow(""),created_on:a.string().allow("").required(),delights_user_name:a.string().allow("").allow(null),display_name:a.string().allow("").required(),email:a.string().allow("").required(),id:a.number().required(),ifsc_code:a.string().allow("").required(),is_active:a.boolean().required(),mobile:a.string().allow(""),modified_on:a.string().allow("").required(),subtitle:a.string().allow("").required(),title:a.string().allow("").required(),transfer_mode:a.string().allow("").required()})}static OrderBeneficiaryResponse(){return a.object({beneficiaries:a.array().items(n.OrderBeneficiaryDetails()),show_beneficiary_details:a.boolean()})}static OutstandingOrderDetailsResponse(){return a.object({data:a.array().items(a.any()),message:a.string().allow("").allow(null),status_code:a.number().required(),success:a.boolean().required()})}static PaidOrderDetailsResponse(){return a.object({data:a.array().items(a.any()),message:a.string().allow("").allow(null),status_code:a.number().required(),success:a.boolean().required()})}static PaymentFlow(){return a.object({ajiodhan:n.AggregatorRoute(),bqr_razorpay:n.AggregatorRoute(),ccavenue:n.AggregatorRoute(),epaylater:n.AggregatorRoute(),fynd:n.AggregatorRoute(),jiopay:n.AggregatorRoute(),juspay:n.AggregatorRoute(),mswipe:n.AggregatorRoute(),payubiz:n.AggregatorRoute(),razorpay:n.AggregatorRoute(),rupifi:n.AggregatorRoute(),simpl:n.AggregatorRoute(),stripe:n.AggregatorRoute(),upi_razorpay:n.AggregatorRoute()})}static PaymentInitializationRequest(){return a.object({aggregator:a.string().allow("").required(),amount:a.number().allow(null).required(),contact:a.string().allow("").required(),currency:a.string().allow("").required(),customer_id:a.string().allow("").required(),device_id:a.string().allow("").allow(null),email:a.string().allow("").required(),merchant_order_id:a.string().allow("").required(),method:a.string().allow("").required(),order_id:a.string().allow("").required(),razorpay_payment_id:a.string().allow("").allow(null),timeout:a.number().allow(null),vpa:a.string().allow("").allow(null)})}static PaymentInitializationResponse(){return a.object({aggregator:a.string().allow("").required(),aggregator_order_id:a.string().allow(""),amount:a.number().allow(null),bqr_image:a.string().allow("").allow(null),currency:a.string().allow("").allow(null),customer_id:a.string().allow("").allow(null),device_id:a.string().allow("").allow(null),merchant_order_id:a.string().allow("").required(),method:a.string().allow("").required(),polling_url:a.string().allow("").required(),razorpay_payment_id:a.string().allow("").allow(null),status:a.string().allow(""),success:a.boolean().required(),timeout:a.number().allow(null),upi_poll_url:a.string().allow("").allow(null),virtual_id:a.string().allow("").allow(null),vpa:a.string().allow("").allow(null)})}static PaymentMethodsMeta(){return a.object({merchant_code:a.string().allow("").required(),payment_gateway:a.string().allow("").required(),payment_identifier:a.string().allow("").required()})}static PaymentMethodsMetaOrder(){return a.object({merchant_code:a.string().allow("").required(),payment_gateway:a.string().allow("").required(),payment_identifier:a.string().allow("").required()})}static PaymentModeList(){return a.object({aggregator_name:a.string().allow("").required(),card_brand:a.string().allow("").allow(null),card_brand_image:a.string().allow("").allow(null),card_fingerprint:a.string().allow("").allow(null),card_id:a.string().allow("").allow(null),card_isin:a.string().allow("").allow(null),card_issuer:a.string().allow("").allow(null),card_name:a.string().allow("").allow(null),card_number:a.string().allow("").allow(null),card_reference:a.string().allow("").allow(null),card_token:a.string().allow("").allow(null),card_type:a.string().allow("").allow(null),cod_limit:a.number().allow(null),cod_limit_per_order:a.number().allow(null),code:a.string().allow("").allow(null),compliant_with_tokenisation_guidelines:a.boolean().allow(null),display_name:a.string().allow("").allow(null),display_priority:a.number().allow(null),exp_month:a.number().allow(null),exp_year:a.number().allow(null),expired:a.boolean().allow(null),fynd_vpa:a.string().allow("").allow(null),intent_app:a.array().items(n.IntentApp()),intent_app_error_dict_list:a.array().items(n.IntentAppErrorList()),intent_app_error_list:a.array().items(a.string().allow("")),intent_flow:a.boolean().allow(null),logo_url:n.PaymentModeLogo(),merchant_code:a.string().allow("").allow(null),meta:a.any().allow(null),name:a.string().allow("").allow(null),nickname:a.string().allow("").allow(null),remaining_limit:a.number().allow(null),retry_count:a.number().allow(null),timeout:a.number().allow(null)})}static PaymentModeLogo(){return a.object({large:a.string().allow("").required(),small:a.string().allow("").required()})}static PaymentModeRouteResponse(){return a.object({advance_payment:a.array().items(n.AdvancePaymentObject()),payment_breakup:a.any(),payment_options:n.PaymentOptionAndFlow().required(),success:a.boolean().required()})}static PaymentOptionAndFlow(){return a.object({payment_flows:n.PaymentFlow().required(),payment_option:n.RootPaymentMode().required()})}static PaymentOrderData(){return a.object({aggregator:a.string().allow("").allow(null),amount:a.number().allow(null),callback_url:a.string().allow("").allow(null),contact:a.string().allow("").allow(null),currency:a.string().allow("").allow(null),customer_id:a.string().allow("").allow(null),email:a.string().allow("").allow(null),merchant_order_id:a.string().allow("").allow(null),method:a.string().allow("").allow(null),order_id:a.string().allow("").allow(null)})}static PaymentOrderMethods(){return a.object({amount:a.number().required(),meta:n.PaymentMethodsMetaOrder().required(),mode:a.string().allow("").required(),name:a.string().allow("").required(),payment:a.string().allow("")})}static PaymentOrderRequest(){return a.object({order_id:a.string().allow("").required(),payment_methods:a.array().items(n.PaymentOrderMethods()),shipment_id:a.string().allow("")})}static PaymentOrderResponse(){return a.object({callback_url:a.string().allow("").allow(null),data:n.PaymentOrderData(),message:a.string().allow("").required(),order_id:a.string().allow("").allow(null),payment_confirm_url:a.string().allow("").allow(null),status_code:a.number().required(),success:a.boolean().required()})}static PaymentStatusUpdateRequest(){return a.object({aggregator:a.string().allow("").required(),amount:a.number().allow(null).required(),contact:a.string().allow("").required(),currency:a.string().allow("").required(),customer_id:a.string().allow("").required(),device_id:a.string().allow("").allow(null),email:a.string().allow("").required(),merchant_order_id:a.string().allow("").required(),merchant_transaction_id:a.string().allow("").required(),method:a.string().allow("").required(),order_id:a.string().allow("").required(),status:a.string().allow("").required(),vpa:a.string().allow("")})}static PaymentStatusUpdateResponse(){return a.object({aggregator_name:a.string().allow("").required(),redirect_url:a.string().allow("").allow(null),retry:a.boolean().required(),status:a.string().allow("").required(),success:a.boolean().allow(null)})}static PollingPaymentLinkResponse(){return a.object({aggregator_name:a.string().allow("").allow(null),amount:a.number().allow(null),http_status:a.number().allow(null),message:a.string().allow("").allow(null),order_id:a.string().allow("").allow(null),payment_link_id:a.string().allow("").allow(null),redirect_url:a.string().allow("").allow(null),status:a.string().allow("").allow(null),status_code:a.number().allow(null),success:a.boolean().allow(null)})}static RedirectToAggregatorResponse(){return a.object({data:n.RedirectURL().required(),success:a.boolean().required()})}static RedirectURL(){return a.object({signup_url:a.string().allow("").required(),status:a.boolean().required()})}static RefundAccountResponse(){return a.object({data:a.any(),is_verified_flag:a.boolean(),message:a.string().allow("").required(),success:a.boolean().required()})}static renderHTMLRequest(){return a.object({base64_html:a.string().allow("").required(),returntype:a.string().allow("").allow(null)})}static renderHTMLResponse(){return a.object({html:a.string().allow("").required()})}static ResendOrCancelPaymentRequest(){return a.object({device_id:a.string().allow("").allow(null),order_id:a.string().allow("").required(),request_type:a.string().allow("").required()})}static ResendOrCancelPaymentResponse(){return a.object({data:n.LinkStatus().required(),success:a.boolean().required()})}static ResendPaymentLinkResponse(){return a.object({message:a.string().allow("").required(),polling_timeout:a.number().allow(null),status_code:a.number().required(),success:a.boolean().required()})}static RootPaymentMode(){return a.object({add_card_enabled:a.boolean().allow(null),aggregator_name:a.string().allow("").allow(null),anonymous_enable:a.boolean().allow(null),display_name:a.string().allow("").required(),display_priority:a.number().required(),is_pay_by_card_pl:a.boolean().allow(null),list:a.array().items(n.PaymentModeList()),name:a.string().allow("").required(),save_card:a.boolean().allow(null)})}static RupifiBannerData(){return a.object({kyc_url:a.string().allow(""),status:a.string().allow("")})}static RupifiBannerResponse(){return a.object({data:n.RupifiBannerData().required(),success:a.boolean().required()})}static SetDefaultBeneficiaryRequest(){return a.object({beneficiary_id:a.string().allow("").required(),order_id:a.string().allow("").required()})}static SetDefaultBeneficiaryResponse(){return a.object({is_beneficiary_set:a.boolean().required(),success:a.boolean()})}static SplitObject(){return a.object({amount_remaining:a.number().allow(null),splits_remaining:a.number().allow(null),total_number_of_splits:a.number().allow(null)})}static TransferItemsDetails(){return a.object({display_name:a.string().allow(""),id:a.number().required(),logo_large:a.string().allow("").required(),logo_small:a.string().allow("").required(),name:a.string().allow("").required()})}static TransferModeDetails(){return a.object({display_name:a.string().allow("").required(),items:a.array().items(n.TransferItemsDetails())})}static TransferModeResponse(){return a.object({data:a.array().items(n.TransferModeDetails()).required()})}static UpdateRefundTransferModeRequest(){return a.object({enable:a.boolean().required(),transfer_mode:a.string().allow("").required()})}static UpdateRefundTransferModeResponse(){return a.object({success:a.boolean()})}static UserPersonalInfoInDetails(){return a.object({address_as_per_id:n.KYCAddress().required(),dob:a.string().allow("").allow(null).required(),driving_license:a.string().allow("").allow(null),email:a.string().allow("").allow(null),email_verified:a.boolean().required(),fathers_name:a.string().allow("").allow(null),first_name:a.string().allow("").required(),gender:a.string().allow("").allow(null),last_name:a.string().allow("").allow(null),middle_name:a.string().allow("").allow(null),mobile_verified:a.boolean().required(),mothers_name:a.string().allow("").allow(null),pan:a.string().allow("").allow(null),passport:a.string().allow("").allow(null),phone:a.string().allow("").required(),voter_id:a.string().allow("").allow(null)})}static ValidateCustomerRequest(){return a.object({aggregator:a.string().allow("").required(),billing_address:a.any(),delivery_address:a.any(),merchant_params:a.any(),order_items:a.array().items(a.any()),payload:a.string().allow("").allow(null),phone_number:a.string().allow("").required(),transaction_amount_in_paise:a.number().required()})}static ValidateCustomerResponse(){return a.object({data:a.any().required(),message:a.string().allow("").required(),success:a.boolean().required()})}static ValidateUPI(){return a.object({customer_name:a.string().allow("").required(),is_valid:a.boolean().required(),status:a.string().allow("").required(),upi_vpa:a.string().allow("").required()})}static ValidateVPARequest(){return a.object({upi_vpa:a.string().allow("").required()})}static ValidateVPAResponse(){return a.object({data:n.ValidateUPI().required(),success:a.boolean().required()})}static WalletDelinkRequestSchema(){return a.object({aggregator:a.string().allow("").required(),wallet_code:a.string().allow("").required()})}static WalletLinkRequestSchema(){return a.object({aggregator:a.string().allow("").required(),mobile:a.string().allow("").required(),wallet_code:a.string().allow("").required()})}static WalletOtpRequest(){return a.object({country_code:a.string().allow("").required(),mobile:a.string().allow("").required()})}static WalletOtpResponse(){return a.object({is_verified_flag:a.string().allow("").required(),request_id:a.string().allow("").required(),success:a.boolean()})}static WalletResponseSchema(){return a.object({data:a.any().required(),success:a.boolean().required()})}static WalletVerifyRequestSchema(){return a.object({aggregator:a.string().allow("").required(),link_token:a.string().allow("").required(),otp:a.number().required()})}static WrongOtpError(){return a.object({description:a.string().allow("").required(),is_verified_flag:a.boolean().required(),success:a.string().allow("").required()})}}e.exports=n},174:(e,t,r)=>{const a=r(2705),n=r(8487);e.exports=class{static addBeneficiaryDetails(){return a.object({body:n.AddBeneficiaryDetailsRequest().required()}).required()}static addRefundBankAccountUsingOTP(){return a.object({body:n.AddBeneficiaryDetailsOTPRequest().required()}).required()}static attachCardToCustomer(){return a.object({body:n.AttachCardRequest().required()}).required()}static cancelPaymentLink(){return a.object({body:n.CancelOrResendPaymentLinkRequest().required()}).required()}static cardDetails(){return a.object({cardInfo:a.string().allow("").required(),aggregator:a.string().allow("")}).required()}static checkAndUpdatePaymentStatus(){return a.object({body:n.PaymentStatusUpdateRequest().required()}).required()}static checkAndUpdatePaymentStatusPaymentLink(){return a.object({body:n.PaymentStatusUpdateRequest().required()}).required()}static checkCredit(){return a.object({aggregator:a.string().allow("")})}static createOrderHandlerPaymentLink(){return a.object({body:n.CreateOrderUserRequest().required()}).required()}static createPaymentLink(){return a.object({body:n.CreatePaymentLinkRequest().required()}).required()}static createPaymentOrder(){return a.object({body:n.PaymentOrderRequest().required()}).required()}static customerCreditSummary(){return a.object({aggregator:a.string().allow("")})}static customerOnboard(){return a.object({body:n.CustomerOnboardingRequest().required()}).required()}static deleteUserCard(){return a.object({body:n.DeletehCardRequest().required()}).required()}static delinkWallet(){return a.object({body:n.WalletDelinkRequestSchema().required()}).required()}static enableOrDisableRefundTransferMode(){return a.object({body:n.UpdateRefundTransferModeRequest().required()}).required()}static getActiveCardAggregator(){return a.object({refresh:a.boolean()})}static getActiveRefundTransferModes(){return a.object({})}static getActiveUserCards(){return a.object({forceRefresh:a.boolean()})}static getAggregatorsConfig(){return a.object({xApiToken:a.string().allow(""),refresh:a.boolean()})}static getEpaylaterBannerDetails(){return a.object({})}static getOrderBeneficiariesDetail(){return a.object({orderId:a.string().allow("").required()}).required()}static getPaymentLink(){return a.object({paymentLinkId:a.string().allow("")})}static getPaymentModeRoutes(){return a.object({amount:a.number().required(),cartId:a.string().allow(""),checkoutMode:a.string().allow(""),refresh:a.boolean(),orderId:a.string().allow(""),cardReference:a.string().allow(""),userDetails:a.string().allow(""),displaySplit:a.boolean(),advancePayment:a.boolean(),shipmentId:a.string().allow("")}).required()}static getPaymentModeRoutesPaymentLink(){return a.object({paymentLinkId:a.string().allow("").required()}).required()}static getPosPaymentModeRoutes(){return a.object({amount:a.number().required(),cartId:a.string().allow(""),pincode:a.string().allow("").required(),checkoutMode:a.string().allow(""),refresh:a.boolean(),cardReference:a.string().allow(""),orderType:a.string().allow("").required(),userDetails:a.string().allow("")}).required()}static getRupifiBannerDetails(){return a.object({})}static getUserBeneficiariesDetail(){return a.object({orderId:a.string().allow("").required()}).required()}static initialisePayment(){return a.object({body:n.PaymentInitializationRequest().required()}).required()}static initialisePaymentPaymentLink(){return a.object({body:n.PaymentInitializationRequest().required()}).required()}static linkWallet(){return a.object({body:n.WalletVerifyRequestSchema().required()}).required()}static outstandingOrderDetails(){return a.object({aggregator:a.string().allow("")})}static paidOrderDetails(){return a.object({aggregator:a.string().allow("")})}static pollingPaymentLink(){return a.object({paymentLinkId:a.string().allow("")})}static redirectToAggregator(){return a.object({source:a.string().allow(""),aggregator:a.string().allow("")})}static renderHTML(){return a.object({body:n.renderHTMLRequest().required()}).required()}static resendOrCancelPayment(){return a.object({body:n.ResendOrCancelPaymentRequest().required()}).required()}static resendPaymentLink(){return a.object({body:n.CancelOrResendPaymentLinkRequest().required()}).required()}static updateDefaultBeneficiary(){return a.object({body:n.SetDefaultBeneficiaryRequest().required()}).required()}static validateVPA(){return a.object({body:n.ValidateVPARequest().required()}).required()}static verifyAndChargePayment(){return a.object({body:n.ChargeCustomerRequest().required()}).required()}static verifyCustomerForPayment(){return a.object({body:n.ValidateCustomerRequest().required()}).required()}static verifyIfscCode(){return a.object({ifscCode:a.string().allow("")})}static verifyOtpAndAddBeneficiaryForBank(){return a.object({body:n.AddBeneficiaryViaOtpVerificationRequest().required()}).required()}static verifyOtpAndAddBeneficiaryForWallet(){return a.object({body:n.WalletOtpRequest().required()}).required()}static walletLinkInitate(){return a.object({body:n.WalletLinkRequestSchema().required()}).required()}}},4823:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(2857)),l=r(6962),{Logger:c}=r(7378),u=r(2705);e.exports=class{constructor(e){this._conf=e,this._relativeUrls={addAddress:"/service/application/pos/cart/v1.0/address",addItems:"/service/application/pos/cart/v1.0/detail",applyCoupon:"/service/application/pos/cart/v1.0/coupon",applyRewardPoints:"/service/application/pos/cart/v1.0/redeem/points/",checkoutCart:"/service/application/pos/cart/v1.0/checkout",getAddressById:"/service/application/pos/cart/v1.0/address/{id}",getAddresses:"/service/application/pos/cart/v1.0/address",getAvailableDeliveryModes:"/service/application/pos/cart/v1.0/available-delivery-mode",getBulkDiscountOffers:"/service/application/pos/cart/v1.0/bulk-price",getCart:"/service/application/pos/cart/v1.0/detail",getCartLastModified:"/service/application/pos/cart/v1.0/detail",getCartShareLink:"/service/application/pos/cart/v1.0/share-cart",getCartSharedItems:"/service/application/pos/cart/v1.0/share-cart/{token}",getCoupons:"/service/application/pos/cart/v1.0/coupon",getItemCount:"/service/application/pos/cart/v1.0/basic",getShipments:"/service/application/pos/cart/v1.0/shipment",getStoreAddressByUid:"/service/application/pos/cart/v1.0/store-address",removeAddress:"/service/application/pos/cart/v1.0/address/{id}",removeCoupon:"/service/application/pos/cart/v1.0/coupon",selectAddress:"/service/application/pos/cart/v1.0/select-address",selectPaymentMode:"/service/application/pos/cart/v1.0/payment",updateAddress:"/service/application/pos/cart/v1.0/address/{id}",updateCart:"/service/application/pos/cart/v1.0/detail",updateCartMeta:"/service/application/pos/cart/v1.0/meta",updateCartWithSharedItems:"/service/application/pos/cart/v1.0/share-cart/{token}/{action}",updateShipments:"/service/application/pos/cart/v1.0/shipment",validateCouponForPayment:"/service/application/pos/cart/v1.0/payment/validate/"},this._urls=Object.entries(this._relativeUrls).reduce(((t,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addAddress({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.addAddress().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.addAddress().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > addAddress \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.addAddress,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SaveAddressResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > addAddress \n ${m}`})}return p}async addItems({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.addItems().validate({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.addItems().validate({body:e,i:t,b:r,areaCode:u,buyNow:d,id:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > addItems \n ${f}`});const y={};y.i=t,y.b=r,y.area_code=u,y.buy_now=d,y.id=p;const b=await a.execute(this._conf,"post",s({url:this._urls.addItems,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.AddCartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > addItems \n ${_}`})}return b}async applyCoupon({body:e,i:t,b:r,p:u,id:d,buyNow:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.applyCoupon().validate({body:e,i:t,b:r,p:u,id:d,buyNow:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.applyCoupon().validate({body:e,i:t,b:r,p:u,id:d,buyNow:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > applyCoupon \n ${f}`});const y={};y.i=t,y.b=r,y.p=u,y.id=d,y.buy_now=p;const b=await a.execute(this._conf,"post",s({url:this._urls.applyCoupon,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.CartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > applyCoupon \n ${_}`})}return b}async applyRewardPoints({body:e,id:t,i:r,b:u,buyNow:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.applyRewardPoints().validate({body:e,id:t,i:r,b:u,buyNow:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:w}=i.applyRewardPoints().validate({body:e,id:t,i:r,b:u,buyNow:d},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > applyRewardPoints \n ${w}`});const f={};f.id=t,f.i=r,f.b=u,f.buy_now=d;const y=await a.execute(this._conf,"post",s({url:this._urls.applyRewardPoints,params:{}}),f,e,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.CartDetailResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > applyRewardPoints \n ${h}`})}return y}async checkoutCart({body:e,id:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.checkoutCart().validate({body:e,id:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.checkoutCart().validate({body:e,id:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > checkoutCart \n ${p}`});const g={};g.id=t;const m=await a.execute(this._conf,"post",s({url:this._urls.checkoutCart,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.CartCheckoutResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > checkoutCart \n ${f}`})}return m}async getAddressById({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:f}=i.getAddressById().validate({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:y}=i.getAddressById().validate({id:e,cartId:t,buyNow:r,mobileNo:u,checkoutMode:d,tags:p,isDefault:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getAddressById \n ${y}`});const b={};b.cart_id=t,b.buy_now=r,b.mobile_no=u,b.checkout_mode=d,b.tags=p,b.is_default=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getAddressById,params:{id:e}}),b,void 0,{...m},{responseHeaders:w});let _=h;w&&(_=h[0]);const{error:v}=l.Address().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getAddressById \n ${v}`})}return h}async getAddresses({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.getAddresses().validate({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.getAddresses().validate({cartId:e,buyNow:t,mobileNo:r,checkoutMode:u,tags:d,isDefault:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getAddresses \n ${f}`});const y={};y.cart_id=e,y.buy_now=t,y.mobile_no=r,y.checkout_mode=u,y.tags=d,y.is_default=p;const b=await a.execute(this._conf,"get",s({url:this._urls.getAddresses,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.GetAddressesResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getAddresses \n ${_}`})}return b}async getAvailableDeliveryModes({areaCode:e,id:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getAvailableDeliveryModes().validate({areaCode:e,id:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getAvailableDeliveryModes().validate({areaCode:e,id:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getAvailableDeliveryModes \n ${p}`});const g={};g.area_code=e,g.id=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getAvailableDeliveryModes,params:{}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.CartDeliveryModesResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getAvailableDeliveryModes \n ${f}`})}return m}async getBulkDiscountOffers({itemId:e,articleId:t,uid:r,slug:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getBulkDiscountOffers().validate({itemId:e,articleId:t,uid:r,slug:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getBulkDiscountOffers().validate({itemId:e,articleId:t,uid:r,slug:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getBulkDiscountOffers \n ${m}`});const w={};w.item_id=e,w.article_id=t,w.uid=r,w.slug=u;const f=await a.execute(this._conf,"get",s({url:this._urls.getBulkDiscountOffers,params:{}}),w,void 0,{...d},{responseHeaders:p});let y=f;p&&(y=f[0]);const{error:b}=l.BulkPriceResponse().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getBulkDiscountOffers \n ${b}`})}return f}async getCart({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:f}=i.getCart().validate({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:y}=i.getCart().validate({id:e,i:t,b:r,c:u,assignCardId:d,areaCode:p,buyNow:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCart \n ${y}`});const b={};b.id=e,b.i=t,b.b=r,b.c=u,b.assign_card_id=d,b.area_code=p,b.buy_now=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getCart,params:{}}),b,void 0,{...m},{responseHeaders:w});let _=h;w&&(_=h[0]);const{error:v}=l.CartDetailResponse().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCart \n ${v}`})}return h}async getCartLastModified({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:l}=i.getCartLastModified().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(l)return Promise.reject(new n(l));const{error:d}=i.getCartLastModified().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCartLastModified \n ${d}`});const p={};p.id=e;const g=await a.execute(this._conf,"head",s({url:this._urls.getCartLastModified,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=u.string().allow("").validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCartLastModified \n ${w}`})}return g}async getCartShareLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCartShareLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCartShareLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCartShareLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getCartShareLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.GetShareCartLinkResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCartShareLink \n ${m}`})}return p}async getCartSharedItems({token:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCartSharedItems().validate({token:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCartSharedItems().validate({token:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCartSharedItems \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getCartSharedItems,params:{token:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.SharedCartResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCartSharedItems \n ${m}`})}return p}async getCoupons({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getCoupons().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getCoupons().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getCoupons \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getCoupons,params:{}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.GetCouponResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getCoupons \n ${f}`})}return m}async getItemCount({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.getItemCount().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.getItemCount().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getItemCount \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getItemCount,params:{}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.CartItemCountResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getItemCount \n ${f}`})}return m}async getShipments({pickAtStoreUid:e,orderingStoreId:t,p:r,id:u,addressId:d,areaCode:p,orderType:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:f}=i.getShipments().validate({pickAtStoreUid:e,orderingStoreId:t,p:r,id:u,addressId:d,areaCode:p,orderType:g},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:y}=i.getShipments().validate({pickAtStoreUid:e,orderingStoreId:t,p:r,id:u,addressId:d,areaCode:p,orderType:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getShipments \n ${y}`});const b={};b.pick_at_store_uid=e,b.ordering_store_id=t,b.p=r,b.id=u,b.address_id=d,b.area_code=p,b.order_type=g;const h=await a.execute(this._conf,"get",s({url:this._urls.getShipments,params:{}}),b,void 0,{...m},{responseHeaders:w});let _=h;w&&(_=h[0]);const{error:v}=l.CartShipmentsResponse().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getShipments \n ${v}`})}return h}async getStoreAddressByUid({storeUid:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getStoreAddressByUid().validate({storeUid:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getStoreAddressByUid().validate({storeUid:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > getStoreAddressByUid \n ${d}`});const p={};p.store_uid=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getStoreAddressByUid,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.StoreDetailsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > getStoreAddressByUid \n ${w}`})}return g}async removeAddress({id:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.removeAddress().validate({id:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.removeAddress().validate({id:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > removeAddress \n ${d}`});const p=await a.execute(this._conf,"delete",s({url:this._urls.removeAddress,params:{id:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.DeleteAddressResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > removeAddress \n ${m}`})}return p}async removeCoupon({id:e,buyNow:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.removeCoupon().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.removeCoupon().validate({id:e,buyNow:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > removeCoupon \n ${p}`});const g={};g.id=e,g.buy_now=t;const m=await a.execute(this._conf,"delete",s({url:this._urls.removeCoupon,params:{}}),g,void 0,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.CartDetailResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > removeCoupon \n ${f}`})}return m}async selectAddress({body:e,cartId:t,buyNow:r,i:u,b:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.selectAddress().validate({body:e,cartId:t,buyNow:r,i:u,b:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:w}=i.selectAddress().validate({body:e,cartId:t,buyNow:r,i:u,b:d},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > selectAddress \n ${w}`});const f={};f.cart_id=t,f.buy_now=r,f.i=u,f.b=d;const y=await a.execute(this._conf,"post",s({url:this._urls.selectAddress,params:{}}),f,e,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.CartDetailResponse().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > selectAddress \n ${h}`})}return y}async selectPaymentMode({body:e,id:t,buyNow:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.selectPaymentMode().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.selectPaymentMode().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > selectPaymentMode \n ${g}`});const m={};m.id=t,m.buy_now=r;const w=await a.execute(this._conf,"put",s({url:this._urls.selectPaymentMode,params:{}}),m,e,{...u},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=l.CartDetailResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > selectPaymentMode \n ${y}`})}return w}async updateAddress({id:e,body:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateAddress().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateAddress().validate({id:e,body:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateAddress \n ${p}`});const g=await a.execute(this._conf,"put",s({url:this._urls.updateAddress,params:{id:e}}),{},t,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.UpdateAddressResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateAddress \n ${w}`})}return g}async updateCart({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.updateCart().validate({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.updateCart().validate({body:e,id:t,i:r,b:u,areaCode:d,buyNow:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateCart \n ${f}`});const y={};y.id=t,y.i=r,y.b=u,y.area_code=d,y.buy_now=p;const b=await a.execute(this._conf,"put",s({url:this._urls.updateCart,params:{}}),y,e,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.UpdateCartDetailResponse().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateCart \n ${_}`})}return b}async updateCartMeta({body:e,id:t,buyNow:r,requestHeaders:u}={requestHeaders:{}},{responseHeaders:d}={responseHeaders:!1}){const{error:p}=i.updateCartMeta().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!0});if(p)return Promise.reject(new n(p));const{error:g}=i.updateCartMeta().validate({body:e,id:t,buyNow:r},{abortEarly:!1,allowUnknown:!1});g&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateCartMeta \n ${g}`});const m={};m.id=t,m.buy_now=r;const w=await a.execute(this._conf,"put",s({url:this._urls.updateCartMeta,params:{}}),m,e,{...u},{responseHeaders:d});let f=w;d&&(f=w[0]);const{error:y}=l.CartMetaResponse().validate(f,{abortEarly:!1,allowUnknown:!0});if(y){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(y));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateCartMeta \n ${y}`})}return w}async updateCartWithSharedItems({token:e,action:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateCartWithSharedItems().validate({token:e,action:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateCartWithSharedItems().validate({token:e,action:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateCartWithSharedItems \n ${p}`});const g=await a.execute(this._conf,"post",s({url:this._urls.updateCartWithSharedItems,params:{token:e,action:t}}),{},void 0,{...r},{responseHeaders:u});let m=g;u&&(m=g[0]);const{error:w}=l.SharedCartResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateCartWithSharedItems \n ${w}`})}return g}async updateShipments({body:e,i:t,p:r,id:u,addressId:d,areaCode:p,orderType:g,requestHeaders:m}={requestHeaders:{}},{responseHeaders:w}={responseHeaders:!1}){const{error:f}=i.updateShipments().validate({body:e,i:t,p:r,id:u,addressId:d,areaCode:p,orderType:g},{abortEarly:!1,allowUnknown:!0});if(f)return Promise.reject(new n(f));const{error:y}=i.updateShipments().validate({body:e,i:t,p:r,id:u,addressId:d,areaCode:p,orderType:g},{abortEarly:!1,allowUnknown:!1});y&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > updateShipments \n ${y}`});const b={};b.i=t,b.p=r,b.id=u,b.address_id=d,b.area_code=p,b.order_type=g;const h=await a.execute(this._conf,"put",s({url:this._urls.updateShipments,params:{}}),b,e,{...m},{responseHeaders:w});let _=h;w&&(_=h[0]);const{error:v}=l.CartShipmentsResponse().validate(_,{abortEarly:!1,allowUnknown:!0});if(v){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(v));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > updateShipments \n ${v}`})}return h}async validateCouponForPayment({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:w,type:f,cardId:y,requestHeaders:b}={requestHeaders:{}},{responseHeaders:h}={responseHeaders:!1}){const{error:_}=i.validateCouponForPayment().validate({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:w,type:f,cardId:y},{abortEarly:!1,allowUnknown:!0});if(_)return Promise.reject(new n(_));const{error:v}=i.validateCouponForPayment().validate({id:e,buyNow:t,addressId:r,paymentMode:u,paymentIdentifier:d,aggregatorName:p,merchantCode:g,iin:m,network:w,type:f,cardId:y},{abortEarly:!1,allowUnknown:!1});v&&c({level:"WARN",message:`Parameter Validation warrnings for application > PosCart > validateCouponForPayment \n ${v}`});const k={};k.id=e,k.buy_now=t,k.address_id=r,k.payment_mode=u,k.payment_identifier=d,k.aggregator_name=p,k.merchant_code=g,k.iin=m,k.network=w,k.type=f,k.card_id=y;const R=await a.execute(this._conf,"get",s({url:this._urls.validateCouponForPayment,params:{}}),k,void 0,{...b},{responseHeaders:h});let P=R;h&&(P=R[0]);const{error:j}=l.PaymentCouponValidate().validate(P,{abortEarly:!1,allowUnknown:!0});if(j){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(j));c({level:"WARN",message:`Response Validation Warnings for application > PosCart > validateCouponForPayment \n ${j}`})}return R}}},6962:(e,t,r)=>{const a=r(2705);class n{static ActionQuery(){return a.object({product_slug:a.array().items(a.string().allow(""))})}static AddCartDetailResponse(){return a.object({cart:n.CartDetailResponse(),message:a.string().allow(""),partial:a.boolean(),success:a.boolean()})}static AddCartRequest(){return a.object({items:a.array().items(n.AddProductCart()),new_cart:a.boolean()})}static AddProductCart(){return a.object({_custom_json:a.any(),article_assignment:a.any(),article_id:a.string().allow(""),display:a.string().allow(""),extra_meta:a.any(),item_id:a.number(),item_size:a.string().allow(""),meta:a.any(),parent_item_identifiers:a.array().items(a.object().pattern(/\S/,a.string().allow(""))),pos:a.boolean(),product_group_tags:a.array().items(a.string().allow("").allow(null)),quantity:a.number(),seller_id:a.number(),store_id:a.number()})}static Address(){return a.object({_custom_json:a.any(),address:a.string().allow(""),address_type:a.string().allow(""),area:a.string().allow(""),area_code:a.string().allow(""),area_code_slug:a.string().allow(""),checkout_mode:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),country_code:a.string().allow(""),country_iso_code:a.string().allow(""),country_phone_code:a.string().allow(""),created_by_user_id:a.string().allow(""),email:a.string().allow(""),geo_location:n.GeoLocation(),google_map_point:a.any(),id:a.string().allow(""),is_active:a.boolean(),is_default_address:a.boolean(),landmark:a.string().allow(""),meta:a.any(),name:a.string().allow(""),phone:a.string().allow(""),sector:a.string().allow(""),state:a.string().allow(""),state_code:a.string().allow(""),tags:a.array().items(a.string().allow("")),user_id:a.string().allow("")})}static AppliedFreeArticles(){return a.object({article_id:a.string().allow(""),free_gift_item_details:n.FreeGiftItem(),parent_item_identifier:a.string().allow(""),quantity:a.number()})}static AppliedPromotion(){return a.object({amount:a.number(),applied_free_articles:a.array().items(n.AppliedFreeArticles()),article_quantity:a.number(),buy_rules:a.array().items(n.BuyRules()),currency:n.CartCurrency(),discount_rules:a.array().items(n.DiscountRulesApp()),mrp_promotion:a.boolean(),offer_text:a.string().allow(""),ownership:n.Ownership(),promo_id:a.string().allow(""),promotion_group:a.string().allow(""),promotion_name:a.string().allow(""),promotion_type:a.string().allow("")})}static ApplyCouponRequest(){return a.object({coupon_code:a.string().allow("").required()})}static ArticleGiftDetail(){return a.object({article_id:n.GiftDetail()})}static ArticlePriceInfo(){return a.object({base:n.BasePrice(),converted:n.BasePrice()})}static BaseInfo(){return a.object({name:a.string().allow(""),uid:a.number()})}static BasePrice(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number()})}static BulkPriceOffer(){return a.object({offers:a.array().items(n.OfferItem()),seller:n.OfferSeller()})}static BulkPriceResponse(){return a.object({data:a.array().items(n.BulkPriceOffer())})}static BuyRules(){return a.object({cart_conditions:a.any(),item_criteria:a.any()})}static CartBreakup(){return a.object({coupon:n.CouponBreakup(),display:a.array().items(n.DisplayBreakup()),loyalty_points:n.LoyaltyPoints(),raw:n.RawBreakup()})}static CartCheckoutCustomMeta(){return a.object({key:a.string().allow("").required(),value:a.string().allow("").required()})}static CartCheckoutResponse(){return a.object({app_intercept_url:a.string().allow(""),callback_url:a.string().allow(""),cart:n.CheckCart(),data:a.any(),message:a.string().allow(""),order_id:a.string().allow(""),payment_confirm_url:a.string().allow(""),success:a.boolean()})}static CartCurrency(){return a.object({code:a.string().allow(""),symbol:a.string().allow("")})}static CartDeliveryModesResponse(){return a.object({available_modes:a.array().items(a.string().allow("")),pickup_stores:a.array().items(a.number())})}static CartDetailResponse(){return a.object({applied_promo_details:a.array().items(n.AppliedPromotion()),breakup_values:n.CartBreakup(),buy_now:a.boolean(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),pan_config:a.any(),pan_no:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean()})}static CartItemCountResponse(){return a.object({user_cart_items_count:a.number()})}static CartMetaMissingResponse(){return a.object({errors:a.array().items(a.string().allow(""))})}static CartMetaRequest(){return a.object({checkout_mode:a.string().allow(""),comment:a.string().allow(""),delivery_slots:a.any(),gift_details:n.ArticleGiftDetail(),gstin:a.string().allow(""),pick_up_customer_details:a.any()})}static CartMetaResponse(){return a.object({is_valid:a.boolean(),message:a.string().allow("")})}static CartPosCheckoutDetailRequest(){return a.object({address_id:a.string().allow(""),aggregator:a.string().allow(""),billing_address:a.any(),billing_address_id:a.string().allow(""),callback_url:a.string().allow("").allow(null),custom_meta:a.array().items(n.CartCheckoutCustomMeta()),customer_details:a.any().allow(null),delivery_address:a.any(),extra_meta:a.any(),files:a.array().items(n.Files()),id:a.string().allow("").allow(null),merchant_code:a.string().allow(""),meta:a.any(),order_type:a.string().allow("").required(),ordering_store:a.number().allow(null),payment_auto_confirm:a.boolean(),payment_identifier:a.string().allow("").allow(null),payment_mode:a.string().allow("").required(),payment_params:a.any().allow(null),pick_at_store_uid:a.number().allow(null),pos:a.boolean(),staff:n.StaffCheckout()})}static CartProduct(){return a.object({_custom_json:a.any(),action:n.ProductAction(),brand:n.BaseInfo(),categories:a.array().items(n.CategoryInfo()),images:a.array().items(n.ProductImage()),item_code:a.string().allow("").allow(null),name:a.string().allow(""),slug:a.string().allow(""),tags:a.array().items(a.string().allow("")),teaser_tag:n.Tags(),type:a.string().allow(""),uid:a.number()})}static CartProductIdentifer(){return a.object({identifier:a.string().allow("")})}static CartProductInfo(){return a.object({article:n.ProductArticle(),availability:n.ProductAvailability(),bulk_offer:a.any(),coupon:n.CouponDetails(),coupon_message:a.string().allow(""),custom_order:a.any(),delivery_promise:n.ShipmentPromise(),discount:a.string().allow(""),identifiers:n.CartProductIdentifer().required(),is_set:a.boolean(),key:a.string().allow(""),message:a.string().allow(""),moq:a.any(),parent_item_identifiers:a.any(),price:n.ProductPriceInfo(),price_per_unit:n.ProductPriceInfo(),product:n.CartProduct(),promo_meta:n.PromoMeta(),promotions_applied:a.array().items(n.AppliedPromotion()),quantity:a.number()})}static CartShipmentsResponse(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),error:a.boolean(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),last_modified:a.string().allow(""),message:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),shipments:a.array().items(n.ShipmentResponse()),uid:a.string().allow("")})}static CategoryInfo(){return a.object({name:a.string().allow(""),uid:a.number()})}static CheckCart(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),cod_available:a.boolean(),cod_charges:a.number(),cod_message:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_charge_order_value:a.number(),delivery_charges:a.number(),delivery_promise:n.ShipmentPromise(),error_message:a.string().allow(""),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),order_id:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),store_code:a.string().allow(""),store_emps:a.array().items(a.any()),success:a.boolean(),uid:a.string().allow(""),user_type:a.string().allow("")})}static Coupon(){return a.object({coupon_code:a.string().allow(""),coupon_type:a.string().allow("").allow(null),coupon_value:a.number(),description:a.string().allow("").allow(null),expires_on:a.string().allow(""),is_applicable:a.boolean(),is_applied:a.boolean(),max_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number(),sub_title:a.string().allow(""),title:a.string().allow("")})}static CouponBreakup(){return a.object({code:a.string().allow(""),coupon_type:a.string().allow("").allow(null),coupon_value:a.number(),description:a.string().allow("").allow(null),is_applied:a.boolean(),max_discount_value:a.number(),message:a.string().allow(""),minimum_cart_value:a.number(),sub_title:a.string().allow("").allow(null),title:a.string().allow("").allow(null),type:a.string().allow(""),uid:a.string().allow(""),value:a.number()})}static CouponDetails(){return a.object({code:a.string().allow(""),discount_single_quantity:a.number(),discount_total_quantity:a.number()})}static CouponValidity(){return a.object({code:a.string().allow("").allow(null),discount:a.number(),display_message_en:a.string().allow("").allow(null),next_validation_required:a.boolean().allow(null),title:a.string().allow(""),valid:a.boolean()})}static CustomerDetails(){return a.object({email:a.string().allow("").allow(null),mobile:a.string().allow("").required(),name:a.string().allow("")})}static DeleteAddressResponse(){return a.object({id:a.string().allow(""),is_deleted:a.boolean()})}static DiscountRulesApp(){return a.object({item_criteria:a.any(),matched_buy_rules:a.array().items(a.string().allow("")),offer:a.any(),raw_offer:a.any()})}static DisplayBreakup(){return a.object({currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),display:a.string().allow(""),key:a.string().allow(""),message:a.array().items(a.string().allow("")),value:a.number()})}static Files(){return a.object({key:a.string().allow("").required(),values:a.array().items(a.string().allow("")).required()})}static FreeGiftItem(){return a.object({item_brand_name:a.string().allow(""),item_id:a.number(),item_images_url:a.array().items(a.string().allow("")),item_name:a.string().allow(""),item_price_details:a.any(),item_slug:a.string().allow("")})}static GeoLocation(){return a.object({latitude:a.number(),longitude:a.number()})}static GetAddressesResponse(){return a.object({address:a.array().items(n.Address()),pii_masking:a.boolean()})}static GetCouponResponse(){return a.object({available_coupon_list:a.array().items(n.Coupon()),page:n.PageCoupon()})}static GetShareCartLinkRequest(){return a.object({id:a.string().allow(""),meta:a.any()})}static GetShareCartLinkResponse(){return a.object({share_url:a.string().allow(""),token:a.string().allow("")})}static GiftDetail(){return a.object({gift_message:a.string().allow(""),is_gift_applied:a.boolean()})}static LoyaltyPoints(){return a.object({applicable:a.number(),description:a.string().allow(""),is_applied:a.boolean(),total:a.number()})}static OfferItem(){return a.object({auto_applied:a.boolean(),best:a.boolean(),margin:a.number(),price:n.OfferPrice(),quantity:a.number(),total:a.number(),type:a.string().allow("")})}static OfferPrice(){return a.object({bulk_effective:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number()})}static OfferSeller(){return a.object({name:a.string().allow(""),uid:a.number()})}static Ownership(){return a.object({payable_by:a.string().allow(""),payable_category:a.string().allow("")})}static PageCoupon(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),total:a.number(),total_item_count:a.number()})}static PaymentCouponValidate(){return a.object({coupon_validity:n.CouponValidity(),message:a.string().allow(""),success:a.boolean().required()})}static PaymentSelectionLock(){return a.object({default_options:a.string().allow(""),enabled:a.boolean(),payment_identifier:a.string().allow("")})}static PickupStoreDetail(){return a.object({address:a.string().allow(""),address_type:a.string().allow(""),area:a.string().allow(""),area_code:a.string().allow(""),area_code_slug:a.string().allow(""),city:a.string().allow(""),country:a.string().allow(""),email:a.string().allow(""),id:a.number(),landmark:a.string().allow(""),name:a.string().allow(""),phone:a.string().allow(""),pincode:a.number(),state:a.string().allow(""),store_code:a.string().allow(""),uid:a.number()})}static ProductAction(){return a.object({query:n.ActionQuery(),type:a.string().allow(""),url:a.string().allow("")})}static ProductArticle(){return a.object({_custom_json:a.any(),cart_item_meta:a.any(),extra_meta:a.any(),gift_card:a.any(),identifier:a.any(),is_gift_visible:a.boolean(),meta:a.any(),mto_quantity:a.number(),parent_item_identifiers:a.any(),price:n.ArticlePriceInfo(),product_group_tags:a.array().items(a.string().allow("")),quantity:a.number(),seller:n.BaseInfo(),seller_identifier:a.string().allow(""),size:a.string().allow(""),store:n.StoreInfo(),tags:a.array().items(a.string().allow("")),type:a.string().allow(""),uid:a.string().allow("")})}static ProductAvailability(){return a.object({available_sizes:a.array().items(n.ProductAvailabilitySize()),deliverable:a.boolean(),is_valid:a.boolean(),other_store_quantity:a.number(),out_of_stock:a.boolean(),sizes:a.array().items(a.string().allow(""))})}static ProductAvailabilitySize(){return a.object({display:a.string().allow(""),is_available:a.boolean(),value:a.string().allow("")})}static ProductImage(){return a.object({aspect_ratio:a.string().allow(""),secure_url:a.string().allow(""),url:a.string().allow("")})}static ProductPrice(){return a.object({add_on:a.number(),currency_code:a.string().allow(""),currency_symbol:a.string().allow(""),effective:a.number(),marked:a.number(),selling:a.number()})}static ProductPriceInfo(){return a.object({base:n.ProductPrice(),converted:n.ProductPrice()})}static PromiseFormatted(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static PromiseISOFormat(){return a.object({max:a.string().allow(""),min:a.string().allow("")})}static PromiseTimestamp(){return a.object({max:a.number(),min:a.number()})}static PromoMeta(){return a.object({message:a.string().allow("")})}static RawBreakup(){return a.object({cod_charge:a.number(),convenience_fee:a.number(),coupon:a.number(),delivery_charge:a.number(),discount:a.number(),fynd_cash:a.number(),gift_card:a.number(),gst_charges:a.number(),mrp_total:a.number(),subtotal:a.number(),total:a.number(),vog:a.number(),you_saved:a.number()})}static RewardPointRequest(){return a.object({points:a.boolean().required()})}static SaveAddressResponse(){return a.object({id:a.string().allow(""),is_default_address:a.boolean(),success:a.boolean()})}static SelectCartAddressRequest(){return a.object({billing_address_id:a.string().allow(""),cart_id:a.string().allow(""),id:a.string().allow("")})}static SharedCart(){return a.object({breakup_values:n.CartBreakup(),buy_now:a.boolean(),cart_id:a.number(),checkout_mode:a.string().allow(""),comment:a.string().allow(""),coupon_text:a.string().allow(""),currency:n.CartCurrency(),delivery_charge_info:a.string().allow(""),delivery_promise:n.ShipmentPromise(),gstin:a.string().allow(""),id:a.string().allow(""),is_valid:a.boolean(),items:a.array().items(n.CartProductInfo()),last_modified:a.string().allow(""),message:a.string().allow(""),payment_selection_lock:n.PaymentSelectionLock(),restrict_checkout:a.boolean(),shared_cart_details:n.SharedCartDetails(),uid:a.string().allow("")})}static SharedCartDetails(){return a.object({created_on:a.string().allow(""),meta:a.any(),source:a.any(),token:a.string().allow(""),user:a.any()})}static SharedCartResponse(){return a.object({cart:n.SharedCart(),error:a.string().allow("")})}static ShipmentPromise(){return a.object({formatted:n.PromiseFormatted(),iso:n.PromiseISOFormat(),timestamp:n.PromiseTimestamp()})}static ShipmentResponse(){return a.object({box_type:a.string().allow("").allow(null),dp_id:a.string().allow("").allow(null),dp_options:a.any().allow(null),fulfillment_id:a.number(),fulfillment_type:a.string().allow(""),items:a.array().items(n.CartProductInfo()),order_type:a.string().allow(""),promise:n.ShipmentPromise(),shipment_type:a.string().allow(""),shipments:a.number()})}static StaffCheckout(){return a.object({_id:a.string().allow("").required(),employee_code:a.string().allow(""),first_name:a.string().allow("").required(),last_name:a.string().allow("").required(),user:a.string().allow("").required()})}static StoreDetailsResponse(){return a.object({items:a.array().items(n.PickupStoreDetail())})}static StoreInfo(){return a.object({name:a.string().allow(""),store_code:a.string().allow(""),uid:a.number()})}static Tags(){return a.object({tags:a.any()})}static UpdateAddressResponse(){return a.object({id:a.string().allow(""),is_default_address:a.boolean(),is_updated:a.boolean(),success:a.boolean()})}static UpdateCartDetailResponse(){return a.object({cart:n.CartDetailResponse(),message:a.string().allow(""),success:a.boolean()})}static UpdateCartPaymentRequest(){return a.object({address_id:a.string().allow(""),aggregator_name:a.string().allow(""),id:a.string().allow(""),merchant_code:a.string().allow(""),payment_identifier:a.string().allow("").allow(null),payment_mode:a.string().allow("")})}static UpdateCartRequest(){return a.object({items:a.array().items(n.UpdateProductCart()),operation:a.string().allow("").required()})}static UpdateCartShipmentItem(){return a.object({article_uid:a.string().allow("").required(),quantity:a.number(),shipment_type:a.string().allow("").required()})}static UpdateCartShipmentRequest(){return a.object({shipments:a.array().items(n.UpdateCartShipmentItem()).required()})}static UpdateProductCart(){return a.object({_custom_json:a.any(),article_id:a.string().allow(""),extra_meta:a.any(),identifiers:n.CartProductIdentifer().required(),item_id:a.number(),item_index:a.number(),item_size:a.string().allow(""),meta:a.any(),parent_item_identifiers:a.any(),quantity:a.number()})}}e.exports=n},2857:(e,t,r)=>{const a=r(2705),n=r(6962);e.exports=class{static addAddress(){return a.object({body:n.Address().required()}).required()}static addItems(){return a.object({i:a.boolean(),b:a.boolean(),areaCode:a.string().allow(""),buyNow:a.boolean(),id:a.string().allow(""),body:n.AddCartRequest().required()}).required()}static applyCoupon(){return a.object({i:a.boolean(),b:a.boolean(),p:a.boolean(),id:a.string().allow(""),buyNow:a.boolean(),body:n.ApplyCouponRequest().required()}).required()}static applyRewardPoints(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),buyNow:a.boolean(),body:n.RewardPointRequest().required()}).required()}static checkoutCart(){return a.object({id:a.string().allow(""),body:n.CartPosCheckoutDetailRequest().required()}).required()}static getAddressById(){return a.object({id:a.string().allow("").required(),cartId:a.string().allow(""),buyNow:a.boolean(),mobileNo:a.string().allow(""),checkoutMode:a.string().allow(""),tags:a.string().allow(""),isDefault:a.boolean()}).required()}static getAddresses(){return a.object({cartId:a.string().allow(""),buyNow:a.boolean(),mobileNo:a.string().allow(""),checkoutMode:a.string().allow(""),tags:a.string().allow(""),isDefault:a.boolean()})}static getAvailableDeliveryModes(){return a.object({areaCode:a.string().allow("").required(),id:a.string().allow("")}).required()}static getBulkDiscountOffers(){return a.object({itemId:a.number(),articleId:a.string().allow(""),uid:a.number(),slug:a.string().allow("")})}static getCart(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),c:a.boolean(),assignCardId:a.number(),areaCode:a.string().allow(""),buyNow:a.boolean()})}static getCartLastModified(){return a.object({id:a.string().allow("")})}static getCartShareLink(){return a.object({body:n.GetShareCartLinkRequest().required()}).required()}static getCartSharedItems(){return a.object({token:a.string().allow("").required()}).required()}static getCoupons(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static getItemCount(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static getShipments(){return a.object({pickAtStoreUid:a.number(),orderingStoreId:a.number(),p:a.boolean(),id:a.string().allow(""),addressId:a.string().allow(""),areaCode:a.string().allow(""),orderType:a.string().allow("")})}static getStoreAddressByUid(){return a.object({storeUid:a.number().required()}).required()}static removeAddress(){return a.object({id:a.string().allow("").required()}).required()}static removeCoupon(){return a.object({id:a.string().allow(""),buyNow:a.boolean()})}static selectAddress(){return a.object({cartId:a.string().allow(""),buyNow:a.boolean(),i:a.boolean(),b:a.boolean(),body:n.SelectCartAddressRequest().required()}).required()}static selectPaymentMode(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),body:n.UpdateCartPaymentRequest().required()}).required()}static updateAddress(){return a.object({id:a.string().allow("").required(),body:n.Address().required()}).required()}static updateCart(){return a.object({id:a.string().allow(""),i:a.boolean(),b:a.boolean(),areaCode:a.string().allow(""),buyNow:a.boolean(),body:n.UpdateCartRequest().required()}).required()}static updateCartMeta(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),body:n.CartMetaRequest().required()}).required()}static updateCartWithSharedItems(){return a.object({token:a.string().allow("").required(),action:a.string().allow("").required()}).required()}static updateShipments(){return a.object({i:a.boolean(),p:a.boolean(),id:a.string().allow(""),addressId:a.string().allow(""),areaCode:a.string().allow(""),orderType:a.string().allow(""),body:n.UpdateCartShipmentRequest().required()}).required()}static validateCouponForPayment(){return a.object({id:a.string().allow(""),buyNow:a.boolean(),addressId:a.string().allow(""),paymentMode:a.string().allow(""),paymentIdentifier:a.string().allow(""),aggregatorName:a.string().allow(""),merchantCode:a.string().allow(""),iin:a.string().allow(""),network:a.string().allow(""),type:a.string().allow(""),cardId:a.string().allow("")})}}},4107:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=r(3589),l=r(3253),c=r(2743),{Logger:u}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async catalogueOrder({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.catalogueOrder().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.catalogueOrder().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > catalogueOrder \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.catalogueOrder,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.CatalogueOrderResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > catalogueOrder \n ${m}`})}return p}async getOfferByName({name:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getOfferByName().validate({name:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getOfferByName().validate({name:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getOfferByName \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getOfferByName,params:{name:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.Offer().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getOfferByName \n ${m}`})}return p}async getOrderDiscount({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.getOrderDiscount().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.getOrderDiscount().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getOrderDiscount \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getOrderDiscount,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.OrderDiscountResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getOrderDiscount \n ${m}`})}return p}async getUserPoints({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getUserPoints().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getUserPoints().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getUserPoints \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getUserPoints,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.PointsResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getUserPoints \n ${g}`})}return d}async getUserPointsHistory({pageId:e,pageSize:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:i}={responseHeaders:!1}){const{error:d}=l.getUserPointsHistory().validate({pageId:e,pageSize:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=l.getUserPointsHistory().validate({pageId:e,pageSize:t},{abortEarly:!1,allowUnknown:!1});p&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getUserPointsHistory \n ${p}`});const g={};g.page_id=e,g.page_size=t;const m=await a.execute(this._conf,"get",s({url:this._urls.getUserPointsHistory,params:{}}),g,void 0,{...r},{responseHeaders:i});let w=m;i&&(w=m[0]);const{error:f}=c.PointsHistoryResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getUserPointsHistory \n ${f}`})}return m}getUserPointsHistoryPaginator({pageSize:e}={}){const t=new i;return t.setCallback((async()=>{const r=t.nextId,a=(t.pageNo,await this.getUserPointsHistory({pageId:r,pageSize:e}));return t.setPaginator({hasNext:!!a.page.has_next,nextId:a.page.next_id}),a}).bind(this)),t}async getUserReferralDetails({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=l.getUserReferralDetails().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:i}=l.getUserReferralDetails().validate({},{abortEarly:!1,allowUnknown:!1});i&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > getUserReferralDetails \n ${i}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getUserReferralDetails,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=c.ReferralDetailsResponse().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > getUserReferralDetails \n ${g}`})}return d}async redeemReferralCode({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:i}=l.redeemReferralCode().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(i)return Promise.reject(new n(i));const{error:d}=l.redeemReferralCode().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&u({level:"WARN",message:`Parameter Validation warrnings for application > Rewards > redeemReferralCode \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.redeemReferralCode,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=c.RedeemReferralCodeResponse().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));u({level:"WARN",message:`Response Validation Warnings for application > Rewards > redeemReferralCode \n ${m}`})}return p}}},2743:(e,t,r)=>{const a=r(2705);class n{static Asset(){return a.object({aspect_ratio:a.string().allow(""),id:a.string().allow(""),secure_url:a.string().allow("")})}static CatalogueOrderRequest(){return a.object({articles:a.array().items(n.RewardsArticle())})}static CatalogueOrderResponse(){return a.object({articles:a.array().items(n.RewardsArticle())})}static DiscountProperties(){return a.object({absolute:a.number(),currency:a.string().allow(""),display_absolute:a.string().allow(""),display_percent:a.string().allow(""),percent:a.number()})}static Error(){return a.object({code:a.number(),exception:a.string().allow(""),info:a.string().allow(""),message:a.string().allow("")})}static Offer(){return a.object({_schedule:n.Schedule(),active:a.boolean(),application_id:a.string().allow(""),banner_image:n.Asset(),created_at:a.string().allow(""),name:a.string().allow(""),rule:a.any(),share:n.ShareMessages(),sub_text:a.string().allow(""),text:a.string().allow(""),type:a.string().allow(""),updated_at:a.string().allow(""),updated_by:a.string().allow(""),url:a.string().allow("")})}static OrderDiscountRequest(){return a.object({currency:a.string().allow(""),order_amount:a.number().required()})}static OrderDiscountResponse(){return a.object({applied_rule_bucket:n.OrderDiscountRuleBucket(),base_discount:n.DiscountProperties(),discount:n.DiscountProperties(),order_amount:a.number(),points:a.number()})}static OrderDiscountRuleBucket(){return a.object({high:a.number(),low:a.number(),max:a.number(),value:a.number(),value_type:a.string().allow("")})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static PointsHistory(){return a.object({_id:a.string().allow(""),application_id:a.string().allow(""),claimed:a.boolean(),created_at:a.string().allow(""),expires_on:a.string().allow(""),meta:a.any(),points:a.number(),remaining_points:a.number(),text_1:a.string().allow(""),text_2:a.string().allow(""),text_3:a.string().allow(""),txn_name:a.string().allow(""),updated_at:a.string().allow(""),user_id:a.string().allow("")})}static PointsHistoryResponse(){return a.object({items:a.array().items(n.PointsHistory()),page:n.Page()})}static PointsResponse(){return a.object({points:a.number()})}static RedeemReferralCodeRequest(){return a.object({device_id:a.string().allow(""),referral_code:a.string().allow("")})}static RedeemReferralCodeResponse(){return a.object({message:a.string().allow(""),points:a.number(),redeemed:a.boolean(),referrer_id:a.string().allow(""),referrer_info:a.string().allow("")})}static ReferralDetailsResponse(){return a.object({referral:n.Offer(),referrer_info:a.string().allow(""),share:n.ShareMessages(),terms_conditions_link:a.string().allow(""),user:n.ReferralDetailsUser()})}static ReferralDetailsUser(){return a.object({blocked:a.boolean(),points:a.number(),redeemed:a.boolean(),referral_code:a.string().allow("")})}static RewardsArticle(){return a.object({id:a.string().allow(""),points:a.number(),price:a.number()})}static Schedule(){return a.object({cron:a.string().allow(""),duration:a.number(),end:a.string().allow(""),start:a.string().allow("")})}static ShareMessages(){return a.object({email:a.number(),facebook:a.string().allow(""),fallback:a.string().allow(""),message:a.string().allow(""),messenger:a.string().allow(""),sms:a.string().allow(""),text:a.string().allow(""),twitter:a.string().allow(""),whatsapp:a.string().allow("")})}}e.exports=n},3253:(e,t,r)=>{const a=r(2705),n=r(2743);e.exports=class{static catalogueOrder(){return a.object({body:n.CatalogueOrderRequest().required()}).required()}static getOfferByName(){return a.object({name:a.string().allow("").required()}).required()}static getOrderDiscount(){return a.object({body:n.OrderDiscountRequest().required()}).required()}static getUserPoints(){return a.object({})}static getUserPointsHistory(){return a.object({pageId:a.string().allow(""),pageSize:a.number()})}static getUserReferralDetails(){return a.object({})}static redeemReferralCode(){return a.object({body:n.RedeemReferralCodeRequest().required()}).required()}}},3740:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(9421)),l=r(6734),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async createShortLink({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.createShortLink().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.createShortLink().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > createShortLink \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.createShortLink,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShortLinkRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > createShortLink \n ${m}`})}return p}async getApplicationQRCode({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getApplicationQRCode().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getApplicationQRCode().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getApplicationQRCode \n ${u}`});const d=await a.execute(this._conf,"post",s({url:this._urls.getApplicationQRCode,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.QRCodeResp().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Share > getApplicationQRCode \n ${g}`})}return d}async getCollectionQRCodeBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getCollectionQRCodeBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getCollectionQRCodeBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getCollectionQRCodeBySlug \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getCollectionQRCodeBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.QRCodeResp().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > getCollectionQRCodeBySlug \n ${m}`})}return p}async getOriginalShortLinkByHash({hash:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getOriginalShortLinkByHash().validate({hash:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getOriginalShortLinkByHash().validate({hash:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getOriginalShortLinkByHash \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getOriginalShortLinkByHash,params:{hash:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShortLinkRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > getOriginalShortLinkByHash \n ${m}`})}return p}async getProductQRCodeBySlug({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getProductQRCodeBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getProductQRCodeBySlug().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getProductQRCodeBySlug \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.getProductQRCodeBySlug,params:{slug:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.QRCodeResp().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > getProductQRCodeBySlug \n ${m}`})}return p}async getShortLinkByHash({hash:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getShortLinkByHash().validate({hash:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getShortLinkByHash().validate({hash:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getShortLinkByHash \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getShortLinkByHash,params:{hash:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ShortLinkRes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Share > getShortLinkByHash \n ${m}`})}return p}async getUrlQRCode({url:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getUrlQRCode().validate({url:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getUrlQRCode().validate({url:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Share > getUrlQRCode \n ${d}`});const p={};p.url=e;const g=await a.execute(this._conf,"post",s({url:this._urls.getUrlQRCode,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.QRCodeResp().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > Share > getUrlQRCode \n ${w}`})}return g}}},6734:(e,t,r)=>{const a=r(2705);class n{static Attribution(){return a.object({campaign_cookie_expiry:a.string().allow("")})}static CampaignShortLink(){return a.object({medium:a.string().allow(""),source:a.string().allow("")})}static ErrorRes(){return a.object({message:a.string().allow("")})}static QRCodeResp(){return a.object({link:a.string().allow(""),svg:a.string().allow("")})}static RedirectDevice(){return a.object({link:a.string().allow(""),type:a.string().allow("")})}static Redirects(){return a.object({android:n.RedirectDevice(),force_web:a.boolean(),ios:n.RedirectDevice(),web:n.WebRedirect()})}static ShortLinkReq(){return a.object({active:a.boolean(),attribution:n.Attribution(),campaign:n.CampaignShortLink(),count:a.number(),enable_tracking:a.boolean(),expire_at:a.string().allow(""),hash:a.string().allow(""),personalized:a.boolean(),redirects:n.Redirects(),social_media_tags:n.SocialMediaTags(),title:a.string().allow("").required(),url:a.string().allow("").required()})}static ShortLinkRes(){return a.object({_id:a.string().allow(""),active:a.boolean(),app_redirect:a.boolean(),application:a.string().allow(""),attribution:n.Attribution(),campaign:n.CampaignShortLink(),count:a.number(),created_at:a.string().allow(""),created_by:a.string().allow(""),enable_tracking:a.boolean(),expire_at:a.string().allow(""),fallback:a.string().allow(""),meta:a.any(),personalized:a.boolean(),redirects:n.Redirects(),social_media_tags:n.SocialMediaTags(),title:a.string().allow(""),updated_at:a.string().allow(""),url:n.UrlInfo(),user_id:a.string().allow("")})}static SocialMediaTags(){return a.object({description:a.string().allow(""),image:a.string().allow(""),title:a.string().allow("")})}static UrlInfo(){return a.object({hash:a.string().allow(""),original:a.string().allow(""),short:a.string().allow("")})}static WebRedirect(){return a.object({link:a.string().allow(""),type:a.string().allow("")})}}e.exports=n},9421:(e,t,r)=>{const a=r(2705),n=r(6734);e.exports=class{static createShortLink(){return a.object({body:n.ShortLinkReq().required()}).required()}static getApplicationQRCode(){return a.object({})}static getCollectionQRCodeBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getOriginalShortLinkByHash(){return a.object({hash:a.string().allow("").required()}).required()}static getProductQRCodeBySlug(){return a.object({slug:a.string().allow("").required()}).required()}static getShortLinkByHash(){return a.object({hash:a.string().allow("").required()}).required()}static getUrlQRCode(){return a.object({url:a.string().allow("").required()}).required()}}},4683:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(1088)),l=r(6377),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async getAllPages({themeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getAllPages().validate({themeId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getAllPages().validate({themeId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Theme > getAllPages \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getAllPages,params:{themeId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.AllAvailablePageSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Theme > getAllPages \n ${m}`})}return p}async getAppliedTheme({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getAppliedTheme().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getAppliedTheme().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > Theme > getAppliedTheme \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getAppliedTheme,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.ThemesSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > Theme > getAppliedTheme \n ${g}`})}return d}async getPage({themeId:e,pageValue:t,filters:r,company:u,requestHeaders:d}={requestHeaders:{}},{responseHeaders:p}={responseHeaders:!1}){const{error:g}=i.getPage().validate({themeId:e,pageValue:t,filters:r,company:u},{abortEarly:!1,allowUnknown:!0});if(g)return Promise.reject(new n(g));const{error:m}=i.getPage().validate({themeId:e,pageValue:t,filters:r,company:u},{abortEarly:!1,allowUnknown:!1});m&&c({level:"WARN",message:`Parameter Validation warrnings for application > Theme > getPage \n ${m}`});const w={};w.filters=r,w.company=u;const f=await a.execute(this._conf,"get",s({url:this._urls.getPage,params:{themeId:e,pageValue:t}}),w,void 0,{...d},{responseHeaders:p});let y=f;p&&(y=f[0]);const{error:b}=l.AvailablePageSchema().validate(y,{abortEarly:!1,allowUnknown:!0});if(b){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(b));c({level:"WARN",message:`Response Validation Warnings for application > Theme > getPage \n ${b}`})}return f}async getThemeForPreview({themeId:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getThemeForPreview().validate({themeId:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getThemeForPreview().validate({themeId:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > Theme > getThemeForPreview \n ${d}`});const p=await a.execute(this._conf,"get",s({url:this._urls.getThemeForPreview,params:{themeId:e}}),{},void 0,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ThemesSchema().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > Theme > getThemeForPreview \n ${m}`})}return p}}},6377:(e,t,r)=>{const a=r(2705);class n{static Action(){return a.object({page:n.ActionPage(),popup:n.ActionPage(),type:a.string().allow("")})}static ActionPage(){return a.object({params:a.object().pattern(/\S/,a.array().items(a.string().allow(""))),query:a.object().pattern(/\S/,a.array().items(a.string().allow(""))),type:n.PageType().required(),url:a.string().allow("")})}static AdvanceSetting(){return a.object({divider_stroke_highlight:n.DividerStrokeHighlightSetting(),overlay_popup:n.OverlayPopupSetting(),user_alerts:n.UserAlertsSetting()})}static AllAvailablePageSchema(){return a.object({pages:a.array().items(n.AvailablePageSchema())})}static Assets(){return a.object({common_js:n.CommonJS(),css:n.CSS(),umd_js:n.UMDJs()})}static AuthConfig(){return a.object({show_footer_auth:a.boolean(),show_header_auth:a.boolean()})}static AvailablePagePlatformPredicate(){return a.object({android:a.boolean(),ios:a.boolean(),web:a.boolean()})}static AvailablePagePredicate(){return a.object({platform:n.AvailablePagePlatformPredicate(),route:n.AvailablePageRoutePredicate(),schedule:n.AvailablePageSchedulePredicate(),screen:n.AvailablePageScreenPredicate(),user:n.AvailablePageUserPredicate(),zones:a.array().items(a.string().allow(""))})}static AvailablePageRoutePredicate(){return a.object({exact_url:a.string().allow(""),query:a.any(),selected:a.string().allow("")})}static AvailablePageSchedulePredicate(){return a.object({cron:a.string().allow(""),end:a.string().allow(""),start:a.string().allow("")})}static AvailablePageSchema(){return a.object({_id:a.string().allow(""),path:a.string().allow(""),props:a.array().items(a.any()),sections:a.array().items(n.AvailablePageSchemaSections()),sections_meta:a.array().items(n.AvailablePageSectionMetaAttributes()),seo:n.AvailablePageSeo(),text:a.string().allow(""),theme:a.string().allow(""),type:a.string().allow(""),value:a.string().allow("")})}static AvailablePageSchemaSections(){return a.object({blocks:a.array().items(a.any()),label:a.string().allow(""),name:a.string().allow(""),predicate:n.AvailablePagePredicate(),preset:a.any(),props:a.any()})}static AvailablePageScreenPredicate(){return a.object({desktop:a.boolean(),mobile:a.boolean(),tablet:a.boolean()})}static AvailablePageSectionMetaAttributes(){return a.object({attributes:a.any()})}static AvailablePageSeo(){return a.object({_id:a.string().allow(""),breadcrumb:a.array().items(n.SEObreadcrumb()),canonical_url:a.string().allow(""),description:a.string().allow(""),meta_tags:a.array().items(n.SEOMetaItem()),sitemap:n.SEOSitemap(),title:a.string().allow("")})}static AvailablePageUserPredicate(){return a.object({anonymous:a.boolean(),authenticated:a.boolean()})}static BlitzkriegApiErrorSchema(){return a.object({message:a.string().allow("")})}static BlitzkriegInternalServerErrorSchema(){return a.object({message:a.string().allow("")})}static Block(){return a.object({name:a.string().allow(""),props:n.BlockProps(),type:a.string().allow("")})}static BlockProps(){return a.object({image:n.ImagePickerProp(),slide_link:n.UrlProp()})}static ButtonSetting(){return a.object({button_link:a.string().allow(""),button_primary:a.string().allow(""),button_secondary:a.string().allow("")})}static CheckboxProp(){return a.object({type:a.string().allow(""),value:a.boolean()})}static Colors(){return a.object({accent_color:a.string().allow(""),bg_color:a.string().allow(""),button_secondary_color:a.string().allow(""),link_color:a.string().allow(""),primary_color:a.string().allow(""),secondary_color:a.string().allow("")})}static CommonJS(){return a.object({link:a.string().allow("")})}static Config(){return a.object({current:a.string().allow("").required(),global_schema:n.GlobalSchema(),list:a.array().items(n.ThemeConfiguration()).required(),preset:n.Preset()})}static CSS(){return a.object({links:a.array().items(a.string().allow(""))})}static CustomConfig(){return a.object({props:n.CustomProps()})}static CustomProps(){return a.object({button_add_to_cart_color:a.string().allow(""),button_add_to_cart_label_color:a.string().allow(""),button_primary_color:a.string().allow(""),button_primary_label_color:a.string().allow(""),button_secondary_color:a.string().allow(""),button_secondary_label_color:a.string().allow(""),button_tertiary_color:a.string().allow(""),button_tertiary_hover_color:a.string().allow(""),button_tertiary_hover_text_color:a.string().allow(""),button_tertiary_label_color:a.string().allow(""),disable_cart:a.boolean(),footer_bg_color:a.string().allow(""),footer_border_color:a.string().allow(""),footer_nav_hover_color:a.string().allow(""),footer_text_color:a.string().allow(""),header_bg_color:a.string().allow(""),header_border_color:a.string().allow(""),header_cart_notification_bg_color:a.string().allow(""),header_cart_notification_text_color:a.string().allow(""),header_icon_color:a.string().allow(""),header_nav_hover_color:a.string().allow(""),header_text_color:a.string().allow(""),is_menu_below_logo:a.boolean(),menu_position:a.string().allow(""),text_body_color:a.string().allow(""),text_discount_color:a.string().allow(""),text_heading_link_color:a.string().allow(""),text_price_color:a.string().allow(""),text_sale_price_color:a.string().allow(""),text_strikethrough_price_color:a.string().allow("")})}static DividerStrokeHighlightSetting(){return a.object({divider_strokes:a.string().allow(""),highlight:a.string().allow("")})}static Font(){return a.object({family:a.string().allow("").required(),variants:n.FontVariants().required()})}static FontVariant(){return a.object({file:a.string().allow("").required(),name:a.string().allow("").required()})}static FontVariants(){return a.object({bold:n.FontVariant(),light:n.FontVariant(),medium:n.FontVariant(),regular:n.FontVariant(),semi_bold:n.FontVariant()})}static FooterSetting(){return a.object({footer_background:a.string().allow(""),footer_body_text:a.string().allow(""),footer_bottom_background:a.string().allow(""),footer_heading_text:a.string().allow(""),footer_icon:a.string().allow("")})}static GeneralSetting(){return a.object({button:n.ButtonSetting(),footer:n.FooterSetting(),header:n.HeaderSetting(),sale_discount:n.SaleDiscountSetting(),text:n.TextSetting(),theme:n.ThemeSetting()})}static GlobalConfig(){return a.object({custom:n.CustomConfig(),statics:n.StaticConfig()})}static GlobalSchema(){return a.object({props:a.array().items(n.Prop())})}static HeaderSetting(){return a.object({header_background:a.string().allow(""),header_icon:a.string().allow(""),header_nav:a.string().allow("")})}static ImagePickerProp(){return a.object({type:a.string().allow(""),value:a.string().allow("")})}static Images(){return a.object({desktop:a.string().allow(""),mobile:a.string().allow("")})}static OverlayPopupSetting(){return a.object({dialog_backgroung:a.string().allow(""),overlay:a.string().allow("")})}static Page(){return a.object({current:a.number(),has_next:a.boolean(),has_previous:a.boolean(),item_total:a.number(),next_id:a.string().allow(""),size:a.number(),type:a.string().allow("").required()})}static PaletteConfig(){return a.object({advance_setting:n.AdvanceSetting(),general_setting:n.GeneralSetting()})}static Predicate(){return a.object({route:n.Route(),screen:n.Screen(),user:n.ThemeUserSchema()})}static Preset(){return a.object({pages:a.array().items(n.Page())})}static Prop(){return a.object({category:a.string().allow(""),id:a.string().allow(""),info:a.string().allow(""),label:a.string().allow(""),type:a.string().allow("")})}static RangeProp(){return a.object({type:a.string().allow(""),value:a.number()})}static Release(){return a.object({notes:a.string().allow(""),version:a.string().allow("")})}static Route(){return a.object({exact_url:a.string().allow(""),selected:a.string().allow("")})}static SaleDiscountSetting(){return a.object({sale_badge_background:a.string().allow(""),sale_badge_text:a.string().allow(""),sale_discount_text:a.string().allow(""),sale_timer:a.string().allow("")})}static Screen(){return a.object({desktop:a.boolean(),mobile:a.boolean(),tablet:a.boolean()})}static Section(){return a.object({blocks:a.array().items(n.Block()),name:a.string().allow(""),predicate:n.Predicate(),preset:n.SectionPreset(),props:n.SectionProps()})}static SectionItem(){return a.object({blocks:a.array().items(a.any()),label:a.string().allow(""),name:a.string().allow(""),props:a.array().items(a.any())})}static SectionPreset(){return a.object({blocks:a.array().items(n.Block())})}static SectionProps(){return a.object({autoplay:n.CheckboxProp(),item_margin:n.TextProp(),slide_interval:n.RangeProp(),title:n.TextProp()})}static SEObreadcrumb(){return a.object({action:n.Action(),url:a.string().allow("")})}static SEOMetaItem(){return a.object({items:a.array().items(n.SEOMetaItems()),title:a.string().allow("")})}static SEOMetaItems(){return a.object({key:a.string().allow(""),value:a.string().allow("")})}static SEOSitemap(){return a.object({frequency:a.string().allow(""),priority:a.number()})}static StaticConfig(){return a.object({props:n.StaticProps()})}static StaticProps(){return a.object({auth:n.AuthConfig(),colors:n.Colors(),palette:n.PaletteConfig()})}static TextProp(){return a.object({type:a.string().allow(""),value:a.string().allow("")})}static TextSetting(){return a.object({text_body:a.string().allow(""),text_heading:a.string().allow(""),text_label:a.string().allow(""),text_secondary:a.string().allow("")})}static ThemeConfiguration(){return a.object({global_config:a.any(),name:a.string().allow(""),page:a.array().items(a.string().allow(""))})}static ThemeMeta(){return a.object({description:a.string().allow(""),images:n.Images(),industry:a.array().items(a.string().allow("")),name:a.string().allow(""),payment:n.ThemePayment(),release:n.Release(),slug:a.string().allow("")})}static ThemePayment(){return a.object({amount:a.number(),is_paid:a.boolean()})}static ThemeSetting(){return a.object({page_background:a.string().allow(""),theme_accent:a.string().allow("")})}static ThemesSchema(){return a.object({_id:a.string().allow(""),application_id:a.string().allow(""),applied:a.boolean(),assets:n.Assets(),available_sections:a.array().items(n.SectionItem()),company_id:a.number(),config:n.Config(),created_at:a.string().allow(""),font:n.Font(),is_private:a.boolean(),marketplace_theme_id:a.string().allow(""),meta:n.ThemeMeta(),name:a.string().allow(""),styles:a.any(),tags:a.array().items(a.string().allow("")),template_theme_id:a.string().allow(""),theme_type:a.string().allow(""),updated_at:a.string().allow(""),version:a.string().allow("")})}static ThemeUserSchema(){return a.object({anonymous:a.boolean(),authenticated:a.boolean()})}static UMDJs(){return a.object({links:a.array().items(a.string().allow(""))})}static UrlProp(){return a.object({type:a.string().allow(""),value:a.string().allow("")})}static UserAlertsSetting(){return a.object({error_background:a.string().allow(""),error_text:a.string().allow(""),info_background:a.string().allow(""),info_text:a.string().allow(""),success_background:a.string().allow(""),success_text:a.string().allow("")})}static PageType(){return a.string().valid("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")}}e.exports=n},1088:(e,t,r)=>{const a=r(2705);r(6377),e.exports=class{static getAllPages(){return a.object({themeId:a.string().allow("").required()}).required()}static getAppliedTheme(){return a.object({})}static getPage(){return a.object({themeId:a.string().allow("").required(),pageValue:a.string().allow("").required(),filters:a.string().allow(""),company:a.number()}).required()}static getThemeForPreview(){return a.object({themeId:a.string().allow("").required()}).required()}}},9792:(e,t,r)=>{const a=r(7886),{FDKClientValidationError:n,FDKResponseValidationError:o}=r(7208),s=r(7854),i=(r(3589),r(7727)),l=r(7022),{Logger:c}=r(7378);r(2705),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,[r,a])=>(t[r]=`${e.domain}${a}`,t)),{})}updateUrls(e){this._urls={...this._urls,...e}}async addEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.addEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.addEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > addEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"put",s({url:this._urls.addEmail,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.VerifyEmailOTPSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > addEmail \n ${f}`})}return m}async addMobileNumber({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.addMobileNumber().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.addMobileNumber().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > addMobileNumber \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"put",s({url:this._urls.addMobileNumber,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.VerifyMobileOTPSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > addMobileNumber \n ${f}`})}return m}async deleteEmail({active:e,primary:t,verified:r,email:u,platform:d,requestHeaders:p}={requestHeaders:{}},{responseHeaders:g}={responseHeaders:!1}){const{error:m}=i.deleteEmail().validate({active:e,primary:t,verified:r,email:u,platform:d},{abortEarly:!1,allowUnknown:!0});if(m)return Promise.reject(new n(m));const{error:w}=i.deleteEmail().validate({active:e,primary:t,verified:r,email:u,platform:d},{abortEarly:!1,allowUnknown:!1});w&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > deleteEmail \n ${w}`});const f={};f.platform=d,f.active=e,f.primary=t,f.verified=r,f.email=u;const y=await a.execute(this._conf,"delete",s({url:this._urls.deleteEmail,params:{}}),f,void 0,{...p},{responseHeaders:g});let b=y;g&&(b=y[0]);const{error:h}=l.LoginSuccess().validate(b,{abortEarly:!1,allowUnknown:!0});if(h){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(h));c({level:"WARN",message:`Response Validation Warnings for application > User > deleteEmail \n ${h}`})}return y}async deleteMobileNumber({active:e,primary:t,verified:r,countryCode:u,phone:d,platform:p,requestHeaders:g}={requestHeaders:{}},{responseHeaders:m}={responseHeaders:!1}){const{error:w}=i.deleteMobileNumber().validate({active:e,primary:t,verified:r,countryCode:u,phone:d,platform:p},{abortEarly:!1,allowUnknown:!0});if(w)return Promise.reject(new n(w));const{error:f}=i.deleteMobileNumber().validate({active:e,primary:t,verified:r,countryCode:u,phone:d,platform:p},{abortEarly:!1,allowUnknown:!1});f&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > deleteMobileNumber \n ${f}`});const y={};y.platform=p,y.active=e,y.primary=t,y.verified=r,y.country_code=u,y.phone=d;const b=await a.execute(this._conf,"delete",s({url:this._urls.deleteMobileNumber,params:{}}),y,void 0,{...g},{responseHeaders:m});let h=b;m&&(h=b[0]);const{error:_}=l.LoginSuccess().validate(h,{abortEarly:!1,allowUnknown:!0});if(_){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(_));c({level:"WARN",message:`Response Validation Warnings for application > User > deleteMobileNumber \n ${_}`})}return b}async deleteUser({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.deleteUser().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.deleteUser().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > deleteUser \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.deleteUser,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.DeleteUserSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > deleteUser \n ${m}`})}return p}async forgotPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.forgotPassword().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.forgotPassword().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > forgotPassword \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.forgotPassword,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > forgotPassword \n ${m}`})}return p}async getListOfActiveSessions({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getListOfActiveSessions().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getListOfActiveSessions().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > getListOfActiveSessions \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getListOfActiveSessions,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.SessionListSuccess().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > User > getListOfActiveSessions \n ${g}`})}return d}async getLoggedInUser({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.getLoggedInUser().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.getLoggedInUser().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > getLoggedInUser \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.getLoggedInUser,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.UserObjectSchema().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > User > getLoggedInUser \n ${g}`})}return d}async getPlatformConfig({name:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getPlatformConfig().validate({name:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getPlatformConfig().validate({name:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > getPlatformConfig \n ${d}`});const p={};p.name=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getPlatformConfig,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.PlatformSchema().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > getPlatformConfig \n ${w}`})}return g}async getUserAttributes({slug:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.getUserAttributes().validate({slug:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.getUserAttributes().validate({slug:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > getUserAttributes \n ${d}`});const p={};p.slug=e;const g=await a.execute(this._conf,"get",s({url:this._urls.getUserAttributes,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.UserAttributes().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > getUserAttributes \n ${w}`})}return g}async hasPassword({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.hasPassword().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.hasPassword().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > hasPassword \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.hasPassword,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.HasPasswordSuccess().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > User > hasPassword \n ${g}`})}return d}async loginWithAppleIOS({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithAppleIOS().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithAppleIOS().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithAppleIOS \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithAppleIOS,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.AuthSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithAppleIOS \n ${f}`})}return m}async loginWithEmailAndPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.loginWithEmailAndPassword().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.loginWithEmailAndPassword().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithEmailAndPassword \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.loginWithEmailAndPassword,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithEmailAndPassword \n ${m}`})}return p}async loginWithFacebook({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithFacebook().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithFacebook().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithFacebook \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithFacebook,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.AuthSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithFacebook \n ${f}`})}return m}async loginWithGoogle({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithGoogle().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithGoogle().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithGoogle \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithGoogle,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.AuthSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithGoogle \n ${f}`})}return m}async loginWithGoogleAndroid({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithGoogleAndroid().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithGoogleAndroid().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithGoogleAndroid \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithGoogleAndroid,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.AuthSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithGoogleAndroid \n ${f}`})}return m}async loginWithGoogleIOS({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithGoogleIOS().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithGoogleIOS().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithGoogleIOS \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithGoogleIOS,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.AuthSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithGoogleIOS \n ${f}`})}return m}async loginWithOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.loginWithOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.loginWithOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.loginWithOTP,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.SendOtpResponse().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithOTP \n ${f}`})}return m}async loginWithToken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.loginWithToken().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.loginWithToken().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > loginWithToken \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.loginWithToken,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > loginWithToken \n ${m}`})}return p}async logout({requestHeaders:e}={requestHeaders:{}},{responseHeaders:t}={responseHeaders:!1}){const{error:r}=i.logout().validate({},{abortEarly:!1,allowUnknown:!0});if(r)return Promise.reject(new n(r));const{error:u}=i.logout().validate({},{abortEarly:!1,allowUnknown:!1});u&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > logout \n ${u}`});const d=await a.execute(this._conf,"get",s({url:this._urls.logout,params:{}}),{},void 0,{...e},{responseHeaders:t});let p=d;t&&(p=d[0]);const{error:g}=l.LogoutSuccess().validate(p,{abortEarly:!1,allowUnknown:!0});if(g){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(g));c({level:"WARN",message:`Response Validation Warnings for application > User > logout \n ${g}`})}return d}async registerWithForm({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.registerWithForm().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.registerWithForm().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > registerWithForm \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.registerWithForm,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.RegisterFormSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > registerWithForm \n ${f}`})}return m}async resetForgotPassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.resetForgotPassword().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.resetForgotPassword().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > resetForgotPassword \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.resetForgotPassword,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResetForgotPasswordSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > resetForgotPassword \n ${m}`})}return p}async sendForgotOTPOnEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendForgotOTPOnEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendForgotOTPOnEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendForgotOTPOnEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendForgotOTPOnEmail,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.EmailOtpSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > sendForgotOTPOnEmail \n ${f}`})}return m}async sendForgotOTPOnMobile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendForgotOTPOnMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendForgotOTPOnMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendForgotOTPOnMobile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendForgotOTPOnMobile,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.OtpSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > sendForgotOTPOnMobile \n ${f}`})}return m}async sendOTPOnEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendOTPOnEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendOTPOnEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendOTPOnEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendOTPOnEmail,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.EmailOtpSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > sendOTPOnEmail \n ${f}`})}return m}async sendOTPOnMobile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendOTPOnMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendOTPOnMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendOTPOnMobile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendOTPOnMobile,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.OtpSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > sendOTPOnMobile \n ${f}`})}return m}async sendResetPasswordEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendResetPasswordEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendResetPasswordEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendResetPasswordEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendResetPasswordEmail,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.ResetPasswordSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > sendResetPasswordEmail \n ${f}`})}return m}async sendResetPasswordMobile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendResetPasswordMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendResetPasswordMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendResetPasswordMobile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendResetPasswordMobile,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.ResetPasswordSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > sendResetPasswordMobile \n ${f}`})}return m}async sendResetToken({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.sendResetToken().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.sendResetToken().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendResetToken \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.sendResetToken,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.ResetPasswordSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > sendResetToken \n ${m}`})}return p}async sendVerificationLinkToEmail({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendVerificationLinkToEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendVerificationLinkToEmail().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendVerificationLinkToEmail \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendVerificationLinkToEmail,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.SendEmailVerifyLinkSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > sendVerificationLinkToEmail \n ${f}`})}return m}async sendVerificationLinkToMobile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.sendVerificationLinkToMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.sendVerificationLinkToMobile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > sendVerificationLinkToMobile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.sendVerificationLinkToMobile,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.SendMobileVerifyLinkSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > sendVerificationLinkToMobile \n ${f}`})}return m}async setEmailAsPrimary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.setEmailAsPrimary().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.setEmailAsPrimary().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > setEmailAsPrimary \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.setEmailAsPrimary,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > setEmailAsPrimary \n ${m}`})}return p}async setMobileNumberAsPrimary({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.setMobileNumberAsPrimary().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.setMobileNumberAsPrimary().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > setMobileNumberAsPrimary \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.setMobileNumberAsPrimary,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.LoginSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > setMobileNumberAsPrimary \n ${m}`})}return p}async updatePassword({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.updatePassword().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.updatePassword().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > updatePassword \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.updatePassword,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.VerifyEmailSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > updatePassword \n ${m}`})}return p}async updateProfile({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.updateProfile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.updateProfile().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > updateProfile \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.updateProfile,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.ProfileEditSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > updateProfile \n ${f}`})}return m}async updateUserAttributes({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.updateUserAttributes().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.updateUserAttributes().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > updateUserAttributes \n ${d}`});const p=await a.execute(this._conf,"patch",s({url:this._urls.updateUserAttributes,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.UserAttributes().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > updateUserAttributes \n ${m}`})}return p}async userExists({q:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.userExists().validate({q:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.userExists().validate({q:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > userExists \n ${d}`});const p={};p.q=e;const g=await a.execute(this._conf,"get",s({url:this._urls.userExists,params:{}}),p,void 0,{...t},{responseHeaders:r});let m=g;r&&(m=g[0]);const{error:w}=l.UserExistsResponse().validate(m,{abortEarly:!1,allowUnknown:!0});if(w){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(w));c({level:"WARN",message:`Response Validation Warnings for application > User > userExists \n ${w}`})}return g}async verifyEmail({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyEmail().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyEmail().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyEmail \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyEmail,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.VerifyEmailSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyEmail \n ${m}`})}return p}async verifyEmailForgotOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.verifyEmailForgotOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.verifyEmailForgotOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyEmailForgotOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.verifyEmailForgotOTP,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.VerifyForgotOtpSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyEmailForgotOTP \n ${f}`})}return m}async verifyEmailOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.verifyEmailOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.verifyEmailOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyEmailOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.verifyEmailOTP,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.VerifyOtpSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyEmailOTP \n ${f}`})}return m}async verifyMobile({body:e,requestHeaders:t}={requestHeaders:{}},{responseHeaders:r}={responseHeaders:!1}){const{error:u}=i.verifyMobile().validate({body:e},{abortEarly:!1,allowUnknown:!0});if(u)return Promise.reject(new n(u));const{error:d}=i.verifyMobile().validate({body:e},{abortEarly:!1,allowUnknown:!1});d&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyMobile \n ${d}`});const p=await a.execute(this._conf,"post",s({url:this._urls.verifyMobile,params:{}}),{},e,{...t},{responseHeaders:r});let g=p;r&&(g=p[0]);const{error:m}=l.VerifyEmailSuccess().validate(g,{abortEarly:!1,allowUnknown:!0});if(m){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(m));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyMobile \n ${m}`})}return p}async verifyMobileForgotOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.verifyMobileForgotOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.verifyMobileForgotOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyMobileForgotOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.verifyMobileForgotOTP,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.VerifyForgotOtpSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyMobileForgotOTP \n ${f}`})}return m}async verifyMobileOTP({body:e,platform:t,requestHeaders:r}={requestHeaders:{}},{responseHeaders:u}={responseHeaders:!1}){const{error:d}=i.verifyMobileOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!0});if(d)return Promise.reject(new n(d));const{error:p}=i.verifyMobileOTP().validate({body:e,platform:t},{abortEarly:!1,allowUnknown:!1});p&&c({level:"WARN",message:`Parameter Validation warrnings for application > User > verifyMobileOTP \n ${p}`});const g={};g.platform=t;const m=await a.execute(this._conf,"post",s({url:this._urls.verifyMobileOTP,params:{}}),g,e,{...r},{responseHeaders:u});let w=m;u&&(w=m[0]);const{error:f}=l.VerifyOtpSuccess().validate(w,{abortEarly:!1,allowUnknown:!0});if(f){if(!0===this._conf.options.strictResponseCheck)return Promise.reject(new o(f));c({level:"WARN",message:`Response Validation Warnings for application > User > verifyMobileOTP \n ${f}`})}return m}}},7022:(e,t,r)=>{const a=r(2705);class n{static Accountkit(){return a.object({app_id:a.string().allow("")})}static APIError(){return a.object({code:a.string().allow(""),info:a.string().allow(""),message:a.string().allow(""),meta:a.any(),request_id:a.string().allow("")})}static AuthenticationApiErrorSchema(){return a.object({message:a.string().allow("")})}static AuthenticationInternalServerErrorSchema(){return a.object({message:a.string().allow("")})}static AuthSuccess(){return a.object({register_token:a.string().allow(""),user:n.UserSchema(),user_exists:a.boolean()})}static CodeRequestBodySchema(){return a.object({code:a.string().allow("")})}static DeleteAccountConsent(){return a.object({consent_text:a.string().allow("")})}static DeleteAccountReasons(){return a.object({reason_id:a.string().allow(""),reason_text:a.string().allow(""),show_text_area:a.boolean()})}static DeleteApplicationUserRequestSchema(){return a.object({otp:a.string().allow(""),reason:a.string().allow(""),reason_id:a.string().allow(""),request_id:a.string().allow(""),user_id:a.string().allow("")})}static DeleteUserSuccess(){return a.object({success:a.boolean()})}static EditEmailRequestSchema(){return a.object({email:a.string().allow("")})}static EditMobileRequestSchema(){return a.object({country_code:a.string().allow(""),phone:a.string().allow("")})}static EditProfileMobileSchema(){return a.object({country_code:a.string().allow(""),phone:a.string().allow("")})}static EditProfileRequestSchema(){return a.object({android_hash:a.string().allow(""),country_code:a.string().allow(""),dob:a.string().allow(""),email:a.string().allow(""),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),mobile:n.EditProfileMobileSchema(),profile_pic_url:a.string().allow(""),register_token:a.string().allow(""),sender:a.string().allow("")})}static Email(){return a.object({active:a.boolean(),email:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static EmailOtpSuccess(){return a.object({success:a.boolean()})}static Facebook(){return a.object({app_id:a.string().allow("")})}static FlashCard(){return a.object({background_color:a.string().allow(""),text:a.string().allow(""),text_color:a.string().allow("")})}static ForgotPasswordRequestSchema(){return a.object({code:a.string().allow(""),password:a.string().allow("")})}static FormRegisterRequestSchema(){return a.object({email:a.string().allow(""),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),password:a.string().allow(""),phone:n.FormRegisterRequestSchemaPhone(),register_token:a.string().allow("")})}static FormRegisterRequestSchemaPhone(){return a.object({country_code:a.string().allow(""),mobile:a.string().allow("")})}static Google(){return a.object({app_id:a.string().allow("")})}static HasPasswordSuccess(){return a.object({result:a.boolean()})}static Login(){return a.object({otp:a.boolean(),password:a.boolean()})}static LoginSuccess(){return a.object({register_token:a.string().allow(""),request_id:a.string().allow(""),user:n.UserSchema()})}static LogoutSuccess(){return a.object({logout:a.boolean()})}static LookAndFeel(){return a.object({background_color:a.string().allow(""),card_position:a.string().allow("")})}static MetaSchema(){return a.object({fynd_default:a.boolean()})}static OAuthRequestAppleSchema(){return a.object({oauth:n.OAuthRequestAppleSchemaOauth(),profile:n.OAuthRequestAppleSchemaProfile(),user_identifier:a.string().allow("")})}static OAuthRequestAppleSchemaOauth(){return a.object({identity_token:a.string().allow("")})}static OAuthRequestAppleSchemaProfile(){return a.object({first_name:a.string().allow(""),full_name:a.string().allow(""),last_name:a.string().allow("")})}static OAuthRequestSchema(){return a.object({is_signed_in:a.boolean(),oauth2:n.OAuthRequestSchemaOauth2(),profile:n.OAuthRequestSchemaProfile()})}static OAuthRequestSchemaOauth2(){return a.object({access_token:a.string().allow(""),expiry:a.number(),refresh_token:a.string().allow("")})}static OAuthRequestSchemaProfile(){return a.object({email:a.string().allow(""),first_name:a.string().allow(""),full_name:a.string().allow(""),id:a.string().allow(""),image:a.string().allow(""),last_name:a.string().allow("")})}static OtpSuccess(){return a.object({country_code:a.string().allow(""),message:a.string().allow(""),mobile:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow(""),resend_timer:a.number(),resend_token:a.string().allow(""),success:a.boolean()})}static PasswordLoginRequestSchema(){return a.object({password:a.string().allow(""),username:a.string().allow("")})}static PhoneNumber(){return a.object({active:a.boolean(),country_code:a.number(),phone:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static PlatformEmail(){return a.object({is_required:a.boolean(),level:a.string().allow("")})}static PlatformMobile(){return a.object({is_required:a.boolean(),level:a.string().allow("")})}static PlatformSchema(){return a.object({_id:a.string().allow(""),active:a.boolean(),created_at:a.string().allow(""),delete_account_consent:a.any(),delete_account_day:a.number(),delete_account_reasons:a.array().items(n.DeleteAccountReasons()),desktop_image:a.string().allow(""),display:a.string().allow(""),flash_card:n.FlashCard(),forgot_password:a.boolean(),login:n.Login(),look_and_feel:n.LookAndFeel(),meta:n.MetaSchema(),mobile_image:a.string().allow(""),name:a.string().allow(""),register:a.boolean(),register_required_fields:n.RegisterRequiredFields(),required_fields:n.RequiredFields(),session_config:a.any(),skip_captcha:a.boolean(),skip_login:a.boolean(),social:n.Social(),social_tokens:n.SocialTokens(),subtext:a.string().allow(""),updated_at:a.string().allow("")})}static ProfileEditSuccess(){return a.object({country_code:a.string().allow(""),email:a.string().allow(""),message:a.string().allow(""),mobile:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow(""),resend_email_token:a.string().allow(""),resend_timer:a.number(),resend_token:a.string().allow(""),success:a.boolean(),user:n.UserSchema(),user_exists:a.boolean(),verify_email_link:a.boolean(),verify_email_otp:a.boolean(),verify_mobile_otp:a.boolean()})}static RegisterFormSuccess(){return a.object({country_code:a.string().allow(""),email:a.string().allow(""),message:a.string().allow(""),mobile:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow(""),resend_email_token:a.string().allow(""),resend_timer:a.number(),resend_token:a.string().allow(""),success:a.boolean(),user_exists:a.boolean(),verify_email_otp:a.boolean(),verify_mobile_otp:a.boolean()})}static RegisterRequiredFields(){return a.object({email:n.RegisterRequiredFieldsEmail(),mobile:n.RegisterRequiredFieldsMobile()})}static RegisterRequiredFieldsEmail(){return a.object({is_required:a.boolean(),level:a.string().allow("")})}static RegisterRequiredFieldsMobile(){return a.object({is_required:a.boolean(),level:a.string().allow("")})}static RequiredFields(){return a.object({email:n.PlatformEmail(),mobile:n.PlatformMobile()})}static ResetForgotPasswordSuccess(){return a.object({success:a.boolean()})}static ResetPasswordSuccess(){return a.object({status:a.string().allow("")})}static SendEmailForgotOtpRequestSchema(){return a.object({action:a.string().allow(""),email:a.string().allow(""),token:a.string().allow("")})}static SendEmailOtpRequestSchema(){return a.object({action:a.string().allow(""),email:a.string().allow(""),register_token:a.string().allow(""),token:a.string().allow("")})}static SendEmailVerifyLinkSuccess(){return a.object({verify_email_link:a.boolean()})}static SendMobileForgotOtpRequestSchema(){return a.object({action:a.string().allow(""),android_hash:a.string().allow(""),country_code:a.string().allow(""),mobile:a.string().allow(""),token:a.string().allow("")})}static SendMobileOtpRequestSchema(){return a.object({action:a.string().allow(""),android_hash:a.string().allow(""),country_code:a.string().allow(""),force:a.string().allow(""),mobile:a.string().allow(""),token:a.string().allow("")})}static SendMobileVerifyLinkSuccess(){return a.object({verify_mobile_link:a.boolean()})}static SendOtpRequestSchema(){return a.object({android_hash:a.string().allow(""),country_code:a.string().allow(""),mobile:a.string().allow("")})}static SendOtpResponse(){return a.object({country_code:a.string().allow(""),email:a.string().allow(""),message:a.string().allow(""),mobile:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow(""),resend_email_token:a.string().allow(""),resend_timer:a.number(),resend_token:a.string().allow(""),success:a.boolean(),user_exists:a.boolean(),verify_email_otp:a.boolean(),verify_mobile_otp:a.boolean()})}static SendResetPasswordEmailRequestSchema(){return a.object({email:a.string().allow("")})}static SendResetPasswordMobileRequestSchema(){return a.object({country_code:a.string().allow(""),mobile:a.string().allow("")})}static SendVerificationLinkMobileRequestSchema(){return a.object({active:a.boolean(),country_code:a.string().allow(""),phone:a.string().allow(""),primary:a.boolean(),verified:a.boolean()})}static SessionExpiry(){return a.object({duration:a.number(),is_rolling:a.boolean(),type:a.string().allow("")})}static SessionListSuccess(){return a.object({sessions:a.array().items(a.string().allow(""))})}static Social(){return a.object({account_kit:a.boolean(),apple:a.boolean(),facebook:a.boolean(),google:a.boolean()})}static SocialTokens(){return a.object({account_kit:n.Accountkit(),facebook:n.Facebook(),google:n.Google()})}static TokenRequestBodySchema(){return a.object({token:a.string().allow("")})}static UpdatePasswordRequestSchema(){return a.object({new_password:a.string().allow(""),old_password:a.string().allow("")})}static UpdateUserAttributesRequest(){return a.object({attributes:a.any()})}static UserAttributes(){return a.object({attributes:a.any()})}static UserExistsResponse(){return a.object({user_exists:a.boolean()})}static UserObjectSchema(){return a.object({user:n.UserSchema()})}static UserSchema(){return a.object({_id:a.string().allow(""),account_type:a.string().allow(""),active:a.boolean(),application_id:a.string().allow(""),created_at:a.string().allow(""),dob:a.string().allow(""),emails:a.array().items(n.Email()),first_name:a.string().allow(""),gender:a.string().allow(""),last_name:a.string().allow(""),meta:a.any(),phone_numbers:a.array().items(n.PhoneNumber()),profile_pic_url:a.string().allow(""),updated_at:a.string().allow(""),user_id:a.string().allow(""),username:a.string().allow("")})}static VerifyEmailForgotOtpRequestSchema(){return a.object({email:a.string().allow(""),otp:a.string().allow("")})}static VerifyEmailOtpRequestSchema(){return a.object({action:a.string().allow(""),email:a.string().allow(""),otp:a.string().allow(""),register_token:a.string().allow("")})}static VerifyEmailOTPSuccess(){return a.object({user:n.UserSchema(),verify_email_link:a.boolean()})}static VerifyEmailSuccess(){return a.object({message:a.string().allow("")})}static VerifyForgotOtpSuccess(){return a.object({forgot_token:a.string().allow(""),success:a.boolean()})}static VerifyMobileForgotOtpRequestSchema(){return a.object({otp:a.string().allow(""),request_id:a.string().allow("")})}static VerifyMobileOTPSuccess(){return a.object({user:n.UserSchema(),verify_mobile_link:a.boolean()})}static VerifyOtpRequestSchema(){return a.object({otp:a.string().allow(""),register_token:a.string().allow(""),request_id:a.string().allow("")})}static VerifyOtpSuccess(){return a.object({register_token:a.string().allow(""),user:n.UserSchema(),user_exists:a.boolean()})}}e.exports=n},7727:(e,t,r)=>{const a=r(2705),n=r(7022);e.exports=class{static addEmail(){return a.object({platform:a.string().allow(""),body:n.EditEmailRequestSchema().required()}).required()}static addMobileNumber(){return a.object({platform:a.string().allow(""),body:n.EditMobileRequestSchema().required()}).required()}static deleteEmail(){return a.object({platform:a.string().allow(""),active:a.boolean().required(),primary:a.boolean().required(),verified:a.boolean().required(),email:a.string().allow("").required()}).required()}static deleteMobileNumber(){return a.object({platform:a.string().allow(""),active:a.boolean().required(),primary:a.boolean().required(),verified:a.boolean().required(),countryCode:a.string().allow("").required(),phone:a.string().allow("").required()}).required()}static deleteUser(){return a.object({body:n.DeleteApplicationUserRequestSchema().required()}).required()}static forgotPassword(){return a.object({body:n.ForgotPasswordRequestSchema().required()}).required()}static getListOfActiveSessions(){return a.object({})}static getLoggedInUser(){return a.object({})}static getPlatformConfig(){return a.object({name:a.string().allow("")})}static getUserAttributes(){return a.object({slug:a.string().allow("")})}static hasPassword(){return a.object({})}static loginWithAppleIOS(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestAppleSchema().required()}).required()}static loginWithEmailAndPassword(){return a.object({body:n.PasswordLoginRequestSchema().required()}).required()}static loginWithFacebook(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestSchema().required()}).required()}static loginWithGoogle(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestSchema().required()}).required()}static loginWithGoogleAndroid(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestSchema().required()}).required()}static loginWithGoogleIOS(){return a.object({platform:a.string().allow(""),body:n.OAuthRequestSchema().required()}).required()}static loginWithOTP(){return a.object({platform:a.string().allow(""),body:n.SendOtpRequestSchema().required()}).required()}static loginWithToken(){return a.object({body:n.TokenRequestBodySchema().required()}).required()}static logout(){return a.object({})}static registerWithForm(){return a.object({platform:a.string().allow(""),body:n.FormRegisterRequestSchema().required()}).required()}static resetForgotPassword(){return a.object({body:n.ForgotPasswordRequestSchema().required()}).required()}static sendForgotOTPOnEmail(){return a.object({platform:a.string().allow(""),body:n.SendEmailForgotOtpRequestSchema().required()}).required()}static sendForgotOTPOnMobile(){return a.object({platform:a.string().allow(""),body:n.SendMobileForgotOtpRequestSchema().required()}).required()}static sendOTPOnEmail(){return a.object({platform:a.string().allow(""),body:n.SendEmailOtpRequestSchema().required()}).required()}static sendOTPOnMobile(){return a.object({platform:a.string().allow(""),body:n.SendMobileOtpRequestSchema().required()}).required()}static sendResetPasswordEmail(){return a.object({platform:a.string().allow(""),body:n.SendResetPasswordEmailRequestSchema().required()}).required()}static sendResetPasswordMobile(){return a.object({platform:a.string().allow(""),body:n.SendResetPasswordMobileRequestSchema().required()}).required()}static sendResetToken(){return a.object({body:n.CodeRequestBodySchema().required()}).required()}static sendVerificationLinkToEmail(){return a.object({platform:a.string().allow(""),body:n.EditEmailRequestSchema().required()}).required()}static sendVerificationLinkToMobile(){return a.object({platform:a.string().allow(""),body:n.SendVerificationLinkMobileRequestSchema().required()}).required()}static setEmailAsPrimary(){return a.object({body:n.EditEmailRequestSchema().required()}).required()}static setMobileNumberAsPrimary(){return a.object({body:n.SendVerificationLinkMobileRequestSchema().required()}).required()}static updatePassword(){return a.object({body:n.UpdatePasswordRequestSchema().required()}).required()}static updateProfile(){return a.object({platform:a.string().allow(""),body:n.EditProfileRequestSchema().required()}).required()}static updateUserAttributes(){return a.object({body:n.UpdateUserAttributesRequest().required()}).required()}static userExists(){return a.object({q:a.string().allow("").required()}).required()}static verifyEmail(){return a.object({body:n.CodeRequestBodySchema().required()}).required()}static verifyEmailForgotOTP(){return a.object({platform:a.string().allow(""),body:n.VerifyEmailForgotOtpRequestSchema().required()}).required()}static verifyEmailOTP(){return a.object({platform:a.string().allow(""),body:n.VerifyEmailOtpRequestSchema().required()}).required()}static verifyMobile(){return a.object({body:n.CodeRequestBodySchema().required()}).required()}static verifyMobileForgotOTP(){return a.object({platform:a.string().allow(""),body:n.VerifyMobileForgotOtpRequestSchema().required()}).required()}static verifyMobileOTP(){return a.object({platform:a.string().allow(""),body:n.VerifyOtpRequestSchema().required()}).required()}}},7854:(e,t,r)=>{const a=r(3204);e.exports=({url:e,params:t})=>e.split("/").map((e=>("{"===e[0]&&"}"===e[e.length-1]&&(e=t[a(e.slice(1,e.length-1))]),e))).join("/")},911:(e,t,r)=>{e.exports={ApplicationConfig:r(6894),ApplicationClient:r(9007),ApplicationModel:{CartApplicationModel:r(7350),CatalogApplicationModel:r(5761),CommonApplicationModel:r(1844),CommunicationApplicationModel:r(4752),ConfigurationApplicationModel:r(4328),ContentApplicationModel:r(3377),FileStorageApplicationModel:r(5108),LeadApplicationModel:r(4535),LogisticApplicationModel:r(9541),OrderApplicationModel:r(2453),PaymentApplicationModel:r(8487),PosCartApplicationModel:r(6962),RewardsApplicationModel:r(2743),ShareApplicationModel:r(6734),ThemeApplicationModel:r(6377),UserApplicationModel:r(7022)}}},2638:(e,t,r)=>{const a=r(7303),n=r(1793),o=r(9669),s=r(7563),{sign:i}=r(5113),{FDKServerResponseError:l}=r(7208),{log:c,Logger:u,getLoggerLevel:d}=r(7378),p=r(6081),{version:g}=r(4147);o.defaults.withCredentials=!0;const m=o.create({paramsSerializer:e=>s.stringify(e)});m.interceptors.request.use((function(e){try{if(d()<=c.levels.DEBUG){const t=p(e);c.debug(t)}}catch(e){u({level:"ERROR",message:`Error Generating Curl: ${e}`})}finally{return e}}),(function(e){u({level:"ERROR",message:e.data||e.message,stack:e.data.stack||e.stack})})),m.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&&!n(e.url)&&(t=a(e.baseURL,e.url));const{host:r,pathname:o,search:l}=new URL(t),{data:c,headers:u,method:d,params:p}=e;u["x-fp-sdk-version"]=g;let m=s.parse(l);m={...m,...p};let w,f="";if(m&&Object.keys(m).length&&""!==s.stringify(m).trim()&&(f=`?${s.stringify(m)}`),"get"!=d){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);w=t(c,u)}const{common:y,delete:b,get:h,head:_,post:v,put:k,patch:R,...P}=u,j={method:d&&d.toUpperCase(),host:r,path:o+l+f,body:w,headers:P},C=i(j);return e.headers["x-fp-date"]=C["x-fp-date"],e.headers["x-fp-signature"]=C["x-fp-signature"],e})),m.interceptors.response.use((function(e){return"head"==e.config.method?e.headers:(u({level:"DEBUG",type:"RESPONSE",message:e.data,url:e.config.url}),e.config.responseHeaders?[e.data,e.headers]:e.data)}),(function(e){throw e.response?(u({level:"ERROR",message:e.response.data||e.message,stack:e.response.data.stack||e.stack,request:{method:e.config.method,url:e.config.url,headers:e.config.headers}}),new l(e.response.data.message||e.message,e.response.data.stack||e.stack,e.response.statusText,e.response.status,e.response.data)):e.request?(u({level:"ERROR",message:e.data||e.message,stack:e.data.stack||e.stack,request:{method:e.config.method,url:e.config.url,headers:e.config.headers}}),new l(e.message,e.stack,e.code,e.code)):(u({level:"ERROR",message:e.message}),new l(e.message,e.stack))})),e.exports={fdkAxios:m}},7208:e=>{class t extends Error{constructor(e,t,r=null,a=null,n=null){super(e),this.name="FDKServerResponseError",this.stackTrace=t,this.status=r,this.code=a,this.details=n}}class r extends Error{constructor(e){super(e.message),this.name="FDKClientValidationError",this.details=e.details}}class a extends Error{constructor(e){super(e.message),this.name="FDKResponseValidationError",this.details=JSON.parse(JSON.stringify(e.details))}}class n extends Error{constructor(e){super(e),this.name="FDKInvalidCredentialError"}}class o extends Error{constructor(e){super(e),this.name="FDKTokenIssueError"}}class s 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:r,FDKResponseValidationError:a,FDKInvalidCredentialError:n,FDKTokenIssueError:o,FDKOAuthCodeError:s,FDKException:i}},7378:(e,t,r)=>{const a=r(2043),n=r(4147).version;function o(){return(new Date).toString()}e.exports={log:a,Logger:function(e){const{level:t,message:r,...s}=e;"TRACE"===t&&a.trace(JSON.stringify({level:t,detail:r,...s,time:o(),version:n})),"DEBUG"===t&&a.debug(JSON.stringify({level:t,detail:r,...s,time:o(),version:n})),"INFO"===t&&a.info(JSON.stringify({level:t,detail:r,...s,time:o(),version:n})),"WARN"===t&&a.warn(JSON.stringify({level:t,detail:r,...s,time:o(),version:n})),"ERROR"===t&&a.error(JSON.stringify({level:t,detail:r,...s,time:o(),version:n}))},setLoggerLevel:function(e){a.setLevel(e)},getLoggerLevel:function(){return a.getLevel()}}},3589: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:r=1}){this.isNext=e,this.nextId=t,this.pageNo=r}next(){return this.callback()}}},6081:(e,t,r)=>{const a=r(7563),n=r(7303),o=r(1793);let s;e.exports=function(e){return s=e,`curl ${`--request ${s.method.toUpperCase()}`.trim()} "${function(){let e=s.url;s.baseURL&&!o(e)&&(e=n(s.baseURL,e).trim());let{search:t}=new URL(e);queryParamObject={...a.parse(t),...s.params};let r="";return queryParamObject&&Object.keys(queryParamObject).length&&""!==a.stringify(queryParamObject).trim()&&(r=`?${a.stringify(queryParamObject).trim()}`),`${e}${t.trim()}${r}`}()}" ${function(){let e=["common","delete","get","head","post","put","patch"],t={};s.headers[s.method]&&(t=s.headers[s.method]),t=Object.keys(t).reduce(((e,r)=>(e[r.toLowerCase()]=t[r],e)),{});for(let r in s.headers)e.includes(r)||(s.headers[r]instanceof Object?t[r.toLowerCase()]=JSON.stringify(s.headers[r]):t[r.toLowerCase()]=s.headers[r]);let r="";for(let e in t)r+=` --header '${e}: ${t[e]}'`;return r.trim()}()} ${"GET"!==s.method.toUpperCase()&&null!==s.data&&""!==s.data&&s.data?`--data-raw '${JSON.stringify(s.data)}'`.trim():""}`.trim()}},5860:(e,t,r)=>{const{FDKException:a}=r(7208),n=":::",o=e=>{let t="";for(const r in e)if("object"!=typeof e[r]&&e[r]){const a=encodeURIComponent(e[r]);t+=`${r}=${a}&`}else Array.isArray(e[r])?e[r].forEach((e=>{const a=encodeURIComponent(e);t+=`${r}=${a}&`})):"object"==typeof e[r]&&e[r]&&(t+=o(e[r]));return t?t.slice(0,-1):t},s=(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,l=()=>"undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;e.exports={transformRequestOptions:o,getParamsFromItem:e=>{let t="";for(let r in e)if(Array.isArray(e[r])){for(let a=0;a{let t=e.split("?");if(t.length>1){const e=new URLSearchParams(t[1]);let r={};for(let t of e){let e=t[0],a=t[1];r[e]=r[e]?[...r[e],a]:[a]}return r}return{}},trimChar:s,generateUrlWithParams:(e={},t)=>{if(!e||!e.link)return"";if(!t)return`/${s(e.link.split(":")[0])}`;const r={};for(let e in t)if(Array.isArray(t[e])){let a="";for(let r=0;r{let r={value:"",params:{}};t=s(t);for(let a=0;a{if(l())return Buffer.from(e,"utf-8").toString("base64");if(i())return window.btoa(e);throw new a("Base64 conversion error: Unsupported environment")},isBrowser:i,isNode:l,NAV_TYPE:{PAGE:"page",POPUP:"popup"}}},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@gofynd/fdk-client-javascript","version":"1.3.11-beta.8","description":"","main":"index.js","scripts":{"test":"jest --coverage","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":"^0.27.2","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","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={},r=function r(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a].call(o.exports,o,o.exports,r),o.exports}(469),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/documentation/application/CART.md b/documentation/application/CART.md index 3913a7664..138634d31 100644 --- a/documentation/application/CART.md +++ b/documentation/application/CART.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Cart Methods -Manages Cart, Coupons, Promotions, Checkout +The Cart and Checkout module manages cart items, applies coupons and reward points, and allows you to select delivery addresses. This module also enables you to update payment information and view ongoing promotions. Additionally, it manages cart sharing, merging, and replacing, as well as providing details on shared carts. Default @@ -861,6 +861,7 @@ Success. Returns a cart object as shown below. Refer `AddCartDetailResponse` for "gst_charges": 1529.96, "mrp_total": 17486, "mop_total": 0, + "total_charge": 10, "subtotal": 13946, "total": 13946, "vog": 12416.04, @@ -927,6 +928,21 @@ Success. Returns a cart object as shown below. Refer `AddCartDetailResponse` for } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "price": { "base": { "add_on": 4798, @@ -1037,6 +1053,21 @@ Success. Returns a cart object as shown below. Refer `AddCartDetailResponse` for } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "price": { "base": { "add_on": 4490, @@ -1151,6 +1182,21 @@ Success. Returns a cart object as shown below. Refer `AddCartDetailResponse` for } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "price": { "base": { "add_on": 1599, @@ -1264,6 +1310,21 @@ Success. Returns a cart object as shown below. Refer `AddCartDetailResponse` for } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "price": { "base": { "add_on": 3059, @@ -1373,6 +1434,7 @@ Success. Returns a cart object as shown below. Refer `AddCartDetailResponse` for "gst_charges": 4804.71, "mrp_total": 302899, "mop_total": 0, + "total_charge": 10, "subtotal": 100899, "total": 100899, "vog": 96094.29, @@ -1468,6 +1530,21 @@ Success. Returns a cart object as shown below. Refer `AddCartDetailResponse` for } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "coupon_message": "", "key": "707569_1", "availability": { @@ -1635,6 +1712,7 @@ Success. Returns coupons applied to the cart along with item details and price b "gst_charges": 2139.08, "mrp_total": 26983, "mop_total": 0, + "total_charge": 10, "subtotal": 19742.7837, "total": 17492.7837, "vog": 15353.7, @@ -1785,7 +1863,22 @@ Success. Returns coupons applied to the cart along with item details and price b "currency_code": "INR" } } - } + }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ] }, { "identifiers": {}, @@ -1881,7 +1974,22 @@ Success. Returns coupons applied to the cart along with item details and price b "currency_code": "INR" } } - } + }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ] }, { "identifiers": {}, @@ -1976,7 +2084,22 @@ Success. Returns coupons applied to the cart along with item details and price b "currency_code": "INR" } } - } + }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ] }, { "identifiers": {}, @@ -2068,7 +2191,22 @@ Success. Returns coupons applied to the cart along with item details and price b "currency_code": "INR" } } - } + }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ] }, { "identifiers": {}, @@ -2160,7 +2298,22 @@ Success. Returns coupons applied to the cart along with item details and price b "currency_code": "INR" } } - } + }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ] } ], "delivery_charge_info": "", @@ -2272,6 +2425,21 @@ Success. Returns a Cart object. Check the example shown below or refer `CartDeta } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "coupon_message": "", "key": "707569_1", "availability": { @@ -2356,6 +2524,7 @@ Success. Returns a Cart object. Check the example shown below or refer `CartDeta "gst_charges": 47.57, "mrp_total": 2999, "mop_total": 0, + "total_charge": 10, "subtotal": 999, "total": 999, "vog": 951.43, @@ -2707,6 +2876,7 @@ Success. Returns the status of cart checkout. Refer `CartCheckoutResponseSchema` "gst_charges": 214.18, "mrp_total": 1999, "mop_total": 0, + "total_charge": 10, "subtotal": 1999, "total": 1999, "vog": 1784.82, @@ -2815,6 +2985,21 @@ Success. Returns the status of cart checkout. Refer `CartCheckoutResponseSchema` } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "coupon_message": "", "availability": { "sizes": [ @@ -3147,6 +3332,7 @@ Success. Returns the status of cart checkout. Refer `CartCheckoutResponseSchema` "gst_charges": 214.18, "mrp_total": 1999, "mop_total": 0, + "total_charge": 10, "subtotal": 1999, "total": 1999, "vog": 1784.82, @@ -3255,6 +3441,21 @@ Success. Returns the status of cart checkout. Refer `CartCheckoutResponseSchema` } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "coupon_message": "", "availability": { "sizes": [ @@ -3430,6 +3631,7 @@ Success. Returns an Address object containing a list of address saved in the acc "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", "country_code": "IND", + "state_code": "MH", "country_phone_code": "91", "country_iso_code": "IND", "phone": "9915347757", @@ -3517,44 +3719,94 @@ Success. Returns an Address object containing a list of address saved in the acc
-  Example: +  Examples: + + +
+  example1 ```json { - "address": [ - { - "landmark": "", - "area_code": "8b526f521bb14a2593a8b9e3ce8c76b3", - "id": "8b526f521bb14a2593a8b9e3ce8c76b3", - "state": "Maharashtra", - "meta": {}, - "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", - "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", - "country_code": "IND", - "country_phone_code": "91", - "country_iso_code": "IND", - "phone": "9915347757", - "geo_location": {}, - "country": "India", - "is_default_address": true, - "is_active": true, - "city": "Mumbai", - "pincode": 400093, - "checkout_mode": "self", - "address_type": "home", - "tags": [], - "area": "Sector 127", - "name": "abc", - "email": "ankur@gofynd1.com", - "address": "Megatron2", - "store_name": "store123", - "_custom_json": {} - } - ] + "summary": "Address for India", + "value": { + "address": [ + { + "landmark": "", + "area_code": "8b526f521bb14a2593a8b9e3ce8c76b3", + "id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "state": "Maharashtra", + "meta": {}, + "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "country_code": "+91", + "country_phone_code": "91", + "country_iso_code": "IN", + "phone": "9915347757", + "geo_location": {}, + "country": "India", + "is_default_address": true, + "is_active": true, + "city": "Mumbai", + "pincode": 400093, + "checkout_mode": "self", + "address_type": "home", + "tags": [], + "area": "Sector 127", + "state_code": "MH", + "name": "abc", + "email": "ankur@gofynd1.com", + "address": "Megatron2", + "_custom_json": {} + } + ] + } } ```
+
+  example2 + +```json +{ + "summary": "Address for Dubai", + "value": { + "address": [ + { + "landmark": "", + "area_code": "", + "id": "651c0b882dbd5f702f711677", + "state": "", + "meta": {}, + "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "country_code": "+971", + "country_phone_code": "+971", + "country_iso_code": "AE", + "phone": "551234567", + "geo_location": {}, + "country": "United Arab Emirates", + "is_default_address": true, + "is_active": true, + "city": "Sharjah", + "sector": "Al Fisht", + "checkout_mode": "self", + "address_type": "home", + "tags": [], + "area": "Dubai Park", + "name": "Shaikh Ahmed", + "email": "example@gmail.com", + "address": "B-62", + "_custom_json": {} + } + ] + } +} +``` +
+ +
+ @@ -4433,6 +4685,7 @@ Success. Returns a Cart object. Check the example shown below or refer `CartDeta "moq": {}, "article": { "type": "article", + "tags": [], "uid": "604_902_SSTC60401_636BLUE_1", "size": "1", "seller": { @@ -4459,6 +4712,21 @@ Success. Returns a Cart object. Check the example shown below or refer `CartDeta }, "coupon_message": "", "key": "707569_1", + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "availability": { "available_sizes": [ { @@ -4548,6 +4816,7 @@ Success. Returns a Cart object. Check the example shown below or refer `CartDeta "gst_charges": 47.57, "mrp_total": 2999, "mop_total": 0, + "total_charge": 10, "subtotal": 999, "total": 999, "vog": 951.43, @@ -4810,6 +5079,21 @@ Success. Returns a Cart object as per the valid token. Refer `SharedCartResponse } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "product": { "type": "product", "uid": 791651, @@ -4906,6 +5190,21 @@ Success. Returns a Cart object as per the valid token. Refer `SharedCartResponse } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "product": { "type": "product", "uid": 791651, @@ -4984,6 +5283,7 @@ Success. Returns a Cart object as per the valid token. Refer `SharedCartResponse "gst_charges": 958.73, "mrp_total": 6285, "mop_total": 0, + "total_charge": 10, "subtotal": 6285, "total": 6285, "vog": 5326.27, @@ -5062,11 +5362,15 @@ Fetch Coupon ```javascript // Promise const promise = applicationClient.cart.getCoupons({ id : value, - buyNow : value }); + buyNow : value, + slug : value, + storeId : value }); // Async/Await const data = await applicationClient.cart.getCoupons({ id : value, - buyNow : value }); + buyNow : value, + slug : value, + storeId : value }); ``` @@ -5076,7 +5380,9 @@ const data = await applicationClient.cart.getCoupons({ id : value, | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | id | string | no | | -| buyNow | boolean | no | | +| buyNow | boolean | no | | +| slug | string | no | | +| storeId | string | no | | @@ -5102,6 +5408,7 @@ Success. Returns a coupon object which has a list of all the eligible coupons. R "available_coupon_list": [ { "coupon_value": 500, + "coupon_amount": 43.5, "minimum_cart_value": 0, "coupon_code": "RAJA500", "title": "RAJA500 | Fynd coupon", @@ -5115,6 +5422,7 @@ Success. Returns a coupon object which has a list of all the eligible coupons. R }, { "coupon_value": 2250, + "coupon_amount": 43.5, "minimum_cart_value": 0, "coupon_code": "PRISMC22250111", "title": "celio 2 time coupn to kalim hsp", @@ -5755,6 +6063,7 @@ Success. Returns delivery promise along with shipment details and price breakup. "gst_charges": 214.18, "mrp_total": 1999, "mop_total": 0, + "total_charge": 10, "subtotal": 1999, "total": 1999, "vog": 1784.82, @@ -5819,6 +6128,10 @@ Success. Returns delivery promise along with shipment details and price breakup. "formatted": { "min": "Aug 24", "max": "Aug 28" + }, + "iso": { + "min": "2019-08-25T00:35:08.000Z", + "max": "2019-08-29T07:55:08.000Z" } }, "box_type": "Small Courier bag", @@ -5891,6 +6204,7 @@ Success. Returns delivery promise along with shipment details and price breakup. "name": "Kormangala" }, "quantity": 2, + "tags": [], "price": { "base": { "marked": 1999, @@ -5904,6 +6218,21 @@ Success. Returns delivery promise along with shipment details and price breakup. } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "availability": { "sizes": [ "L", @@ -6148,6 +6477,7 @@ Success. Returns delivery promise along with shipment details and price breakup. "gst_charges": 214.18, "mrp_total": 1999, "mop_total": 0, + "total_charge": 10, "subtotal": 1999, "total": 1999, "vog": 1784.82, @@ -6316,6 +6646,7 @@ Success. Returns coupons removed from the cart along with item details and price "gst_charges": 342.75, "mrp_total": 3199, "mop_total": 0, + "total_charge": 10, "subtotal": 3199, "total": 3199, "vog": 2856.25, @@ -6451,7 +6782,22 @@ Success. Returns coupons removed from the cart along with item details and price "currency_code": "INR" } } - } + }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ] } ], "delivery_charge_info": "", @@ -6545,6 +6891,7 @@ Success. Returns a Cart object as shown below. Refer `CartDetailResponse` for mo "gst_charges": 315.86, "mrp_total": 5198, "mop_total": 0, + "total_charge": 10, "subtotal": 5198, "total": 2948, "vog": 2632.15, @@ -6653,6 +7000,21 @@ Success. Returns a Cart object as shown below. Refer `CartDetailResponse` for mo } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "product": { "type": "product", "uid": 857596, @@ -6747,6 +7109,21 @@ Success. Returns a Cart object as shown below. Refer `CartDetailResponse` for mo } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "product": { "type": "product", "uid": 820312, @@ -6874,6 +7251,7 @@ Success. Returns a Cart object as shown below. Refer `CartDetailResponse` for mo "gst_charges": 315.86, "mrp_total": 5198, "mop_total": 0, + "total_charge": 10, "subtotal": 5198, "total": 2948, "vog": 2632.15, @@ -6982,6 +7360,21 @@ Success. Returns a Cart object as shown below. Refer `CartDetailResponse` for mo } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "product": { "type": "product", "uid": 857596, @@ -7076,6 +7469,21 @@ Success. Returns a Cart object as shown below. Refer `CartDetailResponse` for mo } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "product": { "type": "product", "uid": 820312, @@ -7274,6 +7682,7 @@ Success. Updates and returns a cart object as shown below. Refer `UpdateCartDeta "gst_charges": 4804.71, "mrp_total": 302899, "mop_total": 0, + "total_charge": 10, "subtotal": 100899, "total": 100899, "vog": 96094.29, @@ -7369,6 +7778,21 @@ Success. Updates and returns a cart object as shown below. Refer `UpdateCartDeta } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "coupon_message": "", "key": "707569_1", "availability": { @@ -8148,6 +8572,7 @@ Success. Updates and returns a cart object as shown below. Refer `UpdateCartDeta "gst_charges": 838.83, "mrp_total": 5499, "mop_total": 0, + "total_charge": 10, "subtotal": 5499, "total": 5499, "vog": 4660.17, @@ -8272,6 +8697,21 @@ Success. Updates and returns a cart object as shown below. Refer `UpdateCartDeta } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "coupon_message": "", "availability": { "available_sizes": [ @@ -8495,6 +8935,21 @@ Success. Returns a merged or replaced cart as per the valid token. Refer `Shared } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "product": { "type": "product", "uid": 791651, @@ -8591,6 +9046,21 @@ Success. Returns a merged or replaced cart as per the valid token. Refer `Shared } } }, + "charges": [ + { + "type": "convenience fee", + "name": "convenience fee", + "code": "convenience fee", + "amount": { + "value": 10, + "currency": "INR" + }, + "meta": { + "price_adjustment_id": "64c22d66fe278c0796bd8e4d", + "article_level_distribution": true + } + } + ], "product": { "type": "product", "uid": 791651, @@ -8669,6 +9139,7 @@ Success. Returns a merged or replaced cart as per the valid token. Refer `Shared "gst_charges": 958.73, "mrp_total": 6285, "mop_total": 0, + "total_charge": 10, "subtotal": 6285, "total": 6285, "vog": 5326.27, @@ -8891,6 +9362,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | product_group_tags | [string]? | yes | | | quantity | number? | yes | | | seller_id | number? | yes | | + | seller_identifier | string? | yes | Add items using seller identifier for store os | | store_id | number? | yes | | @@ -8923,7 +9395,9 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | meta | string? | yes | | | name | string? | yes | | | phone | string? | yes | | + | sector | string? | yes | | | state | string? | yes | | + | state_code | string? | yes | State code for international address | | tags | [string]? | yes | | | user_id | string? | yes | | @@ -9292,6 +9766,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | article | [ProductArticle](#ProductArticle)? | yes | | | availability | [ProductAvailability](#ProductAvailability)? | yes | | | bulk_offer | string? | yes | | + | charges | [[Charges](#Charges)]? | yes | | | coupon | [CouponDetails](#CouponDetails)? | yes | | | coupon_message | string? | yes | | | custom_order | string? | yes | | @@ -9349,6 +9824,30 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | uid | number? | yes | Product Category Id | +--- + +#### [Charges](#Charges) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | allow_refund | boolean? | yes | This boolean value defines that refund is allowed or not for the charge | + | amount | [ChargesAmount](#ChargesAmount)? | yes | | + | code | string? | yes | This is the code of the charge applied | + | meta | string? | yes | This object contains the meta data realted to charges price adjustment | + | name | string? | yes | This is the name of the charge applied | + | type | string? | yes | This is the type of the charge applied | + + +--- + +#### [ChargesAmount](#ChargesAmount) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | currency | string? | yes | This is destination currency of value | + | value | number? | yes | This is the value of amount added | + + --- #### [ChargesThreshold](#ChargesThreshold) @@ -9402,16 +9901,20 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | coupon_amount | number? | yes | The amount based on cart value | + | coupon_applicable_message | string? | yes | | | coupon_code | string? | yes | | | coupon_type | string? | yes | | | coupon_value | number? | yes | | | description | string? | yes | | + | end_date | string? | yes | | | expires_on | string? | yes | | | is_applicable | boolean? | yes | | | is_applied | boolean? | yes | | | max_discount_value | number? | yes | | | message | string? | yes | | | minimum_cart_value | number? | yes | | + | start_date | string? | yes | | | sub_title | string? | yes | | | title | string? | yes | | @@ -9845,6 +10348,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | seller_identifier | string? | yes | | | size | string? | yes | | | store | [StoreInfo](#StoreInfo)? | yes | | + | tags | [string]? | yes | a list of article tags | | type | string? | yes | | | uid | string? | yes | | @@ -9943,6 +10447,16 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | min | string? | yes | | +--- + +#### [PromiseISOFormat](#PromiseISOFormat) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | max | string? | yes | Max promise in ISO format. | + | min | string? | yes | Min Promise in ISO format. | + + --- #### [PromiseTimestamp](#PromiseTimestamp) @@ -10005,6 +10519,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | mrp_total | number? | yes | | | subtotal | number? | yes | | | total | number? | yes | | + | total_charge | number? | yes | | | vog | number? | yes | | | you_saved | number? | yes | | @@ -10097,6 +10612,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | formatted | [PromiseFormatted](#PromiseFormatted)? | yes | | + | iso | [PromiseISOFormat](#PromiseISOFormat)? | yes | | | timestamp | [PromiseTimestamp](#PromiseTimestamp)? | yes | | diff --git a/documentation/application/CATALOG.md b/documentation/application/CATALOG.md index 4c531f2f3..510f659d4 100644 --- a/documentation/application/CATALOG.md +++ b/documentation/application/CATALOG.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Catalog Methods -Catalog API's allows you to access list of products, prices, seller details, similar features, variants and many more useful features. +The Catalog module manages product details and size availability, and enables easy comparisons. Use it to explore product options, check stock status, and retrieve brand and category information. The module also supports personalization by allowing tracking of preferred items and brands. It highlights popular products based on user engagement and provides store details. Additionally, this module covers bundled items, size-specific pricing, and seller information. Default @@ -4756,14 +4756,12 @@ Get the price of a product size at a PIN Code const promise = applicationClient.catalog.getProductPriceBySlug({ slug : value, size : value, storeId : value, - pincode : value, moq : value }); // Async/Await const data = await applicationClient.catalog.getProductPriceBySlug({ slug : value, size : value, storeId : value, - pincode : value, moq : value }); ``` @@ -4776,7 +4774,6 @@ const data = await applicationClient.catalog.getProductPriceBySlug({ slug : val | slug | string | yes | A short, human-readable, URL-friendly identifier of a product. You can get slug value from the endpoint /service/application/catalog/v1.0/products/ | | size | string | yes | A string indicating the size of the product, e.g. S, M, XL. You can get slug value from the endpoint /service/application/catalog/v1.0/products/sizes | | storeId | number | no | The ID of the store that is selling the product, e.g. 1,2,3. | -| pincode | string | no | The PIN Code of the area near which the selling locations should be searched, e.g. 400059. | | moq | number | no | An Integer indication the Minimum Order Quantity of a product, e.g. 100. | @@ -4905,7 +4902,6 @@ Get the sellers of a product size at a PIN Code // Promise const promise = applicationClient.catalog.getProductSellersBySlug({ slug : value, size : value, - pincode : value, strategy : value, pageNo : value, pageSize : value }); @@ -4913,7 +4909,6 @@ const promise = applicationClient.catalog.getProductSellersBySlug({ slug : valu // Async/Await const data = await applicationClient.catalog.getProductSellersBySlug({ slug : value, size : value, - pincode : value, strategy : value, pageNo : value, pageSize : value }); @@ -4927,7 +4922,6 @@ const data = await applicationClient.catalog.getProductSellersBySlug({ slug : v | --------- | ----- | -------- | ----------- | | slug | string | yes | A short, human-readable, URL-friendly identifier of a product. You can get slug value from the endpoint /service/application/catalog/v1.0/products/ | | size | string | yes | A string indicating the size of the product, e.g. S, M, XL. You can get slug value from the endpoint /service/application/catalog/v1.0/products/sizes | -| pincode | string | no | The 6-digit PIN Code of the area near which the selling locations should be searched, e.g. 400059 | | strategy | string | no | Sort stores on the basis of strategy. eg, fast-delivery, low-price, optimal. | | pageNo | number | no | The page number to navigate through the given set of results. | | pageSize | number | no | The number of items to retrieve in each page. | @@ -8433,7 +8427,7 @@ Success. Returns a response object. Check the example shown below or refer `Foll | query | [[CollectionQuery](#CollectionQuery)]? | yes | | | slug | string? | yes | | | sort_on | string? | yes | | - | tag | [string]? | yes | | + | tags | [string]? | yes | | | type | string? | yes | | | uid | string? | yes | | | visible_facets_keys | [string]? | yes | | diff --git a/documentation/application/COMMUNICATION.md b/documentation/application/COMMUNICATION.md index 0ad1bbda6..8d449c689 100644 --- a/documentation/application/COMMUNICATION.md +++ b/documentation/application/COMMUNICATION.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Communication Methods -Manages email, sms, push notifications sent to users +The Communications module manages user notifications to keep users informed and engaged through personalized push notifications. Use it to enable users to view notifications they've opted into, modify their communication preferences, and update push tokens for real-time updates. Default diff --git a/documentation/application/CONFIGURATION.md b/documentation/application/CONFIGURATION.md index 310f2ce89..2fa4e0a12 100644 --- a/documentation/application/CONFIGURATION.md +++ b/documentation/application/CONFIGURATION.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Configuration Methods -Application configuration apis +The Application Configuration module simplifies tasks related to configuring the app. You can use it to retrieve information about sales channels, ownership details, app-specific settings, and integration tokens. This module also offers insights into store performance, ordering options, and available modules. It allows you to access currency information, support multiple languages, and customize store cookies for a personalized user experience. Additionally, the module can retrieve the staff list. Default @@ -69,31 +69,39 @@ Success. Check the example shown below or refer `AppCurrencyResponse` for more d
-  Example: +  Examples: + + +
+  success ```json { - "application": "000000000000000000000001", - "default_currency": { - "ref": "5ecf6122d953d4242c044907", - "code": "INR" - }, - "supported_currency": [ - { - "_id": "5ecf6122d953d4242c044907", - "is_active": true, - "name": "Indian Rupee", - "code": "INR", - "decimal_digits": 2, - "symbol": "₹", - "created_at": "2020-05-28T06:58:42.532Z", - "modified_at": "2021-04-05T16:44:14.358Z" - } - ] + "value": { + "application": "000000000000000000000001", + "default_currency": { + "ref": "5ecf6122d953d4242c044907", + "code": "INR" + }, + "supported_currency": [ + { + "_id": "5ecf6122d953d4242c044907", + "is_active": true, + "name": "Indian Rupee", + "code": "INR", + "decimal_digits": 2, + "symbol": "₹", + "created_at": "2020-05-28T06:58:42.532Z", + "modified_at": "2021-04-05T16:44:14.358Z" + } + ] + } } ```
+
+ @@ -158,13 +166,27 @@ Success. Check the example shown below or refer `AppStaffListResponse` for more
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "5e6b6ae7d450b1219ffdf3b2" + } + ] + } +} ```
+
+ @@ -220,13 +242,27 @@ Success. Check the example shown below or refer `AppStaffResponse` for more deta
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "staff_users": [ + { + "_id": "5e6b6ae7d450b1219ffdf3b2" + } + ] + } +} ```
+
+ @@ -271,76 +307,83 @@ Success. Check the example shown below or refer `Application` for more details.
-  Example: +  Examples: + + +
+  success ```json { - "website": { - "enabled": true, - "basepath": "/" - }, - "cors": { - "domains": [] - }, - "auth": { - "enabled": false - }, - "description": "Uniket B2B - India's Fastest Growing Retail Store - Aapki Badhti Dukaan", - "channel_type": "uniket", - "cache_ttl": -1, - "internal": false, - "is_active": true, - "_id": "000000000000000000000004", - "name": "Uniket B2B", - "owner": "5e71a60dc671daffd81992ea", - "company_id": 1, - "token": "iTNjY_yAI", - "redirections": [], - "meta": [], - "created_at": "2019-12-26T13:22:23.619Z", - "modified_at": "2020-12-02T05:49:41.610Z", - "__v": 29, - "banner": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/landscape-banner/original/uSwlNpygq-Uniket-B2B.png" - }, - "logo": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" - }, - "favicon": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/favicon/original/y3h6SSlY5-Uniket-B2B.png" - }, - "domains": [ - { + "value": { + "website": { + "enabled": true, + "basepath": "/" + }, + "cors": { + "domains": [] + }, + "auth": { + "enabled": false + }, + "description": "Uniket B2B - India's Fastest Growing Retail Store - Aapki Badhti Dukaan", + "channel_type": "uniket", + "cache_ttl": -1, + "internal": false, + "is_active": true, + "_id": "000000000000000000000004", + "name": "Uniket B2B", + "owner": "5e71a60dc671daffd81992ea", + "company_id": 1, + "token": "iTNjY_yAI", + "redirections": [], + "meta": [], + "created_at": "2019-12-26T13:22:23.619Z", + "modified_at": "2020-12-02T05:49:41.610Z", + "__v": 29, + "banner": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/landscape-banner/original/uSwlNpygq-Uniket-B2B.png" + }, + "logo": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" + }, + "favicon": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/favicon/original/y3h6SSlY5-Uniket-B2B.png" + }, + "domains": [ + { + "verified": true, + "is_primary": true, + "is_shortlink": true, + "_id": "5eb1177748312a3bd55d0f1e", + "name": "uniket.hostx0.de" + }, + { + "verified": true, + "is_primary": false, + "is_shortlink": false, + "_id": "5f0858c5f86e00cd42dccc8d", + "name": "jd.hostx0.de" + } + ], + "app_type": "live", + "mobile_logo": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" + }, + "domain": { "verified": true, "is_primary": true, "is_shortlink": true, "_id": "5eb1177748312a3bd55d0f1e", "name": "uniket.hostx0.de" - }, - { - "verified": true, - "is_primary": false, - "is_shortlink": false, - "_id": "5f0858c5f86e00cd42dccc8d", - "name": "jd.hostx0.de" } - ], - "app_type": "live", - "mobile_logo": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" - }, - "domain": { - "verified": true, - "is_primary": true, - "is_shortlink": true, - "_id": "5eb1177748312a3bd55d0f1e", - "name": "uniket.hostx0.de" - }, - "id": "000000000000000000000004" + } } ```
+
+ @@ -385,53 +428,61 @@ Success. Check the example shown below or refer `ApplicationDetail` for more det
-  Example: +  Examples: + + +
+  success ```json { - "name": "Uniket B2B", - "description": "Uniket B2B - India's Fastest Growing Retail Store - Aapki Badhti Dukaan", - "logo": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" - }, - "mobile_logo": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" - }, - "favicon": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/favicon/original/y3h6SSlY5-Uniket-B2B.png" - }, - "banner": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/landscape-banner/original/uSwlNpygq-Uniket-B2B.png" - }, - "domain": { - "verified": true, - "is_primary": true, - "is_shortlink": false, - "_id": "5eb1177748312a3bd55d0f1e", - "name": "uniket.hostx0.de" - }, - "domains": [ - { + "value": { + "name": "Uniket B2B", + "description": "Uniket B2B - India's Fastest Growing Retail Store - Aapki Badhti Dukaan", + "logo": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" + }, + "mobile_logo": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" + }, + "favicon": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/favicon/original/y3h6SSlY5-Uniket-B2B.png" + }, + "banner": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/landscape-banner/original/uSwlNpygq-Uniket-B2B.png" + }, + "domain": { "verified": true, "is_primary": true, "is_shortlink": false, "_id": "5eb1177748312a3bd55d0f1e", "name": "uniket.hostx0.de" }, - { - "verified": true, - "is_primary": false, - "is_shortlink": true, - "_id": "5f0858c5f86e00cd42dccc8d", - "name": "jd.hostx0.de" - } - ], - "company_id": 1, - "_id": "000000000000000000000004" + "domains": [ + { + "verified": true, + "is_primary": true, + "is_shortlink": false, + "_id": "5eb1177748312a3bd55d0f1e", + "name": "uniket.hostx0.de" + }, + { + "verified": true, + "is_primary": false, + "is_shortlink": true, + "_id": "5f0858c5f86e00cd42dccc8d", + "name": "jd.hostx0.de" + } + ], + "company_id": 1, + "_id": "000000000000000000000004" + } } ```
+
+ @@ -476,13 +527,17 @@ Success. Check the example shown below or refer `ApplicationAboutResponse` for m
-  Example: +  Examples: + + +
+  success ```json { "value": { "address": { - "loc": null, + "loc": {}, "address_line": [ "Warehouse 5, Near Industrial Complex", "2nd Lane, Andheri" @@ -572,7 +627,7 @@ Success. Check the example shown below or refer `ApplicationAboutResponse` for m "business_highlights": [ { "_id": "5fc901611dfba6c2e87d1ca9", - "title": "100% Genuine Products", + "title": "Most Genuine Products", "icon": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/business-highlights/pictures/square-logo/original/bVlx43F2a-H6pvZ9tzp-business-logo-icon.png", "sub_title": "Directly from brands" }, @@ -598,6 +653,8 @@ Success. Check the example shown below or refer `ApplicationAboutResponse` for m ```
+
+ @@ -642,26 +699,34 @@ Success. Check the example shown below or refer `CurrenciesResponse` for more de
-  Example: +  Examples: + + +
+  success ```json { - "items": [ - { - "_id": "5ec75d11f7bfb54d798f3516", - "is_active": true, - "name": "United States Dollar", - "code": "USD", - "created_at": "2020-05-22T05:03:13.354Z", - "modified_at": "2020-06-05T09:12:04.248Z", - "decimal_digits": 2, - "symbol": "$" - } - ] + "value": { + "items": [ + { + "_id": "5ec75d11f7bfb54d798f3516", + "is_active": true, + "name": "United States Dollar", + "code": "USD", + "created_at": "2020-05-22T05:03:13.354Z", + "modified_at": "2020-06-05T09:12:04.248Z", + "decimal_digits": 2, + "symbol": "$" + } + ] + } } ```
+
+ @@ -711,22 +776,30 @@ Success. Check the example shown below or refer `Currency` for more details.
-  Example: +  Examples: + + +
+  success ```json { - "_id": "5ec75d11f7bfb501d88f3559", - "is_active": true, - "name": "Gold Ounce", - "code": "XAU", - "created_at": "2020-05-22T05:03:13.429Z", - "modified_at": "2020-06-05T09:12:04.248Z", - "decimal_digits": 1, - "symbol": "" + "value": { + "_id": "5ec75d11f7bfb501d88f3559", + "is_active": true, + "name": "Gold Ounce", + "code": "XAU", + "created_at": "2020-05-22T05:03:13.429Z", + "modified_at": "2020-06-05T09:12:04.248Z", + "decimal_digits": 1, + "symbol": "" + } } ```
+
+ @@ -771,108 +844,116 @@ Success. Check the example shown below or refer `AppFeatureResponse` for more de
-  Example: +  Examples: + + +
+  success ```json { - "feature": { - "product_detail": { - "similar": [ - "basic", - "visual", - "brand", - "category", - "seller", - "price", - "specs" - ], - "seller_selection": true, - "update_product_meta": true, - "request_product": true - }, - "landing_page": { - "launch_page": { - "page_type": "home", - "params": {}, - "query": {} - }, - "continue_as_guest": true, - "login_btn_text": "Click here to sign-in", - "show_domain_textbox": true, - "show_register_btn": true - }, - "registration_page": { - "ask_store_address": false - }, - "home_page": { - "order_processing": true - }, - "common": { - "communication_optin_dialog": { - "visibility": true - }, - "deployment_store_selection": { - "enabled": true, - "type": "hard" - }, - "listing_price": { - "value": "min", - "sort": "min" - }, - "currency": { - "value": [ - "INR" + "value": { + "feature": { + "product_detail": { + "similar": [ + "basic", + "visual", + "brand", + "category", + "seller", + "price", + "specs" ], - "type": "explicit", - "default_currency": "INR" + "seller_selection": true, + "update_product_meta": true, + "request_product": true }, - "revenue_engine": { - "enabled": false + "landing_page": { + "launch_page": { + "page_type": "home", + "params": {}, + "query": {} + }, + "continue_as_guest": true, + "login_btn_text": "Click here to sign-in", + "show_domain_textbox": true, + "show_register_btn": true }, - "feedback": { - "enabled": true + "registration_page": { + "ask_store_address": false }, - "compare_products": { - "enabled": true + "home_page": { + "order_processing": true }, - "reward_points": { - "credit": { - "enabled": true + "common": { + "communication_optin_dialog": { + "visibility": true }, - "debit": { + "deployment_store_selection": { "enabled": true, - "auto_apply": false, - "strategy_channel": "REWARDS" + "type": "hard" + }, + "listing_price": { + "value": "min", + "sort": "min" + }, + "currency": { + "value": [ + "INR" + ], + "type": "explicit", + "default_currency": "INR" + }, + "revenue_engine": { + "enabled": false + }, + "feedback": { + "enabled": true + }, + "compare_products": { + "enabled": true + }, + "reward_points": { + "credit": { + "enabled": true + }, + "debit": { + "enabled": true, + "auto_apply": false, + "strategy_channel": "REWARDS" + } } - } - }, - "cart": { - "gst_input": true, - "staff_selection": true, - "placing_for_customer": true, - "google_map": true - }, - "qr": { - "application": true, - "products": true, - "collections": true - }, - "pcr": { - "staff_selection": true - }, - "order": { - "buy_again": true - }, - "_id": "5e57643c986e4119c973df7d", - "app": "000000000000000000000004", - "created_at": "2020-02-27T06:39:56.088Z", - "modified_at": "2021-02-02T11:04:14.289Z", - "__v": 1 + }, + "cart": { + "gst_input": true, + "staff_selection": true, + "placing_for_customer": true, + "google_map": true + }, + "qr": { + "application": true, + "products": true, + "collections": true + }, + "pcr": { + "staff_selection": true + }, + "order": { + "buy_again": true + }, + "_id": "5e57643c986e4119c973df7d", + "app": "000000000000000000000004", + "created_at": "2020-02-27T06:39:56.088Z", + "modified_at": "2021-02-02T11:04:14.289Z", + "__v": 1 + } } } ```
+
+ @@ -917,82 +998,90 @@ Success. Check the example shown below or refer `AppTokenResponse` for more deta
-  Example: +  Examples: + + +
+  success ```json { - "tokens": { - "firebase": { - "credentials": { - "project_id": "", - "gcm_sender_id": "", - "application_id": "", - "api_key": "" + "value": { + "tokens": { + "firebase": { + "credentials": { + "project_id": "", + "gcm_sender_id": "", + "application_id": "", + "api_key": "" + }, + "enabled": false }, - "enabled": false - }, - "moengage": { - "credentials": { - "app_id": "" + "moengage": { + "credentials": { + "app_id": "" + }, + "enabled": false }, - "enabled": false - }, - "segment": { - "credentials": { - "write_key": "U2FsdGVkX18E920z+xtaD+GnGWoK/5SNxu61phXf6/o=" + "segment": { + "credentials": { + "write_key": "U2FsdGVkX18E920z+xtaD+GnGWoK/5SNxu61phXf6/o=" + }, + "enabled": false }, - "enabled": false - }, - "gtm": { - "credentials": { - "api_key": "" + "gtm": { + "credentials": { + "api_key": "" + }, + "enabled": false }, - "enabled": false - }, - "freshchat": { - "credentials": { - "app_id": "U2FsdGVkX19+Egjfy8alIB4S+n2IQEXz2X4yxzimxbGzq9M5+iFsvGjrBAyQrDZ/iIXgWQyWOFRHmf9xhFGajQ==", - "app_key": "U2FsdGVkX18OydYSvUBRKJDsLD1KCcwK6+jJVGma4Ck2PVwOv6BW5vyiM2sZ4kEpHbRV38KBPZPqlx3EfZd6mw==" + "freshchat": { + "credentials": { + "app_id": "U2FsdGVkX19+Egjfy8alIB4S+n2IQEXz2X4yxzimxbGzq9M5+iFsvGjrBAyQrDZ/iIXgWQyWOFRHmf9xhFGajQ==", + "app_key": "U2FsdGVkX18OydYSvUBRKJDsLD1KCcwK6+jJVGma4Ck2PVwOv6BW5vyiM2sZ4kEpHbRV38KBPZPqlx3EfZd6mw==" + }, + "enabled": true }, - "enabled": true - }, - "safetynet": { - "credentials": { - "api_key": "U2FsdGVkX1/Ex0BXvB16B81dwWIfVK8LPwexMMbVC3/nB9Y5n4stcnOMUCDalDs8Z92MecOQKydWg+E17QfZ4Q==" + "safetynet": { + "credentials": { + "api_key": "U2FsdGVkX1/Ex0BXvB16B81dwWIfVK8LPwexMMbVC3/nB9Y5n4stcnOMUCDalDs8Z92MecOQKydWg+E17QfZ4Q==" + }, + "enabled": true }, - "enabled": true - }, - "fynd_rewards": { - "credentials": { - "public_key": "U2FsdGVkX1/C7x0hybxKPpWSMYBEKukQCVjnm7wfW3lrTJPmcr06xvLzVatPQJTKXeXvay0rdvcXuHlp8n/VAX7v9Usobmp1znadnPWt07GOvq5aPK9zDlg05tb+TX8Wx0q2rVonRK0Q6ZyMcn6Oy+Z812TpRAlcU1AmSrDtl/PMjuH1rSRTxKJLD0HzXk9zPl2M6GOKmgzjpHD4ZmtRSfJmm/h+qbZZ4AuD9upTbJzDm/pcp4S4cYu9rSV31JpOtAkrCxZFzCT8seWKa2eU8VdleRltwF5DO1x8Pny/hKNmhrUqxdkevY6lm4aEQjThA/EeBv1UPq52EFDteXLsZ6yBXyNAxcFNuPupour+K8hi0nfgbd/fsFqu5NUBOwz0hsqQh9OsTGt7SdiIyMSQgCttphaqhBbJ926UlG9d/O1W1u+i9rn7pECcH1eyUYlsNbYqghciz9pTrfRdqA8AIa2j7H/3Lxq37arxZCIDlTgl+Kk/8QUTsTefk+seGZsyiDyIkxW+FcmHBZLr3y85ST23szWSnyweV2hQHtPWnCE=" - } - }, - "auth": { - "google": { - "app_id": "U2FsdGVkX19ZkUS8HAnz17Sbcixaj0N4xDcaxztzAPdkxsc2i56kuEL+hVDv5z47HjiY4jOFN0zd5HbO9vf5/adwr6L8QQVEmz1BEEGEze13a5PgONGZlfQkxeuQLBT9" + "fynd_rewards": { + "credentials": { + "public_key": "U2FsdGVkX1/C7x0hybxKPpWSMYBEKukQCVjnm7wfW3lrTJPmcr06xvLzVatPQJTKXeXvay0rdvcXuHlp8n/VAX7v9Usobmp1znadnPWt07GOvq5aPK9zDlg05tb+TX8Wx0q2rVonRK0Q6ZyMcn6Oy+Z812TpRAlcU1AmSrDtl/PMjuH1rSRTxKJLD0HzXk9zPl2M6GOKmgzjpHD4ZmtRSfJmm/h+qbZZ4AuD9upTbJzDm/pcp4S4cYu9rSV31JpOtAkrCxZFzCT8seWKa2eU8VdleRltwF5DO1x8Pny/hKNmhrUqxdkevY6lm4aEQjThA/EeBv1UPq52EFDteXLsZ6yBXyNAxcFNuPupour+K8hi0nfgbd/fsFqu5NUBOwz0hsqQh9OsTGt7SdiIyMSQgCttphaqhBbJ926UlG9d/O1W1u+i9rn7pECcH1eyUYlsNbYqghciz9pTrfRdqA8AIa2j7H/3Lxq37arxZCIDlTgl+Kk/8QUTsTefk+seGZsyiDyIkxW+FcmHBZLr3y85ST23szWSnyweV2hQHtPWnCE=" + } }, - "facebook": { - "app_id": "U2FsdGVkX1/kPjoWmEvESc276Ect4VZmAFVTkQKKjsxgk6LXWjj73vPrBsnJyPpR" + "auth": { + "google": { + "app_id": "U2FsdGVkX19ZkUS8HAnz17Sbcixaj0N4xDcaxztzAPdkxsc2i56kuEL+hVDv5z47HjiY4jOFN0zd5HbO9vf5/adwr6L8QQVEmz1BEEGEze13a5PgONGZlfQkxeuQLBT9" + }, + "facebook": { + "app_id": "U2FsdGVkX1/kPjoWmEvESc276Ect4VZmAFVTkQKKjsxgk6LXWjj73vPrBsnJyPpR" + }, + "accountkit": { + "app_id": "" + } }, - "accountkit": { - "app_id": "" + "google_map": { + "credentials": { + "api_key": "U2FsdGVkX1+5tBH/3lREPiDwVukCS/Q2ftu/CYD9RdLYK8hGO/XJfrs2zpoGDKCJBhgTDRESItRKR7Lt/w+zeQ==" + } } }, - "google_map": { - "credentials": { - "api_key": "U2FsdGVkX1+5tBH/3lREPiDwVukCS/Q2ftu/CYD9RdLYK8hGO/XJfrs2zpoGDKCJBhgTDRESItRKR7Lt/w+zeQ==" - } - } - }, - "_id": "5e285cb1df7e5b1421d5f840", - "application": "000000000000000000000004", - "created_at": "2020-01-22T14:31:13.192Z", - "modified_at": "2020-05-01T04:14:42.117Z", - "__v": 0 + "_id": "5e285cb1df7e5b1421d5f840", + "application": "000000000000000000000004", + "created_at": "2020-01-22T14:31:13.192Z", + "modified_at": "2020-05-01T04:14:42.117Z", + "__v": 0 + } } ```
+
+ @@ -1037,28 +1126,36 @@ Success. Check the example shown below or refer `LanguageResponse` for more deta
-  Example: +  Examples: + + +
+  success ```json { - "items": [ - { - "name": "हिन्दी", - "code": "hi-IN" - }, - { - "name": "English", - "code": "en-IN" - }, - { - "name": "عربى", - "code": "ar-AE" - } - ] + "value": { + "items": [ + { + "name": "हिन्दी", + "code": "hi-IN" + }, + { + "name": "English", + "code": "en-IN" + }, + { + "name": "عربى", + "code": "ar-AE" + } + ] + } } ```
+
+ @@ -1107,15 +1204,23 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "message": "success" + "value": { + "message": "success" + } } ```
+
+ @@ -1171,13 +1276,27 @@ Success. Check the example shown below or refer `OrderingStores` for more detail
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "items": [ + { + "uid": 1 + } + ] + } +} ```
+
+ @@ -1222,112 +1341,121 @@ Success. Check the example shown below or refer `ApplicationAboutResponse` for m
-  Example: +  Examples: + + +
+  success ```json { - "application_info": { - "domains": [ - { - "verified": true, - "name": "uniket-testing.addsale.link", - "custom": false, - "is_primary": true - } - ], - "website": { - "enabled": true, - "basepath": "/" - }, - "cors": { - "domains": [] - }, - "description": "R-City Mall,Ghatkoper East,Mumbai", - "is_active": true, - "_id": "5cd3db5e9d692cfe5302a7ba", - "name": "Shivam Clothing Store", - "meta": { - "name": "tes", - "value": "test" - }, - "token": "xOfcP-aYE", - "secret": "", - "created_at": "2019-05-09T07:48:46.218Z", - "banner": { - "secure_url": "https://res.cloudinary.com/jkvora/image/upload/v1561551809/fqt2djkddoe2yjjlln2h.png" - }, - "logo": { - "secure_url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1577513094/addsale/applications/app_5cd3db5e9d692cfe5302a7ba/media/store/logo/ayrkk2uzfknst2ohluzc.png" - }, - "id": "5cd3db5e9d692cfe5302a7ba", - "company_info": { - "_id": "5da4274a723af4000188a66c", - "uid": 873, - "created_on": "2019-10-14T07:44:10.391Z", - "is_active": true, - "name": "SAPPER LIFESTYLE PRIVATE LIMITED", - "addresses": [ - { - "pincode": 110042, - "address1": "412, SISODIA MOHALLA BADALI VILLAGE", - "city": "NEW DELHI", - "state": "DELHI", - "country": "INDIA", - "address_type": "registered" - }, - { - "pincode": 110042, - "address1": "412, SISODIA MOHALLA BADALI VILLAGE", - "city": "NEW DELHI", - "state": "DELHI", - "country": "INDIA", - "address_type": "office" - } - ], - "notification_emails": [ - "ecom.sapperlifestyle@f2fretail.com" - ] - }, - "owner_info": { - "_id": "5c77921fa1bf7d8695ed57fd", - "emails": [ - { - "active": true, - "primary": true, - "verified": true, - "email": "abc@test.com" - }, - { - "active": true, - "primary": false, - "verified": true, - "email": "abc@test.com" - }, + "value": { + "application_info": { + "domains": [ { - "active": true, - "primary": false, "verified": true, - "email": "abc@test.com" + "name": "uniket-testing.addsale.link", + "custom": false, + "is_primary": true } ], - "phone_numbers": [ + "website": { + "enabled": true, + "basepath": "/" + }, + "cors": { + "domains": [] + }, + "description": "R-City Mall,Ghatkoper East,Mumbai", + "is_active": true, + "_id": "5cd3db5e9d692cfe5302a7ba", + "name": "Shivam Clothing Store", + "meta": [ { - "active": true, - "primary": true, - "verified": true, - "country_code": 91, - "phone": "9408282323" + "name": "tes", + "value": "test" } ], - "first_name": "Jalak", - "last_name": "Vora", - "profile_pic": "" + "token": "xOfcP-aYE", + "secret": "", + "created_at": "2019-05-09T07:48:46.218Z", + "banner": { + "secure_url": "https://res.cloudinary.com/jkvora/image/upload/v1561551809/fqt2djkddoe2yjjlln2h.png" + }, + "logo": { + "secure_url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1577513094/addsale/applications/app_5cd3db5e9d692cfe5302a7ba/media/store/logo/ayrkk2uzfknst2ohluzc.png" + }, + "company_info": { + "_id": "5da4274a723af4000188a66c", + "uid": 873, + "created_on": "2019-10-14T07:44:10.391Z", + "is_active": true, + "name": "SAPPER LIFESTYLE PRIVATE LIMITED", + "addresses": [ + { + "pincode": 110042, + "address1": "412, SISODIA MOHALLA BADALI VILLAGE", + "city": "NEW DELHI", + "state": "DELHI", + "country": "INDIA", + "address_type": "registered" + }, + { + "pincode": 110042, + "address1": "412, SISODIA MOHALLA BADALI VILLAGE", + "city": "NEW DELHI", + "state": "DELHI", + "country": "INDIA", + "address_type": "office" + } + ], + "notification_emails": [ + "ecom.sapperlifestyle@f2fretail.com" + ] + }, + "owner_info": { + "_id": "5c77921fa1bf7d8695ed57fd", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "abc@test.com" + }, + { + "active": true, + "primary": false, + "verified": true, + "email": "abc@test.com" + }, + { + "active": true, + "primary": false, + "verified": true, + "email": "abc@test.com" + } + ], + "phone_numbers": [ + { + "active": true, + "primary": true, + "verified": true, + "country_code": 91, + "phone": "9408282323" + } + ], + "first_name": "Jalak", + "last_name": "Vora", + "profile_pic": "" + } } } } ```
+
+ @@ -1377,21 +1505,29 @@ Success. Check the example shown below or refer `OrderingStore` for more details
-  Example: +  Examples: + + +
+  success ```json { - "uid": 1060, - "name": "THE MANDHANA PARK KAMLANAGAR DELHI", - "pincode": 110007, - "store_code": "MRVLB22", - "code": "MRVLB22", - "display_name": "Kamla Nagar", - "store_type": "mall" + "value": { + "uid": 1, + "name": "THE MANDHANA PARK KAMLANAGAR DELHI", + "pincode": 110007, + "store_code": "MRVLB22", + "code": "MRVLB22", + "display_name": "Kamla Nagar", + "store_type": "mall" + } } ```
+
+ @@ -1436,15 +1572,23 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "message": "success" + "value": { + "message": "success" + } } ```
+
+ @@ -1475,8 +1619,11 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | | application | string? | yes | Alphanumeric ID allotted to an application (sales channel website) created within a business account | + | created_at | string? | yes | | | default_currency | [DefaultCurrency](#DefaultCurrency)? | yes | | + | modified_at | string? | yes | | | supported_currency | [[Currency](#Currency)]? | yes | | @@ -1494,12 +1641,12 @@ Success | created_at | string? | yes | ISO 8601 timestamp showing the date when the features were configured | | home_page | [HomePageFeature](#HomePageFeature)? | yes | | | landing_page | [LandingPageFeature](#LandingPageFeature)? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of last known modifications to the sales channel feature configuration | | order | [OrderFeature](#OrderFeature)? | yes | | | pcr | [PcrFeature](#PcrFeature)? | yes | | | product_detail | [ProductDetailFeature](#ProductDetailFeature)? | yes | | | qr | [QrFeature](#QrFeature)? | yes | | | registration_page | [RegistrationPageFeature](#RegistrationPageFeature)? | yes | | - | updated_at | string? | yes | ISO 8601 timestamp of last known modifications to the sales channel feature configuration | --- @@ -1536,11 +1683,15 @@ Success | logo | [SecureUrl](#SecureUrl)? | yes | | | meta | [[ApplicationMeta](#ApplicationMeta)]? | yes | | | mobile_logo | [SecureUrl](#SecureUrl)? | yes | | + | mode | string? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of sales channel updation | | name | string? | yes | Name of the sales channel, e.g. Zenz Fashion | | owner | string? | yes | The unique identifier (24-digit Mongo Object ID) of owner who owns the application | | redirections | [[ApplicationRedirections](#ApplicationRedirections)]? | yes | | + | slug | string? | yes | | + | status | string? | yes | | | token | string? | yes | Random generated fix length string for sales channel. It is required and auto-generated. | - | updated_at | string? | yes | ISO 8601 timestamp of sales channel updation | + | tokens | [[TokenSchema](#TokenSchema)]? | yes | | | website | [ApplicationWebsite](#ApplicationWebsite)? | yes | | @@ -1551,8 +1702,6 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | application_info | [ApplicationInfo](#ApplicationInfo)? | yes | | - | company_info | [CompanyInfo](#CompanyInfo)? | yes | | - | owner_info | [OwnerInfo](#OwnerInfo)? | yes | | --- @@ -1581,6 +1730,7 @@ Success | ---------- | ---- | -------- | ----------- | | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) for the sales channel details | | banner | [SecureUrl](#SecureUrl)? | yes | | + | company_id | number? | yes | | | description | string? | yes | It gives a detailed information about the sales channel. It is required. | | domain | [Domain](#Domain)? | yes | | | domains | [[Domain](#Domain)]? | yes | | @@ -1588,6 +1738,7 @@ Success | logo | [SecureUrl](#SecureUrl)? | yes | | | mobile_logo | [SecureUrl](#SecureUrl)? | yes | | | name | string | no | Name of the sales channel. It is required. | + | slug | string? | yes | | --- @@ -1598,16 +1749,24 @@ Success | ---------- | ---- | -------- | ----------- | | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) of application information | | banner | [SecureUrl](#SecureUrl)? | yes | | + | company_info | [CompanyInfo](#CompanyInfo)? | yes | | | cors | [ApplicationCors](#ApplicationCors)? | yes | | | created_at | string? | yes | ISO 8601 timestamp of sales channel information creation | | description | string? | yes | It contains details information about the sales channel | | domain | [Domain](#Domain)? | yes | | + | domains | [[Domain](#Domain)]? | yes | | + | favicon | [SecureUrl](#SecureUrl)? | yes | | | is_active | boolean? | yes | Indicates whether sales channel is active or not active | | logo | [SecureUrl](#SecureUrl)? | yes | | - | meta | [ApplicationMeta](#ApplicationMeta)? | yes | | + | meta | [[ApplicationMeta](#ApplicationMeta)]? | yes | | + | mobile_logo | [SecureUrl](#SecureUrl)? | yes | | + | mode | string? | yes | | | name | string? | yes | Name of the sales channel, e.g. Zenz Fashion | + | owner_info | [OwnerInfo](#OwnerInfo)? | yes | | | secret | string? | yes | Random generated fix length string for sales channel. It is required and auto-generated. | + | slug | string? | yes | | | token | string? | yes | Random generated fix length string for sales channel. It is required and auto-generated. | + | tokens | [[TokenSchema](#TokenSchema)]? | yes | | | website | [ApplicationWebsite](#ApplicationWebsite)? | yes | | @@ -1621,13 +1780,13 @@ Success | _id | string? | yes | Unique identifier (24-digit Mongo Object ID) of the application information | | address | [InformationAddress](#InformationAddress)? | yes | | | application | string? | yes | Alphanumeric ID allotted to a sales channel application created within a business account | - | business_highlights | [BusinessHighlights](#BusinessHighlights)? | yes | | + | business_highlights | [[BusinessHighlights](#BusinessHighlights)]? | yes | | | copyright_text | string? | yes | Copyright statement usually seen at the site's footer | | created_at | string? | yes | ISO 8601 timestamp of creation of the application information | - | links | [Links](#Links)? | yes | | + | links | [[Links](#Links)]? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of updation of the application information | | social_links | [SocialLinks](#SocialLinks)? | yes | | | support | [InformationSupport](#InformationSupport)? | yes | | - | updated_at | string? | yes | ISO 8601 timestamp of updation of the application information | --- @@ -1708,8 +1867,8 @@ Success | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) of the token | | application | string? | yes | Alphanumeric ID allotted to the current application created within the current business account | | created_at | string? | yes | ISO 8601 timestamp of token creation | + | modified_at | string? | yes | ISO 8601 timestamp of token updation | | tokens | [Tokens](#Tokens)? | yes | | - | updated_at | string? | yes | ISO 8601 timestamp of token updation | --- @@ -1759,6 +1918,8 @@ Success | currency | [CurrencyFeature](#CurrencyFeature)? | yes | | | deployment_store_selection | [DeploymentStoreSelectionFeature](#DeploymentStoreSelectionFeature)? | yes | | | feedback | [FeedbackFeature](#FeedbackFeature)? | yes | | + | international_shipping | [InternationalShipping](#InternationalShipping)? | yes | | + | listing_page | [ListingPageFeature](#ListingPageFeature)? | yes | | | listing_price | [ListingPriceFeature](#ListingPriceFeature)? | yes | | | revenue_engine | [RevenueEngineFeature](#RevenueEngineFeature)? | yes | | | reward_points | [RewardPointsConfig](#RewardPointsConfig)? | yes | | @@ -1852,12 +2013,14 @@ Success | ---------- | ---- | -------- | ----------- | | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) of the current sales channel supported currency | | code | string? | yes | 3-character currency code, e.g. INR, USD, EUR. | + | country_code | string? | yes | | + | country_name | string? | yes | | | created_at | string? | yes | ISO 8601 timestamp of sales channel support currency creation | | decimal_digits | number? | yes | Acceptable decimal limits for a given currency, e.g. 1.05$ means upto 2 decimal digits can be accepted as a valid value of a currency. | | is_active | boolean? | yes | Shows currency is enabled or not in current sales channel | + | modified_at | string? | yes | ISO 8601 timestamp of sales channel support currency updation | | name | string? | yes | Name of the currency, e.g Indian Rupee | | symbol | string? | yes | Unique symbol for identifying the currency, e.g. ₹ | - | updated_at | string? | yes | ISO 8601 timestamp of sales channel support currency updation | --- @@ -2051,11 +2214,21 @@ Success | address_line | [string]? | yes | Contact address of the sales channel | | city | string? | yes | Name of the city, e.g. Mumbai | | country | string? | yes | Name of the country, e.g. India | - | loc | string? | yes | Co-ordinates of the location | - | phone | [InformationPhone](#InformationPhone)? | yes | | + | loc | [InformationLoc](#InformationLoc)? | yes | | + | phone | [[InformationPhone](#InformationPhone)]? | yes | | | pincode | number? | yes | 6-digit PIN Code of the city, e.g. 400001 | +--- + +#### [InformationLoc](#InformationLoc) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | coordinates | [number]? | yes | 10-digit mobile number | + | type | string? | yes | Country code for contact number, e.g. +91 (for India) | + + --- #### [InformationPhone](#InformationPhone) @@ -2072,11 +2245,32 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | email | [string]? | yes | | - | phone | [string]? | yes | | + | email | [[InformationSupportEmail](#InformationSupportEmail)]? | yes | | + | phone | [[InformationSupportPhone](#InformationSupportPhone)]? | yes | | | timing | string? | yes | Working hours of support team, e.g. 9 AM to 9 PM | +--- + +#### [InformationSupportEmail](#InformationSupportEmail) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | key | string? | yes | | + | value | string? | yes | Value of email. | + + +--- + +#### [InformationSupportPhone](#InformationSupportPhone) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | code | string? | yes | Country code for contact number, e.g. +91 (for India) | + | key | string? | yes | | + | number | string? | yes | 10-digit mobile number | + + --- #### [InstagramLink](#InstagramLink) @@ -2088,6 +2282,24 @@ Success | title | string? | yes | Name of the social media platform, e.g. Instagram | +--- + +#### [InternationalShipping](#InternationalShipping) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | enabled | boolean? | yes | International shipping is enabled or not. | + + +--- + +#### [InvalidPayloadRequest](#InvalidPayloadRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | Error message when request body payload is improper | + + --- #### [Ios](#Ios) @@ -2152,6 +2364,15 @@ Success | title | string? | yes | Name of the related page or link | +--- + +#### [ListingPageFeature](#ListingPageFeature) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | sort_on | string? | yes | | + + --- #### [ListingPriceFeature](#ListingPriceFeature) @@ -2475,6 +2696,17 @@ Success | segment | [Segment](#Segment)? | yes | | +--- + +#### [TokenSchema](#TokenSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | created_at | string? | yes | ISO 8601 timestamp of when token created | + | created_by | string? | yes | | + | token | string? | yes | | + + --- #### [TwitterLink](#TwitterLink) diff --git a/documentation/application/CONTENT.md b/documentation/application/CONTENT.md index f4e06abe6..8b79eeee1 100644 --- a/documentation/application/CONTENT.md +++ b/documentation/application/CONTENT.md @@ -6,13 +6,15 @@ ##### [Back to Application docs](./README.md) ## Content Methods -Content System +The Content module manages content in the application. Use it to help users stay updated with announcements, read blog posts, manage data loaders, consult FAQs, and access legal and support information. It also enhances navigation modules and SEO capabilities for better online visibility, as well as supports slideshow interactions. Default * [getAnnouncements](#getannouncements) * [getBlog](#getblog) * [getBlogs](#getblogs) +* [getCustomFields](#getcustomfields) +* [getCustomObject](#getcustomobject) * [getDataLoaders](#getdataloaders) * [getFaqBySlug](#getfaqbyslug) * [getFaqCategories](#getfaqcategories) @@ -25,6 +27,7 @@ Default * [getPage](#getpage) * [getPages](#getpages) * [getSEOConfiguration](#getseoconfiguration) +* [getSEOMarkupSchemas](#getseomarkupschemas) * [getSlideshow](#getslideshow) * [getSlideshows](#getslideshows) * [getSupportInformation](#getsupportinformation) @@ -334,6 +337,193 @@ Success. Check the example shown below or refer `BlogGetResponse` for more detai +--- + + +### getCustomFields +Get list of custom fields of given resource and resource_id. + + + +```javascript +// Promise +const promise = applicationClient.content.getCustomFields({ resource : value, + resourceId : value }); + +// Async/Await +const data = await applicationClient.content.getCustomFields({ resource : value, + resourceId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| resource | string | yes | | +| resourceId | string | yes | | + + + +Use this API to retrieve the custom fields for given resource and resource_id in param. + +*Returned Response:* + + + + +[CustomFieldsResponseByResourceIdSchema](#CustomFieldsResponseByResourceIdSchema) + +Success. Returns a list of custom fields. Refer `CustomFieldsResponseByResourceIdSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "653929f012376081aafa90f6", + "namespace": "painter", + "key": "age", + "resource": "metaobject", + "creator": "application", + "value": [ + 5 + ], + "resource_id": "653929f012376081aafa90f1", + "type": "integer", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "definition_id": "653907ced878d53c1a502d96", + "metaobject_definition_id": "653907ced878d53c1a502d92", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "000000000000000000000001", + "is_deleted": false, + "created_at": "2023-10-25T14:45:04.441Z", + "updated_at": "2023-10-25T14:45:04.441Z" + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomObject +Get custom object details + + + +```javascript +// Promise +const promise = applicationClient.content.getCustomObject({ metaobjectId : value }); + +// Async/Await +const data = await applicationClient.content.getCustomObject({ metaobjectId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| metaobjectId | string | yes | | + + + +Use this API to retrieve the custom object details, their fields details with definitions and references. + +*Returned Response:* + + + + +[CustomObjectByIdSchema](#CustomObjectByIdSchema) + +Success. Returns a custom object. Refer `CustomObjectByIdSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "_id": "653929f012376081aafa90f1", + "status": "active", + "display_name": "painter #653929f012376081aafa90f1", + "definition": { + "_id": "653907ced878d53c1a502d92", + "name": "painter", + "type": "painter" + }, + "references": [], + "fields": [ + { + "_id": "653929f012376081aafa90f5", + "key": "name", + "value": [ + "Bruce Wayne" + ], + "type": "string_single_line", + "definition_id": "653907ced878d53c1a502d95" + }, + { + "_id": "653929f012376081aafa90f6", + "key": "age", + "value": [ + 5 + ], + "type": "integer", + "definition_id": "653907ced878d53c1a502d96" + } + ] + } +} +``` +
+ +
+ + + + + + + + + --- @@ -1473,6 +1663,65 @@ Success. Returns a JSON object SEO details such as robots.txt, meta-tags, and si +--- + + +### getSEOMarkupSchemas +Get SEO Markup schemas of an application + + + +```javascript +// Promise +const promise = applicationClient.content.getSEOMarkupSchemas({ pageType : value, + active : value }); + +// Async/Await +const data = await applicationClient.content.getSEOMarkupSchemas({ pageType : value, + active : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageType | string | no | The type of page against which schema template was created | +| active | boolean | no | Boolean value for fetching seo schema. | + + + +Use this API to get all SEO Markup schema Templates setup for an application + +*Returned Response:* + + + + +[SeoSchemaComponent](#SeoSchemaComponent) + +Success. Refer `SeoSchemaComponent` for more details. + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + --- @@ -2073,6 +2322,50 @@ Success. Returns a JSON object containing all the tags injected in the applicati | start | string? | yes | | +--- + +#### [CustomFieldSchema](#CustomFieldSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | application_id | string? | yes | | + | company_id | string? | yes | | + | created_at | string? | yes | | + | created_by | string? | yes | | + | creator | string? | yes | | + | definition_id | string? | yes | | + | has_invalid_values | boolean? | yes | | + | invalid_value_errors | [any]? | yes | | + | is_deleted | boolean? | yes | | + | key | string? | yes | | + | multi_value | boolean? | yes | | + | namespace | string? | yes | | + | resource | string? | yes | | + | resource_id | string? | yes | | + | type | string? | yes | | + | updated_at | string? | yes | | + | value | [[CustomFieldValue](#CustomFieldValue)]? | yes | | + + +--- + +#### [CustomFieldsResponseByResourceIdSchema](#CustomFieldsResponseByResourceIdSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[CustomFieldSchema](#CustomFieldSchema)]? | yes | | + + +--- + +#### [CustomFieldValue](#CustomFieldValue) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | value | any? | yes | | + + --- #### [CustomMetaTag](#CustomMetaTag) @@ -2084,6 +2377,53 @@ Success. Returns a JSON object containing all the tags injected in the applicati | name | string? | yes | | +--- + +#### [CustomObjectByIdSchema](#CustomObjectByIdSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | definition | [CustomObjectListItemDefinationSchema](#CustomObjectListItemDefinationSchema)? | yes | | + | display_name | string? | yes | | + | fields | [[CustomObjectFieldSchema](#CustomObjectFieldSchema)]? | yes | | + | references | [any]? | yes | | + | status | string? | yes | | + + +--- + +#### [CustomObjectFieldSchema](#CustomObjectFieldSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | definition_id | string? | yes | | + | key | string? | yes | | + | type | string? | yes | | + | value | [[CustomObjectFieldValue](#CustomObjectFieldValue)]? | yes | | + + +--- + +#### [CustomObjectFieldValue](#CustomObjectFieldValue) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | value | any? | yes | | + + +--- + +#### [CustomObjectListItemDefinationSchema](#CustomObjectListItemDefinationSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | name | string? | yes | | + | type | string? | yes | | + + --- #### [DataLoaderSchema](#DataLoaderSchema) @@ -2446,11 +2786,25 @@ Success. Returns a JSON object containing all the tags injected in the applicati | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | breadcrumb | [[SEObreadcrumb](#SEObreadcrumb)]? | yes | | + | canonical_url | string? | yes | | | description | string? | yes | | | image | [SEOImage](#SEOImage)? | yes | | + | meta_tags | [[SEOMetaItem](#SEOMetaItem)]? | yes | | + | sitemap | [SEOSitemap](#SEOSitemap)? | yes | | | title | string? | yes | | +--- + +#### [SEObreadcrumb](#SEObreadcrumb) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action | [Action](#Action)? | yes | | + | url | string? | yes | | + + --- #### [SeoComponent](#SeoComponent) @@ -2469,6 +2823,26 @@ Success. Returns a JSON object containing all the tags injected in the applicati | url | string? | yes | | +--- + +#### [SEOMetaItem](#SEOMetaItem) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[SEOMetaItems](#SEOMetaItems)]? | yes | | + | title | string? | yes | | + + +--- + +#### [SEOMetaItems](#SEOMetaItems) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | key | string? | yes | | + | value | string? | yes | | + + --- #### [SeoSchema](#SeoSchema) @@ -2476,6 +2850,7 @@ Success. Returns a JSON object containing all the tags injected in the applicati | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string? | yes | | + | additonal_sitemap | string? | yes | | | app | string? | yes | | | cannonical_enabled | boolean? | yes | | | created_at | string? | yes | | @@ -2486,6 +2861,42 @@ Success. Returns a JSON object containing all the tags injected in the applicati | updated_at | string? | yes | | +--- + +#### [SeoSchemaComponent](#SeoSchemaComponent) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[SEOSchemaMarkupTemplate](#SEOSchemaMarkupTemplate)]? | yes | | + + +--- + +#### [SEOSchemaMarkupTemplate](#SEOSchemaMarkupTemplate) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | active | boolean? | yes | | + | application | string? | yes | | + | created_at | string? | yes | | + | description | string? | yes | | + | id | string? | yes | | + | page_type | string? | yes | | + | schema | string? | yes | | + | title | string? | yes | | + | updated_at | string? | yes | | + + +--- + +#### [SEOSitemap](#SEOSitemap) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | frequency | string? | yes | | + | priority | number? | yes | | + + --- #### [SlideshowGetResponse](#SlideshowGetResponse) diff --git a/documentation/application/FILESTORAGE.md b/documentation/application/FILESTORAGE.md index 5e287611e..2b7c1a3d0 100644 --- a/documentation/application/FILESTORAGE.md +++ b/documentation/application/FILESTORAGE.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## FileStorage Methods -File Storage +The File Storage module simplifies your file upload and storage tasks. Use the 'Initiate Upload' module to start and complete file uploads. Once the upload is successful, employ the 'Complete Upload' module to retrieve the file's URL. For added security, utilize the 'Sign URLs' module, which grants authorized access through signed URLs. * [upload](#upload) diff --git a/documentation/application/LEAD.md b/documentation/application/LEAD.md index b3a921fea..ef3b4bc05 100644 --- a/documentation/application/LEAD.md +++ b/documentation/application/LEAD.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Lead Methods -Handles communication between Staff and Users +The Leads Management module improves communication, support, and effective interaction. Utilize it to retrieve user tickets, create ticket histories, and generate new tickets. This module also enables you to set up video rooms for participants, providing room tokens for secure access. Default diff --git a/documentation/application/LOGISTIC.md b/documentation/application/LOGISTIC.md index 12232ea04..702ea6bab 100644 --- a/documentation/application/LOGISTIC.md +++ b/documentation/application/LOGISTIC.md @@ -6,15 +6,21 @@ ##### [Back to Application docs](./README.md) ## Logistic Methods -Logistics Promise Engine APIs allows you to configure zone, pincode, TAT, logistics and many more useful features. +The Logistics module enhances delivery operations efficiency. It enables you to retrieve data and calculate precise delivery times. You can utilize the Country Information module to serve a global customer base and implement zone mapping for efficient delivery route planning. Additionally, this module offers the capability to optimize store assignments based on various criteria, including products, settings, and ignored locations. Furthermore, it supports Custom Packaging to enhance shipment creation. Default * [getAllCountries](#getallcountries) +* [getCountries](#getcountries) +* [getCountry](#getcountry) +* [getLocalities](#getlocalities) +* [getLocality](#getlocality) +* [getLocations](#getlocations) * [getOptimalLocations](#getoptimallocations) * [getPincodeCity](#getpincodecity) * [getPincodeZones](#getpincodezones) * [getTatProduct](#gettatproduct) +* [validateAddress](#validateaddress) @@ -73,6 +79,1015 @@ Get Country List +--- + + +### getCountries +Get all countries and associated data. + + + +```javascript +// Promise +const promise = applicationClient.logistic.getCountries({ onboarding : value, + pageNo : value, + pageSize : value, + q : value }); + +// Async/Await +const data = await applicationClient.logistic.getCountries({ onboarding : value, + pageNo : value, + pageSize : value, + q : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| onboarding | boolean | no | Only fetch countries which allowed for onboard on Platform. | +| pageNo | number | no | page number. | +| pageSize | number | no | page size. | +| q | string | no | search. | + + + +Retrieve of all countries. + +*Returned Response:* + + + + +[GetCountries](#GetCountries) + +Successfully retrieved all countries with associated data. + + + + +
+  Examples: + + +
+  Country List 1 + +```json +{ + "value": { + "items": [ + { + "id": "64c6ac280000000000000000", + "name": "INDIA", + "type": "country", + "display_name": "India", + "iso2": "IN", + "iso3": "IND", + "timezones": [ + "Asia/Kolkata" + ], + "latitude": "28.6667", + "longitude": "77.2167", + "currency": { + "code": "INR", + "name": "Indian Rupee", + "symbol": "₹" + }, + "phone_code": "+91", + "hierarchy": [ + { + "name": "State", + "slug": "state" + }, + { + "name": "City", + "slug": "city" + }, + { + "name": "Pincode", + "slug": "pincode" + } + ] + }, + { + "name": "UNITED STATES", + "display_name": "USA", + "type": "country", + "id": "66a931280000000000000000", + "iso2": "US", + "iso3": "USA", + "timezones": [ + "America/St_Johns", + "America/Halifax", + "America/Glace_Bay", + "America/Moncton", + "America/Goose_Bay", + "America/Blanc-Sablon", + "America/Toronto", + "America/Iqaluit", + "America/Atikokan", + "America/Winnipeg", + "America/Resolute", + "America/Rankin_Inlet", + "America/Regina", + "America/Swift_Current", + "America/Edmonton", + "America/Cambridge_Bay", + "America/Inuvik", + "America/Creston", + "America/Dawson_Creek", + "America/Fort_Nelson", + "America/Whitehorse", + "America/Dawson", + "America/Vancouver" + ], + "latitude": "38.8951", + "longitude": "-77.0364", + "currency": { + "code": "USD", + "name": "United States Dollar", + "symbol": "$" + }, + "phone_code": "+1", + "hierarchy": [ + { + "name": "State", + "slug": "state" + }, + { + "name": "City", + "slug": "city" + }, + { + "name": "Zipcode", + "slug": "pincode" + } + ] + } + ], + "page": { + "current": 1, + "has_next": true, + "has_previous": false, + "item_total": 2, + "size": 1, + "type": "number" + } + } +} +``` +
+ +
+  Country List 2 + +```json +{ + "value": { + "items": [ + { + "id": "669ea5280000000000000000", + "name": "United Arab Emirates", + "display_name": "United Arab Emirates", + "type": "country", + "iso2": "AE", + "iso3": "ARE", + "timezones": [ + "Asia/Dubai" + ], + "latitude": "24.4648", + "longitude": "54.3618", + "currency": { + "code": "AED", + "name": "United Arab Emirates Dirham", + "symbol": "AED" + }, + "phone_code": "+971", + "hierarchy": [ + { + "name": "City", + "slug": "city" + }, + { + "name": "Area", + "slug": "sector" + } + ] + } + ], + "page": { + "current": 1, + "has_next": true, + "has_previous": false, + "item_total": 1, + "size": 1, + "type": "number" + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCountry +Get single country and associated data. + + + +```javascript +// Promise +const promise = applicationClient.logistic.getCountry({ countryIsoCode : value }); + +// Async/Await +const data = await applicationClient.logistic.getCountry({ countryIsoCode : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| countryIsoCode | string | yes | The `country_iso_code` is ISO-2 (alpha-2) code for the country. | + + + +Retrieve data for a single country and address format. + +*Returned Response:* + + + + +[GetCountry](#GetCountry) + +Get country data. + + + + +
+  Examples: + + +
+  Country 1 + +```json +{ + "value": { + "name": "INDIA", + "display_name": "India", + "type": "country", + "id": "64c6ac280000000000000000", + "iso2": "IN", + "iso3": "IND", + "timezones": [ + "Asia/Kolkata" + ], + "latitude": "28.6667", + "longitude": "77.2167", + "currency": { + "code": "INR", + "name": "Indian Rupee", + "symbol": "₹" + }, + "phone_code": "+91", + "hierarchy": [ + { + "name": "Pincode", + "slug": "pincode" + }, + { + "name": "City", + "slug": "city" + }, + { + "name": "State", + "slug": "state" + } + ], + "fields": { + "serviceability_fields": [ + "pincode" + ], + "address_template": { + "checkout_form": "{address} {area}_{landmark} {pincode}_{city} {state}_{name} {phone}_{email}", + "store_os_form": "{pincode}_{address}_{area}_{landmark}", + "default_display": "{address} {area}_{landmark}_{city} {state} {pincode}_{country}" + }, + "address": [ + { + "display_name": "Flat No/House No", + "slug": "address", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": null, + "error_text": null + }, + { + "display_name": "Building Name/street", + "slug": "area", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": null, + "error_text": null + }, + { + "display_name": "Locality/Landmark", + "slug": "landmark", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": null, + "error_text": null + }, + { + "display_name": "Pincode", + "slug": "pincode", + "input": "textbox", + "required": true, + "edit": true, + "values": { + "get_one": { + "operation_id": "getLocality", + "params": { + "path": { + "locality_value": "400601", + "locality_type": "pincode" + } + } + } + }, + "validation": { + "type": "regex", + "regex": { + "value": "^[0-9]{6}$", + "length": { + "min": 6, + "max": 6 + } + } + }, + "error_text": "Invalid Pincode" + }, + { + "display_name": "City", + "slug": "city", + "input": "textbox", + "required": true, + "edit": false, + "values": null, + "validation": null, + "error_text": "Invalid City" + }, + { + "display_name": "State", + "slug": "state", + "input": "textbox", + "required": true, + "edit": false, + "values": null, + "validation": null, + "error_text": "Invalid State" + }, + { + "display_name": "Full Name", + "slug": "name", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": { + "type": "regex", + "regex": { + "value": ".*", + "length": { + "min": null, + "max": null + } + } + }, + "error_text": null + }, + { + "display_name": "Mobile Number", + "slug": "phone", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": { + "type": "regex", + "regex": { + "value": "^\\\\+[0-9]{2}\\\\s[0-9]{10}$", + "length": { + "min": 13, + "max": 13 + } + } + }, + "error_text": "Invalid Phone Number" + }, + { + "display_name": "Email", + "slug": "email", + "input": "textbox", + "required": false, + "edit": true, + "values": null, + "validation": { + "type": "regex", + "regex": { + "value": "^[\\w\\.-]+@[a-zA-Z\\d\\.-]+\\.[a-zA-Z]{2,}$", + "length": { + "min": null, + "max": null + } + } + }, + "error_text": "Invalid Email" + } + ] + } + } +} +``` +
+ +
+  Country 2 + +```json +{ + "value": { + "name": "United Arab Emirates", + "display_name": "United Arab Emirates", + "type": "country", + "id": "669ea5280000000000000000", + "iso2": "AE", + "iso3": "ARE", + "timezones": [ + "Asia/Dubai" + ], + "latitude": "24.4648", + "longitude": "54.3618", + "currency": { + "code": "AED", + "name": "United Arab Emirates Dirham", + "symbol": "AED" + }, + "phone_code": "+971", + "hierarchy": [ + { + "name": "Area", + "slug": "sector" + }, + { + "name": "City", + "slug": "city" + } + ], + "fields": { + "serviceability_fields": [ + "city", + "sector" + ], + "address_template": { + "checkout_form": "{address} {area}_{landmark} {pincode}_{city} {state}_{name} {phone}_{email}", + "store_os_form": "{address} {area}_{landmark} {pincode}_{city} {state}_{name} {phone}_{email}", + "default_display": "{address} {area}_{landmark}_{city}_{sector} {country}" + }, + "address": [ + { + "display_name": "Flat No/House No", + "slug": "address", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": null, + "error_text": null + }, + { + "display_name": "Building Name/street", + "slug": "area", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": null, + "error_text": null + }, + { + "display_name": "Locality/Landmark", + "slug": "landmark", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": null, + "error_text": null + }, + { + "display_name": "City", + "slug": "city", + "input": "textbox", + "required": true, + "edit": true, + "values": { + "get_all": { + "operation_id": "getLocalities", + "params": { + "path": { + "locality_type": "city" + } + } + } + }, + "validation": null, + "error_text": "Invalid Pincode" + }, + { + "display_name": "Area", + "slug": "sector", + "input": "textbox", + "required": true, + "edit": true, + "values": { + "get_all": { + "operation_id": "getLocalities", + "params": { + "path": { + "locality_type": "sector" + }, + "query": { + "city": "THANE" + } + } + } + }, + "validation": null, + "error_text": "Invalid Area" + }, + { + "display_name": "Full Name", + "slug": "name", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": { + "type": "regex", + "regex": { + "value": ".*", + "length": { + "min": null, + "max": null + } + } + }, + "error_text": null + }, + { + "display_name": "Mobile Number", + "slug": "phone", + "input": "textbox", + "required": true, + "edit": true, + "values": null, + "validation": { + "type": "regex", + "regex": { + "value": "^\\\\+[0-9]{2}\\\\s[0-9]{10}$", + "length": { + "min": 13, + "max": 13 + } + } + }, + "error_text": "Invalid Phone Number" + }, + { + "display_name": "Email", + "slug": "email", + "input": "textbox", + "required": false, + "edit": true, + "values": null, + "validation": { + "type": "regex", + "regex": { + "value": "^[\\w\\.-]+@[a-zA-Z\\d\\.-]+\\.[a-zA-Z]{2,}$", + "length": { + "min": null, + "max": null + } + } + }, + "error_text": "Invalid Email" + } + ] + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getLocalities +Get Localities. + + + +```javascript +// Promise +const promise = applicationClient.logistic.getLocalities({ localityType : value, + country : value, + state : value, + city : value, + pageNo : value, + pageSize : value, + q : value }); + +// Async/Await +const data = await applicationClient.logistic.getLocalities({ localityType : value, + country : value, + state : value, + city : value, + pageNo : value, + pageSize : value, + q : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| localityType | string | yes | A `locality_type` contains unique geographical division. | +| country | string | no | A `country` contains a specific value of the country iso2 code. | +| state | string | no | A `state` contains a specific value of the state, province. | +| city | string | no | A `city` contains a specific value of the city. | +| pageNo | number | no | page number. | +| pageSize | number | no | page size. | +| q | string | no | search. | + + + +Get Localities data. + +*Returned Response:* + + + + +[GetLocalities](#GetLocalities) + +Get Localities data + + + + +
+  Examples: + + +
+  Country 1 + +```json +{ + "value": { + "items": [ + { + "id": "64b78b60707446a37f2afbbb", + "name": "Maharashtra", + "display_name": "Maharashtra", + "type": "state", + "parent_ids": [ + "64b78b60707446a37f2aec6f" + ] + }, + { + "id": "64c7fda80000000000000000", + "name": "400603", + "display_name": "400603", + "type": "pincode", + "parent_ids": [ + "64b78b60707446a37f2aec6f", + "64b78b60707446a37f2aec4b", + "64b78b60707446a37f2aec43" + ] + } + ], + "page": { + "current": 1, + "has_next": true, + "has_previous": false, + "item_total": 2, + "size": 1, + "type": "number" + } + } +} +``` +
+ +
+  Country 2 + +```json +{ + "value": { + "items": [ + { + "id": "63d95e280000000000000000", + "name": "Thane", + "display_name": "Thane", + "type": "city", + "parent_ids": [ + "64b78b60707446a37f2aec6f", + "64b78b60707446a37f2aec4b" + ] + } + ], + "page": { + "current": 1, + "has_next": true, + "has_previous": false, + "item_total": 1, + "size": 1, + "type": "number" + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getLocality +Get Locality API + + + +```javascript +// Promise +const promise = applicationClient.logistic.getLocality({ localityType : value, + localityValue : value, + country : value, + state : value, + city : value }); + +// Async/Await +const data = await applicationClient.logistic.getLocality({ localityType : value, + localityValue : value, + country : value, + state : value, + city : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| localityType | string | yes | A `locality_type` contains value geographical division. | +| localityValue | string | yes | A `locality_value` contains a specific name of the locality. | +| country | string | no | A `country` contains a specific value of the country iso2 code. | +| state | string | no | A `state` contains a specific value of the state, province. | +| city | string | no | A `city` contains a specific value of the city. | + + + +Get Locality data + +*Returned Response:* + + + + +[GetLocality](#GetLocality) + +Get Locality data + + + + +
+  Examples: + + +
+  Country 1 + +```json +{ + "value": { + "id": "649f1f280000000000000000", + "name": "ABU DHABI", + "display_name": "Abu Dhabi", + "type": "city", + "parent_ids": [ + "64b78b60707446a37f2aec6f" + ], + "parents": { + "country": { + "name": "United Arab Emirates", + "id": "64b78b60707486a37f2apd00", + "display_name": "United Arab Emirates", + "type": "country", + "parent_ids": [] + } + } + } +} +``` +
+ +
+  Country 2 + +```json +{ + "value": { + "id": "649887a80000000000000000", + "name": "400603", + "display_name": "400603", + "type": "pincode", + "parent_ids": [ + "64b78b60707446a37f2aec6f", + "64b78b60707446a37f2aec4b" + ], + "localities": [ + { + "name": "THANE", + "id": "64b78b60707446a37f2aed00", + "display_name": "Thane", + "type": "city", + "parent_ids": [ + "64b78b60707446a37f2aec6f", + "64b78b60707446a37f2aec4b" + ] + }, + { + "name": "MAHARASHTRA", + "id": "64b78b60707446a37f2aed00", + "display_name": "Maharashtra", + "type": "state", + "parent_ids": [ + "64b78b60707446a37f2aec6f" + ] + }, + { + "name": "INDIA", + "id": "64b78b60707486a37f2apd00", + "display_name": "India", + "type": "country", + "parent_ids": [] + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getLocations +GET locations from the Pincode. + + + +```javascript +// Promise +const promise = applicationClient.logistic.getLocations({ xApplicationId : value, + xApplicationData : value, + country : value, + state : value, + city : value, + pincode : value, + sector : value, + pageNo : value, + pageSize : value }); + +// Async/Await +const data = await applicationClient.logistic.getLocations({ xApplicationId : value, + xApplicationData : value, + country : value, + state : value, + city : value, + pincode : value, + sector : value, + pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| xApplicationId | string | yes | A `x-application-id` is a unique identifier for a particular sale channel. | +| xApplicationData | string | yes | A `x-application-data` is a unique identifier for a particular sale channel. | +| country | string | no | A `country` contains a specific value of the country `iso2` code. | +| state | string | no | A `state` contains a specific value of the state, province. | +| city | string | no | A `city` contains a specific value of the city. | +| pincode | number | no | A `pincode` contains a specific value of the city. | +| sector | string | no | A `sector` contains a specific value of the city. | +| pageNo | number | no | page number. | +| pageSize | number | no | page size. | + + + +This API returns store from the Pincode View. + +*Returned Response:* + + + + +[GetStoreResponse](#GetStoreResponse) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + --- @@ -438,49 +1453,147 @@ Get TAT data
-  Pincode not found +  Pincode not found + +```json +{ + "value": { + "source": "FYND-APP", + "identifier": "PDP", + "journey": "forward", + "action": "get_tat", + "to_pincode": "99999", + "location_details": [ + { + "fulfillment_id": 8, + "from_pincode": "560023", + "articles": [ + { + "category": { + "level": "l3", + "id": 155 + }, + "manufacturing_time": 2, + "manufacturing_time_unit": "days", + "promise": {}, + "error": { + "type": "ValueError", + "value": "99999", + "message": "We are not delivering to 99999" + } + } + ] + } + ], + "request_uuid": "4b99d15fddb2b9fc2d6ab99a1c933010", + "stormbreaker_uuid": "6a847909-1d59-43e7-9ae0-15f5de8fc7d7", + "error": { + "type": "ValueError", + "value": "99999", + "message": "All of the items in your cart are not deliverable to 99999" + }, + "to_city": "", + "payment_mode": "prepaid", + "is_cod_available": true, + "success": false + } +} +``` +
+ + + + + + + + + + + +--- + + +### validateAddress +Validate given address wrt template + + + +```javascript +// Promise +const promise = applicationClient.logistic.validateAddress({ countryIsoCode : value, + templateName : value, + body : value }); + +// Async/Await +const data = await applicationClient.logistic.validateAddress({ countryIsoCode : value, + templateName : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| countryIsoCode | string | yes | The ISO code of the country. | +| templateName | string | yes | The type of address form. | +| body | [ValidateAddressRequest](#ValidateAddressRequest) | yes | Request body | + + +Validate given address wrt template + +*Returned Response:* + + + + +[ValidateAddressRequest](#ValidateAddressRequest) + +Valid + + + + +
+  Examples: + + +
+  India + +```json +{ + "value": { + "address": "WeWork", + "area": "Andheri", + "landmark": "Police Station", + "pincode": "400093", + "city": "Mumbai", + "state": "Maharashtra", + "name": "WeWork", + "phone": "9876543210", + "email": "wework@w.com" + } +} +``` +
+ +
+  UAE ```json { "value": { - "source": "FYND-APP", - "identifier": "PDP", - "journey": "forward", - "action": "get_tat", - "to_pincode": "99999", - "location_details": [ - { - "fulfillment_id": 8, - "from_pincode": "560023", - "articles": [ - { - "category": { - "level": "l3", - "id": 155 - }, - "manufacturing_time": 2, - "manufacturing_time_unit": "days", - "promise": {}, - "error": { - "type": "ValueError", - "value": "99999", - "message": "We are not delivering to 99999" - } - } - ] - } - ], - "request_uuid": "4b99d15fddb2b9fc2d6ab99a1c933010", - "stormbreaker_uuid": "6a847909-1d59-43e7-9ae0-15f5de8fc7d7", - "error": { - "type": "ValueError", - "value": "99999", - "message": "All of the items in your cart are not deliverable to 99999" - }, - "to_city": "", - "payment_mode": "prepaid", - "is_cod_available": true, - "success": false + "address1": "WeWork", + "address2": "Andheri", + "landmark": "Police Station", + "city": "Abu Dhabi", + "sector": "Abu Dhabi", + "name": "WeWork", + "phone": "9876543210", + "email": "wework@w.com" } } ``` @@ -519,6 +1632,16 @@ Get TAT data | uid | string? | yes | | +--- + +#### [CountryHierarchy](#CountryHierarchy) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | name | string? | yes | | + | slug | string? | yes | | + + --- #### [CountryListResponse](#CountryListResponse) @@ -538,6 +1661,37 @@ Get TAT data | isd_code | string? | yes | | +--- + +#### [CountryObject](#CountryObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | currency | [CurrencyObject](#CurrencyObject)? | yes | | + | display_name | string? | yes | | + | hierarchy | [[CountryHierarchy](#CountryHierarchy)]? | yes | | + | id | string? | yes | | + | iso2 | string? | yes | | + | iso3 | string? | yes | | + | latitude | string? | yes | | + | longitude | string? | yes | | + | name | string? | yes | | + | phone_code | string? | yes | | + | timezones | [string]? | yes | | + | type | string? | yes | | + + +--- + +#### [CurrencyObject](#CurrencyObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | code | string? | yes | | + | name | string? | yes | | + | symbol | string? | yes | | + + --- #### [DP](#DP) @@ -556,6 +1710,190 @@ Get TAT data | transport_mode | string? | yes | | +--- + +#### [ErrorResponse](#ErrorResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | error | string? | yes | | + + +--- + +#### [FieldValidation](#FieldValidation) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | regex | [FieldValidationRegex](#FieldValidationRegex)? | yes | | + | type | string? | yes | | + + +--- + +#### [FieldValidationRegex](#FieldValidationRegex) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | length | [LengthValidation](#LengthValidation)? | yes | | + | value | string? | yes | | + + +--- + +#### [GetCountries](#GetCountries) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[CountryObject](#CountryObject)]? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [GetCountry](#GetCountry) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | currency | [CurrencyObject](#CurrencyObject)? | yes | | + | display_name | string? | yes | | + | fields | [GetCountryFields](#GetCountryFields)? | yes | | + | hierarchy | [[CountryHierarchy](#CountryHierarchy)]? | yes | | + | id | string? | yes | | + | iso2 | string? | yes | | + | iso3 | string? | yes | | + | latitude | string? | yes | | + | longitude | string? | yes | | + | name | string? | yes | | + | phone_code | string? | yes | | + | timezones | [string]? | yes | | + | type | string? | yes | | + + +--- + +#### [GetCountryFields](#GetCountryFields) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | address | [[GetCountryFieldsAddress](#GetCountryFieldsAddress)] | no | | + | address_template | [GetCountryFieldsAddressTemplate](#GetCountryFieldsAddressTemplate) | no | | + | serviceability_fields | [string] | no | | + + +--- + +#### [GetCountryFieldsAddress](#GetCountryFieldsAddress) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display_name | string | no | | + | edit | boolean? | yes | | + | error_text | string? | yes | | + | input | string | no | | + | required | boolean | no | | + | slug | string | no | | + | validation | [FieldValidation](#FieldValidation)? | yes | | + | values | [GetCountryFieldsAddressValues](#GetCountryFieldsAddressValues)? | yes | | + + +--- + +#### [GetCountryFieldsAddressTemplate](#GetCountryFieldsAddressTemplate) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | checkout_form | string | no | | + | default_display | string | no | | + | store_os_form | string | no | | + + +--- + +#### [GetCountryFieldsAddressValues](#GetCountryFieldsAddressValues) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | get_all | [GetOneOrAll](#GetOneOrAll)? | yes | | + | get_one | [GetOneOrAll](#GetOneOrAll)? | yes | | + + +--- + +#### [GetLocalities](#GetLocalities) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[Localities](#Localities)]? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [GetLocality](#GetLocality) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display_name | string? | yes | | + | id | string? | yes | | + | localities | [[LocalityParent](#LocalityParent)]? | yes | | + | name | string? | yes | | + | parent_ids | [string]? | yes | | + | type | string? | yes | | + + +--- + +#### [GetOneOrAll](#GetOneOrAll) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | operation_id | string? | yes | | + | params | [GetOneOrAllParams](#GetOneOrAllParams)? | yes | | + + +--- + +#### [GetOneOrAllParams](#GetOneOrAllParams) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | path | [GetOneOrAllPath](#GetOneOrAllPath)? | yes | | + | query | [GetOneOrAllQuery](#GetOneOrAllQuery)? | yes | | + + +--- + +#### [GetOneOrAllPath](#GetOneOrAllPath) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | locality_type | string? | yes | | + | locality_value | string? | yes | | + + +--- + +#### [GetOneOrAllQuery](#GetOneOrAllQuery) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | city | string? | yes | | + | country | string? | yes | | + | sector | string? | yes | | + | state | string? | yes | | + + +--- + +#### [GetStoreResponse](#GetStoreResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[StoreItemResponse](#StoreItemResponse)]? | yes | | + | page | [Page](#Page)? | yes | | + + --- #### [GetZoneFromPincodeViewRequest](#GetZoneFromPincodeViewRequest) @@ -576,6 +1914,42 @@ Get TAT data | zones | [string] | no | | +--- + +#### [LengthValidation](#LengthValidation) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | max | number? | yes | | + | min | number? | yes | | + + +--- + +#### [Localities](#Localities) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display_name | string? | yes | | + | id | string? | yes | | + | name | string? | yes | | + | parent_ids | [string]? | yes | | + | type | string? | yes | | + + +--- + +#### [LocalityParent](#LocalityParent) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display_name | string? | yes | | + | id | string? | yes | | + | name | string? | yes | | + | parent_ids | [string]? | yes | | + | type | string? | yes | | + + --- #### [LogisticsResponse](#LogisticsResponse) @@ -585,6 +1959,20 @@ Get TAT data | dp | [String: [DP](#DP)]? | yes | | +--- + +#### [Page](#Page) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | current | number? | yes | | + | has_next | boolean? | yes | | + | has_previous | boolean? | yes | | + | item_total | number? | yes | | + | size | number? | yes | | + | type | string? | yes | | + + --- #### [PincodeApiResponse](#PincodeApiResponse) @@ -682,6 +2070,22 @@ Get TAT data | to_pincode | string | no | | +--- + +#### [StoreItemResponse](#StoreItemResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | company_id | number? | yes | | + | fulfillment_type | string? | yes | | + | id | number? | yes | | + | latitude | number? | yes | | + | longitude | number? | yes | | + | processing_time | number? | yes | | + | store_type | string? | yes | | + | tags | [string]? | yes | | + + --- #### [TATArticlesRequest](#TATArticlesRequest) @@ -818,6 +2222,26 @@ Get TAT data --- +#### [ValidateAddressRequest](#ValidateAddressRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | address | string? | yes | A string representing the complete address, combining address line 1, address line 2, area, landmark, sector, city, state, and pincode. This provides a comprehensive view of the address details. | + | address1 | string? | yes | A string representing the first line of the address, typically containing street or building information. | + | address2 | string? | yes | A string representing the second line of the address, which can be used for additional address details if needed. | + | area | string? | yes | A string specifying the locality or area associated with the address. | + | city | string? | yes | A string denoting the city or municipality of the address. | + | email | string? | yes | A string containing the recipient's email address. | + | landmark | string? | yes | A string representing a prominent nearby landmark that aids in locating the address. | + | name | string? | yes | A string representing the recipient's name or the organization name associated with the address. | + | phone | string? | yes | An integer representing the recipient's contact phone number. | + | pincode | string? | yes | A string indicating the postal code or PIN code of the address area. | + | sector | string? | yes | A string specifying the sector or district of the address if applicable. | + | state | string? | yes | A string indicating the state or province of the address. | + + +--- + diff --git a/documentation/application/ORDER.md b/documentation/application/ORDER.md index 3444f36fd..5010a79c2 100644 --- a/documentation/application/ORDER.md +++ b/documentation/application/ORDER.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Order Methods -Handles all Application order and shipment api(s) +The Order and Shipment module is designed for retrieving application-specific orders, accessing order details, and obtaining shipment and invoice information. This module facilitates shipment tracking, allows customization of shipment details, and provides reasons for cancellations and returns. Additionally, it offers real-time shipment status updates. Default @@ -160,10 +160,12 @@ Get details of an order ```javascript // Promise -const promise = applicationClient.order.getOrderById({ orderId : value }); +const promise = applicationClient.order.getOrderById({ orderId : value, + allowInactive : value }); // Async/Await -const data = await applicationClient.order.getOrderById({ orderId : value }); +const data = await applicationClient.order.getOrderById({ orderId : value, + allowInactive : value }); ``` @@ -172,7 +174,8 @@ const data = await applicationClient.order.getOrderById({ orderId : value }); | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| orderId | string | yes | A unique number used for identifying and tracking your orders. | +| orderId | string | yes | A unique number used for identifying and tracking your orders. | +| allowInactive | boolean | no | Flag to allow inactive shipments | @@ -1156,6 +1159,8 @@ const promise = applicationClient.order.getOrders({ status : value, pageSize : value, fromDate : value, toDate : value, + startDate : value, + endDate : value, customMeta : value }); // Async/Await @@ -1164,6 +1169,8 @@ const data = await applicationClient.order.getOrders({ status : value, pageSize : value, fromDate : value, toDate : value, + startDate : value, + endDate : value, customMeta : value }); ``` @@ -1178,6 +1185,8 @@ const data = await applicationClient.order.getOrders({ status : value, | pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | | fromDate | string | no | The date from which the orders should be retrieved. | | toDate | string | no | The date till which the orders should be retrieved. | +| startDate | string | no | UTC Start Date in ISO format | +| endDate | string | no | UTC Start Date in ISO format | | customMeta | string | no | A filter and retrieve data using special fields included for special use-cases | @@ -1666,10 +1675,12 @@ Get details of a shipment ```javascript // Promise -const promise = applicationClient.order.getShipmentById({ shipmentId : value }); +const promise = applicationClient.order.getShipmentById({ shipmentId : value, + allowInactive : value }); // Async/Await -const data = await applicationClient.order.getShipmentById({ shipmentId : value }); +const data = await applicationClient.order.getShipmentById({ shipmentId : value, + allowInactive : value }); ``` @@ -1678,7 +1689,8 @@ const data = await applicationClient.order.getShipmentById({ shipmentId : value | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| shipmentId | string | yes | ID of the shipment. An order may contain multiple items and may get divided into one or more shipment, each having its own ID. | +| shipmentId | string | yes | ID of the shipment. An order may contain multiple items and may get divided into one or more shipment, each having its own ID. | +| allowInactive | boolean | no | Flag to allow inactive shipments | @@ -1935,7 +1947,10 @@ Success. Check the example shown below or refer `ShipmentById` for more details. "name": "Jio-market-store3", "company_id": 33, "id": 50, - "code": "store3" + "code": "store3", + "tags": [ + "infibeam" + ] }, "fulfilling_company": { "id": 33, @@ -2892,6 +2907,7 @@ Success, the code is valid and returns a session token | bags_for_reorder | [[BagsForReorder](#BagsForReorder)]? | yes | | | breakup_values | [[BreakupValues](#BreakupValues)]? | yes | | | order_created_time | string? | yes | | + | order_created_ts | string? | yes | | | order_id | string? | yes | | | shipments | [[Shipments](#Shipments)]? | yes | | | total_shipments_in_order | number? | yes | | @@ -3151,6 +3167,7 @@ Success, the code is valid and returns a session token | return_meta | string? | yes | | | returnable_date | string? | yes | | | shipment_created_at | string? | yes | | + | shipment_created_ts | string? | yes | | | shipment_id | string? | yes | | | shipment_status | [ShipmentStatus](#ShipmentStatus)? | yes | | | show_download_invoice | boolean? | yes | | @@ -3273,6 +3290,7 @@ Success, the code is valid and returns a session token | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | created_ts | string? | yes | | | is_current | boolean? | yes | | | is_passed | boolean? | yes | | | status | string? | yes | | diff --git a/documentation/application/PAYMENT.md b/documentation/application/PAYMENT.md index d96af56f1..c75dc0788 100644 --- a/documentation/application/PAYMENT.md +++ b/documentation/application/PAYMENT.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Payment Methods -Collect payment through many payment gateway i.e Stripe, Razorpay, Juspay etc.into Fynd or Self account +The Payment module lists cards and payment modes, allows for the selection of payment modes during checkout, handles refunds, validates customers, and ensures the security of transactions. Default @@ -20,9 +20,11 @@ Default * [checkCredit](#checkcredit) * [createOrderHandlerPaymentLink](#createorderhandlerpaymentlink) * [createPaymentLink](#createpaymentlink) +* [createPaymentOrder](#createpaymentorder) * [customerCreditSummary](#customercreditsummary) * [customerOnboard](#customeronboard) * [deleteUserCard](#deleteusercard) +* [delinkWallet](#delinkwallet) * [enableOrDisableRefundTransferMode](#enableordisablerefundtransfermode) * [getActiveCardAggregator](#getactivecardaggregator) * [getActiveRefundTransferModes](#getactiverefundtransfermodes) @@ -38,6 +40,7 @@ Default * [getUserBeneficiariesDetail](#getuserbeneficiariesdetail) * [initialisePayment](#initialisepayment) * [initialisePaymentPaymentLink](#initialisepaymentpaymentlink) +* [linkWallet](#linkwallet) * [outstandingOrderDetails](#outstandingorderdetails) * [paidOrderDetails](#paidorderdetails) * [pollingPaymentLink](#pollingpaymentlink) @@ -52,6 +55,7 @@ Default * [verifyIfscCode](#verifyifsccode) * [verifyOtpAndAddBeneficiaryForBank](#verifyotpandaddbeneficiaryforbank) * [verifyOtpAndAddBeneficiaryForWallet](#verifyotpandaddbeneficiaryforwallet) +* [walletLinkInitate](#walletlinkinitate) @@ -718,6 +722,80 @@ Success. Check the example shown below +--- + + +### createPaymentOrder +Create Order + + + +```javascript +// Promise +const promise = applicationClient.payment.createPaymentOrder({ body : value }); + +// Async/Await +const data = await applicationClient.payment.createPaymentOrder({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [PaymentOrderRequest](#PaymentOrderRequest) | yes | Request body | + + +Use this API to create a order and payment on aggregator side + +*Returned Response:* + + + + +[PaymentOrderResponse](#PaymentOrderResponse) + +Success. Check the example shown below + + + + +
+  Example: + +```json +{ + "message": "", + "success": true, + "status_code": 200, + "data": { + "amount": 2190000, + "order_id": "order_JeaZ5ryKO01rno", + "email": "abc@example.com", + "contact": "9999999999", + "currency": "INR", + "customer_id": "cust_CZgcLVGsGP8BUQ", + "callback_url": "https://api.fyndx0.com/service/webhooks/payment/v1.0/callback/link/?razorpay_order_id=order_JeaZ5ryKO01rno", + "method": "upi", + "aggregator": "Razorpay", + "merchant_order_id": "FY629EDC0980B6A8C1EA" + }, + "callback_url": "https://api.fyndx0.com/service/webhooks/payment/v1.0/callback/link/?razorpay_order_id=order_JeaZ5ryKO01rno", + "payment_confirm_url": "https://api.fyndx0.com/service/webhooks/payment/v1.0/callback/link/?razorpay_order_id=order_JeaZ5ryKO01rno", + "order_id": "FY629EDC0980B6A8C1EA" +} +``` +
+ + + + + + + + + --- @@ -789,7 +867,13 @@ Success. Returns the status of payment. Check the example shown below or refer ` "currency": "INR" }, "due_date": "Oct 22 2021", - "days_overdue": 123 + "days_overdue": 123, + "total_due_amount": { + "value": 12576, + "formatted_value": "₹ 12,576.00", + "currency": "INR" + }, + "repayment_url": "https://example_url.com/example/" } } ``` @@ -853,7 +937,11 @@ Success. Returns the status of payment. Check the example shown below or refer ` "session_id": "109dae9a-9fe0-4277-979c-0bebb0136930" }, "redirect_url": "https://retail-dev.epaylater.in?sessionId=109dae9a-9fe0-4277-979c-0bebb0136930", - "status": true + "status": true, + "merchant_customer_ref_id": "64217ecb42a43c10c5bde1b4", + "status_remark": "Your are one step away to avail credit of Amount(value=10000.0, formattedValue=₹ 10,000.00, currency=INR)", + "is_eligible_for_txn": false, + "activation_url": "https://urlshortener-sandbox.rupifi.com/BHs8Dsc" } } ``` @@ -924,6 +1012,75 @@ Success. Returns a success message if card is deleted. +--- + + +### delinkWallet +Delink the wallet + + + +```javascript +// Promise +const promise = applicationClient.payment.delinkWallet({ body : value }); + +// Async/Await +const data = await applicationClient.payment.delinkWallet({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [WalletDelinkRequestSchema](#WalletDelinkRequestSchema) | yes | Request body | + + +It Removes already linked wallet + +*Returned Response:* + + + + +[WalletResponseSchema](#WalletResponseSchema) + +Wallet delinked successfully + + + + +
+  Examples: + + +
+  wallet_delete_success + +```json +{ + "summary": "Wallet delinked successfully", + "value": { + "success": true, + "data": { + "message": "Wallet delinked successfully" + } + } +} +``` +
+ +
+ + + + + + + + + --- @@ -1527,20 +1684,26 @@ Get applicable payment options // Promise const promise = applicationClient.payment.getPaymentModeRoutes({ amount : value, cartId : value, - pincode : value, checkoutMode : value, refresh : value, + orderId : value, cardReference : value, - userDetails : value }); + userDetails : value, + displaySplit : value, + advancePayment : value, + shipmentId : value }); // Async/Await const data = await applicationClient.payment.getPaymentModeRoutes({ amount : value, cartId : value, - pincode : value, checkoutMode : value, refresh : value, + orderId : value, cardReference : value, - userDetails : value }); + userDetails : value, + displaySplit : value, + advancePayment : value, + shipmentId : value }); ``` @@ -1549,13 +1712,16 @@ const data = await applicationClient.payment.getPaymentModeRoutes({ amount : va | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| amount | number | yes | Payable amount. | -| cartId | string | yes | Identifier of the cart. | -| pincode | string | yes | The PIN Code of the destination address, e.g. 400059 | -| checkoutMode | string | yes | Option to checkout for self or for others. | +| amount | number | yes | Payable amount. | +| cartId | string | no | Identifier of the cart. | +| checkoutMode | string | no | Option to checkout for self or for others. | | refresh | boolean | no | This is a boolean value. Select `true` to remove temporary cache files on payment gateway and replace with the latest one. | +| orderId | string | no | | | cardReference | string | no | Card reference id of user's debit or credit card. | -| userDetails | string | no | URIencoded JSON containing details of an anonymous user. | +| userDetails | string | no | URIencoded JSON containing details of an anonymous user. | +| displaySplit | boolean | no | Display Split Payment Option or not | +| advancePayment | boolean | no | Display Advance Payment Options or Normal | +| shipmentId | string | no | | @@ -1803,7 +1969,14 @@ Success. Returns all available options for payment. Check the example shown belo "large": "https://hdn-1.fynd.com/payment/paytm_logo_large.png" }, "aggregator_name": "Juspay", - "display_priority": 1 + "display_priority": 1, + "meta": { + "balance": 10, + "token": "613b11af-dd32-4b59-8f18-70b2a93dc702", + "linked": true, + "mobile": 8999999999, + "wallet_code": "PAYTM" + } }, { "wallet_name": "Amazon Pay", @@ -2072,7 +2245,66 @@ Success. Returns all available options for payment. Check the example shown belo "payment_flow": "api" } } - } + }, + "advance_payment": [ + { + "name": "SPLIT", + "display_priority": 22, + "payment_mode_id": 34, + "display_name": "Split Payment", + "list": [ + { + "aggregator_name": "Fynd", + "name": "Split Payment", + "display_name": "Split Payment", + "code": "SPLIT", + "logo_url": { + "small": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/testz0/misc/default-assets/original/yDRf9iyLbH-PosLogo.png", + "large": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/testz0/misc/default-assets/original/yDRf9iyLbH-PosLogo.png" + }, + "merchant_code": "SPLIT" + } + ], + "split": { + "total_number_of_splits": 7, + "splits_remaining": 7 + } + }, + { + "name": "ADVANCE", + "display_priority": 22, + "payment_mode_id": 35, + "display_name": "Advance Payment", + "list": [ + { + "aggregator_name": "Fynd", + "name": "Advance Payment", + "display_name": "Advance Payment", + "code": "ADVANCE", + "logo_url": { + "small": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/testz0/misc/default-assets/original/yDRf9iyLbH-PosLogo.png", + "large": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/testz0/misc/default-assets/original/yDRf9iyLbH-PosLogo.png" + }, + "merchant_code": "ADVANCE" + } + ], + "advance": { + "is_active": true, + "time_unit": "DAYS", + "description": "Pay Rs 3000 or more of the total amount", + "display_name": "Pay using Advance Payment", + "prepayment_type": "PERCENTAGE", + "prepayment_value": 20, + "cancellation_type": "AUTO", + "refund_time_limit": 4, + "all_prepayment_type": [ + "PERCENTAGE", + "FIXED" + ], + "allow_custom_advance_amount": true + } + } + ] } ```
@@ -2546,20 +2778,20 @@ Get applicable payment options for Point-of-Sale (POS) ```javascript // Promise const promise = applicationClient.payment.getPosPaymentModeRoutes({ amount : value, - cartId : value, pincode : value, - checkoutMode : value, orderType : value, + cartId : value, + checkoutMode : value, refresh : value, cardReference : value, userDetails : value }); // Async/Await const data = await applicationClient.payment.getPosPaymentModeRoutes({ amount : value, - cartId : value, pincode : value, - checkoutMode : value, orderType : value, + cartId : value, + checkoutMode : value, refresh : value, cardReference : value, userDetails : value }); @@ -2571,10 +2803,10 @@ const data = await applicationClient.payment.getPosPaymentModeRoutes({ amount : | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| amount | number | yes | Payable amount. | -| cartId | string | yes | Identifier of the cart. | -| pincode | string | yes | The PIN Code of the destination address, e.g. 400059 | -| checkoutMode | string | yes | Option to checkout for self or for others. | +| amount | number | yes | Payable amount. | +| cartId | string | no | Identifier of the cart. | +| pincode | string | yes | The PIN Code of the destination address, e.g. 400059 | +| checkoutMode | string | no | Option to checkout for self or for others. | | refresh | boolean | no | This is a boolean value. Select `true` to remove temporary cache files on payment gateway and replace with the latest one. | | cardReference | string | no | Card reference id of user's debit or credit card. | | orderType | string | yes | 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. | @@ -3065,6 +3297,77 @@ Success. Check the example shown below or refer `PaymentInitializationResponse` +--- + + +### linkWallet +OTP verification for linking of wallet + + + +```javascript +// Promise +const promise = applicationClient.payment.linkWallet({ body : value }); + +// Async/Await +const data = await applicationClient.payment.linkWallet({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [WalletVerifyRequestSchema](#WalletVerifyRequestSchema) | yes | Request body | + + +It Verifies the linking of wallet using OTP + +*Returned Response:* + + + + +[WalletResponseSchema](#WalletResponseSchema) + +OTP Verification + + + + +
+  Examples: + + +
+  wallet_verify_success + +```json +{ + "summary": "OTP verification success", + "value": { + "success": true, + "data": { + "message": "OTP verified successfully", + "balance": 234, + "token": "100f8193-63b6-4f2b-a9bc-6830639583a6" + } + } +} +``` +
+ +
+ + + + + + + + + --- @@ -4010,6 +4313,76 @@ Success. Sends the OTP to the given mobile number. Check the example shown below +--- + + +### walletLinkInitate +Initiate linking of wallet + + + +```javascript +// Promise +const promise = applicationClient.payment.walletLinkInitate({ body : value }); + +// Async/Await +const data = await applicationClient.payment.walletLinkInitate({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [WalletLinkRequestSchema](#WalletLinkRequestSchema) | yes | Request body | + + +It will initiate linking of wallet for the aggregator. + +*Returned Response:* + + + + +[WalletResponseSchema](#WalletResponseSchema) + +OTP for Wallet Linking sent + + + + +
+  Examples: + + +
+  wallet_link_failed + +```json +{ + "summary": "OTP sent successfully", + "value": { + "success": true, + "data": { + "message": "OTP sent successfully", + "link_token": "31a2f5a7-ee30-4cbb-8669-53071878f6d7" + } + } +} +``` +
+ +
+ + + + + + + + + --- @@ -4022,7 +4395,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cards | [CardPaymentGateway](#CardPaymentGateway) | no | Card's payment gateway with customer id. | + | cards | [CardPaymentGateway](#CardPaymentGateway) | no | | | message | string | no | Human readable message. | | success | boolean | no | Response is successful or not. | @@ -4044,7 +4417,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | delights | boolean | no | True if beneficiary to be added by delights or False if by User | - | details | [BeneficiaryModeDetails](#BeneficiaryModeDetails) | no | Beneficiary bank details | + | details | [BeneficiaryModeDetails](#BeneficiaryModeDetails) | no | | | order_id | string | no | Merchant Order Id | | otp | string? | yes | | | request_id | string? | yes | | @@ -4073,6 +4446,40 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | success | boolean? | yes | Response is successful or not | +--- + +#### [AdvanceObject](#AdvanceObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | all_prepayment_type | [string]? | yes | All available types of prepayment | + | allow_custom_advance_amount | boolean? | yes | Is custom advance amount allowed? | + | amount | number? | yes | Amount for Payment Breakdown | + | cancellation_type | string? | yes | Type of cancellation | + | description | string? | yes | The description for Advance Payment (user configured) | + | display_name | string? | yes | The display name for Advance payment | + | is_active | boolean? | yes | Is Advance Payment active | + | prepayment_type | string? | yes | Type of prepayment value | + | prepayment_value | number? | yes | Value for prepayment in advance payment | + | refund_time_limit | number? | yes | time limit for processing refund | + | time_unit | string? | yes | Time unit for refunds | + + +--- + +#### [AdvancePaymentObject](#AdvancePaymentObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | advance | [AdvanceObject](#AdvanceObject)? | yes | | + | display_name | string? | yes | Display name for Advance Payment Mode | + | display_priority | number? | yes | Display Priority for Payment Option | + | list | [[PaymentModeList](#PaymentModeList)]? | yes | Payment mode | + | name | string? | yes | Name of Advance Payment Mode | + | payment_mode_id | number? | yes | Payment Mode ID for Advance Payment Option | + | split | [SplitObject](#SplitObject)? | yes | | + + --- #### [AggregatorConfigDetail](#AggregatorConfigDetail) @@ -4193,7 +4600,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address | [KYCAddress](#KYCAddress)? | yes | Address details | + | address | [KYCAddress](#KYCAddress)? | yes | | | business_ownership_type | string? | yes | business Ownershipp type(e.g Rented) | | business_type | string? | yes | Business Type | | entity_type | string? | yes | Busineess Entity Type | @@ -4281,7 +4688,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [CardDetails](#CardDetails) | no | Saved Card Details | + | data | [CardDetails](#CardDetails) | no | | | success | boolean | no | Response is successful or not. | @@ -4330,7 +4737,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [CreditDetail](#CreditDetail) | no | Credit summary of user. | + | data | [CreditDetail](#CreditDetail) | no | | | success | boolean | no | Operation is successful or not. | @@ -4358,7 +4765,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | meta | [PaymentMethodsMeta](#PaymentMethodsMeta) | no | Meta | + | meta | [PaymentMethodsMeta](#PaymentMethodsMeta) | no | | | mode | string | no | Payment mode | | name | string | no | Payment mode name | @@ -4373,7 +4780,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | failure_callback_url | string | no | Failure page url | | meta | string? | yes | Meta | | payment_link_id | string | no | Unique id of payment link | - | payment_methods | [CreateOrderUserPaymentMethods](#CreateOrderUserPaymentMethods) | no | Payment method details | + | payment_methods | [CreateOrderUserPaymentMethods](#CreateOrderUserPaymentMethods) | no | | | success_callback_url | string | no | Success page url | @@ -4402,7 +4809,6 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | assign_card_id | string? | yes | | | cart_id | string | no | | | checkout_mode | string | no | | - | pincode | string | no | | --- @@ -4415,7 +4821,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | description | string? | yes | Merchant order id | | email | string | no | Email to which the payment link is to be sent | | external_order_id | string | no | Merchant order id | - | meta | [CreatePaymentLinkMeta](#CreatePaymentLinkMeta) | no | Meta | + | meta | [CreatePaymentLinkMeta](#CreatePaymentLinkMeta) | no | | | mobile_number | string | no | Mobile number to which the payment link is to be sent | @@ -4450,13 +4856,21 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | amount_available | [BalanceDetails](#BalanceDetails)? | yes | Credit summary of user. | - | balance | [BalanceDetails](#BalanceDetails)? | yes | Credit summary of user. | + | activation_url | string? | yes | Url for activation | + | amount_available | [BalanceDetails](#BalanceDetails)? | yes | | + | balance | [BalanceDetails](#BalanceDetails)? | yes | | | buyer_status | string? | yes | Status from Credit aggregator's end | | credit_line_id | string? | yes | ID at Credit aggregator's end | + | due_amount | [BalanceDetails](#BalanceDetails)? | yes | | + | due_date | string? | yes | Due date for repayment | + | is_eligible_for_txn | boolean? | yes | Eligiblity flag to complete transaction | + | limit | [BalanceDetails](#BalanceDetails)? | yes | | | merchant_customer_ref_id | string? | yes | Unique aggregator customer id | + | repayment_url | string? | yes | Url for repayment | + | soa_url | string? | yes | Statement of accounts. Show payment history. | | status | string? | yes | Customer Credit status | | status_message | string? | yes | message to customer | + | total_due_amount | [BalanceDetails](#BalanceDetails)? | yes | | --- @@ -4465,7 +4879,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [CreditSummary](#CreditSummary)? | yes | Credit summary of user. | + | data | [CreditSummary](#CreditSummary)? | yes | | | success | boolean | no | Payment confirmation updated or not. | @@ -4476,11 +4890,11 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | aggregator | string | no | Aggregator Name | - | business_info | [BusinessDetails](#BusinessDetails)? | yes | Business summary. | - | device | [DeviceDetails](#DeviceDetails)? | yes | Device Details. | - | marketplace_info | [MarketplaceInfo](#MarketplaceInfo)? | yes | Market Place info. | + | business_info | [BusinessDetails](#BusinessDetails)? | yes | | + | device | [DeviceDetails](#DeviceDetails)? | yes | | + | marketplace_info | [MarketplaceInfo](#MarketplaceInfo)? | yes | | | mcc | string? | yes | Mcc | - | personal_info | [UserPersonalInfoInDetails](#UserPersonalInfoInDetails) | no | Credit summary of user. | + | personal_info | [UserPersonalInfoInDetails](#UserPersonalInfoInDetails)? | yes | | | source | string | no | callbackURL | @@ -4490,7 +4904,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [OnboardSummary](#OnboardSummary) | no | Redirect URL. | + | data | [OnboardSummary](#OnboardSummary) | no | | | success | boolean | no | Status updated or not. | @@ -4545,7 +4959,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [EpaylaterBannerData](#EpaylaterBannerData) | no | Epaylater KYC banner details. | + | data | [EpaylaterBannerData](#EpaylaterBannerData) | no | | | success | boolean | no | Successful or not. | @@ -4644,7 +5058,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | ---------- | ---- | -------- | ----------- | | code | string? | yes | code | | display_name | string? | yes | display_name | - | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | logos | + | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | | | package_name | string? | yes | package_name | @@ -4722,9 +5136,13 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | redirect_url | string | no | URL to which the user may redirect. | - | session | string | no | User Session | - | status | boolean | no | Operation Status | + | activation_url | string? | yes | Url for activation | + | is_eligible_for_txn | boolean? | yes | Whether is eligible for transaction | + | merchant_customer_ref_id | string? | yes | Rupifi customer ID | + | redirect_url | string? | yes | URL to which the user may redirect. | + | session | string? | yes | User Session | + | status | boolean | no | Transaction status | + | status_remark | string? | yes | Decription of status | --- @@ -4794,20 +5212,20 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | ajiodhan | [AggregatorRoute](#AggregatorRoute)? | yes | Ajiodhan | - | bqr_razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | BQR_Razorpay | - | ccavenue | [AggregatorRoute](#AggregatorRoute)? | yes | Ccavenue | - | epaylater | [AggregatorRoute](#AggregatorRoute)? | yes | Epaylater | - | fynd | [AggregatorRoute](#AggregatorRoute)? | yes | Fynd | - | jiopay | [AggregatorRoute](#AggregatorRoute)? | yes | Jiopay | - | juspay | [AggregatorRoute](#AggregatorRoute)? | yes | Juspay | - | mswipe | [AggregatorRoute](#AggregatorRoute)? | yes | mswipe | - | payubiz | [AggregatorRoute](#AggregatorRoute)? | yes | Payubiz | - | razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | Razorpay | - | rupifi | [AggregatorRoute](#AggregatorRoute)? | yes | Rupifi | - | simpl | [AggregatorRoute](#AggregatorRoute)? | yes | simpl | - | stripe | [AggregatorRoute](#AggregatorRoute)? | yes | Stripe | - | upi_razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | UPI_Razorpay | + | ajiodhan | [AggregatorRoute](#AggregatorRoute)? | yes | | + | bqr_razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | | + | ccavenue | [AggregatorRoute](#AggregatorRoute)? | yes | | + | epaylater | [AggregatorRoute](#AggregatorRoute)? | yes | | + | fynd | [AggregatorRoute](#AggregatorRoute)? | yes | | + | jiopay | [AggregatorRoute](#AggregatorRoute)? | yes | | + | juspay | [AggregatorRoute](#AggregatorRoute)? | yes | | + | mswipe | [AggregatorRoute](#AggregatorRoute)? | yes | | + | payubiz | [AggregatorRoute](#AggregatorRoute)? | yes | | + | razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | | + | rupifi | [AggregatorRoute](#AggregatorRoute)? | yes | | + | simpl | [AggregatorRoute](#AggregatorRoute)? | yes | | + | stripe | [AggregatorRoute](#AggregatorRoute)? | yes | | + | upi_razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | | --- @@ -4867,6 +5285,17 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | payment_identifier | string | no | Payment identifier | +--- + +#### [PaymentMethodsMetaOrder](#PaymentMethodsMetaOrder) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | merchant_code | string | no | Merchant code | + | payment_gateway | string | no | Payment gateway name | + | payment_identifier | string | no | Payment identifier | + + --- #### [PaymentModeList](#PaymentModeList) @@ -4899,8 +5328,9 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | intent_app_error_dict_list | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | | intent_app_error_list | [string]? | yes | intent_app_error_list | | intent_flow | boolean? | yes | intent_flow | - | logo_url | [PaymentModeLogo](#PaymentModeLogo)? | yes | Logo | + | logo_url | [PaymentModeLogo](#PaymentModeLogo)? | yes | | | merchant_code | string? | yes | merchant code | + | meta | string? | yes | Payment methods meta | | name | string? | yes | name | | nickname | string? | yes | nickname | | remaining_limit | number? | yes | Remaining limit | @@ -4924,7 +5354,9 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | payment_options | [PaymentOptionAndFlow](#PaymentOptionAndFlow) | no | payment_options | + | advance_payment | [[AdvancePaymentObject](#AdvancePaymentObject)]? | yes | Advance Payment Array | + | payment_breakup | string? | yes | Payment Breakup for advance payment | + | payment_options | [PaymentOptionAndFlow](#PaymentOptionAndFlow) | no | | | success | boolean | no | Response is successful or not | @@ -4934,8 +5366,65 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | payment_flows | [PaymentFlow](#PaymentFlow) | no | payment_flows | - | payment_option | [[RootPaymentMode](#RootPaymentMode)] | no | Payment options | + | payment_flows | [PaymentFlow](#PaymentFlow) | no | | + | payment_option | [RootPaymentMode](#RootPaymentMode) | no | | + + +--- + +#### [PaymentOrderData](#PaymentOrderData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | aggregator | string? | yes | Aggregator name | + | amount | number? | yes | Amount | + | callback_url | string? | yes | Callback url for aggregator | + | contact | string? | yes | Mobile number | + | currency | string? | yes | Currency | + | customer_id | string? | yes | Aggregator customer id | + | email | string? | yes | Email | + | merchant_order_id | string? | yes | Merchant order id | + | method | string? | yes | Method | + | order_id | string? | yes | Aggregator order id | + + +--- + +#### [PaymentOrderMethods](#PaymentOrderMethods) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | amount | number | no | Amount to be collected | + | meta | [PaymentMethodsMetaOrder](#PaymentMethodsMetaOrder) | no | | + | mode | string | no | Payment mode | + | name | string | no | Payment mode name | + | payment | string? | yes | Payment type i.e. Required / Blocked | + + +--- + +#### [PaymentOrderRequest](#PaymentOrderRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | order_id | string | no | Order id | + | payment_methods | [[PaymentOrderMethods](#PaymentOrderMethods)]? | yes | | + | shipment_id | string? | yes | shipment_id | + + +--- + +#### [PaymentOrderResponse](#PaymentOrderResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | callback_url | string? | yes | Callback url for aggregator | + | data | [PaymentOrderData](#PaymentOrderData)? | yes | | + | message | string | no | Message | + | order_id | string? | yes | Merchant order id | + | payment_confirm_url | string? | yes | Payment confirm url for aggregator | + | status_code | number | no | HTTP status code | + | success | boolean | no | Successful or failure | --- @@ -4996,7 +5485,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [RedirectURL](#RedirectURL) | no | Redirect URL. | + | data | [RedirectURL](#RedirectURL) | no | | | success | boolean | no | Status updated or not. | @@ -5058,7 +5547,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [LinkStatus](#LinkStatus) | no | Data about link action status. | + | data | [LinkStatus](#LinkStatus) | no | | | success | boolean | no | Response is successful or not. | @@ -5107,7 +5596,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [RupifiBannerData](#RupifiBannerData) | no | Rupifi KYC banner details. | + | data | [RupifiBannerData](#RupifiBannerData) | no | | | success | boolean | no | Successful or not. | @@ -5131,6 +5620,17 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | success | boolean? | yes | Response is successful or not | +--- + +#### [SplitObject](#SplitObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | amount_remaining | number? | yes | Amount pending to be paid | + | splits_remaining | number? | yes | Number of splits remaining | + | total_number_of_splits | number? | yes | Maximum amount of splits allowed | + + --- #### [TransferItemsDetails](#TransferItemsDetails) @@ -5188,7 +5688,7 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address_as_per_id | [KYCAddress](#KYCAddress) | no | Address details | + | address_as_per_id | [KYCAddress](#KYCAddress) | no | | | dob | string | no | DOB | | driving_license | string? | yes | Driver License | | email | string? | yes | Email | @@ -5260,10 +5760,31 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [ValidateUPI](#ValidateUPI) | no | Data about UPI ID validate. | + | data | [ValidateUPI](#ValidateUPI) | no | | | success | boolean | no | Response is successful or not. | +--- + +#### [WalletDelinkRequestSchema](#WalletDelinkRequestSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | aggregator | string | no | Aggregator Name | + | wallet_code | string | no | Wallet Code | + + +--- + +#### [WalletLinkRequestSchema](#WalletLinkRequestSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | aggregator | string | no | Aggregator Name | + | mobile | string | no | Mobile Number for Wallet | + | wallet_code | string | no | Wallet Code | + + --- #### [WalletOtpRequest](#WalletOtpRequest) @@ -5285,6 +5806,27 @@ Success. Sends the OTP to the given mobile number. Check the example shown below | success | boolean? | yes | Response is successful or not | +--- + +#### [WalletResponseSchema](#WalletResponseSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | data | string | no | Response received from aggregator | + | success | boolean | no | Success/Failure of the API call | + + +--- + +#### [WalletVerifyRequestSchema](#WalletVerifyRequestSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | aggregator | string | no | Aggregator Name | + | link_token | string | no | Token for wallet linking | + | otp | number | no | OTP received for wallet linking | + + --- #### [WrongOtpError](#WrongOtpError) diff --git a/documentation/application/POSCART.md b/documentation/application/POSCART.md index e0d7a3491..64cfd91fd 100644 --- a/documentation/application/POSCART.md +++ b/documentation/application/POSCART.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## PosCart Methods -Cart APIs +The POS Cart module optimizes the shopping and checkout experience. Use it to manage cart items, apply discounts, update addresses, and choose delivery options. It also supports shared cart options for collaborative shopping. Default @@ -2925,6 +2925,7 @@ Success. Returns an Address object containing a list of address saved in the acc "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", "country_code": "IND", + "state_code": "MH", "country_phone_code": "91", "country_iso_code": "IND", "phone": "9915347757", @@ -3012,44 +3013,94 @@ Success. Returns an Address object containing a list of address saved in the acc
-  Example: +  Examples: + + +
+  example1 ```json { - "address": [ - { - "landmark": "", - "area_code": "410218", - "id": "8b526f521bb14a2593a8b9e3ce8c76b3", - "state": "Maharashtra", - "meta": {}, - "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", - "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", - "country_code": "IND", - "country_phone_code": "91", - "country_iso_code": "IND", - "phone": "9915347757", - "geo_location": {}, - "country": "India", - "is_default_address": true, - "is_active": true, - "city": "Mumbai", - "pincode": 400093, - "checkout_mode": "self", - "address_type": "home", - "tags": [], - "area": "Sector 127", - "name": "abc", - "email": "ankur@gofynd1.com", - "address": "Megatron2", - "store_name": "store123", - "_custom_json": {} - } - ] + "summary": "Address for India", + "value": { + "address": [ + { + "landmark": "", + "area_code": "8b526f521bb14a2593a8b9e3ce8c76b3", + "id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "state": "Maharashtra", + "meta": {}, + "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "country_code": "+91", + "state_code": "MH", + "country_phone_code": "91", + "country_iso_code": "IN", + "phone": "9915347757", + "geo_location": {}, + "country": "India", + "is_default_address": true, + "is_active": true, + "city": "Mumbai", + "pincode": 400093, + "checkout_mode": "self", + "address_type": "home", + "tags": [], + "area": "Sector 127", + "name": "abc", + "email": "ankur@gofynd1.com", + "address": "Megatron2", + "_custom_json": {} + } + ] + } } ```
+
+  example2 + +```json +{ + "summary": "Address for Dubai", + "value": { + "address": [ + { + "landmark": "", + "area_code": "", + "id": "651c0b882dbd5f702f711677", + "state": "", + "meta": {}, + "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "country_code": "+971", + "country_phone_code": "+971", + "country_iso_code": "AE", + "phone": "551234567", + "geo_location": {}, + "country": "United Arab Emirates", + "is_default_address": true, + "is_active": true, + "city": "Sharjah", + "sector": "Al Fisht", + "checkout_mode": "self", + "address_type": "home", + "tags": [], + "area": "Dubai Park", + "name": "Shaikh Ahmed", + "email": "example@gmail.com", + "address": "B-62", + "_custom_json": {} + } + ] + } +} +``` +
+ +
+ @@ -3995,6 +4046,7 @@ Success. Returns a Cart object. Check the example shown below or refer `CartDeta "moq": {}, "article": { "type": "article", + "tags": [], "uid": "604_902_SSTC60401_636BLUE_1", "size": "1", "seller": { @@ -5105,6 +5157,10 @@ Success. Returns delivery promise along with shipment details and price breakup. "formatted": { "min": "Aug 24", "max": "Aug 28" + }, + "iso": { + "min": "2019-08-25T00:35:08.000Z", + "max": "2019-08-29T07:55:08.000Z" } }, "box_type": "Small Courier bag", @@ -5166,6 +5222,7 @@ Success. Returns delivery promise along with shipment details and price breakup. }, "article": { "type": "article", + "tags": [], "uid": "381_610_IGPL01_SPIRAL19ANAVY_L", "size": "L", "seller": { @@ -8434,6 +8491,10 @@ Success. Returns delivery promise along with shipment details and price breakup. "formatted": { "min": "Aug 24", "max": "Aug 28" + }, + "iso": { + "min": "2019-08-25T00:35:08.000Z", + "max": "2019-08-29T07:55:08.000Z" } }, "box_type": "Small Courier bag", @@ -8996,7 +9057,9 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | meta | string? | yes | | | name | string? | yes | | | phone | string? | yes | | + | sector | string? | yes | | | state | string? | yes | | + | state_code | string? | yes | State code for international address | | tags | [string]? | yes | | | user_id | string? | yes | | @@ -9023,6 +9086,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | applied_free_articles | [[AppliedFreeArticles](#AppliedFreeArticles)]? | yes | Applied free article for free gift item promotions | | article_quantity | number? | yes | Quantity of article on which promotion is applicable | | buy_rules | [[BuyRules](#BuyRules)]? | yes | Buy rules for promotions | + | currency | [CartCurrency](#CartCurrency)? | yes | | | discount_rules | [[DiscountRulesApp](#DiscountRulesApp)]? | yes | Discount rules for promotions | | mrp_promotion | boolean? | yes | If applied promotion is applied on product MRP or ESP | | offer_text | string? | yes | Offer text of current promotion | @@ -9749,6 +9813,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | seller_identifier | string? | yes | | | size | string? | yes | | | store | [StoreInfo](#StoreInfo)? | yes | | + | tags | [string]? | yes | a list of article tags | | type | string? | yes | | | uid | string? | yes | | @@ -9823,6 +9888,16 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | min | string? | yes | | +--- + +#### [PromiseISOFormat](#PromiseISOFormat) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | max | string? | yes | Max promise in ISO format. | + | min | string? | yes | Min Promise in ISO format. | + + --- #### [PromiseTimestamp](#PromiseTimestamp) @@ -9951,6 +10026,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | formatted | [PromiseFormatted](#PromiseFormatted)? | yes | | + | iso | [PromiseISOFormat](#PromiseISOFormat)? | yes | | | timestamp | [PromiseTimestamp](#PromiseTimestamp)? | yes | | diff --git a/documentation/application/README.md b/documentation/application/README.md index 0ec683823..c813c32c5 100644 --- a/documentation/application/README.md +++ b/documentation/application/README.md @@ -3,19 +3,19 @@ # FDK Application Front API Documentaion -* [Cart](CART.md) - Manages Cart, Coupons, Promotions, Checkout -* [Catalog](CATALOG.md) - Catalog API's allows you to access list of products, prices, seller details, similar features, variants and many more useful features. +* [Cart](CART.md) - The Cart and Checkout module manages cart items, applies coupons and reward points, and allows you to select delivery addresses. This module also enables you to update payment information and view ongoing promotions. Additionally, it manages cart sharing, merging, and replacing, as well as providing details on shared carts. +* [Catalog](CATALOG.md) - The Catalog module manages product details and size availability, and enables easy comparisons. Use it to explore product options, check stock status, and retrieve brand and category information. The module also supports personalization by allowing tracking of preferred items and brands. It highlights popular products based on user engagement and provides store details. Additionally, this module covers bundled items, size-specific pricing, and seller information. * [Common](COMMON.md) - Application configuration apis -* [Communication](COMMUNICATION.md) - Manages email, sms, push notifications sent to users -* [Configuration](CONFIGURATION.md) - Application configuration apis -* [Content](CONTENT.md) - Content System -* [FileStorage](FILESTORAGE.md) - File Storage -* [Lead](LEAD.md) - Handles communication between Staff and Users -* [Logistic](LOGISTIC.md) - Logistics Promise Engine APIs allows you to configure zone, pincode, TAT, logistics and many more useful features. -* [Order](ORDER.md) - Handles all Application order and shipment api(s) -* [Payment](PAYMENT.md) - Collect payment through many payment gateway i.e Stripe, Razorpay, Juspay etc.into Fynd or Self account -* [PosCart](POSCART.md) - Cart APIs -* [Rewards](REWARDS.md) - Earn and redeem reward points -* [Share](SHARE.md) - Short link and QR Code -* [Theme](THEME.md) - Responsible for Storefront -* [User](USER.md) - Authentication Service \ No newline at end of file +* [Communication](COMMUNICATION.md) - The Communications module manages user notifications to keep users informed and engaged through personalized push notifications. Use it to enable users to view notifications they've opted into, modify their communication preferences, and update push tokens for real-time updates. +* [Configuration](CONFIGURATION.md) - The Application Configuration module simplifies tasks related to configuring the app. You can use it to retrieve information about sales channels, ownership details, app-specific settings, and integration tokens. This module also offers insights into store performance, ordering options, and available modules. It allows you to access currency information, support multiple languages, and customize store cookies for a personalized user experience. Additionally, the module can retrieve the staff list. +* [Content](CONTENT.md) - The Content module manages content in the application. Use it to help users stay updated with announcements, read blog posts, manage data loaders, consult FAQs, and access legal and support information. It also enhances navigation modules and SEO capabilities for better online visibility, as well as supports slideshow interactions. +* [FileStorage](FILESTORAGE.md) - The File Storage module simplifies your file upload and storage tasks. Use the 'Initiate Upload' module to start and complete file uploads. Once the upload is successful, employ the 'Complete Upload' module to retrieve the file's URL. For added security, utilize the 'Sign URLs' module, which grants authorized access through signed URLs. +* [Lead](LEAD.md) - The Leads Management module improves communication, support, and effective interaction. Utilize it to retrieve user tickets, create ticket histories, and generate new tickets. This module also enables you to set up video rooms for participants, providing room tokens for secure access. +* [Logistic](LOGISTIC.md) - The Logistics module enhances delivery operations efficiency. It enables you to retrieve data and calculate precise delivery times. You can utilize the Country Information module to serve a global customer base and implement zone mapping for efficient delivery route planning. Additionally, this module offers the capability to optimize store assignments based on various criteria, including products, settings, and ignored locations. Furthermore, it supports Custom Packaging to enhance shipment creation. +* [Order](ORDER.md) - The Order and Shipment module is designed for retrieving application-specific orders, accessing order details, and obtaining shipment and invoice information. This module facilitates shipment tracking, allows customization of shipment details, and provides reasons for cancellations and returns. Additionally, it offers real-time shipment status updates. +* [Payment](PAYMENT.md) - The Payment module lists cards and payment modes, allows for the selection of payment modes during checkout, handles refunds, validates customers, and ensures the security of transactions. +* [PosCart](POSCART.md) - The POS Cart module optimizes the shopping and checkout experience. Use it to manage cart items, apply discounts, update addresses, and choose delivery options. It also supports shared cart options for collaborative shopping. +* [Rewards](REWARDS.md) - The Rewards Points module manages loyalty and rewards programs. Use it to search for offers by name, track user points, monitor referrals, and apply order discounts. The module also supports the use of referral codes, allowing users to earn rewards for both themselves and their referrers. +* [Share](SHARE.md) - The Sharing module simplifies the creation and sharing of QR codes and short links. Use it to generate QR codes for apps, products, collections, and URLs. Create short links for long URLs and retrieve them, along with the original URLs, using their respective codes. +* [Theme](THEME.md) - The Theme module makes theme management more efficient and effective. It allows you to view all theme pages, obtain details about specific theme pages, check the current app theme, and preview and test themes before applying them live. +* [User](USER.md) - The User Authentication module prioritizes security, offering multiple login options, password management, and profile updates. This module allows users to log in using social accounts, mobile OTPs, or passwords, and also enables secure password resets. It manages mobile and email verification, profile details, and session information. \ No newline at end of file diff --git a/documentation/application/REWARDS.md b/documentation/application/REWARDS.md index 6ec8e3692..609a6096b 100644 --- a/documentation/application/REWARDS.md +++ b/documentation/application/REWARDS.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Rewards Methods -Earn and redeem reward points +The Rewards Points module manages loyalty and rewards programs. Use it to search for offers by name, track user points, monitor referrals, and apply order discounts. The module also supports the use of referral codes, allowing users to earn rewards for both themselves and their referrers. Default diff --git a/documentation/application/SHARE.md b/documentation/application/SHARE.md index 2152a745e..eb6cd2b19 100644 --- a/documentation/application/SHARE.md +++ b/documentation/application/SHARE.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Share Methods -Short link and QR Code +The Sharing module simplifies the creation and sharing of QR codes and short links. Use it to generate QR codes for apps, products, collections, and URLs. Create short links for long URLs and retrieve them, along with the original URLs, using their respective codes. Default diff --git a/documentation/application/THEME.md b/documentation/application/THEME.md index 3ad680513..d04c56abe 100644 --- a/documentation/application/THEME.md +++ b/documentation/application/THEME.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## Theme Methods -Responsible for Storefront +The Theme module makes theme management more efficient and effective. It allows you to view all theme pages, obtain details about specific theme pages, check the current app theme, and preview and test themes before applying them live. Default @@ -78,6 +78,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981639e13f6b2" }, "_id": "60ab5ca6d572fed64294eb0e", @@ -93,6 +100,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981fc5d13f6b9" }, "_id": "60ab5ca6d572fed64294eaf9", @@ -108,6 +122,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981cbca13f6b1" }, "_id": "60ab5ca6d572fed64294eb0b", @@ -123,6 +144,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e9812fdf13f6ae" }, "_id": "60ab5ca6d572fed64294eb02", @@ -138,6 +166,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e9815c9713f6ab" }, "_id": "60ab5ca6d572fed64294eaf6", @@ -153,6 +188,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb24" }, "_id": "60ab5ca6d572fed64294eb25", @@ -168,6 +210,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb22" }, "_id": "60ab5ca6d572fed64294eb23", @@ -183,6 +232,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e9814fed13f6b5" }, "_id": "60ab5ca6d572fed64294eb17", @@ -198,6 +254,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981b32713f6b6" }, "_id": "60ab5ca6d572fed64294eb1a", @@ -213,6 +276,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb28" }, "_id": "60ab5ca6d572fed64294eb29", @@ -228,6 +298,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981dd2d13f6b3" }, "_id": "60ab5ca6d572fed64294eb11", @@ -243,6 +320,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb26" }, "_id": "60ab5ca6d572fed64294eb27", @@ -258,6 +342,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981161a13f6ad" }, "_id": "60ab5ca6d572fed64294eaff", @@ -273,6 +364,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98115b013f6ac" }, "_id": "60ab5ca6d572fed64294eafc", @@ -288,6 +386,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981ad0b13f6b0" }, "_id": "60ab5ca6d572fed64294eb08", @@ -303,6 +408,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981872c13f6af" }, "_id": "60ab5ca6d572fed64294eb05", @@ -318,6 +430,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98177f713f6b4" }, "_id": "60ab5ca6d572fed64294eb14", @@ -333,6 +452,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98170b813f6b8" }, "_id": "60ab5ca6d572fed64294eb20", @@ -348,6 +474,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981469613f6b7" }, "_id": "60ab5ca6d572fed64294eb1d", @@ -2397,7 +2530,8 @@ Success. Returns a JSON object of the theme. Check the example shown below or } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip", + "company_id": 1 } } ``` @@ -2424,11 +2558,15 @@ Get page of a theme ```javascript // Promise const promise = applicationClient.theme.getPage({ themeId : value, - pageValue : value }); + pageValue : value, + filters : value, + company : value }); // Async/Await const data = await applicationClient.theme.getPage({ themeId : value, - pageValue : value }); + pageValue : value, + filters : value, + company : value }); ``` @@ -2438,7 +2576,9 @@ const data = await applicationClient.theme.getPage({ themeId : value, | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | themeId | string | yes | ID of the theme to be retrieved | -| pageValue | string | yes | Value of the page to be retrieved | +| pageValue | string | yes | Value of the page to be retrieved | +| filters | string | no | Filters on sections to be applied or not | +| company | number | no | Company id of the application | @@ -2471,6 +2611,13 @@ Success. Returns an object of the pages. Refer `AvailablePageSchema` for more d "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98115b013f6ac" }, "props": [], @@ -4869,7 +5016,8 @@ Success. Returns a JSON object of the theme. Check the example shown below or re } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip", + "company_id": 1 } } ``` @@ -4893,6 +5041,29 @@ Success. Returns a JSON object of the theme. Check the example shown below or re ### Schemas +#### [Action](#Action) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | page | [ActionPage](#ActionPage)? | yes | | + | popup | [ActionPage](#ActionPage)? | yes | | + | type | string? | yes | | + + +--- + +#### [ActionPage](#ActionPage) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | params | [String: [string]]? | yes | | + | query | [String: [string]]? | yes | | + | type | string? | yes | | + | url | string? | yes | | + + +--- + #### [AdvanceSetting](#AdvanceSetting) | Properties | Type | Nullable | Description | @@ -4932,15 +5103,29 @@ Success. Returns a JSON object of the theme. Check the example shown below or re | show_header_auth | boolean? | yes | Whether to show header authentication or not | +--- + +#### [AvailablePagePlatformPredicate](#AvailablePagePlatformPredicate) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | android | boolean? | yes | Section visibility on android platform | + | ios | boolean? | yes | Section visibility on ios platform | + | web | boolean? | yes | Section visibility on web platform | + + --- #### [AvailablePagePredicate](#AvailablePagePredicate) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | platform | [AvailablePagePlatformPredicate](#AvailablePagePlatformPredicate)? | yes | | | route | [AvailablePageRoutePredicate](#AvailablePageRoutePredicate)? | yes | | + | schedule | [AvailablePageSchedulePredicate](#AvailablePageSchedulePredicate)? | yes | | | screen | [AvailablePageScreenPredicate](#AvailablePageScreenPredicate)? | yes | | | user | [AvailablePageUserPredicate](#AvailablePageUserPredicate)? | yes | | + | zones | [string]? | yes | An array of zone ids associated with the section | --- @@ -4954,6 +5139,17 @@ Success. Returns a JSON object of the theme. Check the example shown below or re | selected | string? | yes | | +--- + +#### [AvailablePageSchedulePredicate](#AvailablePageSchedulePredicate) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | cron | string? | yes | | + | end | string? | yes | | + | start | string? | yes | | + + --- #### [AvailablePageSchema](#AvailablePageSchema) @@ -5013,7 +5209,11 @@ Success. Returns a JSON object of the theme. Check the example shown below or re | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string? | yes | | + | breadcrumb | [[SEObreadcrumb](#SEObreadcrumb)]? | yes | | + | canonical_url | string? | yes | | | description | string? | yes | | + | meta_tags | [[SEOMetaItem](#SEOMetaItem)]? | yes | | + | sitemap | [SEOSitemap](#SEOSitemap)? | yes | | | title | string? | yes | | @@ -5298,21 +5498,6 @@ Success. Returns a JSON object of the theme. Check the example shown below or re | mobile | string? | yes | The URL of the mobile image | ---- - -#### [Meta](#Meta) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | description | string? | yes | The description of the theme | - | images | [Images](#Images)? | yes | | - | industry | [string]? | yes | An array of industries associated with the theme | - | name | string? | yes | The name of the theme | - | payment | [ThemePayment](#ThemePayment)? | yes | | - | release | [Release](#Release)? | yes | | - | slug | string? | yes | The slug of the theme | - - --- #### [OverlayPopupSetting](#OverlayPopupSetting) @@ -5475,6 +5660,46 @@ Success. Returns a JSON object of the theme. Check the example shown below or re | title | [TextProp](#TextProp)? | yes | | +--- + +#### [SEObreadcrumb](#SEObreadcrumb) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action | [Action](#Action)? | yes | | + | url | string? | yes | | + + +--- + +#### [SEOMetaItem](#SEOMetaItem) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[SEOMetaItems](#SEOMetaItems)]? | yes | | + | title | string? | yes | | + + +--- + +#### [SEOMetaItems](#SEOMetaItems) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | key | string? | yes | | + | value | string? | yes | | + + +--- + +#### [SEOSitemap](#SEOSitemap) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | frequency | string? | yes | | + | priority | number? | yes | | + + --- #### [StaticConfig](#StaticConfig) @@ -5528,6 +5753,21 @@ Success. Returns a JSON object of the theme. Check the example shown below or re | page | [string]? | yes | An array of pages | +--- + +#### [ThemeMeta](#ThemeMeta) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | description | string? | yes | The description of the theme | + | images | [Images](#Images)? | yes | | + | industry | [string]? | yes | An array of industries associated with the theme | + | name | string? | yes | The name of the theme | + | payment | [ThemePayment](#ThemePayment)? | yes | | + | release | [Release](#Release)? | yes | | + | slug | string? | yes | The slug of the theme | + + --- #### [ThemePayment](#ThemePayment) @@ -5559,16 +5799,18 @@ Success. Returns a JSON object of the theme. Check the example shown below or re | applied | boolean? | yes | Whether the theme has been applied or not | | assets | [Assets](#Assets)? | yes | | | available_sections | [[SectionItem](#SectionItem)]? | yes | Available sections information | + | company_id | number? | yes | The company id in which sales channel exists | | config | [Config](#Config)? | yes | | | created_at | string? | yes | The creation timestamp of the theme | | font | [Font](#Font)? | yes | | | is_private | boolean? | yes | Whether the theme is private or not | | marketplace_theme_id | string? | yes | The ID of the theme in the marketplace | - | meta | [Meta](#Meta)? | yes | | + | meta | [ThemeMeta](#ThemeMeta)? | yes | | | name | string? | yes | The name of the theme | | styles | string? | yes | The styles associated with the theme | | tags | [string]? | yes | An array of tags associated with the theme | | template_theme_id | string? | yes | The ID of the template theme | + | theme_type | string? | yes | | | updated_at | string? | yes | The last update timestamp of the theme | | version | string? | yes | The version of the theme | @@ -5621,3 +5863,68 @@ Success. Returns a JSON object of the theme. Check the example shown below or re +### Enums + + + + + + #### [PageType](#PageType) + Type : string + + | Name | Value | Description | + | ---- | ----- | ----------- | + | aboutUs | about-us | Symbolic link for About Us: /about-us | + | addresses | addresses | Symbolic link for Saved Addresses: /profile/address | + | blog | blog | Symbolic link for Blog: /blog/:slug | + | brands | brands | Symbolic link for Brands: /brands/:department | + | cards | cards | Symbolic link for Saved Cards: /profile/my-cards | + | cart | cart | Symbolic link for Cart: /cart/bag/ | + | categories | categories | Symbolic link for Categories: /categories/:department | + | brand | brand | Symbolic link for Brand: /brand/:slug | + | category | category | Symbolic link for Category: /category/:slug | + | collection | collection | Symbolic link for Collection: /collection/:slug | + | collections | collections | Symbolic link for Collections: /collections/ | + | contactUs | contact-us | Symbolic link for Contact Us: /contact-us/ | + | external | external | Symbolic link for External Link: /external/ | + | faq | faq | Symbolic link for FAQ: /faq | + | freshchat | freshchat | Symbolic link for Chat by Freshchat: /freshchat | + | home | home | Symbolic link for Home: / | + | notificationSettings | notification-settings | Symbolic link for Notification Settings: /notification-settings | + | orders | orders | Symbolic link for Orders: /profile/orders | + | page | page | Symbolic link for Page: /page/:slug | + | policy | policy | Symbolic link for Privacy Policy: /privacy-policy | + | product | product | Symbolic link for Product: /product/:slug | + | productRequest | product-request | Symbolic link for Product Request: /product-request/ | + | products | products | Symbolic link for Products: /products/ | + | profile | profile | Symbolic link for Profile: /profile | + | profileOrderShipment | profile-order-shipment | Symbolic link for profile orders shipment: /profile/orders/shipment/:shipmentid | + | profileBasic | profile-basic | Symbolic link for Basic Profile: /profile/details | + | profileCompany | profile-company | Symbolic link for Profile Company: /profile/company | + | profileEmails | profile-emails | Symbolic link for Profile Emails: /profile/email | + | profilePhones | profile-phones | Symbolic link for Profile Phones: /profile/phone | + | rateUs | rate-us | Symbolic link for Rate Us: /rate-us | + | referEarn | refer-earn | Symbolic link for Refer & Earn: /profile/refer-earn | + | settings | settings | Symbolic link for Settings: /setting/currency | + | sharedCart | shared-cart | Symbolic link for Shared Cart: /shared-cart/:token | + | tnc | tnc | Symbolic link for Terms and Conditions: /terms-and-conditions | + | trackOrder | track-order | Symbolic link for Track Order: /order-tracking/:orderId | + | wishlist | wishlist | Symbolic link for Wishlist: /wishlist/ | + | sections | sections | Symbolic link for Sections: /sections/:group | + | form | form | Symbolic link for Form: /form/:slug | + | cartDelivery | cart-delivery | Symbolic link for Cart Delivery: /cart/delivery | + | cartPayment | cart-payment | Symbolic link for Cart Payment Information: /cart/payment-info | + | cartReview | cart-review | Symbolic link for Cart Order Review: /cart/order-review | + | login | login | Symbolic link for Login: /auth/login | + | register | register | Symbolic link for Register: /auth/register | + | shippingPolicy | shipping-policy | Symbolic link for Shipping policy: /shipping-policy | + | returnPolicy | return-policy | Symbolic link for Return policy: /return-policy | + | orderStatus | order-status | Symbolic link for Order status: /cart/order-status | + +--- + + + + + + diff --git a/documentation/application/USER.md b/documentation/application/USER.md index 37efc8176..1273b082a 100644 --- a/documentation/application/USER.md +++ b/documentation/application/USER.md @@ -6,7 +6,7 @@ ##### [Back to Application docs](./README.md) ## User Methods -Authentication Service +The User Authentication module prioritizes security, offering multiple login options, password management, and profile updates. This module allows users to log in using social accounts, mobile OTPs, or passwords, and also enables secure password resets. It manages mobile and email verification, profile details, and session information. Default @@ -19,6 +19,7 @@ Default * [getListOfActiveSessions](#getlistofactivesessions) * [getLoggedInUser](#getloggedinuser) * [getPlatformConfig](#getplatformconfig) +* [getUserAttributes](#getuserattributes) * [hasPassword](#haspassword) * [loginWithAppleIOS](#loginwithappleios) * [loginWithEmailAndPassword](#loginwithemailandpassword) @@ -44,6 +45,8 @@ Default * [setMobileNumberAsPrimary](#setmobilenumberasprimary) * [updatePassword](#updatepassword) * [updateProfile](#updateprofile) +* [updateUserAttributes](#updateuserattributes) +* [userExists](#userexists) * [verifyEmail](#verifyemail) * [verifyEmailForgotOTP](#verifyemailforgototp) * [verifyEmailOTP](#verifyemailotp) @@ -1000,6 +1003,75 @@ Success. Returns a JSON object containing the all the platform configurations. R +--- + + +### getUserAttributes +Get user attributes + + + +```javascript +// Promise +const promise = applicationClient.user.getUserAttributes({ slug : value }); + +// Async/Await +const data = await applicationClient.user.getUserAttributes({ slug : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| slug | string | no | Filter by attribute slug. | + + + +Use this API to get the list of user attributes + +*Returned Response:* + + + + +[UserAttributes](#UserAttributes) + +Returns a list of users attributes + + + + +
+  Examples: + + +
+  Success + +```json +{ + "value": { + "attributes": { + "Attribute_01": 1, + "Attribute_02": "String01" + } + } +} +``` +
+ +
+ + + + + + + + + --- @@ -2967,6 +3039,140 @@ Success. Check the example shown below or refer `LoginSuccess` for more details. +--- + + +### updateUserAttributes +Update user attributes + + + +```javascript +// Promise +const promise = applicationClient.user.updateUserAttributes({ body : value }); + +// Async/Await +const data = await applicationClient.user.updateUserAttributes({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [UpdateUserAttributesRequest](#UpdateUserAttributesRequest) | yes | Request body | + + +Use this API to update user attributes + +*Returned Response:* + + + + +[UserAttributes](#UserAttributes) + +Returns a list of users attributes + + + + +
+  Examples: + + +
+  Success + +```json +{ + "value": { + "attributes": { + "Attribute_01": 1, + "Attribute_02": "String01" + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### userExists +Check user is already registered or not + + + +```javascript +// Promise +const promise = applicationClient.user.userExists({ q : value }); + +// Async/Await +const data = await applicationClient.user.userExists({ q : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| q | string | yes | email id or phone number of user | + + + +Use this API to check whether user is already registered or not to the sales channel. + +*Returned Response:* + + + + +[UserExistsResponse](#UserExistsResponse) + +Returns true or false based on user is registered or not. + + + + +
+  Examples: + + +
+  Success + +```json +{ + "value": { + "user_exists": true + } +} +``` +
+ +
+ + + + + + + + + --- @@ -3835,7 +4041,6 @@ Success. Returns a JSON object as shown below. Refer `VerifyOtpSuccess` for more | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | captcha_code | string? | yes | | | password | string? | yes | | | username | string? | yes | | @@ -4026,7 +4231,6 @@ Success. Returns a JSON object as shown below. Refer `VerifyOtpSuccess` for more | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | action | string? | yes | | - | captcha_code | string? | yes | | | email | string? | yes | | | register_token | string? | yes | | | token | string? | yes | | @@ -4062,7 +4266,6 @@ Success. Returns a JSON object as shown below. Refer `VerifyOtpSuccess` for more | ---------- | ---- | -------- | ----------- | | action | string? | yes | | | android_hash | string? | yes | | - | captcha_code | string? | yes | | | country_code | string? | yes | | | force | string? | yes | | | mobile | string? | yes | | @@ -4085,7 +4288,6 @@ Success. Returns a JSON object as shown below. Refer `VerifyOtpSuccess` for more | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | android_hash | string? | yes | | - | captcha_code | string? | yes | | | country_code | string? | yes | | | mobile | string? | yes | | @@ -4117,7 +4319,6 @@ Success. Returns a JSON object as shown below. Refer `VerifyOtpSuccess` for more | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | captcha_code | string? | yes | | | email | string? | yes | | @@ -4127,7 +4328,6 @@ Success. Returns a JSON object as shown below. Refer `VerifyOtpSuccess` for more | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | captcha_code | string? | yes | | | country_code | string? | yes | | | mobile | string? | yes | | @@ -4207,6 +4407,33 @@ Success. Returns a JSON object as shown below. Refer `VerifyOtpSuccess` for more | old_password | string? | yes | | +--- + +#### [UpdateUserAttributesRequest](#UpdateUserAttributesRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | attributes | string? | yes | | + + +--- + +#### [UserAttributes](#UserAttributes) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | attributes | string? | yes | | + + +--- + +#### [UserExistsResponse](#UserExistsResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | user_exists | boolean? | yes | | + + --- #### [UserObjectSchema](#UserObjectSchema) diff --git a/documentation/partner/LEAD.md b/documentation/partner/LEAD.md new file mode 100644 index 000000000..a66903cb5 --- /dev/null +++ b/documentation/partner/LEAD.md @@ -0,0 +1,2411 @@ + + + + + +##### [Back to Partner docs](./README.md) + +## Lead Methods +Handles communication between Administrator + + +Default +* [createHistory](#createhistory) +* [createTicket](#createticket) +* [editTicket](#editticket) +* [getGeneralConfig](#getgeneralconfig) +* [getTicket](#getticket) +* [getTicketHistory](#gettickethistory) +* [getTickets](#gettickets) +* [getTokenForVideoRoom](#gettokenforvideoroom) +* [getVideoParticipants](#getvideoparticipants) + + + + +## Methods with example and description + + + + + +### createHistory +Create history for specific partner level ticket + + + +```javascript +// Promise +const promise = partnerClient.lead.createHistory({ organizationId : value, + id : value, + body : value }); + +// Async/Await +const data = await partnerClient.lead.createHistory({ organizationId : value, + id : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Partner ID for ticket | +| id | string | yes | Ticket ID for which history is created | +| body | [TicketHistoryPayload](#TicketHistoryPayload) | yes | Request body | + + +Create history for specific partner level ticket, this history is seen on ticket detail page, this can be comment, log or rating. + +*Returned Response:* + + + + +[TicketHistory](#TicketHistory) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": { + "_id": "601a9d52c26687d086c499ef", + "ticket_id": "43", + "type": "comment", + "value": { + "text": "d", + "media": [] + }, + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "88.0.4324.96" + }, + "os": { + "name": "macOS", + "version": "10.15.7", + "versionName": "Catalina" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "created_by": { + "5d1363adf599d850df93175e": null + }, + "createdAt": "2021-02-03T12:55:46.808Z", + "updatedAt": "2021-02-03T12:55:46.808Z", + "__v": 0 + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### createTicket +Creates a partner level ticket + + + +```javascript +// Promise +const promise = partnerClient.lead.createTicket({ organizationId : value, + body : value }); + +// Async/Await +const data = await partnerClient.lead.createTicket({ organizationId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Partner ID for which the data will be returned | +| body | [AddTicketPayload](#AddTicketPayload) | yes | Request body | + + +Creates a partner level ticket + +*Returned Response:* + + + + +[Ticket](#Ticket) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": { + "context": { + "partner_id": "884" + }, + "content": { + "title": "SOme title Response", + "description": "Handles communication between Administrator", + "attachments": [] + }, + "status": { + "display": "In Progress", + "color": "#ffa951", + "key": "in_progress" + }, + "priority": { + "display": "Medium", + "color": "#f37736", + "key": "medium" + }, + "assigned_to": { + "agent_id": "5d1363adf599d850df93175e", + "gender": "male", + "accountType": "user", + "active": true, + "profilePicUrl": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=2136700473091190&height=400&width=400&ext=1554542761&hash=AeS6cuWIdjDdJJ-b", + "hasOldPasswordHash": false, + "_id": "5d1363adf599d850df93175e", + "phoneNumbers": [ + { + "active": true, + "primary": true, + "verified": true, + "countryCode": 91, + "phone": "9999999999" + } + ], + "firstName": "Nikhil", + "lastName": "Manapure", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "niktest@xyz.com" + } + ], + "username": "niktest_xyz_com_38425_20500281", + "createdAt": "2019-01-01T17:22:38.528Z", + "updatedAt": "2021-01-22T10:02:42.258Z", + "uid": "20500281", + "__v": 56 + }, + "tags": [ + "some-title" + ], + "_id": "6012f38557751ee8fc162cf7", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "88.0.4324.96" + }, + "os": { + "name": "macOS", + "version": "10.15.7", + "versionName": "Catalina" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "source": "sales_channel", + "created_by": { + "id": "5d1363adf599d850df93175e", + "user": { + "gender": "male", + "accountType": "user", + "active": true, + "profilePicUrl": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=2136700473091190&height=400&width=400&ext=1554542761&hash=AeS6cuWIdjDdJJ-b", + "hasOldPasswordHash": false, + "_id": "5d1363adf599d850df93175e", + "phoneNumbers": [ + { + "active": true, + "primary": true, + "verified": true, + "countryCode": 91, + "phone": "9999999999" + } + ], + "firstName": "Nikhil", + "lastName": "Manapure", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "niktest@xyz.com" + } + ], + "username": "niktest_xyz_com_38425_20500281", + "createdAt": "2019-01-01T17:22:38.528Z", + "updatedAt": "2021-01-22T10:02:42.258Z", + "uid": "20500281", + "__v": 56 + } + }, + "response_id": "6012f38457751e0fb8162cf6", + "category": { + "form": { + "login_required": false, + "should_notify": false, + "inputs": [ + { + "required": false, + "type": "text", + "enum": [], + "display": "Single lineeee", + "key": "single-lineeee", + "showRegexInput": false + }, + { + "required": false, + "type": "email", + "enum": [], + "display": "Email", + "regex": "\\S+@\\S+\\.\\S+", + "key": "email", + "showRegexInput": true + }, + { + "required": false, + "type": "text", + "enum": [], + "display": "dfsdf", + "key": "dfsdf", + "showRegexInput": false + } + ], + "available_assignees": [ + "5b9b98150df588546aaea6d2", + "5c45d78395d7504f76c2cb37" + ], + "_id": "5fd72db3dc250f8decfc61b2", + "title": "SOme title", + "description": "SOme big description", + "slug": "some-title", + "application_id": "000000000000000000000003", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "87.0.4280.88" + }, + "os": { + "name": "macOS", + "version": "10.15.6", + "versionName": "Catalina" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "created_by": "5d1363adf599d850df93175e", + "createdAt": "2020-12-14T09:17:39.953Z", + "updatedAt": "2021-01-28T18:48:07.717Z", + "__v": 0 + }, + "key": "some-title", + "display": "SOme title" + }, + "ticket_id": "43", + "createdAt": "2021-01-28T17:25:25.013Z", + "updatedAt": "2021-01-28T17:25:33.396Z", + "__v": 0, + "video_room_id": "6012f38557751ee8fc162cf7" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### editTicket +Edits ticket details of a partner level ticket + + + +```javascript +// Promise +const promise = partnerClient.lead.editTicket({ organizationId : value, + id : value, + body : value }); + +// Async/Await +const data = await partnerClient.lead.editTicket({ organizationId : value, + id : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Partner ID for ticket | +| id | string | yes | Ticket ID of ticket to be edited | +| body | [EditTicketPayload](#EditTicketPayload) | yes | Request body | + + +Edits ticket details of a partner level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes + +*Returned Response:* + + + + +[Ticket](#Ticket) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": { + "context": { + "partner_id": "1" + }, + "content": { + "title": "SOme title Response", + "description": "Handles communication between Administrator", + "attachments": [] + }, + "status": { + "display": "In Progress", + "color": "#ffa951", + "key": "in_progress" + }, + "priority": { + "display": "Medium", + "color": "#f37736", + "key": "medium" + }, + "assigned_to": { + "agent_id": "5d1363adf599d850df93175e", + "gender": "male", + "accountType": "user", + "active": true, + "profilePicUrl": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=2136700473091190&height=400&width=400&ext=1554542761&hash=AeS6cuWIdjDdJJ-b", + "hasOldPasswordHash": false, + "_id": "5d1363adf599d850df93175e", + "phoneNumbers": [ + { + "active": true, + "primary": true, + "verified": true, + "countryCode": 91, + "phone": "9999999999" + } + ], + "firstName": "Nikhil", + "lastName": "Manapure", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "niktest@xyz.com" + } + ], + "username": "niktest_xyz_com_38425_20500281", + "createdAt": "2019-01-01T17:22:38.528Z", + "updatedAt": "2021-01-22T10:02:42.258Z", + "uid": "20500281", + "__v": 56 + }, + "tags": [ + "some-title" + ], + "_id": "6012f38557751ee8fc162cf7", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "88.0.4324.96" + }, + "os": { + "name": "macOS", + "version": "10.15.7", + "versionName": "Catalina" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "source": "sales_channel", + "created_by": { + "id": "5d1363adf599d850df93175e", + "user": { + "gender": "male", + "accountType": "user", + "active": true, + "profilePicUrl": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=2136700473091190&height=400&width=400&ext=1554542761&hash=AeS6cuWIdjDdJJ-b", + "hasOldPasswordHash": false, + "_id": "5d1363adf599d850df93175e", + "phoneNumbers": [ + { + "active": true, + "primary": true, + "verified": true, + "countryCode": 91, + "phone": "9999999999" + } + ], + "firstName": "Nikhil", + "lastName": "Manapure", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "niktest@xyz.com" + } + ], + "username": "niktest_xyz_com_38425_20500281", + "createdAt": "2019-01-01T17:22:38.528Z", + "updatedAt": "2021-01-22T10:02:42.258Z", + "uid": "20500281", + "__v": 56 + } + }, + "response_id": "6012f38457751e0fb8162cf6", + "category": { + "form": { + "login_required": false, + "should_notify": false, + "inputs": [ + { + "required": false, + "type": "text", + "enum": [], + "display": "Single lineeee", + "key": "single-lineeee", + "showRegexInput": false + }, + { + "required": false, + "type": "email", + "enum": [], + "display": "Email", + "regex": "\\S+@\\S+\\.\\S+", + "key": "email", + "showRegexInput": true + }, + { + "required": false, + "type": "text", + "enum": [], + "display": "dfsdf", + "key": "dfsdf", + "showRegexInput": false + } + ], + "available_assignees": [ + "5b9b98150df588546aaea6d2", + "5c45d78395d7504f76c2cb37" + ], + "_id": "5fd72db3dc250f8decfc61b2", + "title": "SOme title", + "description": "SOme big description", + "slug": "some-title", + "application_id": "000000000000000000000003", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "87.0.4280.88" + }, + "os": { + "name": "macOS", + "version": "10.15.6", + "versionName": "Catalina" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "created_by": "5d1363adf599d850df93175e", + "createdAt": "2020-12-14T09:17:39.953Z", + "updatedAt": "2021-01-28T18:48:07.717Z", + "__v": 0 + }, + "key": "some-title", + "display": "SOme title" + }, + "ticket_id": "43", + "createdAt": "2021-01-28T17:25:25.013Z", + "updatedAt": "2021-01-28T17:25:33.396Z", + "__v": 0, + "video_room_id": "6012f38557751ee8fc162cf7" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getGeneralConfig +Get general support configuration. + + + +```javascript +// Promise +const promise = partnerClient.lead.getGeneralConfig({ organizationId : value }); + +// Async/Await +const data = await partnerClient.lead.getGeneralConfig({ organizationId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Partner ID for which the data will be returned | + + + +Get general support configuration. + +*Returned Response:* + + + + +[GeneralConfigResponse](#GeneralConfigResponse) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": { + "_id": "64ca1aabae093a451d54817d", + "support_communication": [ + { + "type": "link", + "title": "testLink", + "value": "http://invalid.in", + "description": "invalid link in value", + "enabled": true + }, + { + "type": "phone_number", + "title": "update mobile no test", + "value": { + "code": "91", + "number": "7848845538", + "iso": "IN" + }, + "description": "dadskjfd", + "enabled": true + }, + { + "type": "email", + "title": "dfdafdsa", + "value": "asdfad@kdfkd.coj", + "description": "asdfadsf", + "enabled": true + }, + { + "type": "email", + "title": "testanu", + "value": "anushkakamat@gofynd.com", + "description": "tesr", + "enabled": true + } + ], + "show_communication_info": true, + "type": "partner", + "integration": { + "type": "default" + }, + "available_integration": [ + "default", + "freshdesk" + ], + "enable_dris": true + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getTicket +Retreives ticket details of a partner level ticket with ticket ID + + + +```javascript +// Promise +const promise = partnerClient.lead.getTicket({ organizationId : value, + id : value }); + +// Async/Await +const data = await partnerClient.lead.getTicket({ organizationId : value, + id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Partner ID for which the data will be returned | +| id | string | yes | Tiket ID of the ticket to be fetched | + + + +Retreives ticket details of a partner level ticket + +*Returned Response:* + + + + +[Ticket](#Ticket) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": { + "context": { + "partner_id": "1" + }, + "content": { + "title": "SOme title Response", + "description": "Handles communication between Administrator", + "attachments": [] + }, + "status": { + "display": "In Progress", + "color": "#ffa951", + "key": "in_progress" + }, + "priority": { + "display": "Medium", + "color": "#f37736", + "key": "medium" + }, + "assigned_to": { + "agent_id": "5d1363adf599d850df93175e", + "gender": "male", + "accountType": "user", + "active": true, + "profilePicUrl": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=2136700473091190&height=400&width=400&ext=1554542761&hash=AeS6cuWIdjDdJJ-b", + "hasOldPasswordHash": false, + "_id": "5d1363adf599d850df93175e", + "phoneNumbers": [ + { + "active": true, + "primary": true, + "verified": true, + "countryCode": 91, + "phone": "9999999999" + } + ], + "firstName": "Nikhil", + "lastName": "Manapure", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "niktest@xyz.com" + } + ], + "username": "niktest_xyz_com_38425_20500281", + "createdAt": "2019-01-01T17:22:38.528Z", + "updatedAt": "2021-01-22T10:02:42.258Z", + "uid": "20500281", + "__v": 56 + }, + "tags": [ + "some-title" + ], + "_id": "6012f38557751ee8fc162cf7", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "88.0.4324.96" + }, + "os": { + "name": "macOS", + "version": "10.15.7", + "versionName": "Catalina" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "source": "sales_channel", + "created_by": { + "id": "5d1363adf599d850df93175e", + "user": { + "gender": "male", + "accountType": "user", + "active": true, + "profilePicUrl": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=2136700473091190&height=400&width=400&ext=1554542761&hash=AeS6cuWIdjDdJJ-b", + "hasOldPasswordHash": false, + "_id": "5d1363adf599d850df93175e", + "phoneNumbers": [ + { + "active": true, + "primary": true, + "verified": true, + "countryCode": 91, + "phone": "9999999999" + } + ], + "firstName": "Nikhil", + "lastName": "Manapure", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "niktest@xyz.com" + } + ], + "username": "niktest_xyz_com_38425_20500281", + "createdAt": "2019-01-01T17:22:38.528Z", + "updatedAt": "2021-01-22T10:02:42.258Z", + "uid": "20500281", + "__v": 56 + } + }, + "response_id": "6012f38457751e0fb8162cf6", + "category": { + "form": { + "login_required": false, + "should_notify": false, + "inputs": [ + { + "required": false, + "type": "text", + "enum": [], + "display": "Single lineeee", + "key": "single-lineeee", + "showRegexInput": false + }, + { + "required": false, + "type": "email", + "enum": [], + "display": "Email", + "regex": "\\S+@\\S+\\.\\S+", + "key": "email", + "showRegexInput": true + }, + { + "required": false, + "type": "text", + "enum": [], + "display": "dfsdf", + "key": "dfsdf", + "showRegexInput": false + } + ], + "available_assignees": [ + "5b9b98150df588546aaea6d2", + "5c45d78395d7504f76c2cb37" + ], + "_id": "5fd72db3dc250f8decfc61b2", + "title": "SOme title", + "description": "SOme big description", + "slug": "some-title", + "application_id": "000000000000000000000003", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "87.0.4280.88" + }, + "os": { + "name": "macOS", + "version": "10.15.6", + "versionName": "Catalina" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "created_by": "5d1363adf599d850df93175e", + "createdAt": "2020-12-14T09:17:39.953Z", + "updatedAt": "2021-01-28T18:48:07.717Z", + "__v": 0 + }, + "key": "some-title", + "display": "SOme title" + }, + "ticket_id": "43", + "createdAt": "2021-01-28T17:25:25.013Z", + "updatedAt": "2021-01-28T17:25:33.396Z", + "__v": 0, + "video_room_id": "6012f38557751ee8fc162cf7" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getTicketHistory +Gets history list for specific partner level ticket + + + +```javascript +// Promise +const promise = partnerClient.lead.getTicketHistory({ organizationId : value, + id : value }); + +// Async/Await +const data = await partnerClient.lead.getTicketHistory({ organizationId : value, + id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Partner ID for ticket | +| id | string | yes | Ticket ID for which history is to be fetched | + + + +Gets history list for specific partner level ticket, this history is seen on ticket detail page, this can be comment, log or rating. + +*Returned Response:* + + + + +[TicketHistoryList](#TicketHistoryList) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": { + "docs": [ + { + "_id": "602e5384204225eed5cadae7", + "ticket_id": "41", + "type": "comment", + "value": { + "text": "hello service", + "media": [] + }, + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "88.0.4324.150" + }, + "os": { + "name": "macOS", + "version": "11.2.0" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "created_by": { + "gender": "male", + "accountType": "user", + "active": true, + "profilePicUrl": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/partners/pictures/free/original/--unnamed--/banner.jpeg", + "hasOldPasswordHash": false, + "_id": "5f8147abbd1a0a870f61f1a6", + "phoneNumbers": [ + { + "active": true, + "primary": true, + "verified": true, + "phone": "9999999999", + "countryCode": 91 + } + ], + "firstName": "Satyen", + "lastName": "Maurya", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "sattest@xyz.com" + } + ], + "username": "sat5_xyz_com_11118", + "createdAt": "2020-10-10T05:33:31.119Z", + "updatedAt": "2020-10-10T05:33:31.119Z", + "uid": "5678", + "__v": 0 + }, + "createdAt": "2021-02-18T11:46:12.522Z", + "updatedAt": "2021-02-18T11:46:12.522Z", + "__v": 0, + "id": "602e5384204225eed5cadae7" + }, + { + "_id": "60372aa78a046d4d79c46e15", + "ticket_id": "41", + "type": "diff", + "value": { + "status": [ + "pending", + "in_progress" + ] + }, + "created_by": { + "gender": "male", + "accountType": "user", + "active": true, + "profilePicUrl": "https://d2co8r51m5ca2d.cloudfront.net/inapp_banners/default_profile_img.png", + "hasOldPasswordHash": false, + "_id": "5e79e721768c6bf54b783146", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "niktest@xyz.com" + }, + { + "active": true, + "primary": false, + "verified": true, + "email": "xyz@xyz.com" + }, + { + "active": true, + "primary": false, + "verified": true, + "email": "xyz@xyz.com" + }, + { + "active": true, + "primary": false, + "verified": true, + "email": "xyz@xyz.com" + } + ], + "phoneNumbers": [ + { + "active": true, + "primary": true, + "verified": true, + "countryCode": 91, + "phone": "9999999999" + } + ], + "firstName": "Nikhil", + "lastName": "Manapure", + "username": "xyz_xyz_com", + "createdAt": "2020-03-24T10:55:29.298Z", + "updatedAt": "2020-05-12T07:46:41.816Z", + "uid": "5567", + "__v": 2 + }, + "createdAt": "2021-02-25T04:42:15.225Z", + "updatedAt": "2021-02-25T04:42:15.225Z", + "__v": 0, + "id": "60372aa78a046d4d79c46e15" + } + ], + "total": 2, + "limit": 100, + "page": { + "type": "" + }, + "pages": 1 + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getTickets +Gets the list of partner level tickets and/or ticket filters depending on query params + + + +```javascript +// Promise +const promise = partnerClient.lead.getTickets({ organizationId : value, + items : value, + filters : value, + q : value, + status : value, + priority : value, + category : value, + pageNo : value, + pageSize : value }); + +// Async/Await +const data = await partnerClient.lead.getTickets({ organizationId : value, + items : value, + filters : value, + q : value, + status : value, + priority : value, + category : value, + pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Partner ID for which the data will be returned | +| items | boolean | no | Decides that the reponse will contain the list of tickets | +| filters | boolean | no | Decides that the reponse will contain the ticket filters | +| q | string | no | Search through ticket titles and description | +| status | string | no | Filter tickets on status | +| priority | PriorityEnum | no | Filter tickets on priority | +| category | string | no | Filter tickets on category | +| pageNo | number | no | The page number to navigate through the given set of results. | +| pageSize | number | no | Number of items to retrieve in each page. Default is 12. | + + + +Gets the list of partner level tickets and/or ticket filters + +*Returned Response:* + + + + +[TicketList](#TicketList) + +Success + + + + +
+  Examples: + + +
+  Without items + +```json +{ + "value": { + "filters": { + "statuses": [ + { + "display": "Pending", + "color": "#eae22b", + "key": "pending" + }, + { + "display": "In Progress", + "color": "#ffa951", + "key": "in_progress" + }, + { + "display": "Resolved", + "color": "#20c3a6", + "key": "resolved" + }, + { + "display": "Closed", + "color": "#41434c", + "key": "closed" + } + ], + "priorities": [ + { + "display": "Low", + "color": "#fed766", + "key": "low" + }, + { + "display": "Medium", + "color": "#f37736", + "key": "medium" + }, + { + "display": "High", + "color": "#fe4a49", + "key": "high" + } + ], + "assignees": [], + "categories": [ + { + "form": { + "login_required": false, + "should_notify": false, + "inputs": [ + { + "type": "email", + "showRegexInput": false, + "enum": [], + "regex": "\\S+@\\S+\\.\\S+", + "display": "email", + "required": true, + "key": "email" + } + ], + "available_assignees": [], + "_id": "602e900a2042255c03cadaf0", + "title": "service-test-satyen", + "description": "testing form from service", + "slug": "service-test-satyen", + "header_image": "https://hdn-1.addsale.com/x0/support-ticket/files/free/original/KZL86aN5l-service-test-satyen.jpeg", + "application_id": "000000000000000000000001", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "88.0.4324.150" + }, + "os": { + "name": "macOS", + "version": "11.2.0" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "created_by": "5f8147abbd1a0a870f61f1a6", + "createdAt": "2021-02-18T16:04:26.495Z", + "updatedAt": "2021-02-18T16:04:26.495Z", + "__v": 0 + }, + "key": "service-test-satyen", + "display": "service-test-satyen" + } + ] + } + } +} +``` +
+ +
+  With items + +```json +{ + "value": { + "docs": [ + { + "_id": "602d2652ce284d0b008d5c97", + "status": { + "display": "Pending", + "color": "#eae22b", + "key": "pending" + }, + "priority": { + "display": "Medium", + "color": "#f37736", + "key": "medium" + }, + "assigned_to": { + "agent_id": "5e79e721768c6bf54b783146", + "gender": "male", + "accountType": "user", + "active": true, + "profilePicUrl": "https://d2co8r51m5ca2d.cloudfront.net/inapp_banners/default_profile_img.png", + "hasOldPasswordHash": false, + "_id": "5e79e721768c6bf54b783146", + "emails": [ + { + "active": true, + "primary": true, + "verified": true, + "email": "niktest@xyz.com" + }, + { + "active": true, + "primary": false, + "verified": true, + "email": "xyz@xyz.com" + }, + { + "active": true, + "primary": false, + "verified": true, + "email": "xyz@xyz.com" + }, + { + "active": true, + "primary": false, + "verified": true, + "email": "xyz@xyz.com" + } + ], + "phoneNumbers": [ + { + "active": true, + "primary": true, + "verified": true, + "countryCode": 91, + "phone": "9999999999" + } + ], + "firstName": "Nikhil", + "lastName": "Manapure", + "username": "xyz_xyz_com", + "createdAt": "2020-03-24T10:55:29.298Z", + "updatedAt": "2020-05-12T07:46:41.816Z", + "uid": "5567", + "__v": 2 + }, + "tags": [ + "asdf444" + ], + "context": { + "application_id": "000000000000000000000001", + "partner_id": "1" + }, + "created_on": { + "user_agent": "Fynd Platform/0.0.1 (com.fynd.platform; build:3; iOS 14.2.0) Alamofire/5.0.2", + "platform": "web", + "meta": { + "browser": { + "name": "Fynd Platform", + "version": "0.0.1" + } + } + }, + "source": "sales_channel", + "content": { + "title": "asdf444 Response", + "description": "", + "attachments": [] + }, + "response_id": "602d2652ce284dee3c8d5c96", + "category": { + "form": { + "login_required": false, + "should_notify": true, + "inputs": [ + { + "type": "text", + "showRegexInput": false, + "enum": [], + "display": "asdf", + "key": "asdf" + }, + { + "type": "mobile", + "showRegexInput": false, + "enum": [], + "display": "mob num", + "regex": "[0-9]{10}$", + "key": "mob-num" + } + ], + "available_assignees": [ + "5e79e721768c6bf54b783146" + ], + "_id": "60124e4a4d2bc363625e1bf4", + "title": "asdf444", + "description": "adf", + "slug": "asdf444", + "application_id": "000000000000000000000001", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "88.0.4324.96" + }, + "os": { + "name": "macOS", + "version": "10.15.7", + "versionName": "Catalina" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "created_by": "5e79e721768c6bf54b783146", + "createdAt": "2021-01-28T05:40:26.271Z", + "updatedAt": "2021-02-18T16:02:32.086Z", + "__v": 0, + "poll_for_assignment": { + "duration": 20, + "message": "We are looking for executive to connect you", + "success_message": "Executive found", + "failure_message": "All our executives are busy at the moment, We have accepted your request and someone will connect with you soon!" + } + }, + "key": "asdf444", + "display": "asdf444" + }, + "ticket_id": "472", + "createdAt": "2021-02-17T14:21:06.774Z", + "updatedAt": "2021-02-17T14:21:06.774Z", + "__v": 0, + "id": "602d2652ce284d0b008d5c97" + } + ], + "total": 472, + "limit": 10, + "page": 1, + "pages": 48, + "filters": { + "statuses": [ + { + "display": "Pending", + "color": "#eae22b", + "key": "pending" + }, + { + "display": "In Progress", + "color": "#ffa951", + "key": "in_progress" + }, + { + "display": "Resolved", + "color": "#20c3a6", + "key": "resolved" + }, + { + "display": "Closed", + "color": "#41434c", + "key": "closed" + } + ], + "priorities": [ + { + "display": "Low", + "color": "#fed766", + "key": "low" + }, + { + "display": "Medium", + "color": "#f37736", + "key": "medium" + }, + { + "display": "High", + "color": "#fe4a49", + "key": "high" + } + ], + "assignees": [], + "categories": [ + { + "form": { + "login_required": false, + "should_notify": false, + "inputs": [ + { + "type": "email", + "showRegexInput": false, + "enum": [], + "regex": "\\S+@\\S+\\.\\S+", + "display": "email", + "required": true, + "key": "email" + } + ], + "available_assignees": [], + "_id": "602e900a2042255c03cadaf0", + "title": "service-test-satyen", + "description": "testing form from service", + "slug": "service-test-satyen", + "header_image": "https://hdn-1.addsale.com/x0/support-ticket/files/free/original/KZL86aN5l-service-test-satyen.jpeg", + "application_id": "000000000000000000000001", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "88.0.4324.150" + }, + "os": { + "name": "macOS", + "version": "11.2.0" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "created_by": "5f8147abbd1a0a870f61f1a6", + "createdAt": "2021-02-18T16:04:26.495Z", + "updatedAt": "2021-02-18T16:04:26.495Z", + "__v": 0 + }, + "key": "service-test-satyen", + "display": "service-test-satyen" + } + ] + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getTokenForVideoRoom +Get Token to join a specific Video Room using it's unqiue name + + + +```javascript +// Promise +const promise = partnerClient.lead.getTokenForVideoRoom({ organizationId : value, + uniqueName : value }); + +// Async/Await +const data = await partnerClient.lead.getTokenForVideoRoom({ organizationId : value, + uniqueName : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Partner Id for video room | +| uniqueName | string | yes | Unique name of video room | + + + +Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. + +*Returned Response:* + + + + +[GetTokenForVideoRoomResponse](#GetTokenForVideoRoomResponse) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": { + "access_token": "your_token_to_the_room" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getVideoParticipants +Get participants of a specific Video Room using it's unique name + + + +```javascript +// Promise +const promise = partnerClient.lead.getVideoParticipants({ organizationId : value, + uniqueName : value }); + +// Async/Await +const data = await partnerClient.lead.getVideoParticipants({ organizationId : value, + uniqueName : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Partner Id for video room | +| uniqueName | string | yes | Unique name of Video Room | + + + +Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. + +*Returned Response:* + + + + +[GetParticipantsInsideVideoRoomResponse](#GetParticipantsInsideVideoRoomResponse) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": { + "participants": [] + } +} +``` +
+ +
+ + + + + + + + + +--- + + + + +### Schemas + + +#### [AddTicketPayload](#AddTicketPayload) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _custom_json | string? | yes | optional custom data that needs to be sent | + | category | string | no | Category of the ticket | + | content | [TicketContent](#TicketContent) | no | | + | created_by | string? | yes | Creator of the ticket | + | priority | [PriorityEnum](#PriorityEnum)? | yes | | + | status | string? | yes | Status of the ticket | + + +--- + +#### [AgentChangePayload](#AgentChangePayload) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | agent_id | string | no | Agent's unique ID | + + +--- + +#### [CloseVideoRoomResponse](#CloseVideoRoomResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | success | boolean | no | Denotes if operation was successfully | + + +--- + +#### [CreateCustomFormPayload](#CreateCustomFormPayload) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | description | string? | yes | Description of the form | + | header_image | string? | yes | Header image that is to be shown for the form | + | inputs | [string] | no | List of all the form components | + | poll_for_assignment | [PollForAssignment](#PollForAssignment)? | yes | | + | priority | [PriorityEnum](#PriorityEnum) | no | | + | should_notify | boolean? | yes | Indicates if staff should be notified when a response is received | + | slug | string | no | Slug for the form | + | success_message | string? | yes | Success message that will be shown on submission | + | title | string | no | Title for the form | + + +--- + +#### [CreatedOn](#CreatedOn) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | user_agent | string | no | Useragent details | + + +--- + +#### [CreateVideoRoomPayload](#CreateVideoRoomPayload) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | notify | [[NotifyUser](#NotifyUser)]? | yes | List of people to be notified | + | unique_name | string | no | Ticket id | + + +--- + +#### [CreateVideoRoomResponse](#CreateVideoRoomResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | unique_name | string | no | Video Room's unique name | + + +--- + +#### [CustomForm](#CustomForm) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string | no | Unique identifier for the form | + | application_id | string | no | Application ID for form | + | created_on | [CreatedOn](#CreatedOn)? | yes | | + | description | string? | yes | Form description that will be shown to the user | + | header_image | string? | yes | Form header image that will be shown to the user | + | inputs | [string] | no | List of all the form fields | + | login_required | boolean | no | Denotes if login is required to make a form response submission | + | poll_for_assignment | [PollForAssignment](#PollForAssignment)? | yes | | + | priority | [Priority](#Priority) | no | | + | should_notify | boolean | no | Denotes if new response submission for the form should be notified to the assignees | + | slug | string | no | Slug for the form, which is to be used for accessing the form | + | submit_button | [SubmitButton](#SubmitButton)? | yes | | + | success_message | string? | yes | Message that is to be shown on succesfull form response submission | + | title | string | no | Form title that will be shown to the user | + + +--- + +#### [CustomFormList](#CustomFormList) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[CustomForm](#CustomForm)]? | yes | List of forms | + | page | [Page](#Page)? | yes | | + + +--- + +#### [Debug](#Debug) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | platform | string? | yes | Platform of user | + | source | string? | yes | Source of user | + + +--- + +#### [EditCustomFormPayload](#EditCustomFormPayload) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | description | string? | yes | Description of the form | + | header_image | string? | yes | Header image that is to be shown for the form | + | inputs | [string] | no | List of all the form components | + | login_required | boolean? | yes | Denotes if login is required to make a form response submission | + | poll_for_assignment | [PollForAssignment](#PollForAssignment)? | yes | | + | priority | [PriorityEnum](#PriorityEnum) | no | | + | should_notify | boolean? | yes | Indicates if staff should be notified when a response is received | + | success_message | string? | yes | Success message that will be shown on submission | + | title | string | no | Title for the form | + + +--- + +#### [EditTicketPayload](#EditTicketPayload) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | assigned_to | [AgentChangePayload](#AgentChangePayload)? | yes | | + | category | string? | yes | Category assigned to the ticket | + | content | [TicketContent](#TicketContent)? | yes | | + | priority | [PriorityEnum](#PriorityEnum)? | yes | | + | source | string? | yes | Denotes if the ticket was created at partner or application level | + | status | string? | yes | Denotes in what state is the ticket | + | sub_category | string? | yes | Sub-category assigned to the ticket | + | tags | [string]? | yes | Tags relevant to ticket | + + +--- + +#### [Email](#Email) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | active | boolean? | yes | Denotes if the email is active | + | email | string? | yes | Email Address | + | primary | boolean? | yes | Denotes it's the primary email for the account | + | verified | boolean? | yes | Denotes it's a verified email | + + +--- + +#### [FeedbackForm](#FeedbackForm) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | inputs | string? | yes | Input details for the feed back form | + | timestamps | string? | yes | Gives details of category releted data | + | title | string? | yes | Title for the feed back form | + + +--- + +#### [FeedbackResponseItem](#FeedbackResponseItem) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display | string | no | Question/Title of the form field | + | key | string | no | Key of the form field | + | value | string | no | User response value for the form field | + + +--- + +#### [Filter](#Filter) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | assignees | [string] | no | List of support staff availble for tickets assignment | + | categories | [[TicketCategory](#TicketCategory)]? | yes | List of possible categories for tickets | + | priorities | [[Priority](#Priority)] | no | List of possible priorities for tickets | + | statuses | [[Status](#Status)] | no | List of possible statuses for tickets | + + +--- + +#### [GeneralConfigIntegrationSchema](#GeneralConfigIntegrationSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | type | string? | yes | | + + +--- + +#### [GeneralConfigResponse](#GeneralConfigResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | available_integration | [string]? | yes | | + | integration | [GeneralConfigIntegrationSchema](#GeneralConfigIntegrationSchema)? | yes | | + | support_communication | [[SupportCommunicationSchema](#SupportCommunicationSchema)]? | yes | | + | type | string? | yes | | + + +--- + +#### [GetParticipantsInsideVideoRoomResponse](#GetParticipantsInsideVideoRoomResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | participants | [[Participant](#Participant)] | no | List of participants of the video room | + + +--- + +#### [GetTokenForVideoRoomResponse](#GetTokenForVideoRoomResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | access_token | string | no | Access token to be used for video room | + + +--- + +#### [NotifyUser](#NotifyUser) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | country_code | string | no | Country code | + | phone_number | string | no | Phone number | + + +--- + +#### [Page](#Page) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | current | number? | yes | | + | has_next | boolean? | yes | | + | has_previous | boolean? | yes | | + | item_total | number? | yes | | + | next_id | string? | yes | | + | size | number? | yes | | + | type | string | no | | + + +--- + +#### [Participant](#Participant) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | identity | string? | yes | Unique identifier of participant | + | status | string? | yes | Status of participant | + | user | [UserSchema](#UserSchema)? | yes | | + + +--- + +#### [PhoneNumber](#PhoneNumber) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | active | boolean? | yes | Denotes if the phone number is active | + | country_code | number? | yes | Country code | + | phone | string? | yes | Phone number | + | primary | boolean? | yes | Denotes it's the primary phone number for the account | + | verified | boolean? | yes | Denotes it's a verified phone number | + + +--- + +#### [PollForAssignment](#PollForAssignment) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | duration | number | no | Duration for polling of staff | + | failure_message | string | no | Message if polling failed | + | message | string | no | Message for polling | + | success_message | string | no | Message for successful polling | + + +--- + +#### [Priority](#Priority) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | color | string | no | Color for priority | + | display | string | no | Display text for priority | + | key | [PriorityEnum](#PriorityEnum) | no | | + + +--- + +#### [Status](#Status) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | color | string | no | Color for status | + | display | string | no | Display text for status | + | key | string | no | Key for status | + + +--- + +#### [SubmitButton](#SubmitButton) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | background_color | string | no | Color for submit button | + | title | string | no | Title for submit button | + | title_color | string | no | Title color submit button | + + +--- + +#### [SupportCommunicationSchema](#SupportCommunicationSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | description | string? | yes | | + | enabled | boolean? | yes | | + | title | string? | yes | | + | type | string? | yes | | + | value | string? | yes | | + + +--- + +#### [Ticket](#Ticket) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _custom_json | string? | yes | custom json relevant to the ticket | + | _id | string | no | Unique identifier for the ticket | + | assigned_to | string? | yes | Details of support staff to whom ticket is assigned | + | category | [TicketCategory](#TicketCategory) | no | | + | content | [TicketContent](#TicketContent)? | yes | | + | context | [TicketContext](#TicketContext)? | yes | | + | created_at | string? | yes | Time when the ticket was created | + | created_by | string? | yes | User details of ticket creator | + | created_on | [CreatedOn](#CreatedOn)? | yes | | + | integration | string? | yes | Integration type and its details of the ticket | + | is_feedback_pending | boolean? | yes | Denotes if feedback submission is pending for the ticket | + | priority | [Priority](#Priority) | no | | + | response_id | string? | yes | Details of partner and application realated to the ticket | + | source | [TicketSourceEnum](#TicketSourceEnum) | no | | + | status | [Status](#Status) | no | | + | sub_category | string? | yes | Sub-category assigned to the ticket | + | tags | [string]? | yes | Tags relevant to ticket | + | updated_at | string? | yes | Time when the ticket was last updated | + + +--- + +#### [TicketAsset](#TicketAsset) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display | string? | yes | Display text for asset | + | type | [TicketAssetTypeEnum](#TicketAssetTypeEnum) | no | | + | value | string | no | To be used for details | + + +--- + +#### [TicketCategory](#TicketCategory) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display | string | no | Category display value identifier | + | feedback_form | [FeedbackForm](#FeedbackForm)? | yes | | + | group_id | number? | yes | Group id of category releted data | + | key | string | no | Category key value identifier | + | sub_categories | [TicketCategory](#TicketCategory)? | yes | | + + +--- + +#### [TicketContent](#TicketContent) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | attachments | [[TicketAsset](#TicketAsset)]? | yes | List of all attachments related to the ticket | + | description | string? | yes | Long description of issue | + | title | string | no | Title for ticket | + + +--- + +#### [TicketContext](#TicketContext) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | application_id | string? | yes | Application ID related to the ticket | + | partner_id | string | no | Partner ID related to the ticket | + + +--- + +#### [TicketFeedback](#TicketFeedback) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string | no | Unique identifier for the feedback | + | category | string? | yes | Category of the ticket | + | created_at | string? | yes | Time when the feedback was created | + | partner_id | string | no | Partner id for which ticket was raised | + | response | [[FeedbackResponseItem](#FeedbackResponseItem)] | no | | + | ticket_id | string | no | Readable ticket number | + | updated_at | string? | yes | Time when the feedback was last updated | + | user | string? | yes | User who submitted the feedback | + + +--- + +#### [TicketFeedbackList](#TicketFeedbackList) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[TicketFeedback](#TicketFeedback)]? | yes | List of all ticket feedback for the ticket | + + +--- + +#### [TicketFeedbackPayload](#TicketFeedbackPayload) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | form_response | string? | yes | Key-value pairs of all the form fields and their response | + + +--- + +#### [TicketHistory](#TicketHistory) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string | no | Unique identifier of the history event | + | created_at | string? | yes | Time of creation of the history event | + | created_by | string? | yes | User who created the history event | + | created_on | [CreatedOn](#CreatedOn)? | yes | | + | ticket_id | string | no | Readable ticket number | + | type | string | no | Type of the history event | + | updated_at | string? | yes | Time of last update of the history event | + | value | string | no | Data of the history event | + + +--- + +#### [TicketHistoryList](#TicketHistoryList) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[TicketHistory](#TicketHistory)]? | yes | List of ticket history | + | page | [Page](#Page)? | yes | | + + +--- + +#### [TicketHistoryPayload](#TicketHistoryPayload) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | type | [HistoryTypeEnum](#HistoryTypeEnum) | no | | + | value | string | no | Details of history event | + + +--- + +#### [TicketList](#TicketList) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | filters | [Filter](#Filter)? | yes | | + | items | [[Ticket](#Ticket)]? | yes | List of tickets | + | page | [Page](#Page)? | yes | | + + +--- + +#### [UserSchema](#UserSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | Unique identifier of user | + | account_type | string? | yes | Type of account | + | active | boolean? | yes | Is account active | + | created_at | string? | yes | Time of user creation | + | debug | [Debug](#Debug)? | yes | | + | emails | [[Email](#Email)]? | yes | List of email addresses | + | first_name | string? | yes | First name | + | gender | string? | yes | Gender of user | + | has_old_password_hash | boolean? | yes | Denotes if user has old password hash | + | last_name | string? | yes | Last name | + | phone_numbers | [[PhoneNumber](#PhoneNumber)]? | yes | List of phone numbers | + | profile_pic_url | string? | yes | URL for profile pic | + | uid | string? | yes | Unique identifier of user | + | updated_at | string? | yes | Last time of user details update | + | username | string? | yes | username of user | + + +--- + + + + +### Enums + + + + + + #### [PriorityEnum](#PriorityEnum) + Type : string + + | Name | Value | Description | + | ---- | ----- | ----------- | + | low | low | This means ticket is low priority | + | medium | medium | This means ticket is medium priority | + | high | high | This means ticket is high priority | + | urgent | urgent | This means ticket is of urgent priority | + +--- + + + + #### [HistoryTypeEnum](#HistoryTypeEnum) + Type : string + + | Name | Value | Description | + | ---- | ----- | ----------- | + | rating | rating | This means history event is a rating | + | log | log | This means history event is a changelog | + | comment | comment | This means history event is a comment | + +--- + + + + #### [TicketAssetTypeEnum](#TicketAssetTypeEnum) + Type : string + + | Name | Value | Description | + | ---- | ----- | ----------- | + | image | image | Denotes asset is of image type | + | video | video | Denotes asset is of video type | + | file | file | Denotes asset is of file type | + | youtube | youtube | Denotes asset is an youtube link | + | product | product | Denotes asset is of product type | + | collection | collection | Denotes asset is of collection type | + | brand | brand | Denotes asset is of brand type | + | shipment | shipment | Denotes asset is of shipment type | + | order | order | Denotes asset is of order type | + +--- + + + + #### [TicketSourceEnum](#TicketSourceEnum) + Type : string + + | Name | Value | Description | + | ---- | ----- | ----------- | + | platformPanel | platform_panel | This means it is partner level ticket | + | salesChannel | sales_channel | This means it is a application/sales channel level ticket | + +--- + + + + + + diff --git a/documentation/partner/LOGISTICS.md b/documentation/partner/LOGISTICS.md new file mode 100644 index 000000000..13fe716ee --- /dev/null +++ b/documentation/partner/LOGISTICS.md @@ -0,0 +1,1317 @@ + + + + + +##### [Back to Partner docs](./README.md) + +## Logistics Methods +Serviceability API's + + +Default +* [bulkServiceability](#bulkserviceability) +* [bulkTat](#bulktat) +* [createCourierPartnerAccount](#createcourierpartneraccount) +* [createCourierPartnerScheme](#createcourierpartnerscheme) +* [getBulkServiceability](#getbulkserviceability) +* [getBulkTat](#getbulktat) +* [getCountries](#getcountries) +* [getCourierPartnerAccount](#getcourierpartneraccount) +* [getCourierPartnerAccounts](#getcourierpartneraccounts) +* [getSampleFileServiceabilityStatus](#getsamplefileserviceabilitystatus) +* [sampleFileServiceability](#samplefileserviceability) +* [updateCourierPartnerAccount](#updatecourierpartneraccount) +* [updateCourierPartnerScheme](#updatecourierpartnerscheme) + + + + +## Methods with example and description + + + + + +### bulkServiceability +Serviceability Import or Export + + + +```javascript +// Promise +const promise = partnerClient.logistics.bulkServiceability({ organizationId : value, + extensionId : value, + schemeId : value, + body : value }); + +// Async/Await +const data = await partnerClient.logistics.bulkServiceability({ organizationId : value, + extensionId : value, + schemeId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| body | [BulkRegionJobSerializer](#BulkRegionJobSerializer) | yes | Request body | + + +Serviceability Import or Export + +*Returned Response:* + + + + +[BulkRegionResponseItemData](#BulkRegionResponseItemData) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### bulkTat +Region TAT Import or Export + + + +```javascript +// Promise +const promise = partnerClient.logistics.bulkTat({ organizationId : value, + extensionId : value, + schemeId : value, + body : value }); + +// Async/Await +const data = await partnerClient.logistics.bulkTat({ organizationId : value, + extensionId : value, + schemeId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| body | [BulkRegionJobSerializer](#BulkRegionJobSerializer) | yes | Request body | + + +Region TAT Import or Export + +*Returned Response:* + + + + +[BulkRegionResponseItemData](#BulkRegionResponseItemData) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### createCourierPartnerAccount +Creation of Courier Account + + + +```javascript +// Promise +const promise = partnerClient.logistics.createCourierPartnerAccount({ organizationId : value, + body : value }); + +// Async/Await +const data = await partnerClient.logistics.createCourierPartnerAccount({ organizationId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| body | [CourierAccount](#CourierAccount) | yes | Request body | + + +This API Creates a new Courier Account + +*Returned Response:* + + + + +[CourierAccount](#CourierAccount) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### createCourierPartnerScheme +Create Scheme for courier partner extension + + + +```javascript +// Promise +const promise = partnerClient.logistics.createCourierPartnerScheme({ organizationId : value, + body : value }); + +// Async/Await +const data = await partnerClient.logistics.createCourierPartnerScheme({ organizationId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| body | [CourierPartnerSchemeModel](#CourierPartnerSchemeModel) | yes | Request body | + + +Create Scheme for courier partner extension + +*Returned Response:* + + + + +[CourierPartnerSchemeModel](#CourierPartnerSchemeModel) + +Success Response Status + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getBulkServiceability +Get Region Serviceability Bulk History + + + +```javascript +// Promise +const promise = partnerClient.logistics.getBulkServiceability({ organizationId : value, + extensionId : value, + schemeId : value, + pageNo : value, + pageSize : value, + batchId : value, + action : value, + status : value, + country : value, + region : value, + startDate : value, + endDate : value }); + +// Async/Await +const data = await partnerClient.logistics.getBulkServiceability({ organizationId : value, + extensionId : value, + schemeId : value, + pageNo : value, + pageSize : value, + batchId : value, + action : value, + status : value, + country : value, + region : value, + startDate : value, + endDate : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| pageNo | number | no | index of the item to start returning with | +| pageSize | number | no | determines the items to be displayed in a page | +| batchId | string | no | Unique identifier of bulk job | +| action | string | no | import or export bulk type | +| status | string | no | Status of the bulk actions | +| country | string | no | Country for which bulk job is initiated | +| region | string | no | Region for which bulk job is initiated | +| startDate | string | no | Fetch job history after a particule date | +| endDate | string | no | Fetch job history before a particule date | + + + +Get Region Serviceability Bulk History + +*Returned Response:* + + + + +[BulkRegionResponse](#BulkRegionResponse) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getBulkTat +Get region tat bulk history + + + +```javascript +// Promise +const promise = partnerClient.logistics.getBulkTat({ organizationId : value, + extensionId : value, + schemeId : value, + pageNo : value, + pageSize : value, + batchId : value, + action : value, + status : value, + country : value, + region : value, + startDate : value, + endDate : value }); + +// Async/Await +const data = await partnerClient.logistics.getBulkTat({ organizationId : value, + extensionId : value, + schemeId : value, + pageNo : value, + pageSize : value, + batchId : value, + action : value, + status : value, + country : value, + region : value, + startDate : value, + endDate : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| pageNo | number | no | index of the item to start returning with | +| pageSize | number | no | determines the items to be displayed in a page | +| batchId | string | no | Unique identifier of bulk job | +| action | string | no | import or export bulk type | +| status | string | no | Status of the bulk actions | +| country | string | no | Country for which bulk job is initiated | +| region | string | no | Region for which bulk job is initiated | +| startDate | string | no | Fetch job history after a particule date | +| endDate | string | no | Fetch job history before a particule date | + + + +Get region tat bulk history + +*Returned Response:* + + + + +[BulkRegionResponse](#BulkRegionResponse) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getCountries +Get all countries and associated data. + + + +```javascript +// Promise +const promise = partnerClient.logistics.getCountries({ organizationId : value, + onboarding : value, + pageNo : value, + pageSize : value, + q : value }); + +// Async/Await +const data = await partnerClient.logistics.getCountries({ organizationId : value, + onboarding : value, + pageNo : value, + pageSize : value, + q : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| onboarding | boolean | no | Only fetch countries which allowed for onboard on Platform. | +| pageNo | number | no | page number. | +| pageSize | number | no | page size. | +| q | string | no | search. | + + + +Retrieve of all countries. + +*Returned Response:* + + + + +[GetCountries](#GetCountries) + +Successfully retrieved all countries with associated data. + + + + +
+  Examples: + + +
+  Country List 1 + +```json +{ + "value": { + "items": [ + { + "name": "INDIA", + "sub_type": "country", + "display_name": "India", + "uid": "64c6ac280000000000000000", + "iso2": "IN", + "iso3": "IND", + "timezones": [ + "Asia/Kolkata" + ], + "currency": "INR", + "phone_code": "+91", + "hierarchy": [ + { + "display_name": "State", + "slug": "state" + }, + { + "display_name": "City", + "slug": "city" + }, + { + "display_name": "Pincode", + "slug": "pincode" + } + ] + }, + { + "name": "UNITED STATES", + "sub_type": "country", + "uid": "66a931280000000000000000", + "iso2": "US", + "iso3": "USA", + "timezones": [ + "America/St_Johns", + "America/Halifax", + "America/Glace_Bay", + "America/Moncton", + "America/Goose_Bay", + "America/Blanc-Sablon", + "America/Toronto", + "America/Iqaluit", + "America/Atikokan", + "America/Winnipeg", + "America/Resolute", + "America/Rankin_Inlet", + "America/Regina", + "America/Swift_Current", + "America/Edmonton", + "America/Cambridge_Bay", + "America/Inuvik", + "America/Creston", + "America/Dawson_Creek", + "America/Fort_Nelson", + "America/Whitehorse", + "America/Dawson", + "America/Vancouver" + ], + "currency": "USD", + "phone_code": "+1", + "hierarchy": [ + { + "display_name": "State", + "slug": "state" + }, + { + "display_name": "City", + "slug": "city" + }, + { + "display_name": "Zipcode", + "slug": "pincode" + } + ] + } + ], + "page": { + "current": 1, + "has_next": true, + "has_previous": false, + "item_total": 2, + "size": 1, + "type": "number" + } + } +} +``` +
+ +
+  Country List 2 + +```json +{ + "value": { + "items": [ + { + "name": "United Arab Emirates", + "display_name": "United Arab Emirates", + "sub_type": "country", + "uid": "669ea5280000000000000000", + "iso2": "AE", + "iso3": "ARE", + "timezones": [ + "Asia/Dubai" + ], + "currency": "DIR", + "phone_code": "+971", + "hierarchy": [ + { + "display_name": "City", + "slug": "city" + }, + { + "display_name": "Area", + "slug": "sector" + } + ] + } + ], + "page": { + "current": 1, + "has_next": true, + "has_previous": false, + "item_total": 1, + "size": 1, + "type": "number" + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCourierPartnerAccount +Getting Courier Account of a company from database. + + + +```javascript +// Promise +const promise = partnerClient.logistics.getCourierPartnerAccount({ organizationId : value, + accountId : value }); + +// Async/Await +const data = await partnerClient.logistics.getCourierPartnerAccount({ organizationId : value, + accountId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| accountId | string | yes | Unique ID of courier account | + + + +This API returns response DpAccount of a company from mongo database. + +*Returned Response:* + + + + +[CourierAccountResponse](#CourierAccountResponse) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getCourierPartnerAccounts +Getting Courier Account list of a company. + + + +```javascript +// Promise +const promise = partnerClient.logistics.getCourierPartnerAccounts({ organizationId : value, + pageNo : value, + pageSize : value, + stage : value, + paymentMode : value, + transportType : value }); + +// Async/Await +const data = await partnerClient.logistics.getCourierPartnerAccounts({ organizationId : value, + pageNo : value, + pageSize : value, + stage : value, + paymentMode : value, + transportType : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| pageNo | number | no | index of the item to start returning with | +| pageSize | number | no | determines the items to be displayed in a page | +| stage | string | no | stage of the account. enabled/disabled | +| paymentMode | string | no | Filters dp accounts based on payment mode | +| transportType | string | no | Filters dp accounts based on transport_type | + + + +This API returns Courier Account of a company. + +*Returned Response:* + + + + +[CompanyCourierPartnerAccountListResponse](#CompanyCourierPartnerAccountListResponse) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getSampleFileServiceabilityStatus +Get Serviceability TAT sample files generator status + + + +```javascript +// Promise +const promise = partnerClient.logistics.getSampleFileServiceabilityStatus({ organizationId : value, + pageNo : value, + pageSize : value, + batchId : value }); + +// Async/Await +const data = await partnerClient.logistics.getSampleFileServiceabilityStatus({ organizationId : value, + pageNo : value, + pageSize : value, + batchId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| pageNo | number | no | index of the item to start returning with | +| pageSize | number | no | determines the items to be displayed in a page | +| batchId | string | no | Batch id of the execution | + + + +Get Serviceability TAT sample file generator status + +*Returned Response:* + + + + +[BulkRegionServiceabilityTatResponse](#BulkRegionServiceabilityTatResponse) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### sampleFileServiceability +Sample File Download + + + +```javascript +// Promise +const promise = partnerClient.logistics.sampleFileServiceability({ organizationId : value, + body : value }); + +// Async/Await +const data = await partnerClient.logistics.sampleFileServiceability({ organizationId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| body | [BulkRegionServiceabilityTatRequest](#BulkRegionServiceabilityTatRequest) | yes | Request body | + + +Sample File Download + +*Returned Response:* + + + + +[BulkRegionServiceabilityTatResponseItemData](#BulkRegionServiceabilityTatResponseItemData) + +Success Response Status + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### updateCourierPartnerAccount +Update Courier Account in database. + + + +```javascript +// Promise +const promise = partnerClient.logistics.updateCourierPartnerAccount({ organizationId : value, + accountId : value, + body : value }); + +// Async/Await +const data = await partnerClient.logistics.updateCourierPartnerAccount({ organizationId : value, + accountId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| accountId | string | yes | Unique ID of courier account | +| body | [CourierAccount](#CourierAccount) | yes | Request body | + + +Updates Courier Account + +*Returned Response:* + + + + +[CourierAccountResponse](#CourierAccountResponse) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### updateCourierPartnerScheme +Update Scheme for courier partner extension + + + +```javascript +// Promise +const promise = partnerClient.logistics.updateCourierPartnerScheme({ organizationId : value, + schemeId : value, + body : value }); + +// Async/Await +const data = await partnerClient.logistics.updateCourierPartnerScheme({ organizationId : value, + schemeId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Unique Identifier of Organization | +| schemeId | string | yes | Unique Identifier of Scheme | +| body | [CourierPartnerSchemeUpdateRequest](#CourierPartnerSchemeUpdateRequest) | yes | Request body | + + +Update Scheme for courier partner extension + +*Returned Response:* + + + + +[CourierPartnerSchemeUpdateRequest](#CourierPartnerSchemeUpdateRequest) + +Success Response Status + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + + + +### Schemas + + +#### [ArithmeticOperations](#ArithmeticOperations) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | gt | number? | yes | | + | gte | number? | yes | | + | lt | number? | yes | | + | lte | number? | yes | | + + +--- + +#### [BulkRegionJobSerializer](#BulkRegionJobSerializer) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action | string | no | | + | country | string | no | | + | file_path | string? | yes | | + | region | string | no | | + + +--- + +#### [BulkRegionResponse](#BulkRegionResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[BulkRegionResponseItemData](#BulkRegionResponseItemData)] | no | | + | page | [Page](#Page) | no | | + + +--- + +#### [BulkRegionResponseItemData](#BulkRegionResponseItemData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action | string | no | | + | batch_id | string | no | | + | country | string | no | | + | error_file_path | string? | yes | | + | failed | number? | yes | | + | failed_records | [string]? | yes | | + | file_path | string | no | | + | region | string | no | | + | status | string | no | | + | success | number? | yes | | + | total | number? | yes | | + + +--- + +#### [BulkRegionServiceabilityTatRequest](#BulkRegionServiceabilityTatRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | country | string | no | | + | region | string | no | | + | type | string | no | | + + +--- + +#### [BulkRegionServiceabilityTatResponse](#BulkRegionServiceabilityTatResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[BulkRegionServiceabilityTatResponseItemData](#BulkRegionServiceabilityTatResponseItemData)]? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [BulkRegionServiceabilityTatResponseItemData](#BulkRegionServiceabilityTatResponseItemData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | batch_id | string? | yes | | + | country | string? | yes | | + | failed_records | [string]? | yes | | + | file_path | string? | yes | | + | region | string? | yes | | + | status | string? | yes | | + | type | string? | yes | | + + +--- + +#### [CompanyCourierPartnerAccountListResponse](#CompanyCourierPartnerAccountListResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[CourierAccountResponse](#CourierAccountResponse)] | no | | + | page | [Page](#Page) | no | | + + +--- + +#### [CourierAccount](#CourierAccount) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | account_id | string | no | | + | extension_id | string | no | | + | is_own_account | boolean | no | | + | is_self_ship | boolean | no | | + | scheme_id | string | no | | + | stage | string | no | | + + +--- + +#### [CourierAccountResponse](#CourierAccountResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | account_id | string | no | | + | is_own_account | boolean | no | | + | is_self_ship | boolean | no | | + | scheme_id | string | no | | + | scheme_rules | [CourierPartnerSchemeModel](#CourierPartnerSchemeModel) | no | | + | stage | string | no | | + + +--- + +#### [CourierPartnerAccountFailureResponse](#CourierPartnerAccountFailureResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | error | [[ErrorResponse](#ErrorResponse)] | no | | + | success | boolean | no | | + + +--- + +#### [CourierPartnerSchemeFeatures](#CourierPartnerSchemeFeatures) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | cold_storage_goods | boolean? | yes | | + | dangerous_goods | boolean? | yes | | + | doorstep_exchange | boolean? | yes | | + | doorstep_qc | boolean? | yes | | + | doorstep_return | boolean? | yes | | + | ewaybill | boolean? | yes | | + | fragile_goods | boolean? | yes | | + | mps | boolean? | yes | | + | multi_pick_multi_drop | boolean? | yes | | + | multi_pick_single_drop | boolean? | yes | | + | ndr | boolean? | yes | | + | ndr_attempts | number? | yes | | + | openbox_delivery | boolean? | yes | | + | product_installation | boolean? | yes | | + | qr | boolean? | yes | | + | restricted_goods | boolean? | yes | | + | single_pick_multi_drop | boolean? | yes | | + | status_updates | string? | yes | | + + +--- + +#### [CourierPartnerSchemeModel](#CourierPartnerSchemeModel) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | delivery_type | string | no | | + | extension_id | string | no | | + | feature | [CourierPartnerSchemeFeatures](#CourierPartnerSchemeFeatures) | no | | + | name | string | no | | + | payment_mode | [string] | no | | + | region | string | no | | + | scheme_id | string | no | | + | stage | string | no | | + | transport_type | string | no | | + | weight | [ArithmeticOperations](#ArithmeticOperations) | no | | + + +--- + +#### [CourierPartnerSchemeUpdateRequest](#CourierPartnerSchemeUpdateRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | delivery_type | string | no | | + | feature | [CourierPartnerSchemeFeatures](#CourierPartnerSchemeFeatures) | no | | + | name | string | no | | + | payment_mode | [string] | no | | + | region | string | no | | + | stage | string | no | | + | transport_type | string | no | | + | weight | [ArithmeticOperations](#ArithmeticOperations) | no | | + + +--- + +#### [ErrorResponse](#ErrorResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string | no | | + | type | string | no | | + | value | string | no | | + + +--- + +#### [FailureResponse](#FailureResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | error | [[ErrorResponse](#ErrorResponse)] | no | | + | success | boolean | no | | + + +--- + +#### [GetCountries](#GetCountries) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[GetCountriesItems](#GetCountriesItems)] | no | | + | page | [Page](#Page) | no | | + + +--- + +#### [GetCountriesItems](#GetCountriesItems) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | currency | string? | yes | | + | display_name | string? | yes | | + | hierarchy | [[HierarchyItems](#HierarchyItems)]? | yes | | + | id | string? | yes | | + | iso2 | string? | yes | | + | iso3 | string? | yes | | + | latitude | string? | yes | | + | longitude | string? | yes | | + | name | string? | yes | | + | phone_code | string? | yes | | + | timezones | [string]? | yes | | + | type | string? | yes | | + + +--- + +#### [HierarchyItems](#HierarchyItems) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display_name | string? | yes | | + | slug | string? | yes | | + + +--- + +#### [Page](#Page) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | current | number? | yes | Current page number | + | has_next | boolean? | yes | Next page available | + | has_previous | boolean? | yes | Previous page available | + | item_total | number? | yes | total records | + | size | number? | yes | Current page size | + + +--- + + + + diff --git a/documentation/partner/README.md b/documentation/partner/README.md index 14b4b0d09..26881d6f6 100644 --- a/documentation/partner/README.md +++ b/documentation/partner/README.md @@ -5,4 +5,7 @@ * [FileStorage](FILESTORAGE.md) - This service provides functionality to manage assets and generate pdf. You can upload the assets, get the cdn link for the assets, proxy the assets and many more things. -* [Theme](THEME.md) - Responsible for partner theme submission \ No newline at end of file +* [Lead](LEAD.md) - Handles communication between Administrator +* [Logistics](LOGISTICS.md) - Serviceability API's +* [Theme](THEME.md) - Responsible for partner theme submission +* [Webhook](WEBHOOK.md) - Webhook dispatcher with retry and one event to many subscriber vice versa \ No newline at end of file diff --git a/documentation/partner/THEME.md b/documentation/partner/THEME.md index 6cffd3e55..1173d2c0c 100644 --- a/documentation/partner/THEME.md +++ b/documentation/partner/THEME.md @@ -12,6 +12,7 @@ Responsible for partner theme submission Default * [createNewThemeInOrganization](#createnewthemeinorganization) * [createPage](#createpage) +* [createTheme](#createtheme) * [deleteOrganizationTheme](#deleteorganizationtheme) * [deletePage](#deletepage) * [deleteTheme](#deletetheme) @@ -756,6 +757,64 @@ Success. Returns the page of the theme. Refer `AvailablePageSchema` for more det +--- + + +### createTheme +Create a new theme + + + +```javascript +// Promise +const promise = partnerClient.theme.createTheme({ organizationId : value, + body : value }); + +// Async/Await +const data = await partnerClient.theme.createTheme({ organizationId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | Organization ID | +| body | [CreateNewTheme](#CreateNewTheme) | yes | Request body | + + +Themes improve the look and appearance of a website. Use this API to create a theme. + +*Returned Response:* + + + + +[ThemesSchema](#ThemesSchema) + +Returns the new application theme details + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + --- @@ -3277,7 +3336,8 @@ Theme successfully deleted. } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip", + "company_id": 1 } } ``` @@ -5248,7 +5308,8 @@ Theme successfully deleted. } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64aec4634bc407961ed265c5/theme/assets/Gpbt5naNG-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64aec4634bc407961ed265c5/theme/assets/Gpbt5naNG-archive.zip", + "company_id": 1 } } ``` @@ -7649,7 +7710,8 @@ The list of themes for the application was fetched successfully. } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip", + "company_id": 1 } ] } @@ -9622,7 +9684,8 @@ The list of themes for the application was fetched successfully. } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64aec4634bc407961ed265c5/theme/assets/Gpbt5naNG-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64aec4634bc407961ed265c5/theme/assets/Gpbt5naNG-archive.zip", + "company_id": 1 } ] } @@ -13942,7 +14005,8 @@ Theme updated successfully } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip", + "company_id": 1 } } ``` @@ -15913,7 +15977,8 @@ Theme updated successfully } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64aec4634bc407961ed265c5/theme/assets/Gpbt5naNG-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64aec4634bc407961ed265c5/theme/assets/Gpbt5naNG-archive.zip", + "company_id": 1 } } ``` @@ -16206,6 +16271,23 @@ Theme updated successfully | seller_contact | string? | yes | Seller contact information | +--- + +#### [CreateNewTheme](#CreateNewTheme) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | available_sections | [[SectionItem](#SectionItem)] | no | Available sections information | + | current | string? | yes | The current configuration | + | global_schema | [GlobalSchema](#GlobalSchema)? | yes | | + | list | [[ThemeConfiguration](#ThemeConfiguration)]? | yes | A list of configurations | + | name | string | no | The name of the theme | + | pages | [[Page](#Page)]? | yes | | + | preset | [Preset](#Preset)? | yes | | + | theme_type | string | no | Type of the Theme | + | version | string | no | The version of the theme | + + --- #### [CSS](#CSS) @@ -16490,21 +16572,6 @@ Theme updated successfully | themes | [[MarketplaceTheme](#MarketplaceTheme)]? | yes | | ---- - -#### [Meta](#Meta) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | description | string? | yes | The description of the theme | - | images | [Images](#Images)? | yes | | - | industry | [string]? | yes | An array of industries associated with the theme | - | name | string? | yes | The name of the theme | - | payment | [ThemePayment](#ThemePayment)? | yes | | - | release | [Release](#Release)? | yes | | - | slug | string? | yes | The slug of the theme | - - --- #### [OverlayPopupSetting](#OverlayPopupSetting) @@ -16743,6 +16810,21 @@ Theme updated successfully | page | [string]? | yes | An array of pages | +--- + +#### [ThemeMeta](#ThemeMeta) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | description | string? | yes | The description of the theme | + | images | [Images](#Images)? | yes | | + | industry | [string]? | yes | An array of industries associated with the theme | + | name | string? | yes | The name of the theme | + | payment | [ThemePayment](#ThemePayment)? | yes | | + | release | [Release](#Release)? | yes | | + | slug | string? | yes | The slug of the theme | + + --- #### [ThemePayment](#ThemePayment) @@ -16792,16 +16874,18 @@ Theme updated successfully | applied | boolean? | yes | Whether the theme has been applied or not | | assets | [Assets](#Assets)? | yes | | | available_sections | [[SectionItem](#SectionItem)]? | yes | Available sections information | + | company_id | number? | yes | The company id in which sales channel exists | | config | [Config](#Config)? | yes | | | created_at | string? | yes | The creation timestamp of the theme | | font | [Font](#Font)? | yes | | | is_private | boolean? | yes | Whether the theme is private or not | | marketplace_theme_id | string? | yes | The ID of the theme in the marketplace | - | meta | [Meta](#Meta)? | yes | | + | meta | [ThemeMeta](#ThemeMeta)? | yes | | | name | string? | yes | The name of the theme | | styles | string? | yes | The styles associated with the theme | | tags | [string]? | yes | An array of tags associated with the theme | | template_theme_id | string? | yes | The ID of the template theme | + | theme_type | string? | yes | | | updated_at | string? | yes | The last update timestamp of the theme | | version | string? | yes | The version of the theme | diff --git a/documentation/partner/WEBHOOK.md b/documentation/partner/WEBHOOK.md new file mode 100644 index 000000000..9ddb79482 --- /dev/null +++ b/documentation/partner/WEBHOOK.md @@ -0,0 +1,1201 @@ + + + + + +##### [Back to Partner docs](./README.md) + +## Webhook Methods +Webhook dispatcher with retry and one event to many subscriber vice versa + + +Default +* [cancelReportDownload](#cancelreportdownload) +* [fetchDeliverySummary](#fetchdeliverysummary) +* [fetchDeliveryTs](#fetchdeliveryts) +* [fetchReportFilters](#fetchreportfilters) +* [fetchSubscribers](#fetchsubscribers) +* [getDeliveryDetailInsights](#getdeliverydetailinsights) +* [getHistoricalReports](#gethistoricalreports) +* [getInvalidEventList](#getinvalideventlist) +* [updateSubscriber](#updatesubscriber) + + + + +## Methods with example and description + + + + + +### cancelReportDownload +Cancel report download job + + + +```javascript +// Promise +const promise = partnerClient.webhook.cancelReportDownload({ organizationId : value, + extensionId : value, + filename : value }); + +// Async/Await +const data = await partnerClient.webhook.cancelReportDownload({ organizationId : value, + extensionId : value, + filename : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | organization_id | +| extensionId | string | yes | extension_id | +| filename | string | yes | filename | + + + +Cancel report download job + +*Returned Response:* + + + + +[CancelDownloadResponse](#CancelDownloadResponse) + +Success + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "message": "Job cancelled successfully", + "result": "SUCCESS" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### fetchDeliverySummary +Webhook delivery summary + + + +```javascript +// Promise +const promise = partnerClient.webhook.fetchDeliverySummary({ organizationId : value, + extensionId : value, + startDate : value, + endDate : value }); + +// Async/Await +const data = await partnerClient.webhook.fetchDeliverySummary({ organizationId : value, + extensionId : value, + startDate : value, + endDate : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | organization_id | +| extensionId | string | yes | extension_id | +| startDate | string | yes | start_date | +| endDate | string | yes | end_date | + + + +Webhook delivery summary + +*Returned Response:* + + + + +[DeliverySummaryResponse](#DeliverySummaryResponse) + +Success + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "delivery_event_level": [ + { + "event": "product-size", + "success": 1121, + "failed": 0, + "failed_percentage": 0, + "removed_webhooks": 0, + "total": 1121, + "response_time": 95.08 + } + ], + "delivery_summary": { + "success": 1121, + "response_time": 95.08, + "failed_percentage": 0, + "removed_webhooks": 0 + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### fetchDeliveryTs +Webhook delivery ts + + + +```javascript +// Promise +const promise = partnerClient.webhook.fetchDeliveryTs({ organizationId : value, + extensionId : value, + startDate : value, + endDate : value }); + +// Async/Await +const data = await partnerClient.webhook.fetchDeliveryTs({ organizationId : value, + extensionId : value, + startDate : value, + endDate : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | organization_id | +| extensionId | string | yes | extension_id | +| startDate | string | yes | start_date | +| endDate | string | yes | end_date | + + + +Webhook delivery ts + +*Returned Response:* + + + + +[DeliveryTsResponse](#DeliveryTsResponse) + +Success + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "delivery_ts": [ + { + "timestamp": { + "value": "2023-11-01T05:02:51.000Z" + }, + "failed": 0, + "removed_webhooks": 0, + "success": 1121 + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### fetchReportFilters +Fetch webhook report filters + + + +```javascript +// Promise +const promise = partnerClient.webhook.fetchReportFilters({ organizationId : value, + extensionId : value, + startDate : value, + endDate : value, + pageNo : value, + pageSize : value }); + +// Async/Await +const data = await partnerClient.webhook.fetchReportFilters({ organizationId : value, + extensionId : value, + startDate : value, + endDate : value, + pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | organization_id | +| extensionId | string | yes | extension_id | +| startDate | string | yes | start_date | +| endDate | string | yes | end_date | +| pageNo | number | yes | page_no | +| pageSize | number | yes | page_size | + + + +Fetch webhook report filters + +*Returned Response:* + + + + +[Array](#Array) + +Success + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": [ + { + "filter_name": "Event", + "values": null + }, + { + "text": "article.delete-v1 (company)", + "value": { + "event_name": "article", + "event_type": "delete", + "event_category": "company", + "version": "1" + } + }, + { + "filter_name": "Subscriber Name", + "values": null + }, + { + "text": "64206a45609cb12dd02310eb", + "value": 1604 + }, + { + "filter_name": "Company Name", + "values": [] + } + ] +} +``` +
+ +
+ + + + + + + + + +--- + + +### fetchSubscribers +Fetch subscriber by filters + + + +```javascript +// Promise +const promise = partnerClient.webhook.fetchSubscribers({ organizationId : value, + extensionId : value }); + +// Async/Await +const data = await partnerClient.webhook.fetchSubscribers({ organizationId : value, + extensionId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | organization_id | +| extensionId | string | yes | extension_id | + + + +Fetch subscriber by filters + +*Returned Response:* + + + + +[SubscriberConfigResponse](#SubscriberConfigResponse) + +Success + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": [ + { + "name": "xyz webhook", + "webhook_url": "https://xyz.requestcatcher.com/test", + "association": { + "company_id": 1, + "extension_id": "64affd97cbddb85348ca8f93", + "application_id": [ + "63a0490757475baff6154585", + "63a42b512df5d4731c5eb601" + ] + }, + "custom_headers": {}, + "status": "active", + "email_id": "axyz@gofynd.com", + "auth_meta": {}, + "event_id": [ + 10, + 11, + 17 + ] + } + ] +} +``` +
+ +
+ + + + + + + + + +--- + + +### getDeliveryDetailInsights +Get the insights of delivery details of the events that was pushed to subscribers + + + +```javascript +// Promise +const promise = partnerClient.webhook.getDeliveryDetailInsights({ organizationId : value, + extensionId : value, + body : value }); + +// Async/Await +const data = await partnerClient.webhook.getDeliveryDetailInsights({ organizationId : value, + extensionId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | organization_id | +| extensionId | string | yes | extension_id | +| body | [DeliveryDetailsRequest](#DeliveryDetailsRequest) | yes | Request body | + + +Get the delivery details insights + +*Returned Response:* + + + + +[DeliveryDetailsResponse](#DeliveryDetailsResponse) + +Success + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "rows": [ + { + "event_name": "product-size.create.v2.company", + "response_code": 200, + "response_message": "OK", + "data": { + "company_id": 327 + }, + "attempt": 1, + "last_attempted_on": 1700472182926, + "status": "SUCCESS", + "name": "64b0b865c35f9905188806fe", + "webhook_url": "https://unicommerce.connect.fyndx1.de/event/webhook", + "response_time": 139, + "message_id": "5TFWXZ5p2sEHpbGAEHEgiUfsMEACgRpePrjlld+J3+I=", + "event_trace_id": "[\"silverbolt.6791e276-8786-11ee-a387-46ec7da68c2f\"]" + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getHistoricalReports +Get report download history. + + + +```javascript +// Promise +const promise = partnerClient.webhook.getHistoricalReports({ organizationId : value, + extensionId : value, + body : value }); + +// Async/Await +const data = await partnerClient.webhook.getHistoricalReports({ organizationId : value, + extensionId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | organization_id | +| extensionId | string | yes | extension_id | +| body | [HistoryPayload](#HistoryPayload) | yes | Request body | + + +Retrieve history reports for a specific company based on the provided filters. + + +*Returned Response:* + + + + +[HistoryResponse](#HistoryResponse) + +It will give list of all the reports that was downloaded. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": [ + { + "id": 25, + "association": { + "company_id": 24 + }, + "filters": { + "status": "FAILED", + "end_date": "2023-07-18T09:38:07.000Z", + "start_date": "2023-07-17T09:38:07.000Z", + "subscribers": [ + 40 + ] + }, + "filename": "exportJMehD_1689675047609", + "status": "COMPLETED", + "upload_service_response": { + "cdn": { + "urls": [ + { + "url": "https://storage.googleapis.com/fynd-data-platform-fynd-x0/fp-analytics-query-result/exportJMehD_1689675047609/000000000000.csv.gz?GoogleAccessId=dms-to-bq%40fynd-1088.iam.gserviceaccount.com&Expires=1692267060&Signature=aPhTRMOJswVhx5jTYF7JV42aPQKJ4Mkzv9vJr8zqrbpso00GytuhmBnpP1Gxt%2BoTnIINyWUWAuchlm6paS9yKFrjCXemsqSM0hqTA8T0MUjng3swZAtZuWK4dVK2jMyOv88l1Xn8tkrwOFo7ohG3scFwgjplrU%2FkMUNZqxw4fdgdUUXZ%2BJrnGC5jlGkz5PTooRtForUXtTkA8Kf9mJvX3F6f6p5I2VvhzmXHGMabavEjgZ56JUe2%2B0o5POs4jN0s%2F6fZGOz4hhLa9hMIyQpjoodbcGO%2BRCKukxRbY1s00%2F1WNGLLYYuU4bvqtME60rCnj0FHEmbte4Tr73SmOU4xwg%3D%3D", + "name": "000000000000.csv.gz" + } + ] + } + }, + "created_on": "2023-07-18T10:10:49.189Z", + "updated_on": "2023-07-18T10:10:50.798Z", + "message": "Completed in less than 1 min" + } + ] +} +``` +
+ +
+ + + + + + + + + +--- + + +### getInvalidEventList +Get invalid event list + + + +```javascript +// Promise +const promise = partnerClient.webhook.getInvalidEventList({ organizationId : value, + extensionId : value, + body : value }); + +// Async/Await +const data = await partnerClient.webhook.getInvalidEventList({ organizationId : value, + extensionId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | organization_id | +| extensionId | string | yes | extension_id | +| body | [InvalidEventsRequest](#InvalidEventsRequest) | yes | Request body | + + +Get invalid event list. + + +*Returned Response:* + + + + +[Array](#Array) + +It will give list of all the invalid events that was failed to pushed to subscribers due to its schema mismatched. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": [ + { + "event_name": "test", + "event_type": "test", + "version": "1", + "category": "company", + "count": 10 + } + ] +} +``` +
+ +
+ + + + + + + + + +--- + + +### updateSubscriber +Update subscriber status by id. + + + +```javascript +// Promise +const promise = partnerClient.webhook.updateSubscriber({ organizationId : value, + extensionId : value, + subscriberId : value, + body : value }); + +// Async/Await +const data = await partnerClient.webhook.updateSubscriber({ organizationId : value, + extensionId : value, + subscriberId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| organizationId | string | yes | organization_id | +| extensionId | string | yes | extension_id | +| subscriberId | number | yes | subscriber_id | +| body | [UpdateSubscriberRequest](#UpdateSubscriberRequest) | yes | Request body | + + +Update subscriber status by id. + + +*Returned Response:* + + + + +[UpdateSubscriberResponse](#UpdateSubscriberResponse) + +It will give you subscriber config details of a selected subscribers. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "message": "Subscriber with id 1 with extension id 64affd97cbddb85348ca8f93 updated successfully" + } +} +``` +
+ +
+ + + + + + + + + +--- + + + + +### Schemas + + +#### [Association](#Association) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | application_id | [string]? | yes | | + | company_id | number? | yes | | + | criteria | string? | yes | | + | extension_id | string? | yes | | + + +--- + +#### [AuthMeta](#AuthMeta) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | secret | string? | yes | | + | type | string? | yes | | + + +--- + +#### [CancelDownloadResponse](#CancelDownloadResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + | result | string? | yes | | + + +--- + +#### [CdnObject](#CdnObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | urls | [[Url](#Url)]? | yes | | + + +--- + +#### [DeliveryDetailsRequest](#DeliveryDetailsRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | company_id | string? | yes | | + | end_date | string? | yes | | + | event | [[EventDeliveryDetailSchema](#EventDeliveryDetailSchema)]? | yes | | + | page_no | number? | yes | | + | page_size | number? | yes | | + | start_date | string? | yes | | + | status | string? | yes | | + + +--- + +#### [DeliveryDetailsResponse](#DeliveryDetailsResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | page | [Page](#Page)? | yes | | + | rows | [[EventProcessReportObject](#EventProcessReportObject)]? | yes | | + + +--- + +#### [DeliveryEventLevelSchema](#DeliveryEventLevelSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | event | string? | yes | | + | failed | number? | yes | | + | failed_percentage | number? | yes | | + | removed_webhooks | number? | yes | | + | response_time | number? | yes | | + | success | number? | yes | | + | total | number? | yes | | + + +--- + +#### [DeliverySummaryResponse](#DeliverySummaryResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | delivery_event_level | [[DeliveryEventLevelSchema](#DeliveryEventLevelSchema)]? | yes | | + | delivery_summary | [DeliverySummarySchema](#DeliverySummarySchema)? | yes | | + + +--- + +#### [DeliverySummarySchema](#DeliverySummarySchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | failed_percentage | number? | yes | | + | removed_webhooks | number? | yes | | + | response_time | number? | yes | | + | success | number? | yes | | + + +--- + +#### [DeliveryTsResponse](#DeliveryTsResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | delivery_ts | [[DeliveryTsSchema](#DeliveryTsSchema)]? | yes | | + + +--- + +#### [DeliveryTsSchema](#DeliveryTsSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | failed | number? | yes | | + | removed_webhooks | number? | yes | | + | success | number? | yes | | + | timestamp | string? | yes | | + + +--- + +#### [DownloadReponse](#DownloadReponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | file_name | string? | yes | | + + +--- + +#### [EventConfigResponse](#EventConfigResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | created_on | string? | yes | | + | description | string? | yes | | + | display_name | string? | yes | | + | event_category | string? | yes | | + | event_name | string? | yes | | + | event_schema | string? | yes | | + | event_type | string? | yes | | + | id | number? | yes | | + | subscriber_event_mapping | [SubscriberEventMapping](#SubscriberEventMapping)? | yes | | + | updated_on | string? | yes | | + | version | string? | yes | | + + +--- + +#### [EventDeliveryDetailSchema](#EventDeliveryDetailSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | event_category | string? | yes | | + | event_name | string? | yes | | + | event_type | string? | yes | | + | version | string? | yes | | + + +--- + +#### [EventProcessReportObject](#EventProcessReportObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | attempt | number? | yes | The attempt number of the event. | + | data | string? | yes | The data associated with the event. | + | event_name | string? | yes | The name of the processed event. | + | event_trace_id | string? | yes | | + | last_attempted_on | number? | yes | The timestamp of the last attempted event. | + | message_id | string? | yes | | + | name | string? | yes | The name of the event. | + | response_code | number? | yes | The response code of the event. | + | response_message | string? | yes | The response message of the event. | + | response_time | number? | yes | The response time of the event. | + | status | string? | yes | The status of the event (e.g., "FAILED"). | + | webhook_url | string? | yes | The webhook URL associated with the event. | + + +--- + +#### [FilterReportResponse](#FilterReportResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | filter_name | string? | yes | | + | values | [string]? | yes | | + + +--- + +#### [HistoryAssociation](#HistoryAssociation) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | company_id | number? | yes | | + | subscriber_ids | [number]? | yes | | + + +--- + +#### [HistoryFilters](#HistoryFilters) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | end_date | string? | yes | The end date and time of the history report. | + | events | [string]? | yes | | + | search_text | string? | yes | | + | start_date | string? | yes | The start date and time of the history report. | + | status | string? | yes | The status of the history report (e.g., "FAILED"). | + | subscribers | [number]? | yes | An array of subscriber IDs associated with the history report. | + + +--- + +#### [HistoryItems](#HistoryItems) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | association | [HistoryAssociation](#HistoryAssociation)? | yes | | + | created_on | string? | yes | The date and time when the history report was created. | + | filename | string? | yes | The filename of the history report. | + | filters | [HistoryFilters](#HistoryFilters)? | yes | | + | id | number? | yes | The ID of the history report. | + | message | string? | yes | A message related to the history report. | + | status | string? | yes | The status of the history report (e.g., "COMPLETED"). | + | updated_on | string? | yes | The date and time when the history report was last updated. | + | upload_service_response | [UploadServiceObject](#UploadServiceObject)? | yes | | + + +--- + +#### [HistoryPayload](#HistoryPayload) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | company_id | number? | yes | | + | page_no | number? | yes | The page number of the history report. | + | page_size | number? | yes | The number of records per page. | + | type | string? | yes | The type of history report (e.g., "platform"). | + + +--- + +#### [HistoryResponse](#HistoryResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[HistoryItems](#HistoryItems)]? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [InvalidEventsRequest](#InvalidEventsRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | end_date | string? | yes | | + | event_name | string? | yes | | + | start_date | string? | yes | | + | version | string? | yes | | + + +--- + +#### [InvalidEventsResponse](#InvalidEventsResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | count | number? | yes | | + | event_name | string? | yes | | + | event_type | string? | yes | | + | version | string? | yes | | + + +--- + +#### [ItemSchema](#ItemSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | association | [Association](#Association)? | yes | | + | auth_meta | [AuthMeta](#AuthMeta)? | yes | | + | created_on | string? | yes | | + | custom_headers | string? | yes | | + | email_id | string? | yes | | + | event_configs | [[EventConfigResponse](#EventConfigResponse)]? | yes | | + | event_id | [number]? | yes | | + | id | number? | yes | | + | modified_by | string? | yes | | + | name | string? | yes | | + | status | string? | yes | | + | type | string? | yes | | + | updated_on | string? | yes | | + | webhook_url | string? | yes | | + + +--- + +#### [Page](#Page) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | current | number? | yes | The current page number. | + | has_next | boolean? | yes | Indicates if there is a next page. | + | has_previous | boolean? | yes | Indicates if there is a previous page. | + | item_total | number? | yes | The total number of items. | + | size | number? | yes | The number of items per page. | + | total_page | number? | yes | | + | type | string? | yes | Type of the response (e.g., "number"). | + + +--- + +#### [SubscriberConfigResponse](#SubscriberConfigResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[ItemSchema](#ItemSchema)]? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [SubscriberEventMapping](#SubscriberEventMapping) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | created_on | string? | yes | | + | event_id | number? | yes | | + | id | number? | yes | | + | subscriber_id | number? | yes | | + + +--- + +#### [UpdateSubscriberRequest](#UpdateSubscriberRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | status | string? | yes | | + + +--- + +#### [UpdateSubscriberResponse](#UpdateSubscriberResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + + +--- + +#### [UploadServiceObject](#UploadServiceObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | cdn | [CdnObject](#CdnObject)? | yes | | + + +--- + +#### [Url](#Url) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | name | string? | yes | The name of the uploaded report file. | + | url | string? | yes | The URL of the uploaded report file. | + + +--- + + + + diff --git a/documentation/platform/BILLING.md b/documentation/platform/BILLING.md index a40905966..ce061b47c 100644 --- a/documentation/platform/BILLING.md +++ b/documentation/platform/BILLING.md @@ -24,6 +24,7 @@ Default * [getInvoices](#getinvoices) * [getSubscription](#getsubscription) * [getSubscriptionCharge](#getsubscriptioncharge) +* [getentityDetail](#getentitydetail) * [planStatusUpdate](#planstatusupdate) * [subscripePlan](#subscripeplan) * [upsertCustomerDetail](#upsertcustomerdetail) @@ -832,16 +833,24 @@ Get subscription subscription limits ```javascript // Promise -const promise = platformClient.billing.getFeatureLimitConfig(); +const promise = platformClient.billing.getFeatureLimitConfig({ productSuite : value, + type : value }); // Async/Await -const data = await platformClient.billing.getFeatureLimitConfig(); +const data = await platformClient.billing.getFeatureLimitConfig({ productSuite : value, + type : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| productSuite | string | no | | +| type | string | no | | + + Get subscription subscription limits. @@ -2095,6 +2104,74 @@ Success +--- + + +### getentityDetail +Generic api to get the entity detail + + + +```javascript +// Promise +const promise = platformClient.billing.getentityDetail({ entityName : value, + channel : value, + entityId : value, + component : value, + componentName : value }); + +// Async/Await +const data = await platformClient.billing.getentityDetail({ entityName : value, + channel : value, + entityId : value, + component : value, + componentName : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| entityName | string | yes | Entity name. | +| entityId | string | no | Entity unique id. | +| channel | string | yes | Ordering channel. | +| component | string | no | The coponents the user would like to know. | +| componentName | string | no | The name of component the preferred to be fetched. | + + + +Generic api to get the entity detail + +*Returned Response:* + + + + +[EntityResponse](#EntityResponse) + +Success + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + --- @@ -2631,6 +2708,16 @@ Success | start_date | string? | yes | | +--- + +#### [Details](#Details) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | features | [[Features](#Features)]? | yes | | + | fee_components | [[FeeComponents](#FeeComponents)]? | yes | | + + --- #### [EntityChargePrice](#EntityChargePrice) @@ -2650,6 +2737,18 @@ Success | interval | string | no | | +--- + +#### [EntityResponse](#EntityResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[Details](#Details)]? | yes | | + | page | number? | yes | | + | page_size | number? | yes | | + | success | boolean? | yes | | + + --- #### [EntitySubscription](#EntitySubscription) @@ -2668,6 +2767,35 @@ Success | trial_period | [SubscriptionTrialPeriod](#SubscriptionTrialPeriod)? | yes | | +--- + +#### [Features](#Features) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | description | string? | yes | | + | display_text | string? | yes | | + | enabled | boolean? | yes | | + | group | string? | yes | | + | name | string? | yes | | + | slug | string? | yes | | + + +--- + +#### [FeeComponents](#FeeComponents) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | brand | [string]? | yes | | + | business_lead | string? | yes | | + | channel | [string]? | yes | | + | components | [string]? | yes | | + | location | [string]? | yes | | + | settle_cycle_period | string? | yes | | + | settlement_type | string? | yes | | + + --- #### [InternalServerError](#InternalServerError) diff --git a/documentation/platform/CART.md b/documentation/platform/CART.md index df93dabdf..821f020ed 100644 --- a/documentation/platform/CART.md +++ b/documentation/platform/CART.md @@ -921,6 +921,12 @@ Price Adjustment Created successfully "collection": { "collected_by": "FYND", "refund_by": "FYND" + }, + "restrictions": { + "post_order": { + "cancellation_allowed": false, + "return_allowed": false + } } } } @@ -3526,6 +3532,7 @@ Success. Returns an PlatformAddress object containing a list of address saved in "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", "country_code": "IND", + "state_code": "MH", "phone": "9915347757", "geo_location": {}, "country": "India", @@ -3614,41 +3621,94 @@ Success. Returns an Address object containing a list of address saved in the acc
-  Example: +  Examples: + + +
+  example1 ```json { - "address": [ - { - "landmark": "", - "area_code": "410218", - "id": "8b526f521bb14a2593a8b9e3ce8c76b3", - "state": "Maharashtra", - "meta": {}, - "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", - "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", - "country_code": "IND", - "phone": "99999999", - "geo_location": {}, - "country": "India", - "is_default_address": true, - "is_active": true, - "city": "Mumbai", - "pincode": 400093, - "checkout_mode": "self", - "address_type": "home", - "tags": [], - "area": "Sector 127", - "name": "abc", - "email": "ankur@gofynd1.com", - "address": "Megatron2", - "store_name": "store123" - } - ] + "summary": "Address for India", + "value": { + "address": [ + { + "landmark": "", + "area_code": "8b526f521bb14a2593a8b9e3ce8c76b3", + "id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "state": "Maharashtra", + "meta": {}, + "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "country_code": "+91", + "state_code": "MH", + "country_phone_code": "91", + "country_iso_code": "IN", + "phone": "9915347757", + "geo_location": {}, + "country": "India", + "is_default_address": true, + "is_active": true, + "city": "Mumbai", + "pincode": 400093, + "checkout_mode": "self", + "address_type": "home", + "tags": [], + "area": "Sector 127", + "name": "abc", + "email": "ankur@gofynd1.com", + "address": "Megatron2", + "_custom_json": {} + } + ] + } +} +``` +
+ +
+  example2 + +```json +{ + "summary": "Address for Dubai", + "value": { + "address": [ + { + "landmark": "", + "area_code": "", + "id": "651c0b882dbd5f702f711677", + "state": "", + "meta": {}, + "user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "created_by_user_id": "8b526f521bb14a2593a8b9e3ce8c76b3", + "country_code": "+971", + "country_phone_code": "+971", + "country_iso_code": "AE", + "phone": "551234567", + "geo_location": {}, + "country": "United Arab Emirates", + "is_default_address": true, + "is_active": true, + "city": "Sharjah", + "sector": "Al Fisht", + "checkout_mode": "self", + "address_type": "home", + "tags": [], + "area": "Dubai Park", + "name": "Shaikh Ahmed", + "email": "example@gmail.com", + "address": "B-62", + "_custom_json": {} + } + ] + } } ```
+
+ @@ -3668,11 +3728,15 @@ Fetch Coupon ```javascript // Promise const promise = platformClient.application("").cart.getAppCoupons({ id : value, - buyNow : value }); + buyNow : value, + slug : value, + storeId : value }); // Async/Await const data = await platformClient.application("").cart.getAppCoupons({ id : value, - buyNow : value }); + buyNow : value, + slug : value, + storeId : value }); ``` @@ -3682,7 +3746,9 @@ const data = await platformClient.application("").cart.getAppCou | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | id | string | no | | -| buyNow | boolean | no | | +| buyNow | boolean | no | | +| slug | string | no | | +| storeId | string | no | | @@ -3888,6 +3954,7 @@ Success. Returns a Cart object. Check the example shown below or refer `CartDeta "discount": "67% OFF", "article": { "type": "article", + "tags": [], "uid": "604_902_SSTC60401_636BLUE_1", "size": "1", "seller": { @@ -5938,6 +6005,10 @@ Success. Returns delivery promise along with shipment details and price breakup. "formatted": { "min": "Aug 24", "max": "Aug 28" + }, + "iso": { + "min": "2019-08-25T00:35:08.000Z", + "max": "2019-08-29T07:55:08.000Z" } }, "box_type": "Small Courier bag", @@ -6001,6 +6072,7 @@ Success. Returns delivery promise along with shipment details and price breakup. }, "article": { "type": "article", + "tags": [], "uid": "381_610_IGPL01_SPIRAL19ANAVY_L", "size": "L", "seller": { @@ -11899,6 +11971,12 @@ Price Adjustment Updated successfully "collection": { "collected_by": "FYND", "refund_by": "FYND" + }, + "restrictions": { + "post_order": { + "cancellation_allowed": false, + "return_allowed": false + } } } } @@ -12505,6 +12583,10 @@ Success. Returns delivery promise along with shipment details and price breakup. "formatted": { "min": "Aug 24", "max": "Aug 28" + }, + "iso": { + "min": "2019-08-25T00:35:08.000Z", + "max": "2019-08-29T07:55:08.000Z" } }, "box_type": "Small Courier bag", @@ -13096,6 +13178,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | product_group_tags | [string]? | yes | | | quantity | number? | yes | | | seller_id | number? | yes | | + | seller_identifier | string? | yes | Add items using seller identifier for store os | | store_id | number? | yes | | @@ -13121,6 +13204,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | applied_free_articles | [[AppliedFreeArticles](#AppliedFreeArticles)]? | yes | Applied free article for free gift item promotions | | article_quantity | number? | yes | Quantity of article on which promotion is applicable | | buy_rules | [[BuyRules](#BuyRules)]? | yes | Buy rules for promotions | + | currency | [CartCurrency](#CartCurrency)? | yes | | | discount_rules | [[DiscountRulesApp](#DiscountRulesApp)]? | yes | Discount rules for promotions | | mrp_promotion | boolean? | yes | If applied promotion is applied on product MRP or ESP | | offer_text | string? | yes | Offer text of current promotion | @@ -13369,6 +13453,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | cart_id | string? | yes | | | cart_value | number? | yes | | | created_on | string? | yes | | + | currency_code | string? | yes | | | item_counts | number? | yes | | | pick_up_customer_details | string? | yes | | | user_id | string? | yes | | @@ -13580,16 +13665,19 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | coupon_applicable_message | string? | yes | | | coupon_code | string? | yes | | | coupon_type | string? | yes | | | coupon_value | number? | yes | | | description | string? | yes | | + | end_date | string? | yes | | | expires_on | string? | yes | | | is_applicable | boolean? | yes | | | is_applied | boolean? | yes | | | max_discount_value | number? | yes | | | message | string? | yes | | | minimum_cart_value | number? | yes | | + | start_date | string? | yes | | | sub_title | string? | yes | | | title | string? | yes | | @@ -14233,6 +14321,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | item_list | [string]? | yes | | + | parent_promo_id | string? | yes | | | promo_amount | string | no | | | promo_desc | string? | yes | | | promo_id | string | no | | @@ -14452,6 +14541,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | _custom_json | string? | yes | | | address | string? | yes | | | address_type | string? | yes | | | area | string? | yes | | @@ -14462,6 +14552,8 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | city | string? | yes | | | country | string? | yes | | | country_code | string? | yes | | + | country_iso_code | string? | yes | | + | country_phone_code | string? | yes | | | created_by_user_id | string? | yes | | | email | string? | yes | | | geo_location | [GeoLocation](#GeoLocation)? | yes | | @@ -14473,7 +14565,9 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | meta | string? | yes | | | name | string? | yes | | | phone | string? | yes | | + | sector | string? | yes | | | state | string? | yes | | + | state_code | string? | yes | State code for international address | | tags | [string]? | yes | | | user_id | string? | yes | | @@ -14681,6 +14775,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | is_authenticated | boolean | no | Flag indicating whether the user is authenticated | | message | string | no | The message associated with the price adjustment | | meta | string? | yes | | + | restrictions | [PriceAdjustmentRestrictions](#PriceAdjustmentRestrictions)? | yes | This field accepts the restrictions applied to this particular item or service, including whether or not cancellation and return are allowed, etc | | type | string | no | type of price adjusment | | value | number | no | | @@ -14701,6 +14796,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | is_authenticated | boolean | no | Flag indicating whether the user is authenticated | | message | string | no | The message associated with the price adjustment | | meta | string? | yes | | + | restrictions | [PriceAdjustmentRestrictions](#PriceAdjustmentRestrictions)? | yes | This field accepts the restrictions applied to this particular item or service, including whether or not cancellation and return are allowed, etc | | type | string | no | type of price adjusment | | value | number | no | | @@ -14714,6 +14810,15 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | data | [PriceAdjustment](#PriceAdjustment)? | yes | | +--- + +#### [PriceAdjustmentRestrictions](#PriceAdjustmentRestrictions) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | post_order | string? | yes | This field holds the post-order restrictions, indicated by nested fields ['cancellation_allowed','return_allowed'] | + + --- #### [PriceAdjustmentUpdate](#PriceAdjustmentUpdate) @@ -14730,6 +14835,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | message | string | no | The message associated with the price adjustment | | meta | string? | yes | | | modified_by | string? | yes | The entity that modified the field | + | restrictions | [PriceAdjustmentRestrictions](#PriceAdjustmentRestrictions)? | yes | restrictions applied to this particular item or product, including whether or not cancellation and return are allowed. | | type | string | no | type of price adjusment | | value | number | no | | @@ -14777,6 +14883,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | seller_identifier | string? | yes | | | size | string? | yes | | | store | [StoreInfo](#StoreInfo)? | yes | | + | tags | [string]? | yes | a list of article tags | | type | string? | yes | | | uid | string? | yes | | @@ -14851,6 +14958,16 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | min | string? | yes | | +--- + +#### [PromiseISOFormat](#PromiseISOFormat) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | max | string? | yes | Max promise in ISO format. | + | min | string? | yes | Min Promise in ISO format. | + + --- #### [PromiseTimestamp](#PromiseTimestamp) @@ -15084,7 +15201,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | anonymous_users | boolean? | yes | | | order_quantity | number? | yes | | | ordering_stores | [number]? | yes | | - | payments | [[PromotionPaymentModes](#PromotionPaymentModes)]? | yes | | + | payments | string? | yes | | | platforms | [string]? | yes | | | post_order | [PostOrder1](#PostOrder1)? | yes | | | user_groups | [number]? | yes | | @@ -15201,6 +15318,7 @@ Success. Returns a success message and the coupon validity. Refer `PaymentCoupon | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | formatted | [PromiseFormatted](#PromiseFormatted)? | yes | | + | iso | [PromiseISOFormat](#PromiseISOFormat)? | yes | | | timestamp | [PromiseTimestamp](#PromiseTimestamp)? | yes | | diff --git a/documentation/platform/CATALOG.md b/documentation/platform/CATALOG.md index 268fb464a..54527f8ce 100644 --- a/documentation/platform/CATALOG.md +++ b/documentation/platform/CATALOG.md @@ -96,6 +96,7 @@ Default * [getInventoryExport](#getinventoryexport) * [getListingConfigurations](#getlistingconfigurations) * [getMarketplaceOptinDetail](#getmarketplaceoptindetail) +* [getMarketplaces](#getmarketplaces) * [getOptimalLocations](#getoptimallocations) * [getProduct](#getproduct) * [getProductAssetsInBulk](#getproductassetsinbulk) @@ -143,6 +144,7 @@ Default * [updateHsnCode](#updatehsncode) * [updateInventories](#updateinventories) * [updateListingConfiguration](#updatelistingconfiguration) +* [updateMarketplaceOptin](#updatemarketplaceoptin) * [updateProductBundle](#updateproductbundle) * [updateRealtimeInventory](#updaterealtimeinventory) * [updateSearchConfiguration](#updatesearchconfiguration) @@ -1536,7 +1538,7 @@ This API allows to create product. -[SuccessResponse](#SuccessResponse) +[SuccessResponse1](#SuccessResponse1) Returns a success response @@ -2187,9 +2189,9 @@ Delete a collection by it's id. Returns an object that tells whether the collect -[DeleteResponse](#DeleteResponse) +[CommonResponseSchemaCollection](#CommonResponseSchemaCollection) -Status object. Tells whether the operation was successful. See example below or refer `DeleteResponse` +Status object. Tells whether the operation was successful. @@ -4131,7 +4133,9 @@ const promise = platformClient.application("").catalog.getAppLoc q : value, stage : value, pageNo : value, - pageSize : value }); + pageSize : value, + tags : value, + storeTypes : value }); // Async/Await const data = await platformClient.application("").catalog.getAppLocations({ storeType : value, @@ -4139,7 +4143,9 @@ const data = await platformClient.application("").catalog.getApp q : value, stage : value, pageNo : value, - pageSize : value }); + pageSize : value, + tags : value, + storeTypes : value }); ``` @@ -4153,7 +4159,9 @@ const data = await platformClient.application("").catalog.getApp | q | string | no | Query that is to be searched. | | stage | string | no | to filter companies on basis of verified or unverified companies. | | pageNo | number | no | The page number to navigate through the given set of results | -| pageSize | number | no | Number of items to retrieve in each page. Default is 20. | +| pageSize | number | no | Number of items to retrieve in each page. Default is 20. | +| tags | Array | no | Get locations filtered by tags. | +| storeTypes | Array | no | Get locations filtered by store types. | @@ -4285,7 +4293,8 @@ The Company Applicaton Product Data(MOQ/SEO). "title": "test-title", "breadcrumbs": [], "sitemap": {}, - "meta_tags": [] + "meta_tags": [], + "canonical_url": "/test" }, "size_promotion_threshold": { "threshold_type": "flat", @@ -6277,9 +6286,9 @@ Get the details of a collection by its `slug`. If successful, returns a Collecti -[CollectionDetailResponse](#CollectionDetailResponse) +[GetCollectionDetailResponse](#GetCollectionDetailResponse) -The Collection object. See example below or refer `CollectionDetailResponse` for details +The Collection object. See example below or refer `GetCollectionDetailResponse` for details @@ -6337,13 +6346,12 @@ The Collection object. See example below or refer `CollectionDetailResponse` for "meta": {}, "name": "new", "published": true, - "query": [ - { - "attribute": "", - "op": "in", - "value": [] - } - ], + "query": { + "l3_categories": [ + "12" + ], + "sort_on": "discount_asc" + }, "slug": "new", "sort_on": "popular", "tags": [], @@ -6664,11 +6672,17 @@ Get configuration metadata details for catalog for admin panel ```javascript // Promise const promise = platformClient.application("").catalog.getConfigurationMetadata({ configType : value, - templateSlug : value }); + templateSlug : value, + pageNo : value, + pageSize : value, + q : value }); // Async/Await const data = await platformClient.application("").catalog.getConfigurationMetadata({ configType : value, - templateSlug : value }); + templateSlug : value, + pageNo : value, + pageSize : value, + q : value }); ``` @@ -6678,7 +6692,10 @@ const data = await platformClient.application("").catalog.getCon | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | configType | string | yes | A `config_type` is an identifier that defines a specific type of configuration. | -| templateSlug | string | no | Get configuration list filtered by `template_slug` string. This is for the details and comparision groups. | +| templateSlug | string | no | Get configuration list filtered by `template_slug` string. This is for the details and comparision groups. | +| pageNo | number | no | The page number to navigate through the given set of results. | +| pageSize | number | no | Number of items to retrieve in each page. | +| q | string | no | Get configuration list filtered by `q` string. | @@ -7408,6 +7425,26 @@ configuration details for catalog. See example below or refer `GetConfigMetadata "key": "rating" } ], + "page": [ + { + "current": 1 + }, + { + "type": "number" + }, + { + "size": 1 + }, + { + "has_previous": false + }, + { + "has_next": false + }, + { + "item_total": 3 + } + ], "values": [ { "sort": [ @@ -10955,6 +10992,88 @@ See example below or refer `GetOptInPlatformSchema` for details. +--- + + +### getMarketplaces +List all marketplaces + + + +```javascript +// Promise +const promise = platformClient.catalog.getMarketplaces(); + +// Async/Await +const data = await platformClient.catalog.getMarketplaces(); +``` + + + + + + +This API allows to get marketplace information. + +*Returned Response:* + + + + +[GetAllMarketplaces](#GetAllMarketplaces) + +List all Marketplace details. + + + + +
+  Example: + +```json +{ + "items": [ + { + "brand_ids": [], + "app_id": "000000000000000000000001", + "enabled": true, + "created_by": { + "username": "test@gofynd.com", + "user_id": "ef56cde2dc3227c44bcb73fd" + }, + "created_on": "2023-07-11T18:27:10.477000", + "opt_level": "company", + "company_id": 1, + "modified_by": { + "username": "test@gofynd.com", + "user_id": "ef56cde2dc3227c44bcb73fd" + }, + "store_ids": [], + "modified_on": "2023-07-11T18:27:10.477000", + "platform": "fynd", + "_id": "64ad9efe8069f0f413265003" + } + ], + "page": { + "current": 1, + "has_next": false, + "has_previous": false, + "item_total": 6, + "size": 1, + "type": "number" + } +} +``` +
+ + + + + + + + + --- @@ -13016,9 +13135,9 @@ Get query filters to configure a collection -[GetCollectionQueryOptionResponse](#GetCollectionQueryOptionResponse) +[GetQueryFiltersResponse](#GetQueryFiltersResponse) -The attached items of an collection. See example below or refer `GetCollectionQueryOptionResponse` for details +The attached items of an collection. See example below or refer `GetQueryFiltersResponse` for details @@ -13066,6 +13185,40 @@ The attached items of an collection. See example below or refer `GetCollectionQu } ] }, + { + "key": { + "display": "Category L1", + "kind": "multivalued", + "logo": "https://hdn-1.fynd.com/global/menu-icons/Category.png", + "name": "category" + }, + "values": [ + { + "count": 968, + "display": "T-Shirts", + "is_selected": false, + "logo": "https://hdn-1.fynd.com/media/logo/category/original/15442_57fdc97abfd248aaaf8841f097a4ed67.jpg", + "value": "192" + } + ] + }, + { + "key": { + "display": "Category L2", + "kind": "multivalued", + "logo": "https://hdn-1.fynd.com/global/menu-icons/Category.png", + "name": "category" + }, + "values": [ + { + "count": 968, + "display": "T-Shirts", + "is_selected": false, + "logo": "https://hdn-1.fynd.com/media/logo/category/original/15442_57fdc97abfd248aaaf8841f097a4ed67.jpg", + "value": "192" + } + ] + }, { "key": { "display": "Size", @@ -13173,7 +13326,7 @@ The attached items of an collection. See example below or refer `GetCollectionQu "key": { "display": "Set", "kind": "multivalued", - "logo": "https://hdn-1.fynd.com/global/menu-icons/Department.png", + "logo": "", "name": "is_set" }, "values": [ @@ -13189,7 +13342,7 @@ The attached items of an collection. See example below or refer `GetCollectionQu "key": { "display": "Product Fit", "kind": "multivalued", - "logo": "https://hdn-1.fynd.com/global/menu-icons/Department.png", + "logo": "", "name": "product_fit" }, "values": [ @@ -13205,7 +13358,7 @@ The attached items of an collection. See example below or refer `GetCollectionQu "key": { "display": "Primary Material", "kind": "multivalued", - "logo": "https://hdn-1.fynd.com/global/menu-icons/Department.png", + "logo": "", "name": "primary_material" }, "values": [ @@ -13221,7 +13374,7 @@ The attached items of an collection. See example below or refer `GetCollectionQu "key": { "display": "Gender", "kind": "multivalued", - "logo": "https://hdn-1.fynd.com/global/menu-icons/Department.png", + "logo": "", "name": "gender" }, "values": [ @@ -13243,7 +13396,7 @@ The attached items of an collection. See example below or refer `GetCollectionQu "key": { "display": "Primary Colour", "kind": "multivalued", - "logo": "https://hdn-1.fynd.com/global/menu-icons/Department.png", + "logo": "", "name": "primary_color" }, "values": [ @@ -13272,8 +13425,7 @@ The attached items of an collection. See example below or refer `GetCollectionQu "min": 0, "query_format": "[{} TO {}]", "selected_max": 9, - "selected_min": 0, - "value": 1 + "selected_min": 0 } ] }, @@ -13289,14 +13441,12 @@ The attached items of an collection. See example below or refer `GetCollectionQu "count": 4263, "currency_code": "INR", "currency_symbol": "₹", - "display": "0 - 9", "is_selected": false, "max": 24999, "min": 398, "query_format": "[{},INR TO {},INR]", - "selected_max": 24998, - "selected_min": 398, - "value": 1 + "selected_max": 24998.77, + "selected_min": 398.8 } ] }, @@ -13317,15 +13467,11 @@ The attached items of an collection. See example below or refer `GetCollectionQu "min": 0, "query_format": "[{} TO {}]", "selected_max": 50, - "selected_min": 0, - "value": 1 + "selected_min": 0 } ] } ], - "operators": { - "key": "value" - }, "sort_on": [ { "display": "Latest Products", @@ -13804,14 +13950,16 @@ const promise = platformClient.catalog.getSizeGuides({ active : value, q : value, tag : value, pageNo : value, - pageSize : value }); + pageSize : value, + brandId : value }); // Async/Await const data = await platformClient.catalog.getSizeGuides({ active : value, q : value, tag : value, pageNo : value, - pageSize : value }); + pageSize : value, + brandId : value }); ``` @@ -13824,7 +13972,8 @@ const data = await platformClient.catalog.getSizeGuides({ active : value, | q | string | no | Query that is to be searched. | | tag | string | no | to filter size guide on basis of tag. | | pageNo | number | no | The page number to navigate through the given set of results | -| pageSize | number | no | Number of items to retrieve in each page. Default is 10. | +| pageSize | number | no | Number of items to retrieve in each page. Default is 10. | +| brandId | number | no | Brand id that is to be searched. | @@ -14081,17 +14230,19 @@ Get product categories list ```javascript // Promise const promise = platformClient.catalog.listCategories({ level : value, - departments : value, + department : value, q : value, pageNo : value, - pageSize : value }); + pageSize : value, + uids : value }); // Async/Await const data = await platformClient.catalog.listCategories({ level : value, - departments : value, + department : value, q : value, pageNo : value, - pageSize : value }); + pageSize : value, + uids : value }); ``` @@ -14101,10 +14252,11 @@ const data = await platformClient.catalog.listCategories({ level : value, | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | level | string | no | Get category for multiple levels | -| departments | string | no | Get category for multiple departments filtered | +| department | number | no | Get category for multiple departments filtered | | q | string | no | Get multiple categories filtered by search string | | pageNo | number | no | The page number to navigate through the given set of results | -| pageSize | number | no | Number of items to retrieve in each page. Default is 10. | +| pageSize | number | no | Number of items to retrieve in each page. Default is 10. | +| uids | Array | no | Get multiple categories filtered by category uids. | @@ -16059,10 +16211,10 @@ The Collection object. See example below or refer `UpdateCollectionSchema` for d "next_schedule": [ { "end": null, - "start": "2021-04-02T15:43:59.410000Z" + "start": "2021-03-15T12:51:21.333000+00:00Z" } ], - "start": "2021-04-02T15:43:59.410000Z" + "start": "2021-03-15T12:51:21.333000+00:00Z" }, "action": { "page": { @@ -16083,12 +16235,10 @@ The Collection object. See example below or refer `UpdateCollectionSchema` for d }, "banners": { "landscape": { - "aspect_ratio": "250", "type": "image", "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1588857999/production/applications/app_000000000000000000000001/media/collection/landscape/avm7xibo2jgk8glc4bwl.png" }, "portrait": { - "aspect_ratio": "250", "type": "image", "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1588858137/production/applications/app_000000000000000000000001/media/collection/portrait/xzuftshmmw4yuwzb12pm.png" } @@ -16096,14 +16246,13 @@ The Collection object. See example below or refer `UpdateCollectionSchema` for d "description": "", "is_active": true, "logo": { - "aspect_ratio": "250", "type": "image", "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1588857854/production/applications/app_000000000000000000000001/media/collection/logo/w9ns7nfgv7fk45xqrpoh.png" }, "meta": {}, "name": "New", "published": true, - "query": [], + "query": {}, "seo": { "description": "Test description", "title": "Test" @@ -16575,6 +16724,83 @@ success flag will tell whether the operation was successful. +--- + + +### updateMarketplaceOptin +Update marketplace optin + + + +```javascript +// Promise +const promise = platformClient.catalog.updateMarketplaceOptin({ marketplaceSlug : value, + body : value }); + +// Async/Await +const data = await platformClient.catalog.updateMarketplaceOptin({ marketplaceSlug : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| marketplaceSlug | string | yes | Slug of the marketplace . | +| body | [UpdateMarketplaceOptinRequest](#UpdateMarketplaceOptinRequest) | yes | Request body | + + +This API allows to update marketplace optin for a company. + +*Returned Response:* + + + + +[UpdateMarketplaceOptinResponse](#UpdateMarketplaceOptinResponse) + +Update marketplace optin config. + + + + +
+  Example: + +```json +{ + "items": null, + "-data": { + "brand_ids": [], + "app_id": "000000000000000000000001", + "enabled": true, + "created_by": { + "username": "test@gofynd.com", + "user_id": "ef56cde2dc3227c44bcb73fd" + }, + "opt_level": "company", + "company_id": 1, + "modified_by": { + "username": "test@gofynd.com", + "user_id": "ef56cde2dc3227c44bcb73fd" + }, + "store_ids": [], + "platform": "fynd" + } +} +``` +
+ + + + + + + + + --- @@ -17125,10 +17351,6 @@ List of fields and validation values fro each. See example below or refer `Inven "InventoryBaseSchema": { "properties": { "currency": { - "enum": [ - "INR", - "QAR" - ], "title": "Currency", "type": "string" }, @@ -18236,6 +18458,17 @@ List of fields and validation values fro each. See example below or refer `Inven | priority | number? | yes | | +--- + +#### [CollectionItemSchemaV2](#CollectionItemSchemaV2) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action | string | no | | + | item_id | number | no | | + | priority | number? | yes | | + + --- #### [CollectionItemUpdate](#CollectionItemUpdate) @@ -18250,6 +18483,20 @@ List of fields and validation values fro each. See example below or refer `Inven | visible_facets_keys | [string]? | yes | | +--- + +#### [CollectionItemUpdateSchemaV2](#CollectionItemUpdateSchemaV2) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | allow_facets | boolean? | yes | | + | allow_sort | boolean? | yes | | + | items | [[CollectionItemSchemaV2](#CollectionItemSchemaV2)]? | yes | | + | query | [[CollectionQuerySchemaV2](#CollectionQuerySchemaV2)]? | yes | | + | type | string | no | | + | visible_facets_keys | [string]? | yes | | + + --- #### [CollectionListingFilter](#CollectionListingFilter) @@ -18293,6 +18540,17 @@ List of fields and validation values fro each. See example below or refer `Inven | value | [any] | no | The value of the attribute of the collection query | +--- + +#### [CollectionQuerySchemaV2](#CollectionQuerySchemaV2) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | attribute | string | no | The attribute of the collection query | + | op | string | no | The operation to be performed on the attribute of the collection query | + | value | [any] | no | The value of the attribute of the collection query | + + --- #### [CollectionSchedule](#CollectionSchedule) @@ -18306,6 +18564,15 @@ List of fields and validation values fro each. See example below or refer `Inven | start | string? | yes | | +--- + +#### [CommonResponseSchemaCollection](#CommonResponseSchemaCollection) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + + --- #### [CompanyBrandDetail](#CompanyBrandDetail) @@ -18573,6 +18840,16 @@ List of fields and validation values fro each. See example below or refer `Inven | visible_facets_keys | [string]? | yes | | +--- + +#### [CreatedBy](#CreatedBy) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | user_id | string? | yes | | + | username | string? | yes | | + + --- #### [CreateSearchConfigurationRequest](#CreateSearchConfigurationRequest) @@ -18945,6 +19222,16 @@ List of fields and validation values fro each. See example below or refer `Inven | state | string? | yes | | +--- + +#### [GetAllMarketplaces](#GetAllMarketplaces) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[Marketplaces](#Marketplaces)]? | yes | | + | page | [Page](#Page)? | yes | | + + --- #### [GetAllSizes](#GetAllSizes) @@ -19057,6 +19344,39 @@ List of fields and validation values fro each. See example below or refer `Inven | visible_facets_keys | [string]? | yes | | +--- + +#### [GetCollectionDetailResponse](#GetCollectionDetailResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _custom_json | string? | yes | | + | _locale_language | string? | yes | | + | _schedule | [CollectionSchedule](#CollectionSchedule)? | yes | | + | action | string? | yes | | + | allow_facets | boolean? | yes | | + | allow_sort | boolean? | yes | | + | app_id | string? | yes | | + | badge | [CollectionBadge](#CollectionBadge)? | yes | | + | banners | [ImageUrls](#ImageUrls)? | yes | | + | description | string? | yes | | + | is_active | boolean? | yes | | + | is_visible | boolean? | yes | | + | logo | [Media](#Media)? | yes | | + | meta | string? | yes | | + | name | string? | yes | | + | priority | number? | yes | | + | published | boolean? | yes | | + | query | [[CollectionQuery](#CollectionQuery)]? | yes | | + | seo | [SeoDetail](#SeoDetail)? | yes | | + | slug | string? | yes | | + | sort_on | string? | yes | | + | tags | [string]? | yes | | + | type | string? | yes | | + | uid | string? | yes | | + | visible_facets_keys | [string]? | yes | | + + --- #### [GetCollectionItemsResponse](#GetCollectionItemsResponse) @@ -19069,6 +19389,16 @@ List of fields and validation values fro each. See example below or refer `Inven | sort_on | [[ProductSortOn](#ProductSortOn)]? | yes | | +--- + +#### [GetCollectionItemsResponseSchemaV2](#GetCollectionItemsResponseSchemaV2) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[ProductDetailV2](#ProductDetailV2)]? | yes | | + | page | [Page1](#Page1)? | yes | | + + --- #### [GetCollectionListingResponse](#GetCollectionListingResponse) @@ -19120,6 +19450,7 @@ List of fields and validation values fro each. See example below or refer `Inven | ---------- | ---- | -------- | ----------- | | condition | [string]? | yes | | | data | [string] | no | | + | page | [Page](#Page)? | yes | | | values | [string]? | yes | | @@ -19315,6 +19646,17 @@ List of fields and validation values fro each. See example below or refer `Inven | sizes | [[Size](#Size)]? | yes | | +--- + +#### [GetQueryFiltersResponse](#GetQueryFiltersResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | filters | [[ProductFilters](#ProductFilters)]? | yes | | + | operators | [String: string] | no | | + | sort_on | [[ProductSortOn](#ProductSortOn)]? | yes | | + + --- #### [GetSearchConfigurationResponse](#GetSearchConfigurationResponse) @@ -20105,6 +20447,26 @@ List of fields and validation values fro each. See example below or refer `Inven | name | string? | yes | | +--- + +#### [Marketplaces](#Marketplaces) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | app_id | string? | yes | | + | brand_ids | [number]? | yes | | + | company_id | number? | yes | | + | created_by | [CreatedBy](#CreatedBy)? | yes | | + | created_on | any? | yes | | + | enabled | boolean? | yes | | + | modified_by | [CreatedBy](#CreatedBy)? | yes | | + | modified_on | any? | yes | | + | opt_level | string? | yes | | + | platforms | string? | yes | | + | store_ids | [number]? | yes | | + + --- #### [Media](#Media) @@ -20345,6 +20707,23 @@ List of fields and validation values fro each. See example below or refer `Inven | type | string | no | | +--- + +#### [Page1](#Page1) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | ca | boolean? | yes | | + | department | string? | yes | | + | page_no | number? | yes | | + | page_size | number? | yes | | + | q | string? | yes | | + | sort | string? | yes | | + | sort_on | string? | yes | | + | type | string? | yes | | + | variant | string? | yes | | + + --- #### [PageResponse](#PageResponse) @@ -20751,6 +21130,25 @@ List of fields and validation values fro each. See example below or refer `Inven | title | string? | yes | | +--- + +#### [ProductDetailV2](#ProductDetailV2) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | brand | [ProductBrand](#ProductBrand)? | yes | | + | is_excluded | boolean? | yes | | + | is_pinned | boolean? | yes | | + | item_code | string? | yes | | + | item_type | string? | yes | | + | medias | [[Media](#Media)]? | yes | | + | name | string? | yes | | + | priority | number? | yes | | + | short_description | string? | yes | | + | slug | string | no | | + | uid | number? | yes | | + + --- #### [ProductDownloadsResponse](#ProductDownloadsResponse) @@ -21399,6 +21797,7 @@ List of fields and validation values fro each. See example below or refer `Inven | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | breadcrumbs | [[ApplicationItemSeoBreadcrumbs](#ApplicationItemSeoBreadcrumbs)]? | yes | | + | canonical_url | string? | yes | | | description | string? | yes | | | meta_tags | [[Metatags](#Metatags)]? | yes | | | sitemap | [Sitemap](#Sitemap)? | yes | | @@ -21412,6 +21811,7 @@ List of fields and validation values fro each. See example below or refer `Inven | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | breadcrumbs | [[ApplicationItemSeoBreadcrumbs](#ApplicationItemSeoBreadcrumbs)]? | yes | | + | canonical_url | string? | yes | | | description | string? | yes | | | meta_tags | [[Metatags](#Metatags)]? | yes | | | sitemap | string? | yes | | @@ -21755,6 +22155,37 @@ List of fields and validation values fro each. See example below or refer `Inven | message | string? | yes | | +--- + +#### [UpdateMarketplaceOptinRequest](#UpdateMarketplaceOptinRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | brand_ids | [number]? | yes | | + | company_id | number? | yes | | + | enabled | boolean? | yes | | + | opt_level | string? | yes | | + | platform | string? | yes | | + | store_ids | [number]? | yes | | + + +--- + +#### [UpdateMarketplaceOptinResponse](#UpdateMarketplaceOptinResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | app_id | string? | yes | | + | brand_ids | [number]? | yes | | + | company_id | number? | yes | | + | created_by | [CreatedBy](#CreatedBy)? | yes | | + | enabled | boolean? | yes | | + | modified_by | [CreatedBy](#CreatedBy)? | yes | | + | opt_level | string? | yes | | + | platform | string? | yes | | + | store_ids | [number]? | yes | | + + --- #### [UpdateSearchConfigurationRequest](#UpdateSearchConfigurationRequest) diff --git a/documentation/platform/COMMUNICATION.md b/documentation/platform/COMMUNICATION.md index 64365c74f..f6b2b4dfe 100644 --- a/documentation/platform/COMMUNICATION.md +++ b/documentation/platform/COMMUNICATION.md @@ -17,13 +17,18 @@ Default * [createCampaign](#createcampaign) * [createEmailProvider](#createemailprovider) * [createEmailTemplate](#createemailtemplate) +* [createEventSubscriptions](#createeventsubscriptions) +* [createEventSubscriptionsByBulk](#createeventsubscriptionsbybulk) +* [createJobs](#createjobs) * [createSmsProvider](#createsmsprovider) * [createSmsTemplate](#createsmstemplate) * [deleteAudienceById](#deleteaudiencebyid) * [deleteEmailProviderById](#deleteemailproviderbyid) * [deleteEmailTemplateById](#deleteemailtemplatebyid) +* [deleteEventSubscriptionsById](#deleteeventsubscriptionsbyid) * [deleteSmsProviderById](#deletesmsproviderbyid) * [deleteSmsTemplateById](#deletesmstemplatebyid) +* [editEventSubscriptions](#editeventsubscriptions) * [getAppProviders](#getappproviders) * [getAudienceById](#getaudiencebyid) * [getAudiences](#getaudiences) @@ -40,12 +45,14 @@ Default * [getEmailTemplateById](#getemailtemplatebyid) * [getEmailTemplates](#getemailtemplates) * [getEventSubscriptions](#geteventsubscriptions) +* [getEventSubscriptionsById](#geteventsubscriptionsbyid) * [getGlobalProviders](#getglobalproviders) * [getGlobalVariables](#getglobalvariables) * [getJobLogs](#getjoblogs) * [getJobs](#getjobs) * [getNSampleRecordsFromCsv](#getnsamplerecordsfromcsv) * [getNSampleRecordsFromCsvByGet](#getnsamplerecordsfromcsvbyget) +* [getOtpConfiguration](#getotpconfiguration) * [getSmsProviderById](#getsmsproviderbyid) * [getSmsProviders](#getsmsproviders) * [getSmsTemplateById](#getsmstemplatebyid) @@ -67,6 +74,7 @@ Default * [updateCampaignById](#updatecampaignbyid) * [updateEmailProviderById](#updateemailproviderbyid) * [updateEmailTemplateById](#updateemailtemplatebyid) +* [updateOtpConfiguration](#updateotpconfiguration) * [updateSmsProviderById](#updatesmsproviderbyid) * [updateSmsTemplateById](#updatesmstemplatebyid) * [verfiyOtp](#verfiyotp) @@ -621,6 +629,250 @@ Refer `EmailTemplate` schema for more details. +--- + + +### createEventSubscriptions +Create event subscriptions + + + +```javascript +// Promise +const promise = platformClient.application("").communication.createEventSubscriptions({ body : value }); + +// Async/Await +const data = await platformClient.application("").communication.createEventSubscriptions({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [SubscriptionsObject](#SubscriptionsObject) | yes | Request body | + + +Create event subscriptions + +*Returned Response:* + + + + +[EventSubscriptionsBulkUpdateResponse](#EventSubscriptionsBulkUpdateResponse) + +Success + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": [ + { + "template": { + "sms": { + "subscribed": true, + "template": "65252a7f2b235b3b7a75e4be" + }, + "email": { + "subscribed": true, + "template": "65252a196fcb371a2d6aa418" + }, + "pushnotification": { + "subscribed": false + } + }, + "_id": "64b2ddb856dd97a75c452f2d", + "application": "64b2ddb6cb99a609e12a9bea", + "event": "64aec4c6c987e14691600e2b", + "slug": "invite-event", + "category": "website", + "created_at": "2023-07-15T17:56:08.601Z", + "updated_at": "2023-10-10T10:50:28.781Z" + } + ] +} +``` +
+ +
+ + + + + + + + + +--- + + +### createEventSubscriptionsByBulk +Create event subscriptions by bulk + + + +```javascript +// Promise +const promise = platformClient.application("").communication.createEventSubscriptionsByBulk({ body : value }); + +// Async/Await +const data = await platformClient.application("").communication.createEventSubscriptionsByBulk({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [EventSubscriptionsBulkUpdateRequest](#EventSubscriptionsBulkUpdateRequest) | yes | Request body | + + +Create event subscriptions by bulk + +*Returned Response:* + + + + +[Array](#Array) + +Success + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": [ + { + "template": { + "sms": { + "subscribed": true, + "template": "65252a7f2b235b3b7a75e4be" + }, + "email": { + "subscribed": true, + "template": "65252a196fcb371a2d6aa418" + }, + "pushnotification": { + "subscribed": false + } + }, + "_id": "64b2ddb856dd97a75c452f2d", + "application": "64b2ddb6cb99a609e12a9bea", + "event": "64aec4c6c987e14691600e2b", + "slug": "invite-event", + "category": "website", + "created_at": "2023-07-15T17:56:08.601Z", + "updated_at": "2023-10-10T10:50:28.781Z" + } + ] +} +``` +
+ +
+ + + + + + + + + +--- + + +### createJobs +Create jobs + + + +```javascript +// Promise +const promise = platformClient.application("").communication.createJobs({ body : value }); + +// Async/Await +const data = await platformClient.application("").communication.createJobs({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [CreateJobsReq](#CreateJobsReq) | yes | Request body | + + +Create jobs + +*Returned Response:* + + + + +[CreateJobsRes](#CreateJobsRes) + +Success + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "application": "000000000000000000000004", + "campaign": "656c9cad5638b4af9e2329af", + "completed": true, + "is_active": true, + "_id": "5fd9fd44c474a7e3d5d376d6", + "created_at": "2020-12-16T12:27:48.051Z", + "updated_at": "2020-12-16T12:27:48.051Z", + "__v": 0 + } +} +``` +
+ +
+ + + + + + + + + --- @@ -806,10 +1058,12 @@ Delete audience by id ```javascript // Promise -const promise = platformClient.application("").communication.deleteAudienceById({ id : value }); +const promise = platformClient.application("").communication.deleteAudienceById({ id : value, + body : value }); // Async/Await -const data = await platformClient.application("").communication.deleteAudienceById({ id : value }); +const data = await platformClient.application("").communication.deleteAudienceById({ id : value, + body : value }); ``` @@ -819,7 +1073,7 @@ const data = await platformClient.application("").communication. | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | id | string | yes | Audience id | - +| body | [AudienceReq](#AudienceReq) | yes | Request body | Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. Use this API to delete audience by id. @@ -829,9 +1083,9 @@ Audience is used to import CSV files containing emails, phone numbers, and other -[GenericDelete](#GenericDelete) +[Audience](#Audience) -Refer `GenericDelete` schema for more details. +Refer `Audience` schema for more details. @@ -846,10 +1100,26 @@ Refer `GenericDelete` schema for more details. ```json { "value": { - "message": "Deletion Successfull", - "acknowledged": true, - "affected": 1, - "operation": "TEMP-ST-DEL:ID" + "_id": "64ad30a15efbc5f85fb549d8", + "application": "64802b8bd4dc759bcc1fef86", + "name": "dummy ds", + "description": "desc", + "records_count": 1, + "type": "raw_csv", + "tags": [ + "tag1", + "tag2" + ], + "headers": [ + "phone", + "mail" + ], + "file_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x5/application/64802b8bd4dc759bcc1fef86/datasources/ODKRR6aBQ-jsonviewer.csv", + "is_active": true, + "created_at": "2023-07-11T10:36:17.340Z", + "updated_at": "2023-07-11T10:36:17.340Z", + "slug": "dummy-1-5JrNGM8LA", + "__v": 0 } } ``` @@ -1003,6 +1273,75 @@ Refer `GenericDelete` schema for more details. +--- + + +### deleteEventSubscriptionsById +Create event subscriptions + + + +```javascript +// Promise +const promise = platformClient.application("").communication.deleteEventSubscriptionsById({ id : value }); + +// Async/Await +const data = await platformClient.application("").communication.deleteEventSubscriptionsById({ id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | Event subscription id | + + + +Create event subscriptions + +*Returned Response:* + + + + +[GenericDelete](#GenericDelete) + +Refer `GenericDelete` schema for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "message": "Deletion Successfull", + "acknowledged": true, + "affected": 1, + "operation": "TEMP-ST-DEL:ID" + } +} +``` +
+ +
+ + + + + + + + + --- @@ -1141,6 +1480,95 @@ Refer `GenericDelete` schema for more details. +--- + + +### editEventSubscriptions +Create event subscriptions + + + +```javascript +// Promise +const promise = platformClient.application("").communication.editEventSubscriptions({ id : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").communication.editEventSubscriptions({ id : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | Event subscription id | +| body | [SubscriptionsObject](#SubscriptionsObject) | yes | Request body | + + +Create event subscriptions + +*Returned Response:* + + + + +[EventSubscriptionsBulkUpdateResponse](#EventSubscriptionsBulkUpdateResponse) + +Success + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": [ + { + "template": { + "sms": { + "subscribed": true, + "template": "65252a7f2b235b3b7a75e4be" + }, + "email": { + "subscribed": true, + "template": "65252a196fcb371a2d6aa418" + }, + "pushnotification": { + "subscribed": false + } + }, + "_id": "64b2ddb856dd97a75c452f2d", + "application": "64b2ddb6cb99a609e12a9bea", + "event": "64aec4c6c987e14691600e2b", + "slug": "invite-event", + "category": "website", + "created_at": "2023-07-15T17:56:08.601Z", + "updated_at": "2023-10-10T10:50:28.781Z" + } + ] +} +``` +
+ +
+ + + + + + + + + --- @@ -1333,12 +1761,14 @@ Get audiences // Promise const promise = platformClient.application("").communication.getAudiences({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); // Async/Await const data = await platformClient.application("").communication.getAudiences({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); ``` @@ -1349,7 +1779,8 @@ const data = await platformClient.application("").communication. | --------- | ----- | -------- | ----------- | | pageNo | number | no | Current page no | | pageSize | number | no | Current request items count | -| sort | Object | no | To sort based on created_at | +| sort | Object | no | To sort based on created_at | +| query | Object | no | To search based on plain text | @@ -1652,12 +2083,14 @@ Get campaigns ```javascript // Promise -const promise = platformClient.application("").communication.getCampaigns({ pageNo : value, +const promise = platformClient.application("").communication.getCampaigns({ query : value, + pageNo : value, pageSize : value, sort : value }); // Async/Await -const data = await platformClient.application("").communication.getCampaigns({ pageNo : value, +const data = await platformClient.application("").communication.getCampaigns({ query : value, + pageNo : value, pageSize : value, sort : value }); ``` @@ -1668,6 +2101,7 @@ const data = await platformClient.application("").communication. | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | +| query | Object | no | To search based on plain text | | pageNo | number | no | Current page no | | pageSize | number | no | Current request items count | | sort | Object | no | To sort based on created_at | @@ -2180,12 +2614,14 @@ Get email providers // Promise const promise = platformClient.application("").communication.getEmailProviders({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); // Async/Await const data = await platformClient.application("").communication.getEmailProviders({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); ``` @@ -2196,7 +2632,8 @@ const data = await platformClient.application("").communication. | --------- | ----- | -------- | ----------- | | pageNo | number | no | Current page no | | pageSize | number | no | Current request items count | -| sort | Object | no | To sort based on created_at | +| sort | Object | no | To sort based on created_at | +| query | Object | no | To search based on plain text | @@ -2392,12 +2829,14 @@ Get email templates // Promise const promise = platformClient.application("").communication.getEmailTemplates({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); // Async/Await const data = await platformClient.application("").communication.getEmailTemplates({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); ``` @@ -2408,7 +2847,8 @@ const data = await platformClient.application("").communication. | --------- | ----- | -------- | ----------- | | pageNo | number | no | Current page no | | pageSize | number | no | Current request items count | -| sort | Object | no | To sort based on created_at | +| sort | Object | no | To sort based on created_at | +| query | Object | no | To search based on plain text | @@ -2537,7 +2977,7 @@ const data = await platformClient.application("").communication. | --------- | ----- | -------- | ----------- | | pageNo | number | no | Current page no | | pageSize | number | no | Current request items count | -| populate | string | no | populate fields | +| populate | string | no | Populate Fields | @@ -3126,14 +3566,103 @@ Success "updated_at": "2021-03-03T09:00:48.141Z", "__v": 0 } - ], - "page": { - "type": "number", - "current": 1, - "size": 200, - "item_total": 28, - "has_next": false - } + ], + "page": { + "type": "number", + "current": 1, + "size": 200, + "item_total": 28, + "has_next": false + } + } +} +``` +
+ + + + + + + + + + + +--- + + +### getEventSubscriptionsById +Get event subscriptions by id + + + +```javascript +// Promise +const promise = platformClient.application("").communication.getEventSubscriptionsById({ id : value, + populate : value }); + +// Async/Await +const data = await platformClient.application("").communication.getEventSubscriptionsById({ id : value, + populate : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | Event subscription id | +| populate | string | no | Populate Fields | + + + +Get event subscriptions by id + +*Returned Response:* + + + + +[EventSubscription](#EventSubscription) + +Success + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "template": { + "sms": { + "subscribed": true, + "template": "64aec4c4c987e14691600d1a" + }, + "email": { + "subscribed": true, + "template": "64aec4c4c987e14691600d1a" + }, + "pushnotification": { + "subscribed": false + } + }, + "_id": "64b2ddb756dd97a75c452ee6", + "application": "64b2ddb6cb99a609e12a9bea", + "event": "64aec4c4c987e14691600d1d", + "slug": "arriving_early_out_for_delivery-event", + "category": "website", + "created_at": "2023-07-15T17:56:07.926Z", + "updated_at": "2023-10-07T09:41:32.836Z", + "__v": 0 } } ``` @@ -3323,12 +3852,14 @@ Get job logs // Promise const promise = platformClient.application("").communication.getJobLogs({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); // Async/Await const data = await platformClient.application("").communication.getJobLogs({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); ``` @@ -3339,7 +3870,8 @@ const data = await platformClient.application("").communication. | --------- | ----- | -------- | ----------- | | pageNo | number | no | Current page no | | pageSize | number | no | Current request items count | -| sort | Object | no | To sort based on created_at | +| sort | Object | no | To sort based on created_at | +| query | Object | no | To search based on plain text | @@ -3426,12 +3958,14 @@ Get jobs // Promise const promise = platformClient.application("").communication.getJobs({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); // Async/Await const data = await platformClient.application("").communication.getJobs({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); ``` @@ -3442,7 +3976,8 @@ const data = await platformClient.application("").communication. | --------- | ----- | -------- | ----------- | | pageNo | number | no | Current page no | | pageSize | number | no | Current request items count | -| sort | Object | no | To sort based on created_at | +| sort | Object | no | To sort based on created_at | +| query | Object | no | To search based on plain text | @@ -3646,6 +4181,77 @@ Refer `GetNRecordsCsvRes` schema for more details. +--- + + +### getOtpConfiguration +Get otp-configuration, if not present in db then return default settings + + + +```javascript +// Promise +const promise = platformClient.application("").communication.getOtpConfiguration(); + +// Async/Await +const data = await platformClient.application("").communication.getOtpConfiguration(); +``` + + + + + + +Get otp-configuration + +*Returned Response:* + + + + +[OtpConfiguration](#OtpConfiguration) + +Success + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "type": "numeric", + "otp_length": 4, + "expiry": { + "type": "new", + "duration": { + "time": 5, + "denomination": "min" + } + }, + "application_id": "6399ba6924ab1bacf0131492", + "company_id": "1" + } +} +``` +
+ +
+ + + + + + + + + --- @@ -3931,12 +4537,14 @@ Get sms templates // Promise const promise = platformClient.application("").communication.getSmsTemplates({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); // Async/Await const data = await platformClient.application("").communication.getSmsTemplates({ pageNo : value, pageSize : value, - sort : value }); + sort : value, + query : value }); ``` @@ -3947,7 +4555,8 @@ const data = await platformClient.application("").communication. | --------- | ----- | -------- | ----------- | | pageNo | number | no | Current page no | | pageSize | number | no | Current request items count | -| sort | Object | no | To sort based on created_at | +| sort | Object | no | To sort based on created_at | +| query | Object | no | To search based on plain text | @@ -4130,11 +4739,13 @@ Get subscribed email templates ```javascript // Promise const promise = platformClient.application("").communication.getSubscribedEmailTemplates({ pageNo : value, - pageSize : value }); + pageSize : value, + query : value }); // Async/Await const data = await platformClient.application("").communication.getSubscribedEmailTemplates({ pageNo : value, - pageSize : value }); + pageSize : value, + query : value }); ``` @@ -4144,7 +4755,8 @@ const data = await platformClient.application("").communication. | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | pageNo | number | no | Current page no | -| pageSize | number | no | Current request items count | +| pageSize | number | no | Current request items count | +| query | Object | no | To search based on plain text | @@ -4256,11 +4868,13 @@ Get subscribed sms templates ```javascript // Promise const promise = platformClient.application("").communication.getSubscribedSmsTemplates({ pageNo : value, - pageSize : value }); + pageSize : value, + query : value }); // Async/Await const data = await platformClient.application("").communication.getSubscribedSmsTemplates({ pageNo : value, - pageSize : value }); + pageSize : value, + query : value }); ``` @@ -4270,7 +4884,8 @@ const data = await platformClient.application("").communication. | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | pageNo | number | no | Current page no | -| pageSize | number | no | Current request items count | +| pageSize | number | no | Current request items count | +| query | Object | no | To search based on plain text | @@ -5552,6 +6167,77 @@ Refer `EmailTemplate` schema for more details. +--- + + +### updateOtpConfiguration +Update/insert otp configurations + + + +```javascript +// Promise +const promise = platformClient.application("").communication.updateOtpConfiguration(); + +// Async/Await +const data = await platformClient.application("").communication.updateOtpConfiguration(); +``` + + + + + + +Update otp-configuration + +*Returned Response:* + + + + +[OtpConfiguration](#OtpConfiguration) + +Success + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "type": "numeric", + "otp_length": 4, + "expiry": { + "type": "new", + "duration": { + "time": 5, + "denomination": "min" + } + }, + "application_id": "6399ba6924ab1bacf0131492", + "company_id": "1" + } +} +``` +
+ +
+ + + + + + + + + --- @@ -6001,6 +6687,41 @@ Success | from_name | string? | yes | | +--- + +#### [CommunicationTemplate](#CommunicationTemplate) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | subscribed | boolean? | yes | Whether the user is subscribed or not | + | template | string? | yes | Template ID | + + +--- + +#### [CreateJobsReq](#CreateJobsReq) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | campaign | string? | yes | | + + +--- + +#### [CreateJobsRes](#CreateJobsRes) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | __v | number? | yes | | + | _id | string? | yes | | + | application | string? | yes | | + | campaign | string? | yes | | + | completed | boolean? | yes | | + | created_at | string? | yes | | + | is_active | boolean? | yes | | + | updated_at | string? | yes | | + + --- #### [DefaultSmsProviders](#DefaultSmsProviders) @@ -6245,6 +6966,32 @@ Success | page | [Page](#Page)? | yes | | +--- + +#### [EventSubscriptionsBulkUpdateRequest](#EventSubscriptionsBulkUpdateRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | subscriptions | [[SubscriptionsObject](#SubscriptionsObject)]? | yes | | + + +--- + +#### [EventSubscriptionsBulkUpdateResponse](#EventSubscriptionsBulkUpdateResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | __v | number? | yes | | + | _id | string? | yes | | + | application | string? | yes | | + | category | string? | yes | | + | created_at | string? | yes | | + | event | string? | yes | | + | slug | string? | yes | | + | template | [EventSubscriptionTemplate](#EventSubscriptionTemplate)? | yes | | + | updated_at | string? | yes | | + + --- #### [EventSubscriptionTemplate](#EventSubscriptionTemplate) @@ -6563,6 +7310,39 @@ Success | title | string? | yes | | +--- + +#### [OtpConfiguration](#OtpConfiguration) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | application_id | string? | yes | | + | company_id | string? | yes | | + | expiry | [OtpConfigurationExpiry](#OtpConfigurationExpiry) | no | | + | otp_length | number | no | | + | type | string | no | | + + +--- + +#### [OtpConfigurationExpiry](#OtpConfigurationExpiry) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | duration | [OtpConfigurationExpiryDuration](#OtpConfigurationExpiryDuration) | no | | + | type | string | no | | + + +--- + +#### [OtpConfigurationExpiryDuration](#OtpConfigurationExpiryDuration) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | denomination | string | no | | + | time | number | no | | + + --- #### [Page](#Page) @@ -6955,6 +7735,16 @@ Success | suppressed | number? | yes | | +--- + +#### [SubscriptionsObject](#SubscriptionsObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | Subscription ID | + | template | [TemplateObject](#TemplateObject)? | yes | | + + --- #### [SystemEmailTemplate](#SystemEmailTemplate) @@ -7065,6 +7855,17 @@ Success | template_type | string? | yes | | +--- + +#### [TemplateObject](#TemplateObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | email | [CommunicationTemplate](#CommunicationTemplate)? | yes | | + | pushnotification | [CommunicationTemplate](#CommunicationTemplate)? | yes | | + | sms | [CommunicationTemplate](#CommunicationTemplate)? | yes | | + + --- #### [TriggerJobRequest](#TriggerJobRequest) diff --git a/documentation/platform/COMPANYPROFILE.md b/documentation/platform/COMPANYPROFILE.md index 48d616637..2529d984a 100644 --- a/documentation/platform/COMPANYPROFILE.md +++ b/documentation/platform/COMPANYPROFILE.md @@ -129,7 +129,13 @@ Company profile object. See example below or refer `GetCompanyProfileSerializerR "uid": 1, "business_country_info": { "country": "India", - "country_code": "IN" + "country_code": "IN", + "currency": { + "code": "INR", + "symbol": "₹", + "name": "Indian Rupee" + }, + "timezone": "Asia/Calcutta" } } ``` @@ -1073,7 +1079,9 @@ const promise = platformClient.companyProfile.getLocations({ storeType : value, stage : value, pageNo : value, pageSize : value, - locationIds : value }); + locationIds : value, + types : value, + tags : value }); // Async/Await const data = await platformClient.companyProfile.getLocations({ storeType : value, @@ -1081,7 +1089,9 @@ const data = await platformClient.companyProfile.getLocations({ storeType : val stage : value, pageNo : value, pageSize : value, - locationIds : value }); + locationIds : value, + types : value, + tags : value }); ``` @@ -1095,7 +1105,9 @@ const data = await platformClient.companyProfile.getLocations({ storeType : val | stage | string | no | to filter companies on basis of verified or unverified companies. | | pageNo | number | no | The page number to navigate through the given set of results | | pageSize | number | no | Number of items to retrieve in each page. Default is 10. | -| locationIds | Array | no | Helps to filter stores on the basis of uids. | +| locationIds | Array | no | Helps to filter stores on the basis of uids. | +| types | Array | no | Helps to get the location list on the basis of multiple location type. | +| tags | Array | no | Helps to get the location list on the basis of multiple location tag. | @@ -1449,12 +1461,14 @@ Returns a success response | address_type | string? | yes | | | city | string? | yes | | | country | string? | yes | | - | country_code | string? | yes | | + | country_code | string | no | | | landmark | string? | yes | | | latitude | number | no | | | longitude | number | no | | | pincode | number? | yes | | + | sector | string? | yes | | | state | string? | yes | | + | state_code | string? | yes | | --- @@ -1492,8 +1506,10 @@ Returns a success response | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | country | string? | yes | | - | country_code | string? | yes | | + | country | string | no | | + | country_code | string | no | | + | currency | [CountryCurrencyInfo](#CountryCurrencyInfo) | no | | + | timezone | string | no | | --- @@ -1624,6 +1640,17 @@ Returns a success response | phone | [[SellerPhoneNumber](#SellerPhoneNumber)]? | yes | | +--- + +#### [CountryCurrencyInfo](#CountryCurrencyInfo) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | code | string | no | | + | name | string | no | | + | symbol | string | no | | + + --- #### [CreateUpdateAddressSerializer](#CreateUpdateAddressSerializer) @@ -1712,7 +1739,9 @@ Returns a success response | latitude | number | no | | | longitude | number | no | | | pincode | number? | yes | | + | sector | string? | yes | | | state | string? | yes | | + | state_code | string? | yes | | --- @@ -1802,6 +1831,7 @@ Returns a success response | ---------- | ---- | -------- | ----------- | | _custom_json | string? | yes | | | address | [GetAddressSerializer](#GetAddressSerializer) | no | | + | auto_assign_courier_partner | boolean? | yes | | | auto_invoice | boolean? | yes | | | avg_order_processing_time | [AverageOrderProcessingTime](#AverageOrderProcessingTime)? | yes | | | bulk_shipment | boolean? | yes | | @@ -1917,6 +1947,7 @@ Returns a success response | ---------- | ---- | -------- | ----------- | | _custom_json | string? | yes | | | address | [AddressSerializer](#AddressSerializer) | no | | + | auto_assign_courier_partner | boolean? | yes | | | auto_invoice | boolean? | yes | | | avg_order_processing_time | [AverageOrderProcessingTime](#AverageOrderProcessingTime)? | yes | | | bulk_shipment | boolean? | yes | | @@ -1926,7 +1957,7 @@ Returns a success response | credit_note | boolean? | yes | | | default_order_acceptance_timing | boolean? | yes | Flag to set order_acceptance_timing as default timing | | display_name | string | no | | - | documents | [[Document](#Document)]? | yes | | + | documents | [[Document](#Document)] | no | | | gst_credentials | [InvoiceDetailsSerializer](#InvoiceDetailsSerializer)? | yes | | | holiday | [[HolidaySchemaSerializer](#HolidaySchemaSerializer)]? | yes | | | manager | [LocationManagerSerializer](#LocationManagerSerializer)? | yes | | diff --git a/documentation/platform/CONFIGURATION.md b/documentation/platform/CONFIGURATION.md index e5064ea6a..c24e84c81 100644 --- a/documentation/platform/CONFIGURATION.md +++ b/documentation/platform/CONFIGURATION.md @@ -107,21 +107,28 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "name": "testdm.hostx0.de", - "verified": true, - "txtRecords": [], - "message": "New domain added successfully", - "is_primary": false, - "is_shortlink": false, - "_id": "6048497e87f5730423149190" + "value": { + "name": "testdm.hostfynd.dev", + "verified": true, + "message": "New domain added successfully", + "is_primary": false, + "is_shortlink": false, + "_id": "6048497e87f5730423149190" + } } ```
+
+ @@ -170,37 +177,45 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "domains": [ - { - "_id": "5eb1177748312a3bd55d0f1e", - "verified": true, - "name": "uniket.hostx0.de", - "is_primary": true, - "is_shortlink": false - }, - { - "verified": true, - "is_primary": false, - "is_shortlink": true, - "_id": "5f0858c5f86e00cd42dccc8d", - "name": "jd.hostx0.de" - }, - { - "verified": true, - "is_primary": false, - "is_shortlink": false, - "_id": "6048497e87f5730423149190", - "name": "testdm.hostx0.de" - } - ] + "value": { + "domains": [ + { + "_id": "5eb1177748312a3bd55d0f1e", + "verified": true, + "name": "uniket.hostx0.de", + "is_primary": true, + "is_shortlink": false + }, + { + "verified": true, + "is_primary": false, + "is_shortlink": true, + "_id": "5f0858c5f86e00cd42dccc8d", + "name": "jd.hostx0.de" + }, + { + "verified": true, + "is_primary": false, + "is_shortlink": false, + "_id": "6048497e87f5730423149190", + "name": "testdm.hostx0.de" + } + ] + } } ```
+
+ @@ -249,13 +264,25 @@ Success
-  Example: +  Examples: + + +
+  success ```json - +{ + "value": { + "app": { + "name": "testing" + } + } +} ```
+
+ @@ -300,91 +327,88 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "tokens": { - "firebase": { - "credentials": { - "ios": { - "application_id": "test", - "api_key": "test" - }, - "android": { + "value": { + "tokens": { + "firebase": { + "credentials": { + "ios": { + "application_id": "test", + "api_key": "test" + }, + "android": { + "application_id": "test", + "api_key": "test" + }, + "project_id": "uniket-d8cdc", + "gcm_sender_id": "test", "application_id": "test", "api_key": "test" }, - "project_id": "uniket-d8cdc", - "gcm_sender_id": "test", - "application_id": "test", - "api_key": "test" - }, - "enabled": true - }, - "moengage": { - "credentials": { - "app_id": "test" + "enabled": true }, - "enabled": true - }, - "segment": { - "credentials": { - "write_key": "test" + "moengage": { + "credentials": { + "app_id": "test" + }, + "enabled": true }, - "enabled": true - }, - "gtm": { - "credentials": { - "api_key": "test" + "segment": { + "credentials": { + "write_key": "test" + }, + "enabled": true }, - "enabled": false - }, - "freshchat": { - "credentials": { - "app_id": "123456", - "app_key": "123456789", - "web_token": "" + "gtm": { + "credentials": { + "api_key": "test" + }, + "enabled": false }, - "enabled": false - }, - "safetynet": { - "credentials": { - "api_key": "test" + "freshchat": { + "credentials": { + "app_id": "123456", + "app_key": "123456789", + "web_token": "" + }, + "enabled": false }, - "enabled": true - }, - "fynd_rewards": { - "credentials": { - "public_key": "test" - } - }, - "auth": { - "google": { - "appId": "test" + "safetynet": { + "credentials": { + "api_key": "test" + }, + "enabled": true }, - "facebook": { - "appId": "test" + "fynd_rewards": { + "credentials": { + "public_key": "test" + } }, - "accountkit": { - "appId": "" + "google_map": { + "credentials": { + "api_key": "test" + } } }, - "google_map": { - "credentials": { - "api_key": "test" - } - } - }, - "_id": "5e66282a073261060ee83751", - "application": "000000000000000000000004", - "created_at": "2020-03-09T11:27:38.894Z", - "modified_at": "2020-12-24T05:39:17.054Z", - "__v": 0 + "_id": "5e66282a073261060ee83751", + "application": "000000000000000000000001", + "created_at": "2020-03-09T11:27:38.894Z", + "modified_at": "2020-12-24T05:39:17.054Z", + "__v": 0 + } } ```
+
+ @@ -429,53 +453,62 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "name": "Uniket B2B", - "description": "Uniket B2B - India's Fastest Growing Retail Store - Aapki Badhti Dukaan", - "logo": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" - }, - "mobile_logo": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" - }, - "favicon": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/favicon/original/y3h6SSlY5-Uniket-B2B.png" - }, - "banner": { - "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/landscape-banner/original/uSwlNpygq-Uniket-B2B.png" - }, - "domain": { - "verified": true, - "is_primary": true, - "is_shortlink": false, - "_id": "5eb1177748312a3bd55d0f1e", - "name": "uniket.hostx0.de" - }, - "domains": [ - { + "value": { + "name": "Uniket B2B", + "description": "Uniket B2B - India's Fastest Growing Retail Store - Aapki Badhti Dukaan", + "logo": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" + }, + "mobile_logo": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" + }, + "favicon": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/favicon/original/y3h6SSlY5-Uniket-B2B.png" + }, + "banner": { + "secure_url": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/x1/company/1/applications/000000000000000000000004/application/pictures/landscape-banner/original/uSwlNpygq-Uniket-B2B.png" + }, + "domain": { "verified": true, "is_primary": true, "is_shortlink": false, "_id": "5eb1177748312a3bd55d0f1e", - "name": "uniket.hostx0.de" + "name": "uniket.hostfynd.dev" }, - { - "verified": true, - "is_primary": false, - "is_shortlink": true, - "_id": "5f0858c5f86e00cd42dccc8d", - "name": "jd.hostx0.de" - } - ], - "company_id": 1, - "_id": "000000000000000000000004" + "domains": [ + { + "verified": true, + "is_primary": true, + "is_shortlink": false, + "_id": "5eb1177748312a3bd55d0f1e", + "name": "uniket.hostfynd.dev" + }, + { + "verified": true, + "is_primary": false, + "is_shortlink": true, + "_id": "5f0858c5f86e00cd42dccc8d", + "name": "jd.hostfynd.dev" + } + ], + "company_id": 2, + "slug": "test-mg1-36,", + "_id": "000000000000000000000001" + } } ```
+
+ @@ -531,26 +564,36 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "items": { - "uid": 108, - "name": "Sample2 Company", - "company_type": "mbo" - }, - "page": { - "type": "number", - "size": 200, - "current": 1, - "has_next": false, - "item_total": 3 + "value": { + "items": [ + { + "uid": 2, + "name": "Sample2 Company", + "company_type": "mbo" + } + ], + "page": { + "type": "number", + "size": 200, + "current": 1, + "has_next": false, + "item_total": 3 + } } } ```
+
+ @@ -595,13 +638,17 @@ Success
-  Example: +  Examples: + + +
+  success ```json { "value": { "address": { - "loc": null, + "loc": {}, "address_line": [ "Warehouse 5, Near Industrial Complex", "2nd Lane, Andheri" @@ -691,7 +738,7 @@ Success "business_highlights": [ { "_id": "5fc901611dfba6c2e87d1ca9", - "title": "100% Genuine Products", + "title": "Most Genuine Products", "icon": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/business-highlights/pictures/square-logo/original/bVlx43F2a-H6pvZ9tzp-business-logo-icon.png", "sub_title": "Directly from brands" }, @@ -708,7 +755,7 @@ Success "sub_title": "For all damaged/wrong items" } ], - "application": "000000000000000000000004", + "application": "000000000000000000000001", "created_at": "2020-03-09T11:25:49.921Z", "modified_at": "2020-12-03T15:16:49.087Z", "__v": 99 @@ -717,6 +764,8 @@ Success ```
+
+ @@ -761,29 +810,37 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "_id": "5ec7a85965c3893857538d93", - "supported_currency": [ - "5ec75d11f7bfb5a7d38f3524", - "5ec75d11f7bfb54d798f3516", - "5ec75d11f7bfb553b88f355f", - "5ec75d11f7bfb559d08f34d5", - "5ec75d11f7bfb5d1e98f34da" - ], - "application": "000000000000000000000004", - "default_currency": { - "ref": "5ec75d11f7bfb54d798f3516", - "code": "USD" - }, - "created_at": "2020-05-22T10:24:25.984Z", - "modified_at": "2021-03-09T10:47:32.664Z" + "value": { + "_id": "5ec7a85965c3893857538d93", + "supported_currency": [ + "5ec75d11f7bfb5a7d38f3524", + "5ec75d11f7bfb54d798f3516", + "5ec75d11f7bfb553b88f355f", + "5ec75d11f7bfb559d08f34d5", + "5ec75d11f7bfb5d1e98f34da" + ], + "application": "000000000000000000000001", + "default_currency": { + "ref": "5ec75d11f7bfb54d798f3516", + "code": "USD" + }, + "created_at": "2020-05-22T10:24:25.984Z", + "modified_at": "2021-03-09T10:47:32.664Z" + } } ```
+
+ @@ -828,109 +885,123 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "feature": { - "product_detail": { - "similar": [ - "basic", - "visual", - "brand", - "category", - "seller", - "price", - "specs" - ], - "seller_selection": true, - "update_product_meta": true, - "request_product": true - }, - "landing_page": { - "launch_page": { - "page_type": "home", - "params": {}, - "query": {} - }, - "continue_as_guest": true, - "login_btn_text": "Click here to sign-in", - "show_domain_textbox": true, - "show_register_btn": true - }, - "registration_page": { - "ask_store_address": false - }, - "home_page": { - "order_processing": true - }, - "common": { - "communication_optin_dialog": { - "visibility": true - }, - "deployment_store_selection": { - "enabled": true, - "type": "hard" - }, - "listing_price": { - "value": "min", - "sort": "min" - }, - "currency": { - "value": [ - "INR" + "value": { + "feature": { + "product_detail": { + "similar": [ + "basic", + "visual", + "brand", + "category", + "seller", + "price", + "specs" ], - "type": "explicit", - "default_currency": "INR" + "seller_selection": true, + "update_product_meta": true, + "request_product": true }, - "revenue_engine": { - "enabled": false + "landing_page": { + "launch_page": { + "page_type": "home", + "params": {}, + "query": {} + }, + "continue_as_guest": true, + "login_btn_text": "Click here to sign-in", + "show_domain_textbox": true, + "show_register_btn": true }, - "feedback": { - "enabled": true + "registration_page": { + "ask_store_address": false }, - "compare_products": { - "enabled": true + "home_page": { + "order_processing": true }, - "reward_points": { - "credit": { - "enabled": true + "common": { + "communication_optin_dialog": { + "visibility": true }, - "debit": { + "deployment_store_selection": { "enabled": true, - "auto_apply": false, - "strategy_channel": "REWARDS" + "type": "hard" + }, + "listing_price": { + "value": "min", + "sort": "min" + }, + "listing_page": { + "sort_on": "popular" + }, + "international_shipping": { + "enabled": false + }, + "currency": { + "value": [ + "INR" + ], + "type": "explicit", + "default_currency": "INR" + }, + "revenue_engine": { + "enabled": false + }, + "feedback": { + "enabled": true + }, + "compare_products": { + "enabled": true + }, + "reward_points": { + "credit": { + "enabled": true + }, + "debit": { + "enabled": true, + "auto_apply": false, + "strategy_channel": "REWARDS" + } } - } - }, - "cart": { - "gst_input": true, - "staff_selection": true, - "placing_for_customer": true, - "google_map": true, - "revenue_engine_coupon": false - }, - "qr": { - "application": true, - "products": true, - "collections": true - }, - "pcr": { - "staff_selection": true - }, - "order": { - "buy_again": true - }, - "_id": "5e57643c986e4119c973df7d", - "app": "000000000000000000000004", - "created_at": "2020-02-27T06:39:56.088Z", - "modified_at": "2021-02-02T11:04:14.289Z", - "__v": 1 + }, + "cart": { + "gst_input": true, + "staff_selection": true, + "placing_for_customer": true, + "google_map": true, + "revenue_engine_coupon": false + }, + "qr": { + "application": true, + "products": true, + "collections": true + }, + "pcr": { + "staff_selection": true + }, + "order": { + "buy_again": true + }, + "_id": "5e57643c986e4119c973df7d", + "app": "000000000000000000000001", + "created_at": "2020-02-27T06:39:56.088Z", + "modified_at": "2021-02-02T11:04:14.289Z", + "__v": 1 + } } } ```
+
+ @@ -983,29 +1054,53 @@ Success
-  Example: - -```json -{ - "items": { - "id": "5ec2c0b168fc2800017112f5", - "uid": 1, - "name": "RRL01", - "display_name": "RRL01", - "store_type": "warehouse", - "store_code": "WH_8513", - "company_id": 1 - }, - "page": { - "type": "number", - "size": 200, - "current": 1, - "has_next": true, - "item_total": 3 - } -} -``` -
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "id": "5ec2c0b168fc2800017112f5", + "uid": 1, + "name": "RRL01", + "display_name": "RRL01", + "store_type": "warehouse", + "store_code": "WH_8513", + "company_id": 2, + "address": { + "country": "INDIA", + "address1": "76, GROUND FLOOR, R CITY MALL, GHATKOPAR WEST", + "city": "Mumbai", + "pincode": 400086, + "lat_long": { + "type": "Point", + "coordinates": [ + 72.916756, + 19.099478 + ] + }, + "state": "MAHARASHTRA" + } + } + ], + "page": { + "type": "number", + "size": 200, + "current": 1, + "has_next": true, + "item_total": 3 + } + } +} +``` +
+ +
@@ -1051,31 +1146,39 @@ Success. Check the example shown below or refer `AppCurrencyResponse` for more d
-  Example: +  Examples: + + +
+  success ```json { - "application": "000000000000000000000001", - "default_currency": { - "ref": "5ecf6122d953d4242c044907", - "code": "INR" - }, - "supported_currency": [ - { - "_id": "5ecf6122d953d4242c044907", - "is_active": true, - "name": "Indian Rupee", - "code": "INR", - "decimal_digits": 2, - "symbol": "₹", - "created_at": "2020-05-28T06:58:42.532Z", - "modified_at": "2021-04-05T16:44:14.358Z" - } - ] + "value": { + "application": "000000000000000000000001", + "default_currency": { + "ref": "5ecf6122d953d4242c044907", + "code": "INR" + }, + "supported_currency": [ + { + "_id": "5ecf6122d953d4242c044907", + "is_active": true, + "name": "Indian Rupee", + "code": "INR", + "decimal_digits": 2, + "symbol": "₹", + "created_at": "2020-05-28T06:58:42.532Z", + "modified_at": "2021-04-05T16:44:14.358Z" + } + ] + } } ```
+
+ @@ -1120,13 +1223,24 @@ Success
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "company_id": 2, + "name": "test" + } +} ```
+
+ @@ -1182,13 +1296,26 @@ Success
-  Example: +  Examples: + + +
+  success ```json - +{ + "value": { + "app": { + "name": "testing", + "company_id": 2 + } + } +} ```
+
+ @@ -1241,120 +1368,128 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "items": [ - { - "validators": { - "company": { - "json_schema": [ - { - "display": "Host", - "key": "host", - "type": "text", - "tooltip": "Enter host address" - } - ], - "browser_script": "" - }, - "store": { - "json_schema": [], - "browser_script": "" - }, - "inventory": { - "json_schema": [], - "browser_script": "" + "value": { + "items": [ + { + "validators": { + "company": { + "json_schema": [ + { + "display": "Host", + "key": "host", + "type": "text", + "tooltip": "Enter host address" + } + ], + "browser_script": "" + }, + "store": { + "json_schema": [], + "browser_script": "" + }, + "inventory": { + "json_schema": [], + "browser_script": "" + }, + "order": { + "json_schema": [], + "browser_script": "" + } }, - "order": { - "json_schema": [], - "browser_script": "" - } + "description": "awesome integration", + "description_html": "", + "constants": "{\"mop_mapping\":{\"FYND\":\"FYND\"}}", + "companies": [], + "support": [ + "inventory", + "order" + ], + "_id": "5e56089f4265cf2846d1e58c", + "name": "x0-1", + "meta": [ + { + "public": true, + "_id": "5e56089f4265cf81e1d1e58e", + "name": "wow", + "value": "1" + } + ], + "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1582696589/addsale/platform/integrations/icon/jihgcoibfmdttgiukwg0.png", + "owner": "5e55fe074bda3c392ed9eab2", + "created_at": "2020-02-26T05:56:47.214Z", + "updated_at": "2021-03-02T12:29:03.554Z", + "token": "fKoHRW5H", + "secret": "d1E85CTmf", + "__v": 12 }, - "description": "awesome integration", - "description_html": "", - "constants": "{\"mop_mapping\":{\"FYND\":\"FYND\"}}", - "companies": [], - "support": [ - "inventory", - "order" - ], - "_id": "5e56089f4265cf2846d1e58c", - "name": "x0-1", - "meta": [ - { - "public": true, - "_id": "5e56089f4265cf81e1d1e58e", - "name": "wow", - "value": "1" - } - ], - "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1582696589/addsale/platform/integrations/icon/jihgcoibfmdttgiukwg0.png", - "owner": "5e55fe074bda3c392ed9eab2", - "created_at": "2020-02-26T05:56:47.214Z", - "modified_at": "2021-03-02T12:29:03.554Z", - "token": "fKoHRW5H", - "secret": "d1E85CTmf", - "__v": 12 - }, - { - "validators": { - "company": { - "json_schema": [], - "browser_script": "" - }, - "store": { - "json_schema": [], - "browser_script": "" - }, - "inventory": { - "json_schema": [], - "browser_script": "" + { + "validators": { + "company": { + "json_schema": [], + "browser_script": "" + }, + "store": { + "json_schema": [], + "browser_script": "" + }, + "inventory": { + "json_schema": [], + "browser_script": "" + }, + "order": { + "json_schema": [], + "browser_script": "" + } }, - "order": { - "json_schema": [], - "browser_script": "" - } - }, - "description": "jabardast", - "description_html": "", - "constants": "{\"mop_mapping\":{\"FYND\":\"FYND\"}}", - "companies": [], - "support": [ - "inventory", - "order" - ], - "_id": "5e5608bf4265cf7198d1e58f", - "name": "x0-2", - "meta": [ - { - "public": false, - "_id": "5e5608bf4265cf813fd1e590", - "name": "wow", - "value": "1" - } - ], - "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1582696633/addsale/platform/integrations/icon/cstvvkgjgip1ja56gq4x.png", - "owner": "5e55fe074bda3c392ed9eab2", - "created_at": "2020-02-26T05:57:19.875Z", - "modified_at": "2021-02-15T05:23:55.962Z", - "token": "3h3_mnzp", - "secret": "dgGHrIlFG", - "__v": 7 + "description": "jabardast", + "description_html": "", + "constants": "{\"mop_mapping\":{\"FYND\":\"FYND\"}}", + "companies": [], + "support": [ + "inventory", + "order" + ], + "_id": "5e5608bf4265cf7198d1e58f", + "name": "x0-2", + "meta": [ + { + "public": false, + "_id": "5e5608bf4265cf813fd1e590", + "name": "wow", + "value": "1" + } + ], + "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1582696633/addsale/platform/integrations/icon/cstvvkgjgip1ja56gq4x.png", + "owner": "5e55fe074bda3c392ed9eab2", + "created_at": "2020-02-26T05:57:19.875Z", + "updated_at": "2021-02-15T05:23:55.962Z", + "token": "3h3_mnzp", + "secret": "dgGHrIlFG", + "__v": 7 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 50, + "item_total": 24, + "has_next": false } - ], - "page": { - "type": "number", - "current": 1, - "size": 50, - "item_total": 24, - "has_next": false } } ```
+
+ @@ -1404,21 +1539,31 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "brands": { - "name": "5th Avenue", - "value": 476, - "brand_logo_url": "https://hdn-1.addsale.com/x0/seller/pictures/logo/original/--unnamed--/1595615012186.jpeg", - "brand_banner_url": "https://hdn-1.addsale.com/x0/seller/pictures/landscape-banner/original/--unnamed--/1595615012724.jpeg", - "brand_banner_portrait_url": "https://hdn-1.addsale.com/x0/seller/pictures/portrait-banner/original/--unnamed--/1595615013203.jpeg" + "value": { + "brands": [ + { + "name": "5th Avenue", + "value": 476, + "brand_logo_url": "https://hdn-1.addsale.com/x0/seller/pictures/logo/original/--unnamed--/1595615012186.jpeg", + "brand_banner_url": "https://hdn-1.addsale.com/x0/seller/pictures/landscape-banner/original/--unnamed--/1595615012724.jpeg", + "brand_banner_portrait_url": "https://hdn-1.addsale.com/x0/seller/pictures/portrait-banner/original/--unnamed--/1595615013203.jpeg" + } + ] } } ```
+
+ @@ -1468,31 +1613,39 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "is_active": true, - "_id": "5ea9b318bc23a343ab6d442f", - "app_name": "TestUniket", - "landing_image": { - "aspect_ratio": "57/51", - "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/mobile-build/pictures/free-landing/original/yKnXY1ATx-store-landing-image.png" - }, - "splash_image": { - "aspect_ratio": "1/1", - "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/mobile-build/pictures/free-splash/original/s6d7oYfY6-store-splash-image.png" - }, - "application": "000000000000000000000004", - "platform_type": "android", - "created_at": "2020-04-29T17:02:16.976Z", - "modified_at": "2021-02-23T17:10:26.872Z", - "__v": 0, - "package_name": "com.fynd.store.x000000000000000000000004" + "value": { + "is_active": true, + "_id": "5ea9b318bc23a343ab6d442f", + "app_name": "TestUniket", + "landing_image": { + "aspect_ratio": "57/51", + "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/mobile-build/pictures/free-landing/original/yKnXY1ATx-store-landing-image.png" + }, + "splash_image": { + "aspect_ratio": "1/1", + "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/mobile-build/pictures/free-splash/original/s6d7oYfY6-store-splash-image.png" + }, + "application": "000000000000000000000001", + "platform_type": "android", + "created_at": "2020-04-29T17:02:16.976Z", + "modified_at": "2021-02-23T17:10:26.872Z", + "__v": 0, + "package_name": "com.fynd.store.x000000000000000000000004" + } } ```
+
+ @@ -1547,35 +1700,43 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "items": [ - { - "company_name": "RELIANCE RETAIL LTD", - "company_id": 1 - }, - { - "company_name": "SARASUOLE PRIVATE LIMITED", - "company_id": 3 - }, - { - "company_name": "Lloyd Palek", - "company_id": 4 + "value": { + "items": [ + { + "company_name": "RELIANCE RETAIL LTD", + "company_id": 1 + }, + { + "company_name": "SARASUOLE PRIVATE LIMITED", + "company_id": 2 + }, + { + "company_name": "Lloyd Palek", + "company_id": 4 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 200, + "item_total": 171, + "has_next": false } - ], - "page": { - "type": "number", - "current": 1, - "size": 200, - "item_total": 171, - "has_next": false } } ```
+
+ @@ -1620,26 +1781,34 @@ Currencies Success response
-  Example: +  Examples: + + +
+  success ```json { - "items": [ - { - "_id": "5ec75d11f7bfb54d798f3516", - "is_active": true, - "name": "United States Dollar", - "code": "USD", - "created_at": "2020-05-22T05:03:13.354Z", - "modified_at": "2020-06-05T09:12:04.248Z", - "decimal_digits": 2, - "symbol": "$" - } - ] + "value": { + "items": [ + { + "_id": "5ec75d11f7bfb54d798f3516", + "is_active": true, + "name": "United States Dollar", + "code": "USD", + "created_at": "2020-05-22T05:03:13.354Z", + "updated_at": "2020-06-05T09:12:04.248Z", + "decimal_digits": 2, + "symbol": "$" + } + ] + } } ```
+
+ @@ -1692,46 +1861,43 @@ Success
-  Suggestions for fynd domains +  success ```json { "value": { - "domains": [ - { - "name": "test.hostx1.de", - "is_available": false - }, - { - "name": "testhive.hostx1.de", - "is_available": true + "Suggestions for fynd domains": { + "value": { + "domains": [ + { + "name": "test.hostx1.de", + "is_available": false + }, + { + "name": "testhive.hostx1.de", + "is_available": true + } + ] } - ] - } -} -``` -
- -
-  Suggestions for custom domains - -```json -{ - "value": { - "domains": [ - { - "name": "test25.in", - "unsupported": false, - "is_available": false - }, - { - "name": "try25.in", - "unsupported": false, - "is_available": true, - "price": 14.99, - "currency": "USD" + }, + "Suggestions for custom domains": { + "value": { + "domains": [ + { + "name": "test25.in", + "unsupported": false, + "is_available": false + }, + { + "name": "try25.in", + "unsupported": false, + "is_available": true, + "price": 14.99, + "currency": "USD" + } + ] } - ] + } } } ``` @@ -1787,29 +1953,37 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "connected": true, - "status": [ - { - "display": "Domain TXT record entry 5d65089e031f9029f8e8dc2f", - "status": true - }, - { - "display": "Domain pointing to 18.217.232.69 A record", - "status": true - }, - { - "display": "Domain pointing to 18.188.115.251 A record", - "status": true - } - ] + "value": { + "connected": true, + "status": [ + { + "display": "Domain TXT record entry 5d65089e031f9029f8e8dc2f", + "status": true + }, + { + "display": "Domain pointing to 18.217.232.69 A record", + "status": true + }, + { + "display": "Domain pointing to 18.188.115.251 A record", + "status": true + } + ] + } } ```
+
+ @@ -1854,40 +2028,48 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "domains": [ - { - "_id": "5eb1177748312a3bd55d0f1e", - "verified": true, - "name": "uniket.hostx0.de", - "is_primary": true, - "is_shortlink": false, - "is_predefined": true - }, - { - "verified": true, - "is_primary": false, - "is_shortlink": true, - "_id": "5f0858c5f86e00cd42dccc8d", - "name": "jd.hostx0.de", - "is_predefined": true - }, - { - "verified": true, - "is_primary": false, - "is_shortlink": false, - "_id": "6048497e87f5730423149190", - "name": "testdm.hostx0.de", - "is_predefined": true - } - ] + "value": { + "domains": [ + { + "_id": "5eb1177748312a3bd55d0f1e", + "verified": true, + "name": "uniket.hostfynd.dev", + "is_primary": true, + "is_shortlink": false, + "is_predefined": true + }, + { + "verified": true, + "is_primary": false, + "is_shortlink": true, + "_id": "5f0858c5f86e00cd42dccc8d", + "name": "jd.hostfynd.dev", + "is_predefined": true + }, + { + "verified": true, + "is_primary": false, + "is_shortlink": false, + "_id": "6048497e87f5730423149190", + "name": "testdm.hostfynd.dev", + "is_predefined": true + } + ] + } } ```
+
+ @@ -1918,7 +2100,7 @@ const data = await platformClient.configuration.getIntegrationById({ id : value | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| id | number | yes | Integration id | +| id | string | yes | Integration id | @@ -1937,108 +2119,116 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "_id": "5ec376ce848a005189acb312", - "validators": { - "company": { - "browser_script": "", - "json_schema": [ - { - "type": "object" - }, - { - "required": [ - "ip_address", - "icode", - "gds_entity_id", - "auth_key" - ] - }, - { - "properties": null, - "gds_entity_id": { - "type": "string", - "title": "GDS Entity ID", - "minLength": 3, - "maxLength": 10, - "pattern": "^[a-zA-Z0-9]+$", - "description": "GDS Entity ID is a unique identifier provided by Ginesys to you." - }, - "ip_address": { - "type": "string", - "title": "IP Address", - "pattern": "(\\d{1,3}\\.){3}\\d{1,3}", - "description": "Enter IP address provided by Ginesys for your POS server" + "value": { + "_id": "5ec376ce848a005189acb312", + "validators": { + "company": { + "browser_script": "", + "json_schema": [ + { + "type": "object" }, - "auth_key": { - "title": "Auth Key", - "type": "string", - "maxLength": 500, - "description": "Provide authentication token provided by Ginesys to you." + { + "required": [ + "ip_address", + "icode", + "gds_entity_id", + "auth_key" + ] }, - "icode": { - "title": "ICODE", - "type": "string", - "enum": [ - "ean", - "upc", - "alu", - "sku_code" - ], - "description": "Please select the correct SKU identifier that you use to provide inventory to Fynd." + { + "properties": null, + "gds_entity_id": { + "type": "string", + "title": "GDS Entity ID", + "minLength": 3, + "maxLength": 10, + "pattern": "^[a-zA-Z0-9]+$", + "description": "GDS Entity ID is a unique identifier provided by Ginesys to you." + }, + "ip_address": { + "type": "string", + "title": "IP Address", + "pattern": "(\\d{1,3}\\.){3}\\d{1,3}", + "description": "Enter IP address provided by Ginesys for your POS server" + }, + "auth_key": { + "title": "Auth Key", + "type": "string", + "maxLength": 500, + "description": "Provide authentication token provided by Ginesys to you." + }, + "icode": { + "title": "ICODE", + "type": "string", + "enum": [ + "ean", + "upc", + "alu", + "sku_code" + ], + "description": "Please select the correct SKU identifier that you use to provide inventory to Fynd." + } } - } - ] - }, - "store": { - "browser_script": "", - "json_schema": [ - { - "type": "object" - }, - { - "properties": null, - "location_id": { - "type": "string", - "title": "Location ID", - "description": "Provide site code as per POS/SAP." + ] + }, + "store": { + "browser_script": "", + "json_schema": [ + { + "type": "object" }, - "ip_address": { - "type": "string", - "title": "IP Address", - "pattern": "(\\d{1,3}\\.){3}\\d{1,3}", - "description": "Enter IP address provided by Ginesys for your POS server" + { + "properties": null, + "location_id": { + "type": "string", + "title": "Location ID", + "description": "Provide site code as per POS/SAP." + }, + "ip_address": { + "type": "string", + "title": "IP Address", + "pattern": "(\\d{1,3}\\.){3}\\d{1,3}", + "description": "Enter IP address provided by Ginesys for your POS server" + } } - } - ] - } - }, - "description": "Sap Integration west ELM brands", - "constants": {}, - "name": "SAP RBL Integration", - "meta": [ - { - "public": true, - "_id": "5ee3e246129be17ce0b59ef4", - "name": "price_level", - "value": "store" - } - ], - "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1589868232/addsale/platform/integrations/icon/z3kj9p8nidx4zzmdutdu.svg", - "owner": "5e60e43dcd08cf01069eb23e", - "created_at": "2020-05-19T06:03:58.757Z", - "modified_at": "2020-06-15T12:00:42.598Z", - "token": "qk60vXqk-", - "secret": "Gp0dYInpUV", - "__v": 13, - "description_html": "" + ] + } + }, + "description": "Sap Integration west ELM brands", + "constants": {}, + "name": "SAP RBL Integration", + "meta": [ + { + "public": true, + "_id": "5ee3e246129be17ce0b59ef4", + "name": "price_level", + "value": "store" + } + ], + "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1589868232/addsale/platform/integrations/icon/z3kj9p8nidx4zzmdutdu.svg", + "owner": "5e60e43dcd08cf01069eb23e", + "created_at": "2020-05-19T06:03:58.757Z", + "updated_at": "2020-06-15T12:00:42.598Z", + "token": "qk60vXqk-", + "secret": "Gp0dYInpUV", + "__v": 13, + "description_html": "" + } } ```
+
+ @@ -2094,30 +2284,34 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "opted": false, - "permissions": [], - "last_patch": [], - "_id": "5ec377f2848a0073feacb31b", - "integration": "5ec376ce848a005189acb312", - "level": "store", - "uid": 1, - "meta": [], - "token": "1RuGX0Fyp", - "created_at": "2020-05-19T06:08:50.199Z", - "modified_at": "2020-08-17T07:54:01.809Z", - "__v": 14, - "data": { - "location_id": "09876", - "ip_address": "1.2.3.4" + "value": { + "opted": false, + "permissions": [], + "last_patch": [], + "_id": "5ec377f2848a0073feacb31b", + "integration": "5ec376ce848a005189acb312", + "level": "store", + "uid": 1, + "meta": [], + "token": "1RuGX0Fyp", + "created_at": "2020-05-19T06:08:50.199Z", + "modified_at": "2020-08-17T07:54:01.809Z", + "__v": 14 } } ```
+
+ @@ -2176,34 +2370,38 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "items": [ - { - "opted": false, - "permissions": [], - "last_patch": [], - "_id": "5ec377f2848a0073feacb31b", - "integration": "5ec376ce848a005189acb312", - "level": "store", - "uid": 1, - "meta": [], - "token": "1RuGX0Fyp", - "created_at": "2020-05-19T06:08:50.199Z", - "modified_at": "2020-08-17T07:54:01.809Z", - "__v": 14, - "data": { - "location_id": "09876", - "ip_address": "1.2.3.4" + "value": { + "items": [ + { + "opted": false, + "permissions": [], + "last_patch": [], + "_id": "5ec377f2848a0073feacb31b", + "integration": "5ec376ce848a005189acb312", + "level": "store", + "uid": 1, + "meta": [], + "token": "1RuGX0Fyp", + "created_at": "2020-05-19T06:08:50.199Z", + "modified_at": "2020-08-17T07:54:01.809Z", + "__v": 14 } - } - ] + ] + } } ```
+
+ @@ -2248,77 +2446,83 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "inventory": { - "brand": { - "criteria": "all", - "brands": [] - }, - "store": { - "criteria": "filter", - "stores": [], - "rules": [ - { - "companies": [ - 1, - 3, - 4 - ], - "brands": [] - } - ] - }, - "category": { - "criteria": "all", - "categories": [] + "value": { + "inventory": { + "brand": { + "criteria": "all", + "brands": [] + }, + "store": { + "criteria": "filter", + "stores": [], + "rules": [ + { + "companies": [ + 1, + 2, + 4 + ], + "brands": [] + } + ] + }, + "category": { + "criteria": "all", + "categories": [] + }, + "price": { + "min": 1, + "max": 10000 + }, + "discount": { + "min": 0, + "max": 100 + }, + "out_of_stock": true, + "franchise_enabled": true, + "exclude_category": [], + "image": [ + "standard", + "substandard", + "default" + ], + "company_store": [] }, - "price": { - "min": 1, - "max": 10000 + "authentication": { + "required": true, + "provider": "fynd" }, - "discount": { - "min": 0, - "max": 100 + "article_assignment": { + "rules": { + "store_priority": { + "enabled": false, + "storetype_order": [] + } + }, + "post_order_reassignment": true }, - "out_of_stock": true, - "franchise_enabled": true, - "exclude_category": [], - "image": [ - "standard", - "substandard", - "default" - ], - "company_store": [] - }, - "authentication": { - "required": true, - "provider": "fynd" - }, - "article_assignment": { - "rules": { - "store_priority": { - "enabled": false, - "storetype_order": [] + "reward_points": { + "credit": { + "enabled": true + }, + "debit": { + "enabled": true, + "auto_apply": false, + "strategy_channel": "rewards" } }, - "post_order_reassignment": true - }, - "reward_points": { - "credit": { - "enabled": true - }, - "debit": { - "enabled": true, - "auto_apply": false, - "strategy_channel": "rewards" - } - }, - "cart": { - "delivery_charges": { - "enabled": true, + "cart": { + "delivery_charges": { + "enabled": true + }, "charges": [ { "threshold": 1000, @@ -2328,129 +2532,144 @@ Success "threshold": 200000, "charges": 79 } - ] - }, - "enabled": true, - "max_cart_items": 0, - "min_cart_value": 120, - "bulk_coupons": true, - "revenue_engine_coupon": false - }, - "payment": { - "callback_url": { - "app": "", - "web": "" - }, - "methods": { - "pl": { - "enabled": true - }, - "card": { - "enabled": true - }, - "nb": { - "enabled": true - }, - "wl": { - "enabled": true - }, - "ps": { - "enabled": true - }, - "upi": { - "enabled": true - }, - "qr": { - "enabled": true - }, - "cod": { - "enabled": true - }, - "pp": { - "enabled": true + ], + "international_delivery_charges": { + "enabled": true, + "charges": [ + { + "threshold": 1000, + "charges": 49 + }, + { + "threshold": 200000, + "charges": 79 + } + ] }, - "jp": { - "enabled": false + "enabled": true, + "max_cart_items": 0, + "min_cart_value": 120, + "bulk_coupons": true, + "revenue_engine_coupon": false + }, + "payment": { + "callback_url": { + "app": "", + "web": "" }, - "pac": { - "enabled": false + "methods": { + "pl": { + "enabled": true + }, + "card": { + "enabled": true + }, + "nb": { + "enabled": true + }, + "wl": { + "enabled": true + }, + "ps": { + "enabled": true + }, + "upi": { + "enabled": true + }, + "qr": { + "enabled": true + }, + "cod": { + "enabled": true + }, + "pp": { + "enabled": true + }, + "jp": { + "enabled": false + }, + "pac": { + "enabled": false + }, + "fc": { + "enabled": false + }, + "jiopp": { + "enabled": false + }, + "stripepg": { + "enabled": true + }, + "juspaypg": { + "enabled": false + }, + "payubizpg": { + "enabled": true + }, + "payumoneypg": { + "enabled": true + }, + "rupifipg": { + "enabled": false + }, + "simpl": { + "enabled": true + } }, - "fc": { - "enabled": false + "payment_selection_lock": { + "enabled": false, + "default_options": "", + "payment_identifier": "" }, - "jiopp": { + "mode_of_payment": "uniket_b2b", + "source": "uniket", + "enabled": true, + "cod_amount_limit": 100000, + "cod_charges": 1500 + }, + "order": { + "enabled": true, + "force_reassignment": false + }, + "logistics": { + "logistics_by_seller": false, + "serviceability_check": true, + "same_day_delivery": true, + "dp_assignment": true + }, + "business": "retail", + "comms_enabled": true, + "communication": { + "email": { "enabled": false }, - "stripepg": { - "enabled": true - }, - "juspaypg": { + "sms": { "enabled": false }, - "payubizpg": { - "enabled": true - }, - "payumoneypg": { - "enabled": true - }, - "rupifipg": { + "voice": { "enabled": false - }, - "simpl": { - "enabled": true } }, - "payment_selection_lock": { - "enabled": false, - "default_options": "", - "payment_identifier": "" - }, - "mode_of_payment": "uniket_b2b", - "source": "uniket", - "enabled": true, - "cod_amount_limit": 100000, - "cod_charges": 1500 - }, - "order": { - "enabled": true, - "force_reassignment": false - }, - "logistics": { - "logistics_by_seller": false, - "serviceability_check": true, - "same_day_delivery": true, - "dp_assignment": true - }, - "business": "retail", - "comms_enabled": true, - "communication": { - "email": { - "enabled": false - }, - "sms": { - "enabled": false + "platforms": [ + "uniket_wholesale" + ], + "_id": "5e04c76b8dd8c003577fdd0a", + "loyalty_points": { + "enabled": true, + "auto_apply": false }, - "voice": { - "enabled": false - } - }, - "platforms": [ - "uniket_wholesale" - ], - "_id": "5e04c76b8dd8c003577fdd0a", - "loyalty_points": { - "enabled": true, - "auto_apply": false - }, - "app": "000000000000000000000004", - "created_at": "2019-12-26t14:44:59.835z", - "modified_at": "2021-03-09t15:40:29.208z", - "__v": 3, - "modified_by": "5e199eed98cfe16dc61385de" + "app": "000000000000000000000001", + "created_at": "2019-12-26t14:44:59.835z", + "modified_at": "2021-03-09t15:40:29.208z", + "__v": 3, + "modified_by": "5e199eed98cfe16dc61385de" + } } ```
+
+ @@ -2506,30 +2725,36 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "opted": false, - "permissions": [], - "last_patch": [], - "_id": "5ec377f2848a0073feacb31b", - "integration": "5ec376ce848a005189acb312", - "level": "store", - "uid": 1, - "meta": [], - "token": "1RuGX0Fyp", - "created_at": "2020-05-19T06:08:50.199Z", - "modified_at": "2020-08-17T07:54:01.809Z", - "__v": 14, - "data": { - "location_id": "09876", - "ip_address": "1.2.3.4" + "value": { + "other_entity": { + "opted": false, + "permissions": [], + "last_patch": [], + "_id": "5ec377f2848a0073feacb31b", + "integration": "5ec376ce848a005189acb312", + "level": "company", + "uid": 2, + "meta": [], + "token": "1RuGX0Fyp", + "created_at": "2020-05-19T06:08:50.199Z", + "modified_at": "2020-08-17T07:54:01.809Z", + "__v": 14 + } } } ```
+
+ @@ -2574,26 +2799,33 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "deployment_meta": { - "deployed_stores": [ - 1, - 10 - ], - "all_stores": false, - "enabled": true, - "type": "hard", - "_id": "5e7e5e4d6b5f3b4b54c95f9c", - "app": "000000000000000000000004", - "__v": 6 + "value": { + "deployment_meta": { + "deployed_stores": [ + 1, + 10 + ], + "all_stores": false, + "enabled": true, + "type": "hard", + "_id": "5e7e5e4d6b5f3b4b54c95f9c", + "app": "000000000000000000000001" + } } } ```
+
+ @@ -2642,15 +2874,23 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "message": "success" + "value": { + "message": "success" + } } ```
+
+ @@ -2705,97 +2945,105 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "page": { - "type": "number", - "size": 10, - "current": 1, - "has_next": true, - "item_total": 583 - }, - "items": [ - { - "address": { - "state": "MAHARASHTRA", - "address1": "SAGAR TECH PLAZA, SAKINAKA", - "lat_long": { - "type": "Point", - "coordinates": [ - 1, - 1 - ] + "value": { + "page": { + "type": "number", + "size": 10, + "current": 1, + "has_next": true, + "item_total": 583 + }, + "items": [ + { + "address": { + "state": "MAHARASHTRA", + "address1": "SAGAR TECH PLAZA, SAKINAKA", + "lat_long": { + "type": "Point", + "coordinates": [ + 1, + 1 + ] + }, + "pincode": 400070, + "country": "INDIA", + "city": "MUMBAI" }, + "_id": "5f586563f509dd000145c02d", + "store_type": "high_street", + "uid": 11016, + "store_code": "HS-0c532", + "display_name": " Brand Company Store 11", + "name": " Brand Company Store 11", "pincode": 400070, - "country": "INDIA", - "city": "MUMBAI" + "code": "HS-0c532" }, - "_id": "5f586563f509dd000145c02d", - "store_type": "high_street", - "uid": 11016, - "store_code": "HS-0c532", - "display_name": " Brand Company Store 11", - "name": " Brand Company Store 11", - "pincode": 400070, - "code": "HS-0c532" - }, - { - "address": { - "state": "MAHARASHTRA", - "address1": "UNNAMED ROAD, VASAI EAST SALT PLANT", - "lat_long": { - "type": "Point", - "coordinates": [ - 72.84293219999999, - 19.3805675 - ] + { + "address": { + "state": "MAHARASHTRA", + "address1": "UNNAMED ROAD, VASAI EAST SALT PLANT", + "lat_long": { + "type": "Point", + "coordinates": [ + 72.84293219999999, + 19.3805675 + ] + }, + "address2": "VASAI EAST SALT PLANT, VASAI EAST, ", + "pincode": 401208, + "country": "INDIA", + "city": "VIRAR", + "landmark": "" }, - "address2": "VASAI EAST SALT PLANT, VASAI EAST, ", + "_id": "5f585934f509dd000145c025", + "store_type": "high_street", + "uid": 11567, + "store_code": "123456", + "display_name": "2nd Store", + "name": "2nd Store", "pincode": 401208, - "country": "INDIA", - "city": "VIRAR", - "landmark": "" + "code": "123456" }, - "_id": "5f585934f509dd000145c025", - "store_type": "high_street", - "uid": 11567, - "store_code": "123456", - "display_name": "2nd Store", - "name": "2nd Store", - "pincode": 401208, - "code": "123456" - }, - { - "address": { - "state": "GUJARAT", - "address1": "32, AANAND SHOPPING CENTRE ", - "lat_long": { - "type": "Point", - "coordinates": [ - 1, - 1 - ] + { + "address": { + "state": "GUJARAT", + "address1": "32, AANAND SHOPPING CENTRE ", + "lat_long": { + "type": "Point", + "coordinates": [ + 1, + 1 + ] + }, + "pincode": 380001, + "country": "INDIA", + "city": "AHMEDABAD" }, + "_id": "5f587b5ef509dd000145c02f", + "store_type": "high_street", + "uid": 11568, + "store_code": "12345", + "display_name": "3rd ", + "name": "3rd ", "pincode": 380001, - "country": "INDIA", - "city": "AHMEDABAD" - }, - "_id": "5f587b5ef509dd000145c02f", - "store_type": "high_street", - "uid": 11568, - "store_code": "12345", - "display_name": "3rd ", - "name": "3rd ", - "pincode": 380001, - "code": "12345" - } - ] + "code": "12345" + } + ] + } } ```
+
+ @@ -2845,58 +3093,68 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "name": "intent 2", - "description": "", - "_id": "5f030880f019afd636889afc", - "domain": "intent.hostx0.de", - "company": { - "uid": 94, - "name": "DummyImran" - }, - "opted_inventory": { - "opt_type": { - "key": "store", - "display": "Store" - } - }, - "items": { - "name": "RRL01", - "id": 1, - "store_code": "WH_8513", - "_id": "5ec2c0b168fc2800017112f5", - "modified_on": "2020-09-09T04:25:55.843Z", - "uid": 1 - }, - "address": { - "state": "MAHARASHTRA", - "address1": "SHOPSENSE RETAIL TECHNOLOGIES PRIVATE LIMITED 1ST FLOOR WEWORK VIJAY DIAMOND, CROSS RD B, AJIT NAGAR,", - "lat_long": { - "type": "Point", - "coordinates": [ - 72.8691788, - 19.1174114 + "value": { + "name": "intent 2", + "description": "", + "_id": "5f030880f019afd636889afc", + "domain": "intent.hostfynd.dev", + "company": { + "uid": 94, + "name": "DummyImran" + }, + "opted_inventory": { + "opt_type": { + "key": "store", + "display": "Store" + }, + "items": [ + { + "name": "RRL01", + "id": 1, + "store_code": "WH_8513", + "_id": "5ec2c0b168fc2800017112f5", + "modified_on": "2020-09-09T04:25:55.843Z", + "uid": 1 + } ] }, - "address2": "KONDIVITA, ANDHERI EAST, MUMBAI, MAHARASHTRA 400069", - "pincode": 400059, - "country": "INDIA", - "city": "MUMBAI" - }, - "display_name": "RRL01", - "store_type": "warehouse", - "company_id": 1, - "opt_out_inventory": { - "store": [], - "company": [] + "address": { + "state": "MAHARASHTRA", + "address1": "SHOPSENSE RETAIL TECHNOLOGIES PRIVATE LIMITED 1ST FLOOR WEWORK VIJAY DIAMOND, CROSS RD B, AJIT NAGAR,", + "lat_long": { + "type": "Point", + "coordinates": [ + 72.8691788, + 19.1174114 + ] + }, + "address2": "KONDIVITA, ANDHERI EAST, MUMBAI, MAHARASHTRA 400069", + "pincode": 400059, + "country": "INDIA", + "city": "MUMBAI" + }, + "display_name": "RRL01", + "store_type": "warehouse", + "company_id": 2, + "opt_out_inventory": { + "store": [], + "company": [] + } } } ```
+
+ @@ -2949,56 +3207,64 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "items": [ - { - "name": "intent 2", - "description": "", - "_id": "5f030880f019afd636889afc", - "domain": "intent.hostx0.de", - "company": { - "uid": 94, - "name": "DummyImran" - }, - "opt_type": "store" - }, - { - "name": "new application imran", - "description": "", - "_id": "5f03f5d17692029e2d1a50a5", - "domain": "imranstore.hostx0.de", - "company": { - "uid": 94, - "name": "DummyImran" + "value": { + "items": [ + { + "name": "intent 2", + "description": "", + "_id": "5f030880f019afd636889afc", + "domain": "intent.hostfynd.dev", + "company": { + "uid": 2, + "name": "DummyImran" + }, + "opt_type": "store" }, - "opt_type": "store" - }, - { - "name": "helo", - "description": "", - "_id": "5f03f63b769202170c1a50a9", - "domain": "helo.hostx0.de", - "company": { - "uid": 7, - "name": "Zack Burgdorf" + { + "name": "new application imran", + "description": "", + "_id": "5f03f5d17692029e2d1a50a5", + "domain": "imranstore.hostfynd.dev", + "company": { + "uid": 2, + "name": "DummyImran" + }, + "opt_type": "store" }, - "opt_type": "store" + { + "name": "helo", + "description": "", + "_id": "5f03f63b769202170c1a50a9", + "domain": "helo.hostfynd.dev", + "company": { + "uid": 7, + "name": "Zack Burgdorf" + }, + "opt_type": "store" + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 20, + "has_next": true } - ], - "page": { - "type": "number", - "current": 1, - "size": 10, - "item_total": 20, - "has_next": true } } ```
+
+ @@ -3048,26 +3314,39 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "versions": { - "_id": "6035376ab937c5f7c5462888", - "application": "000000000000000000000004", - "platform_type": "android", - "build_status": "pending", - "version_name": "0.5.6", - "version_code": 1, - "created_at": "2021-02-23T17:12:10.977Z", - "modified_at": "2021-02-23T17:12:10.977Z", - "__v": 0 - }, - "latest_available_version_name": "0.5.7" + "value": { + "versions": [ + { + "_id": "6035376ab937c5f7c5462888", + "application": "000000000000000000000001", + "platform_type": "android", + "build_status": "pending", + "version_name": "0.5.6", + "download_url": { + "secure_url": "http://test-bucket.s3.amazonaws.com/test-bucket/release/app-uniket-release.apk" + }, + "version_code": 1, + "created_at": "2021-02-23T17:12:10.977Z", + "modified_at": "2021-02-23T17:12:10.977Z", + "__v": 0 + } + ], + "latest_available_version_name": "0.5.7" + } } ```
+
+ @@ -3126,120 +3405,128 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "items": [ - { - "validators": { - "company": { - "json_schema": [ - { - "display": "Host", - "key": "host", - "type": "text", - "tooltip": "Enter host address" - } - ], - "browser_script": "" - }, - "store": { - "json_schema": [], - "browser_script": "" - }, - "inventory": { - "json_schema": [], - "browser_script": "" + "value": { + "items": [ + { + "validators": { + "company": { + "json_schema": [ + { + "display": "Host", + "key": "host", + "type": "text", + "tooltip": "Enter host address" + } + ], + "browser_script": "" + }, + "store": { + "json_schema": [], + "browser_script": "" + }, + "inventory": { + "json_schema": [], + "browser_script": "" + }, + "order": { + "json_schema": [], + "browser_script": "" + } }, - "order": { - "json_schema": [], - "browser_script": "" - } + "description": "awesome integration", + "description_html": "", + "constants": "{\"mop_mapping\":{\"FYND\":\"FYND\"}}", + "companies": [], + "support": [ + "inventory", + "order" + ], + "_id": "5e56089f4265cf2846d1e58c", + "name": "x0-1", + "meta": [ + { + "public": true, + "_id": "5e56089f4265cf81e1d1e58e", + "name": "wow", + "value": "1" + } + ], + "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1582696589/addsale/platform/integrations/icon/jihgcoibfmdttgiukwg0.png", + "owner": "5e55fe074bda3c392ed9eab2", + "created_at": "2020-02-26T05:56:47.214Z", + "updated_at": "2021-03-02T12:29:03.554Z", + "token": "fKoHRW5H", + "secret": "d1E85CTmf", + "__v": 12 }, - "description": "awesome integration", - "description_html": "", - "constants": "{\"mop_mapping\":{\"FYND\":\"FYND\"}}", - "companies": [], - "support": [ - "inventory", - "order" - ], - "_id": "5e56089f4265cf2846d1e58c", - "name": "x0-1", - "meta": [ - { - "public": true, - "_id": "5e56089f4265cf81e1d1e58e", - "name": "wow", - "value": "1" - } - ], - "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1582696589/addsale/platform/integrations/icon/jihgcoibfmdttgiukwg0.png", - "owner": "5e55fe074bda3c392ed9eab2", - "created_at": "2020-02-26T05:56:47.214Z", - "modified_at": "2021-03-02T12:29:03.554Z", - "token": "fKoHRW5H", - "secret": "d1E85CTmf", - "__v": 12 - }, - { - "validators": { - "company": { - "json_schema": [], - "browser_script": "" - }, - "store": { - "json_schema": [], - "browser_script": "" - }, - "inventory": { - "json_schema": [], - "browser_script": "" + { + "validators": { + "company": { + "json_schema": [], + "browser_script": "" + }, + "store": { + "json_schema": [], + "browser_script": "" + }, + "inventory": { + "json_schema": [], + "browser_script": "" + }, + "order": { + "json_schema": [], + "browser_script": "" + } }, - "order": { - "json_schema": [], - "browser_script": "" - } - }, - "description": "jabardast", - "description_html": "", - "constants": "{\"mop_mapping\":{\"FYND\":\"FYND\"}}", - "companies": [], - "support": [ - "inventory", - "order" - ], - "_id": "5e5608bf4265cf7198d1e58f", - "name": "x0-2", - "meta": [ - { - "public": false, - "_id": "5e5608bf4265cf813fd1e590", - "name": "wow", - "value": "1" - } - ], - "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1582696633/addsale/platform/integrations/icon/cstvvkgjgip1ja56gq4x.png", - "owner": "5e55fe074bda3c392ed9eab2", - "created_at": "2020-02-26T05:57:19.875Z", - "modified_at": "2021-02-15T05:23:55.962Z", - "token": "3h3_mnzp", - "secret": "dgGHrIlFG", - "__v": 7 + "description": "jabardast", + "description_html": "", + "constants": "{\"mop_mapping\":{\"FYND\":\"FYND\"}}", + "companies": [], + "support": [ + "inventory", + "order" + ], + "_id": "5e5608bf4265cf7198d1e58f", + "name": "x0-2", + "meta": [ + { + "public": false, + "_id": "5e5608bf4265cf813fd1e590", + "name": "wow", + "value": "1" + } + ], + "icon": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1582696633/addsale/platform/integrations/icon/cstvvkgjgip1ja56gq4x.png", + "owner": "5e55fe074bda3c392ed9eab2", + "created_at": "2020-02-26T05:57:19.875Z", + "updated_at": "2021-02-15T05:23:55.962Z", + "token": "3h3_mnzp", + "secret": "dgGHrIlFG", + "__v": 7 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 50, + "item_total": 24, + "has_next": false } - ], - "page": { - "type": "number", - "current": 1, - "size": 50, - "item_total": 24, - "has_next": false } } ```
+
+ @@ -3295,13 +3582,23 @@ Success. Check the example shown below or refer `OrderingStoresResponse` for mor
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "uid": 10 + } +} ```
+
+ @@ -3356,74 +3653,82 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "items": [ - { - "store_name": "RRL01", - "store_id": 1, - "store_type": "warehouse", - "store_code": "WH_8513", - "store_address": { - "state": "MAHARASHTRA", - "address1": "SHOPSENSE RETAIL TECHNOLOGIES PRIVATE LIMITED 1ST FLOOR WEWORK VIJAY DIAMOND, CROSS RD B, AJIT NAGAR,", - "lat_long": { - "type": "Point", - "coordinates": [ - 72.8691788, - 19.1174114 - ] + "value": { + "items": [ + { + "store_name": "RRL01", + "store_id": 1, + "store_type": "warehouse", + "store_code": "WH_8513", + "store_address": { + "state": "MAHARASHTRA", + "address1": "SHOPSENSE RETAIL TECHNOLOGIES PRIVATE LIMITED 1ST FLOOR WEWORK VIJAY DIAMOND, CROSS RD B, AJIT NAGAR,", + "lat_long": { + "type": "Point", + "coordinates": [ + 72.8691788, + 19.1174114 + ] + }, + "address2": "KONDIVITA, ANDHERI EAST, MUMBAI, MAHARASHTRA 400069", + "pincode": 400059, + "country": "INDIA", + "city": "MUMBAI" }, - "address2": "KONDIVITA, ANDHERI EAST, MUMBAI, MAHARASHTRA 400069", - "pincode": 400059, - "country": "INDIA", - "city": "MUMBAI" + "company": { + "uid": 2, + "name": "RELIANCE RETAIL LTD" + } }, - "company": { - "uid": 1, - "name": "RELIANCE RETAIL LTD" - } - }, - { - "store_name": "RUOSH WAREHOUSE", - "store_id": 2, - "store_type": "warehouse", - "store_code": "RUOSH43", - "store_address": { - "state": "MAHARASHTRA", - "address1": "RAUNAK CITY SECTOR 4 D10, SAPAD GAON", - "lat_long": { - "type": "Point", - "coordinates": [ - 73.121952, - 19.2645048 - ] + { + "store_name": "RUOSH WAREHOUSE", + "store_id": 2, + "store_type": "warehouse", + "store_code": "RUOSH43", + "store_address": { + "state": "MAHARASHTRA", + "address1": "RAUNAK CITY SECTOR 4 D10, SAPAD GAON", + "lat_long": { + "type": "Point", + "coordinates": [ + 73.121952, + 19.2645048 + ] + }, + "address2": "SAPAD GAON, KHADAKPADA, ", + "pincode": 421301, + "country": "INDIA", + "city": "THANE", + "landmark": "near taj" }, - "address2": "SAPAD GAON, KHADAKPADA, ", - "pincode": 421301, - "country": "INDIA", - "city": "THANE", - "landmark": "near taj" - }, - "company": { - "uid": 3, - "name": "SARASUOLE PRIVATE LIMITED" + "company": { + "uid": 2, + "name": "SARASUOLE PRIVATE LIMITED" + } } + ], + "page": { + "type": "number", + "current": 1, + "size": 200, + "item_total": 762, + "has_next": true } - ], - "page": { - "type": "number", - "current": 1, - "size": 200, - "item_total": 762, - "has_next": true } } ```
+
+ @@ -3472,100 +3777,105 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "product_detail": { - "similar": [ - "basic", - "visual", - "brand", - "category", - "seller", - "price", - "specs" - ], - "seller_selection": true, - "update_product_meta": true, - "request_product": true - }, - "landing_page": { - "launch_page": { - "page_type": "home", - "params": {}, - "query": {} + "value": { + "product_detail": { + "similar": [ + "basic", + "visual", + "brand", + "category", + "seller", + "price", + "specs" + ], + "seller_selection": true, + "update_product_meta": true, + "request_product": true }, - "continue_as_guest": true, - "login_btn_text": "Click here to sign-in", - "show_domain_textbox": true, - "show_register_btn": true - }, - "registration_page": { - "ask_store_address": false - }, - "home_page": { - "order_processing": true - }, - "common": { - "international_shipping": { - "enabled": true + "landing_page": { + "launch_page": { + "page_type": "home", + "params": {}, + "query": {} + }, + "continue_as_guest": true, + "login_btn_text": "Click here to sign-in", + "show_domain_textbox": true, + "show_register_btn": true }, - "communication_optin_dialog": { - "visibility": true + "registration_page": { + "ask_store_address": false }, - "deployment_store_selection": { - "enabled": true, - "type": "hard" + "home_page": { + "order_processing": true }, - "listing_price": { - "value": "min", - "sort": "min" + "common": { + "communication_optin_dialog": { + "visibility": true + }, + "deployment_store_selection": { + "enabled": true, + "type": "hard" + }, + "listing_price": { + "value": "min", + "sort": "min" + }, + "currency": { + "value": [ + "INR" + ], + "type": "explicit", + "default_currency": "INR" + }, + "revenue_engine": { + "enabled": false + }, + "feedback": { + "enabled": true + }, + "compare_products": { + "enabled": true + } }, - "currency": { - "value": [ - "INR" - ], - "type": "explicit", - "default_currency": "INR" + "cart": { + "gst_input": true, + "staff_selection": true, + "placing_for_customer": true, + "google_map": true, + "revenue_engine_coupon": false + }, + "qr": { + "application": true, + "products": true, + "collections": true }, - "revenue_engine": { - "enabled": false + "pcr": { + "staff_selection": true }, - "feedback": { - "enabled": true + "order": { + "buy_again": true }, - "compare_products": { - "enabled": true - } - }, - "cart": { - "gst_input": true, - "staff_selection": true, - "placing_for_customer": true, - "google_map": true, - "revenue_engine_coupon": false - }, - "qr": { - "application": true, - "products": true, - "collections": true - }, - "pcr": { - "staff_selection": true - }, - "order": { - "buy_again": true - }, - "_id": "5e57643c986e4119c973df7d", - "app": "000000000000000000000004", - "created_at": "2020-02-27T06:39:56.088Z", - "modified_at": "2021-03-09T15:40:29.188Z", - "__v": 1 + "_id": "5e57643c986e4119c973df7d", + "app": "000000000000000000000001", + "created_at": "2020-02-27T06:39:56.088Z", + "modified_at": "2021-03-09T15:40:29.188Z", + "__v": 1 + } } ```
+
+ @@ -3617,15 +3927,23 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "message": "Updated opt out data" + "value": { + "message": "Updated opt out data" + } } ```
+
+ @@ -3674,77 +3992,83 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "inventory": { - "brand": { - "criteria": "all", - "brands": [] - }, - "store": { - "criteria": "filter", - "stores": [], - "rules": [ - { - "companies": [ - 1, - 3, - 4 - ], - "brands": [] - } - ] - }, - "category": { - "criteria": "all", - "categories": [] + "value": { + "inventory": { + "brand": { + "criteria": "all", + "brands": [] + }, + "store": { + "criteria": "filter", + "stores": [], + "rules": [ + { + "companies": [ + 1, + 3, + 4 + ], + "brands": [] + } + ] + }, + "category": { + "criteria": "all", + "categories": [] + }, + "price": { + "min": 1, + "max": 10000 + }, + "discount": { + "min": 0, + "max": 100 + }, + "out_of_stock": true, + "franchise_enabled": true, + "exclude_category": [], + "image": [ + "standard", + "substandard", + "default" + ], + "company_store": [] }, - "price": { - "min": 1, - "max": 10000 + "authentication": { + "required": true, + "provider": "fynd" }, - "discount": { - "min": 0, - "max": 100 + "article_assignment": { + "rules": { + "store_priority": { + "enabled": false, + "storetype_order": [] + } + }, + "post_order_reassignment": true }, - "out_of_stock": true, - "franchise_enabled": true, - "exclude_category": [], - "image": [ - "standard", - "substandard", - "default" - ], - "company_store": [] - }, - "authentication": { - "required": true, - "provider": "fynd" - }, - "article_assignment": { - "rules": { - "store_priority": { - "enabled": false, - "storetype_order": [] + "reward_points": { + "credit": { + "enabled": true + }, + "debit": { + "enabled": true, + "auto_apply": false, + "strategy_channel": "REWARDS" } }, - "post_order_reassignment": true - }, - "reward_points": { - "credit": { - "enabled": true - }, - "debit": { - "enabled": true, - "auto_apply": false, - "strategy_channel": "REWARDS" - } - }, - "cart": { - "delivery_charges": { - "enabled": true, + "cart": { + "delivery_charges": { + "enabled": true + }, "charges": [ { "threshold": 1000, @@ -3754,129 +4078,144 @@ Success "threshold": 200000, "charges": 79 } - ] - }, - "enabled": true, - "max_cart_items": 0, - "min_cart_value": 120, - "bulk_coupons": true, - "revenue_engine_coupon": false - }, - "payment": { - "callback_url": { - "app": "", - "web": "" - }, - "methods": { - "PL": { - "enabled": true - }, - "CARD": { - "enabled": true - }, - "NB": { - "enabled": true - }, - "WL": { - "enabled": true - }, - "PS": { - "enabled": true - }, - "UPI": { - "enabled": true - }, - "QR": { - "enabled": true - }, - "COD": { - "enabled": true - }, - "PP": { - "enabled": true - }, - "JP": { - "enabled": false - }, - "PAC": { - "enabled": false - }, - "FC": { - "enabled": false + ], + "international_delivery_charges": { + "enabled": true, + "charges": [ + { + "threshold": 1000, + "charges": 49 + }, + { + "threshold": 200000, + "charges": 79 + } + ] }, - "JIOPP": { - "enabled": false + "enabled": true, + "max_cart_items": 0, + "min_cart_value": 120, + "bulk_coupons": true, + "revenue_engine_coupon": false + }, + "payment": { + "callback_url": { + "app": "", + "web": "" }, - "STRIPEPG": { - "enabled": true - }, - "JUSPAYPG": { - "enabled": false + "methods": { + "pl": { + "enabled": true + }, + "card": { + "enabled": true + }, + "nb": { + "enabled": true + }, + "wl": { + "enabled": true + }, + "ps": { + "enabled": true + }, + "upi": { + "enabled": true + }, + "qr": { + "enabled": true + }, + "cod": { + "enabled": true + }, + "pp": { + "enabled": true + }, + "jp": { + "enabled": false + }, + "pac": { + "enabled": false + }, + "fc": { + "enabled": false + }, + "jiopp": { + "enabled": false + }, + "stripepg": { + "enabled": true + }, + "juspaypg": { + "enabled": false + }, + "payubizpg": { + "enabled": true + }, + "payumoneypg": { + "enabled": true + }, + "rupifipg": { + "enabled": false + }, + "simpl": { + "enabled": true + } }, - "PAYUBIZPG": { - "enabled": true + "payment_selection_lock": { + "enabled": false, + "default_options": "", + "payment_identifier": "" }, - "PAYUMONEYPG": { - "enabled": true + "mode_of_payment": "UNIKET_B2B", + "source": "UNIKET", + "enabled": true, + "cod_amount_limit": 100000, + "cod_charges": 1500 + }, + "order": { + "enabled": true, + "force_reassignment": false + }, + "logistics": { + "logistics_by_seller": false, + "serviceability_check": true, + "same_day_delivery": true, + "dp_assignment": true + }, + "business": "retail", + "comms_enabled": true, + "communication": { + "email": { + "enabled": false }, - "RUPIFIPG": { + "sms": { "enabled": false }, - "SIMPL": { - "enabled": true + "voice": { + "enabled": false } }, - "payment_selection_lock": { - "enabled": false, - "default_options": "", - "payment_identifier": "" - }, - "mode_of_payment": "UNIKET_B2B", - "source": "UNIKET", - "enabled": true, - "cod_amount_limit": 100000, - "cod_charges": 1500 - }, - "order": { - "enabled": true, - "force_reassignment": false - }, - "logistics": { - "logistics_by_seller": false, - "serviceability_check": true, - "same_day_delivery": true, - "dp_assignment": true - }, - "business": "retail", - "comms_enabled": true, - "communication": { - "email": { - "enabled": false - }, - "sms": { - "enabled": false + "platforms": [ + "uniket_wholesale" + ], + "_id": "5e04c76b8dd8c003577fdd0a", + "loyalty_points": { + "enabled": true, + "auto_apply": false }, - "voice": { - "enabled": false - } - }, - "platforms": [ - "uniket_wholesale" - ], - "_id": "5e04c76b8dd8c003577fdd0a", - "loyalty_points": { - "enabled": true, - "auto_apply": false - }, - "app": "000000000000000000000004", - "created_at": "2019-12-26T14:44:59.835Z", - "modified_at": "2021-03-09T15:40:29.208Z", - "__v": 3, - "modified_by": "5e199eed98cfe16dc61385de" + "app": "000000000000000000000001", + "created_at": "2019-12-26T14:44:59.835Z", + "modified_at": "2021-03-09T15:40:29.208Z", + "__v": 3, + "modified_by": "5e199eed98cfe16dc61385de" + } } ```
+
+ @@ -3926,15 +4265,23 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "message": "Domain removed successfully" + "value": { + "message": "Domain removed successfully" + } } ```
+
+ @@ -3979,15 +4326,23 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "message": "success" + "value": { + "message": "success" + } } ```
+
+ @@ -4036,91 +4391,99 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "tokens": { - "firebase": { - "credentials": { - "ios": { - "application_id": "test", - "api_key": "test" - }, - "android": { + "value": { + "tokens": { + "firebase": { + "credentials": { + "ios": { + "application_id": "test", + "api_key": "test" + }, + "android": { + "application_id": "test", + "api_key": "test" + }, + "project_id": "uniket-d8cdc", + "gcm_sender_id": "test", "application_id": "test", "api_key": "test" }, - "project_id": "uniket-d8cdc", - "gcm_sender_id": "test", - "application_id": "test", - "api_key": "test" + "enabled": true }, - "enabled": true - }, - "moengage": { - "credentials": { - "app_id": "test" + "moengage": { + "credentials": { + "app_id": "test" + }, + "enabled": true }, - "enabled": true - }, - "segment": { - "credentials": { - "write_key": "test" + "segment": { + "credentials": { + "write_key": "test" + }, + "enabled": true }, - "enabled": true - }, - "gtm": { - "credentials": { - "api_key": "1234567890" + "gtm": { + "credentials": { + "api_key": "1234567890" + }, + "enabled": false }, - "enabled": false - }, - "freshchat": { - "credentials": { - "app_id": "123456", - "app_key": "123456789", - "web_token": "" + "freshchat": { + "credentials": { + "app_id": "123456", + "app_key": "123456789", + "web_token": "" + }, + "enabled": false }, - "enabled": false - }, - "safetynet": { - "credentials": { - "api_key": "test" + "safetynet": { + "credentials": { + "api_key": "test" + }, + "enabled": true }, - "enabled": true - }, - "fynd_rewards": { - "credentials": { - "public_key": "test" - } - }, - "auth": { - "google": { - "appId": "test" + "fynd_rewards": { + "credentials": { + "public_key": "test" + } }, - "facebook": { - "appId": "test" + "auth": { + "google": { + "appId": "test" + }, + "facebook": { + "appId": "test" + }, + "accountkit": { + "appId": "" + } }, - "accountkit": { - "appId": "" + "google_map": { + "credentials": { + "api_key": "test" + } } }, - "google_map": { - "credentials": { - "api_key": "test" - } - } - }, - "_id": "5e66282a073261060ee83751", - "application": "000000000000000000000004", - "created_at": "2020-03-09T11:27:38.894Z", - "modified_at": "2020-12-24T05:39:17.054Z", - "__v": 0 + "_id": "5e66282a073261060ee83751", + "application": "000000000000000000000001", + "created_at": "2020-03-09T11:27:38.894Z", + "updated_at": "2020-12-24T05:39:17.054Z", + "__v": 0 + } } ```
+
+ @@ -4169,51 +4532,59 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "name": "Uniket B2B", - "description": "Uniket B2B - India's Fastest Growing Retail Store - Aapki Badhti Dukaan", - "logo": { - "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" - }, - "mobile_logo": { - "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" - }, - "favicon": { - "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/application/pictures/favicon/original/y3h6SSlY5-Uniket-B2B.png" - }, - "banner": { - "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/application/pictures/landscape-banner/original/uSwlNpygq-Uniket-B2B.png" - }, - "domain": { - "verified": true, - "is_primary": true, - "is_shortlink": false, - "_id": "5eb1177748312a3bd55d0f1e", - "name": "uniket.hostx0.de" - }, - "domains": [ - { + "value": { + "name": "Uniket B2B", + "description": "Uniket B2B - India's Fastest Growing Retail Store - Aapki Badhti Dukaan", + "logo": { + "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" + }, + "mobile_logo": { + "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/application/pictures/free-logo/original/oEf3SQjda-Uniket-B2B.png" + }, + "favicon": { + "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/application/pictures/favicon/original/y3h6SSlY5-Uniket-B2B.png" + }, + "banner": { + "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/application/pictures/landscape-banner/original/uSwlNpygq-Uniket-B2B.png" + }, + "domain": { "verified": true, "is_primary": true, "is_shortlink": false, "_id": "5eb1177748312a3bd55d0f1e", - "name": "uniket.hostx0.de" + "name": "uniket.hostfynd.dev" }, - { - "verified": true, - "is_primary": false, - "is_shortlink": true, - "_id": "5f0858c5f86e00cd42dccc8d", - "name": "jd.hostx0.de" - } - ] + "domains": [ + { + "verified": true, + "is_primary": true, + "is_shortlink": false, + "_id": "5eb1177748312a3bd55d0f1e", + "name": "uniket.hostfynd.dev" + }, + { + "verified": true, + "is_primary": false, + "is_shortlink": true, + "_id": "5f0858c5f86e00cd42dccc8d", + "name": "jd.hostfynd.dev" + } + ] + } } ```
+
+ @@ -4262,120 +4633,128 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "_id": "5e6627bd0732616083e83750", - "address": { - "address_line": [ - "Warehouse 5, Near Industrial Complex", - "2nd Lane, Andheri" - ], - "phone": [ - { - "code": "+91", - "number": "9988998899" - } - ], - "city": "Mumbai , Maharashtra , India", - "country": "India", - "pincode": 400059 - }, - "social_links": { - "facebook": { - "title": "Facebook", - "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/hQAbAKdvHK-facebookfooteraopcjq.svg", - "link": "" - }, - "instagram": { - "title": "Instagram", - "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/UZYsGWOqXp-instagramfooterl3utrr.svg", - "link": "" - }, - "twitter": { - "title": "Twitter", - "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/oT2hW-BJjq-twitterfooternajsyr.svg", - "link": "" - }, - "pinterest": { - "title": "Pinterest", - "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/v0erlcMk8p-pinterestfooternzmq4b.svg", - "link": "" - }, - "google_plus": { - "title": "Google+", - "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/lw3Y5S58h4-googleplusysukr1.png", - "link": "" - }, - "youtube": { - "title": "Youtube", - "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/EYV03PDST_-youtubefootermqhcr7.svg", - "link": "" - }, - "linked_in": { - "title": "LinkedIn", - "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/qa7gx_bW9O-linkedinfooterrcr0yq.svg", - "link": "" - }, - "blog_link": { - "title": "Blog", - "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/LKpxTk1I3s-mediumfooterdtvrva.svg", - "link": "" - } - }, - "links": [ - { - "title": "Shipping", - "link": "www.uniket.store/shipping-details" - }, - { - "title": "Returns", - "link": "www.uniket.store/policy/return-policy" + "value": { + "_id": "5e6627bd0732616083e83750", + "address": { + "address_line": [ + "Warehouse 5, Near Industrial Complex", + "2nd Lane, Andheri" + ], + "phone": [ + { + "code": "+91", + "number": "9988998899" + } + ], + "city": "Mumbai , Maharashtra , India", + "country": "India", + "pincode": 400059 }, - { - "title": "Privacy", - "link": "www.uniket.store/policy/privacy-policy" + "social_links": { + "facebook": { + "title": "Facebook", + "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/hQAbAKdvHK-facebookfooteraopcjq.svg", + "link": "" + }, + "instagram": { + "title": "Instagram", + "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/UZYsGWOqXp-instagramfooterl3utrr.svg", + "link": "" + }, + "twitter": { + "title": "Twitter", + "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/oT2hW-BJjq-twitterfooternajsyr.svg", + "link": "" + }, + "pinterest": { + "title": "Pinterest", + "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/v0erlcMk8p-pinterestfooternzmq4b.svg", + "link": "" + }, + "google_plus": { + "title": "Google+", + "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/lw3Y5S58h4-googleplusysukr1.png", + "link": "" + }, + "youtube": { + "title": "Youtube", + "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/EYV03PDST_-youtubefootermqhcr7.svg", + "link": "" + }, + "linked_in": { + "title": "LinkedIn", + "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/qa7gx_bW9O-linkedinfooterrcr0yq.svg", + "link": "" + }, + "blog_link": { + "title": "Blog", + "icon": "https://hdn-1.fynd.com/system/svg/social-media/icon/original/LKpxTk1I3s-mediumfooterdtvrva.svg", + "link": "" + } }, - { - "title": "Terms", - "link": "www.uniket.store/policy/terms-conditions" - } - ], - "copyright_text": "#MadeInIndia © 2020 Shopsense Retail Technologies", - "support": { - "timing": "9 AM to 9 PM", - "phone": [], - "email": [], - "business_highlights": [ + "links": [ { - "_id": "60479413a32f774d754b00ef", - "title": "100% Genuine Products", - "icon": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/business-highlights/pictures/square-logo/original/bVlx43F2a-H6pvZ9tzp-business-logo-icon.png", - "sub_title": "Directly from brands" + "title": "Shipping", + "link": "www.uniket.store/shipping-details" }, { - "_id": "60479413a32f7717df4b00f0", - "title": "Credit Facility Available", - "icon": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/business-highlights/pictures/square-logo/original/VMnltS1m3-QuUnEjOsA-business-logo-icon.png", - "sub_title": "Free 30 Days Credit" + "title": "Returns", + "link": "www.uniket.store/policy/return-policy" }, { - "_id": "60479413a32f77e70b4b00f1", - "title": "Assured Returns", - "icon": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/business-highlights/pictures/square-logo/original/cTHzgHJXK-sROtLMalN-business-logo-icon.png", - "sub_title": "For all damaged/wrong items" + "title": "Privacy", + "link": "www.uniket.store/policy/privacy-policy" + }, + { + "title": "Terms", + "link": "www.uniket.store/policy/terms-conditions" } - ] - }, - "application": "000000000000000000000004", - "created_at": "2020-03-09T11:25:49.921Z", - "modified_at": "2021-03-09T15:28:19.598Z", - "__v": 101 + ], + "copyright_text": "#MadeInIndia © 2020 Shopsense Retail Technologies", + "support": { + "timing": "9 AM to 9 PM", + "phone": [], + "email": [], + "business_highlights": [ + { + "_id": "60479413a32f774d754b00ef", + "title": "Most Genuine Products", + "icon": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/business-highlights/pictures/square-logo/original/bVlx43F2a-H6pvZ9tzp-business-logo-icon.png", + "sub_title": "Directly from brands" + }, + { + "_id": "60479413a32f7717df4b00f0", + "title": "Credit Facility Available", + "icon": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/business-highlights/pictures/square-logo/original/VMnltS1m3-QuUnEjOsA-business-logo-icon.png", + "sub_title": "Free 30 Days Credit" + }, + { + "_id": "60479413a32f77e70b4b00f1", + "title": "Assured Returns", + "icon": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/business-highlights/pictures/square-logo/original/cTHzgHJXK-sROtLMalN-business-logo-icon.png", + "sub_title": "For all damaged/wrong items" + } + ] + }, + "application": "000000000000000000000001", + "created_at": "2020-03-09T11:25:49.921Z", + "modified_at": "2021-03-09T15:28:19.598Z", + "__v": 101 + } } ```
+
+ @@ -4424,29 +4803,37 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "_id": "5ec7a85965c3893857538d93", - "supported_currency": [ - "5ec75d11f7bfb5a7d38f3524", - "5ec75d11f7bfb54d798f3516", - "5ec75d11f7bfb553b88f355f", - "5ec75d11f7bfb559d08f34d5", - "5ec75d11f7bfb5d1e98f34da" - ], - "application": "000000000000000000000004", - "default_currency": { - "ref": "5ec75d11f7bfb54d798f3516", - "code": "USD" - }, - "created_at": "2020-05-22T10:24:25.984Z", - "modified_at": "2021-03-09T10:47:32.664Z" + "value": { + "_id": "5ec7a85965c3893857538d93", + "supported_currency": [ + "5ec75d11f7bfb5a7d38f3524", + "5ec75d11f7bfb54d798f3516", + "5ec75d11f7bfb553b88f355f", + "5ec75d11f7bfb559d08f34d5", + "5ec75d11f7bfb5d1e98f34da" + ], + "application": "000000000000000000000001", + "default_currency": { + "ref": "5ec75d11f7bfb54d798f3516", + "code": "USD" + }, + "created_at": "2020-05-22T10:24:25.984Z", + "modified_at": "2021-03-09T10:47:32.664Z" + } } ```
+
+ @@ -4495,97 +4882,105 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "product_detail": { - "similar": [ - "basic", - "visual", - "brand", - "category", - "seller", - "price", - "specs" - ], - "seller_selection": true, - "update_product_meta": true, - "request_product": true - }, - "landing_page": { - "launch_page": { - "page_type": "home", - "params": {}, - "query": {} + "value": { + "product_detail": { + "similar": [ + "basic", + "visual", + "brand", + "category", + "seller", + "price", + "specs" + ], + "seller_selection": true, + "update_product_meta": true, + "request_product": true + }, + "landing_page": { + "launch_page": { + "page_type": "home", + "params": {}, + "query": {} + }, + "continue_as_guest": true, + "login_btn_text": "Click here to sign-in", + "show_domain_textbox": true, + "show_register_btn": true }, - "continue_as_guest": true, - "login_btn_text": "Click here to sign-in", - "show_domain_textbox": true, - "show_register_btn": true - }, - "registration_page": { - "ask_store_address": false - }, - "home_page": { - "order_processing": true - }, - "common": { - "communication_optin_dialog": { - "visibility": true + "registration_page": { + "ask_store_address": false }, - "deployment_store_selection": { - "enabled": true, - "type": "hard" + "home_page": { + "order_processing": true }, - "listing_price": { - "value": "min", - "sort": "min" + "common": { + "communication_optin_dialog": { + "visibility": true + }, + "deployment_store_selection": { + "enabled": true, + "type": "hard" + }, + "listing_price": { + "value": "min", + "sort": "min" + }, + "currency": { + "value": [ + "INR" + ], + "type": "explicit", + "default_currency": "INR" + }, + "revenue_engine": { + "enabled": false + }, + "feedback": { + "enabled": true + }, + "compare_products": { + "enabled": true + } + }, + "cart": { + "gst_input": true, + "staff_selection": true, + "placing_for_customer": true, + "google_map": true, + "revenue_engine_coupon": false }, - "currency": { - "value": [ - "INR" - ], - "type": "explicit", - "default_currency": "INR" + "qr": { + "application": true, + "products": true, + "collections": true }, - "revenue_engine": { - "enabled": false + "pcr": { + "staff_selection": true }, - "feedback": { - "enabled": true + "order": { + "buy_again": true }, - "compare_products": { - "enabled": true - } - }, - "cart": { - "gst_input": true, - "staff_selection": true, - "placing_for_customer": true, - "google_map": true, - "revenue_engine_coupon": false - }, - "qr": { - "application": true, - "products": true, - "collections": true - }, - "pcr": { - "staff_selection": true - }, - "order": { - "buy_again": true - }, - "_id": "5e57643c986e4119c973df7d", - "app": "000000000000000000000004", - "created_at": "2020-02-27T06:39:56.088Z", - "modified_at": "2021-03-09T15:40:29.188Z", - "__v": 1 + "_id": "5e57643c986e4119c973df7d", + "app": "000000000000000000000001", + "created_at": "2020-02-27T06:39:56.088Z", + "updated_at": "2021-03-09T15:40:29.188Z", + "__v": 1 + } } ```
+
+ @@ -4637,31 +5032,39 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "is_active": true, - "_id": "5ea9b318bc23a343ab6d442f", - "app_name": "TestUniket", - "landing_image": { - "aspect_ratio": "57/51", - "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/mobile-build/pictures/free-landing/original/yKnXY1ATx-store-landing-image.png" - }, - "splash_image": { - "aspect_ratio": "1/1", - "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/mobile-build/pictures/free-splash/original/s6d7oYfY6-store-splash-image.png" - }, - "application": "000000000000000000000004", - "platform_type": "android", - "created_at": "2020-04-29T17:02:16.976Z", - "modified_at": "2021-02-23T17:10:26.872Z", - "__v": 0, - "package_name": "com.fynd.store.x000000000000000000000004" + "value": { + "is_active": true, + "_id": "5ea9b318bc23a343ab6d442f", + "app_name": "TestUniket", + "landing_image": { + "aspect_ratio": "57/51", + "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/mobile-build/pictures/free-landing/original/yKnXY1ATx-store-landing-image.png" + }, + "splash_image": { + "aspect_ratio": "1/1", + "secure_url": "https://hdn-1.addsale.com/x0/company/1/applications/000000000000000000000004/mobile-build/pictures/free-splash/original/s6d7oYfY6-store-splash-image.png" + }, + "application": "000000000000000000000001", + "platform_type": "android", + "created_at": "2020-04-29T17:02:16.976Z", + "modified_at": "2021-02-23T17:10:26.872Z", + "__v": 0, + "package_name": "com.fynd.store.x000000000000000000000001" + } } ```
+
+ @@ -4710,77 +5113,83 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "inventory": { - "brand": { - "criteria": "all", - "brands": [] - }, - "store": { - "criteria": "filter", - "stores": [], - "rules": [ - { - "companies": [ - 1, - 3, - 4 - ], - "brands": [] - } - ] - }, - "category": { - "criteria": "all", - "categories": [] + "value": { + "inventory": { + "brand": { + "criteria": "all", + "brands": [] + }, + "store": { + "criteria": "filter", + "stores": [], + "rules": [ + { + "companies": [ + 1, + 3, + 4 + ], + "brands": [] + } + ] + }, + "category": { + "criteria": "all", + "categories": [] + }, + "price": { + "min": 1, + "max": 10000 + }, + "discount": { + "min": 0, + "max": 100 + }, + "out_of_stock": true, + "franchise_enabled": true, + "exclude_category": [], + "image": [ + "standard", + "substandard", + "default" + ], + "company_store": [] }, - "price": { - "min": 1, - "max": 10000 + "authentication": { + "required": true, + "provider": "fynd" }, - "discount": { - "min": 0, - "max": 100 + "article_assignment": { + "rules": { + "store_priority": { + "enabled": false, + "storetype_order": [] + } + }, + "post_order_reassignment": true }, - "out_of_stock": true, - "franchise_enabled": true, - "exclude_category": [], - "image": [ - "standard", - "substandard", - "default" - ], - "company_store": [] - }, - "authentication": { - "required": true, - "provider": "fynd" - }, - "article_assignment": { - "rules": { - "store_priority": { - "enabled": false, - "storetype_order": [] + "reward_points": { + "credit": { + "enabled": true + }, + "debit": { + "enabled": true, + "auto_apply": false, + "strategy_channel": "REWARDS" } }, - "post_order_reassignment": true - }, - "reward_points": { - "credit": { - "enabled": true - }, - "debit": { - "enabled": true, - "auto_apply": false, - "strategy_channel": "REWARDS" - } - }, - "cart": { - "delivery_charges": { - "enabled": true, + "cart": { + "delivery_charges": { + "enabled": true + }, "charges": [ { "threshold": 1000, @@ -4790,129 +5199,144 @@ Success "threshold": 200000, "charges": 79 } - ] - }, - "enabled": true, - "max_cart_items": 0, - "min_cart_value": 120, - "bulk_coupons": true, - "revenue_engine_coupon": false - }, - "payment": { - "callback_url": { - "app": "", - "web": "" - }, - "methods": { - "PL": { - "enabled": true - }, - "CARD": { - "enabled": true - }, - "NB": { - "enabled": true - }, - "WL": { - "enabled": true - }, - "PS": { - "enabled": true - }, - "UPI": { - "enabled": true - }, - "QR": { - "enabled": true - }, - "COD": { - "enabled": true - }, - "PP": { - "enabled": true + ], + "international_delivery_charges": { + "enabled": true, + "charges": [ + { + "threshold": 1000, + "charges": 49 + }, + { + "threshold": 200000, + "charges": 79 + } + ] }, - "JP": { - "enabled": false + "enabled": true, + "max_cart_items": 0, + "min_cart_value": 120, + "bulk_coupons": true, + "revenue_engine_coupon": false + }, + "payment": { + "callback_url": { + "app": "", + "web": "" }, - "PAC": { - "enabled": false + "methods": { + "pl": { + "enabled": true + }, + "card": { + "enabled": true + }, + "nb": { + "enabled": true + }, + "wl": { + "enabled": true + }, + "ps": { + "enabled": true + }, + "upi": { + "enabled": true + }, + "qr": { + "enabled": true + }, + "cod": { + "enabled": true + }, + "pp": { + "enabled": true + }, + "jp": { + "enabled": false + }, + "pac": { + "enabled": false + }, + "fc": { + "enabled": false + }, + "jiopp": { + "enabled": false + }, + "stripepg": { + "enabled": true + }, + "juspaypg": { + "enabled": false + }, + "payubizpg": { + "enabled": true + }, + "payumoneypg": { + "enabled": true + }, + "rupifipg": { + "enabled": false + }, + "simpl": { + "enabled": true + } }, - "FC": { - "enabled": false + "payment_selection_lock": { + "enabled": false, + "default_options": "", + "payment_identifier": "" }, - "JIOPP": { + "mode_of_payment": "UNIKET_B2B", + "source": "UNIKET", + "enabled": true, + "cod_amount_limit": 100000, + "cod_charges": 1500 + }, + "order": { + "enabled": true, + "force_reassignment": false + }, + "logistics": { + "logistics_by_seller": false, + "serviceability_check": true, + "same_day_delivery": true, + "dp_assignment": true + }, + "business": "retail", + "comms_enabled": true, + "communication": { + "email": { "enabled": false }, - "STRIPEPG": { - "enabled": true - }, - "JUSPAYPG": { + "sms": { "enabled": false }, - "PAYUBIZPG": { - "enabled": true - }, - "PAYUMONEYPG": { - "enabled": true - }, - "RUPIFIPG": { + "voice": { "enabled": false - }, - "SIMPL": { - "enabled": true } }, - "payment_selection_lock": { - "enabled": false, - "default_options": "", - "payment_identifier": "" - }, - "mode_of_payment": "UNIKET_B2B", - "source": "UNIKET", - "enabled": true, - "cod_amount_limit": 100000, - "cod_charges": 1500 - }, - "order": { - "enabled": true, - "force_reassignment": false - }, - "logistics": { - "logistics_by_seller": false, - "serviceability_check": true, - "same_day_delivery": true, - "dp_assignment": true - }, - "business": "retail", - "comms_enabled": true, - "communication": { - "email": { - "enabled": false - }, - "sms": { - "enabled": false + "platforms": [ + "uniket_wholesale" + ], + "_id": "5e04c76b8dd8c003577fdd0a", + "loyalty_points": { + "enabled": true, + "auto_apply": false }, - "voice": { - "enabled": false - } - }, - "platforms": [ - "uniket_wholesale" - ], - "_id": "5e04c76b8dd8c003577fdd0a", - "loyalty_points": { - "enabled": true, - "auto_apply": false - }, - "app": "000000000000000000000004", - "created_at": "2019-12-26T14:44:59.835Z", - "modified_at": "2021-03-09T15:40:29.208Z", - "__v": 3, - "modified_by": "5e199eed98cfe16dc61385de" + "app": "000000000000000000000001", + "created_at": "2019-12-26T14:44:59.835Z", + "modified_at": "2021-03-09T15:40:29.208Z", + "__v": 3, + "modified_by": "5e199eed98cfe16dc61385de" + } } ```
+
+ @@ -4967,30 +5391,34 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "opted": false, - "permissions": [], - "last_patch": [], - "_id": "5ec377f2848a0073feacb31b", - "integration": "5ec376ce848a005189acb312", - "level": "store", - "uid": 1, - "meta": [], - "token": "1RuGX0Fyp", - "created_at": "2020-05-19T06:08:50.199Z", - "modified_at": "2020-08-17T07:54:01.809Z", - "__v": 14, - "data": { - "location_id": "09876", - "ip_address": "1.2.3.4" + "value": { + "opted": false, + "permissions": [], + "last_patch": [], + "_id": "5ec377f2848a0073feacb31b", + "integration": "5ec376ce848a005189acb312", + "level": "store", + "uid": 1, + "meta": [], + "token": "1RuGX0Fyp", + "created_at": "2020-05-19T06:08:50.199Z", + "modified_at": "2020-08-17T07:54:01.809Z", + "__v": 14 } } ```
+
+ @@ -5048,30 +5476,35 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "opted": false, - "permissions": [], - "last_patch": [], - "_id": "5ec377f2848a0073feacb31b", - "integration": "5ec376ce848a005189acb312", - "level": "store", - "uid": 1, - "meta": [], - "token": "1RuGX0Fyp", - "created_at": "2020-05-19T06:08:50.199Z", - "modified_at": "2020-08-17T07:54:01.809Z", - "__v": 14, - "data": { - "location_id": "09876", - "ip_address": "1.2.3.4" + "value": { + "opted": false, + "permissions": [], + "last_patch": [], + "_id": "5ec377f2848a0073feacb31b", + "integration": "5ec376ce848a005189acb312", + "level": "store", + "uid": 2, + "meta": [], + "token": "1RuGX0Fyp", + "company_id": 2, + "created_at": "2020-05-19T06:08:50.199Z", + "modified_at": "2020-08-17T07:54:01.809Z", + "__v": 14 } } ```
+
+ @@ -5120,11 +5553,15 @@ Success
-  Example: +  Examples: + + +
+  success ```json { - "deployment_meta": { + "value": { "deployed_stores": [ 1, 10 @@ -5133,23 +5570,14 @@ Success "enabled": true, "type": "hard", "_id": "5e7e5e4d6b5f3b4b54c95f9c", - "app": "000000000000000000000004", - "__v": 6 - }, - "deployed_stores": [ - 1, - 10 - ], - "all_stores": false, - "enabled": true, - "type": "hard", - "_id": "5e7e5e4d6b5f3b4b54c95f9c", - "app": "000000000000000000000004", - "__v": 6 + "app": "000000000000000000000001" + } } ```
+
+ @@ -5196,6 +5624,7 @@ Success | bulk_coupons | boolean? | yes | Allow creation of bulk coupons | | delivery_charges | [DeliveryCharges](#DeliveryCharges)? | yes | | | enabled | boolean? | yes | Shows whether cart configuration is enabled or not | + | international_delivery_charges | [InternationalDeliveryCharges](#InternationalDeliveryCharges)? | yes | | | max_cart_items | number? | yes | Maximum number of items that can be added to cart by the customer | | min_cart_value | number? | yes | Minimum cart value below which customer cannot place an order | | pan_card | [PanCardConfig](#PanCardConfig)? | yes | | @@ -5208,8 +5637,11 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) of the currency configuration supported by the application | | application | string? | yes | Alphanumeric ID allotted to an application (sales channel website) created within a business account | + | created_at | string? | yes | ISO 8601 timestamp when currency was added in the list of currencies supported by the sales channel | | default_currency | [DefaultCurrency](#DefaultCurrency)? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp when currency was updated in the list of currencies supported by the sales channel | | supported_currency | [[Currency](#Currency)]? | yes | | @@ -5236,12 +5668,12 @@ Success | created_at | string? | yes | ISO 8601 timestamp showing the date when the features were configured | | home_page | [HomePageFeature](#HomePageFeature)? | yes | | | landing_page | [LandingPageFeature](#LandingPageFeature)? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of last known modifications to the sales channel feature configuration | | order | [OrderFeature](#OrderFeature)? | yes | | | pcr | [PcrFeature](#PcrFeature)? | yes | | | product_detail | [ProductDetailFeature](#ProductDetailFeature)? | yes | | | qr | [QrFeature](#QrFeature)? | yes | | | registration_page | [RegistrationPageFeature](#RegistrationPageFeature)? | yes | | - | updated_at | string? | yes | ISO 8601 timestamp of last known modifications to the sales channel feature configuration | --- @@ -5269,13 +5701,8 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | article_assignment | [InventoryArticleAssignment](#InventoryArticleAssignment)? | yes | | - | brand | [InventoryBrandRule](#InventoryBrandRule)? | yes | | - | franchise_enabled | boolean? | yes | Allow other businesses (companies) to consume the current sales channel's inventory and sell products | - | image | [string]? | yes | | - | only_verified_products | boolean? | yes | Show only verified products (the ones whose data have been verified by the admin) | - | out_of_stock | boolean? | yes | Indicates whether out of stock products are allowed to show up on the website. | + | inventory | [InventoryConfig](#InventoryConfig)? | yes | | | payment | [InventoryPaymentConfig](#InventoryPaymentConfig)? | yes | | - | store | [InventoryStoreRule](#InventoryStoreRule)? | yes | | --- @@ -5297,6 +5724,7 @@ Success | ---------- | ---- | -------- | ----------- | | brand | [InventoryBrand](#InventoryBrand)? | yes | | | category | [InventoryCategory](#InventoryCategory)? | yes | | + | company_id | number? | yes | | | company_store | [any]? | yes | List of selling locations whose inventory is available to the sales channel for displaying on the website | | discount | [InventoryDiscount](#InventoryDiscount)? | yes | | | exclude_category | [any]? | yes | List of excluded brands category | @@ -5329,8 +5757,10 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string? | yes | The unique identifier of the store (24-digit Mongo Object ID) in the sales channel inventory | + | address | string? | yes | | | company_id | number? | yes | Company ID of the selling location (store) added to the sales channel's inventory | | display_name | string? | yes | Display name of the sales channel inventory store (can be different than the actual store name), e.g. Reebok MUM | + | integration_type | string? | yes | | | modified_on | string? | yes | ISO 8601 timestamp of last known updation to the stores in sales channel inventory | | name | string? | yes | Name of the store in the sales channel inventory, e.g. Reebok Mumbai | | store_code | string? | yes | Store code of the enabled inventory store, e.g. HS-c9bac. It is unique for every store. | @@ -5363,12 +5793,16 @@ Success | logo | [SecureUrl](#SecureUrl)? | yes | | | meta | [[ApplicationMeta](#ApplicationMeta)]? | yes | | | mobile_logo | [SecureUrl](#SecureUrl)? | yes | | + | mode | string? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of sales channel updation | | name | string? | yes | Name of the sales channel, e.g. Zenz Fashion | | owner | string? | yes | The unique identifier (24-digit Mongo Object ID) of owner who owns the application | | redirections | [[ApplicationRedirections](#ApplicationRedirections)]? | yes | | + | secret | string? | yes | | | slug | string? | yes | | - | token | string? | yes | Random generated fix length string for sales channel. It is required and auto-generated. | - | updated_at | string? | yes | ISO 8601 timestamp of sales channel updation | + | status | string? | yes | | + | token | string? | yes | Random generated fix length string for sales channel. It is required and auto-generated. | + | tokens | [[TokenSchema](#TokenSchema)]? | yes | | | website | [ApplicationWebsite](#ApplicationWebsite)? | yes | | @@ -5398,6 +5832,7 @@ Success | ---------- | ---- | -------- | ----------- | | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) for the sales channel details | | banner | [SecureUrl](#SecureUrl)? | yes | | + | company_id | number? | yes | | | description | string? | yes | It gives a detailed information about the sales channel. It is required. | | domain | [Domain](#Domain)? | yes | | | domains | [[Domain](#Domain)]? | yes | | @@ -5405,6 +5840,7 @@ Success | logo | [SecureUrl](#SecureUrl)? | yes | | | mobile_logo | [SecureUrl](#SecureUrl)? | yes | | | name | string | no | Name of the sales channel. It is required. | + | slug | string? | yes | | --- @@ -5417,13 +5853,13 @@ Success | _id | string? | yes | Unique identifier (24-digit Mongo Object ID) of the application information | | address | [InformationAddress](#InformationAddress)? | yes | | | application | string? | yes | Alphanumeric ID allotted to a sales channel application created within a business account | - | business_highlights | [BusinessHighlights](#BusinessHighlights)? | yes | | + | business_highlights | [[BusinessHighlights](#BusinessHighlights)]? | yes | | | copyright_text | string? | yes | Copyright statement usually seen at the site's footer | | created_at | string? | yes | ISO 8601 timestamp of creation of the application information | | links | [[Links](#Links)]? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of updation of the application information | | social_links | [SocialLinks](#SocialLinks)? | yes | | | support | [InformationSupport](#InformationSupport)? | yes | | - | updated_at | string? | yes | ISO 8601 timestamp of updation of the application information | --- @@ -5432,6 +5868,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | __v | number? | yes | | | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) of the sales channel inventory | | app | string? | yes | Current sales channel ID | | article_assignment | [ArticleAssignmentConfig](#ArticleAssignmentConfig)? | yes | | @@ -5444,12 +5881,14 @@ Success | inventory | [AppInventoryConfig](#AppInventoryConfig)? | yes | | | logistics | [AppLogisticsConfig](#AppLogisticsConfig)? | yes | | | loyalty_points | [LoyaltyPointsConfig](#LoyaltyPointsConfig)? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of sales channel inventory updation | | modified_by | string? | yes | User ID of the person who made the latest changes in the sales channel inventory | | order | [AppOrderConfig](#AppOrderConfig)? | yes | | | payment | [AppPaymentConfig](#AppPaymentConfig)? | yes | | + | pii_masking | [PiiMasking](#PiiMasking)? | yes | | | platforms | [string]? | yes | | | reward_points | [RewardPointsConfig](#RewardPointsConfig)? | yes | | - | updated_at | string? | yes | ISO 8601 timestamp of sales channel inventory updation | + | tags | [string]? | yes | | --- @@ -5531,6 +5970,7 @@ Success | mode_of_payment | string? | yes | Mode of payment for sales channel payment, e.g. 'ECOMM'. | | payment_selection_lock | [PaymentSelectionLock](#PaymentSelectionLock)? | yes | | | source | string? | yes | Source of the payment mode, e.g. 'ECOMM'. Default value is FYND. | + | user_cod_limit | number? | yes | | --- @@ -5539,7 +5979,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brands | [any]? | yes | List of brands whose products will be shown on the website | + | brands | [number]? | yes | List of brands whose products will be shown on the website | | companies | [number]? | yes | List of companies whose inventory is available to the sales channel for displaying on the website | @@ -5553,8 +5993,8 @@ Success | application | string? | yes | Alphanumeric ID allotted to an application (sales channel website) created within a business account. | | created_at | string? | yes | ISO 8601 timestamp when currency was added in the list of currencies supported by the sales channel | | default_currency | [DefaultCurrency](#DefaultCurrency)? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp when currency was updated in the list of currencies supported by the sales channel | | supported_currency | [string]? | yes | | - | updated_at | string? | yes | ISO 8601 timestamp when currency was updated in the list of currencies supported by the sales channel | --- @@ -5563,6 +6003,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | enforced_stores | [number]? | yes | | | post_order_reassignment | boolean? | yes | Allow post order reassigment of article | | rules | [ArticleAssignmentRules](#ArticleAssignmentRules)? | yes | | @@ -5622,7 +6063,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brands | [CompanyBrandInfo](#CompanyBrandInfo)? | yes | | + | brands | [[CompanyBrandInfo](#CompanyBrandInfo)]? | yes | | --- @@ -5650,8 +6091,9 @@ Success | application | string? | yes | Application ID of the sales channel | | build_status | string? | yes | Current progress of the mobile build, e.g. pending, cancelled, failed, success | | created_at | string? | yes | ISO 8601 timestamp of app creation | + | download_url | [LandingImage](#LandingImage)? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of last known modifications to the app build | | platform_type | string? | yes | Device platform for which the mobile app was built, e.g. android, ios. | - | updated_at | string? | yes | ISO 8601 timestamp of last known modifications to the app build | | version_code | number? | yes | A positive integer used as an internal version number | | version_name | string? | yes | Version number of the mobile build, in dot-decimal notation | @@ -5663,7 +6105,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | latest_available_version_name | string? | yes | Latest version number of the mobile build, in dot-decimal notation | - | versions | [BuildVersion](#BuildVersion)? | yes | | + | versions | [[BuildVersion](#BuildVersion)]? | yes | | --- @@ -5722,6 +6164,8 @@ Success | currency | [CurrencyFeature](#CurrencyFeature)? | yes | | | deployment_store_selection | [DeploymentStoreSelectionFeature](#DeploymentStoreSelectionFeature)? | yes | | | feedback | [FeedbackFeature](#FeedbackFeature)? | yes | | + | international_shipping | [InternationalShipping](#InternationalShipping)? | yes | | + | listing_page | [ListingPageFeature](#ListingPageFeature)? | yes | | | listing_price | [ListingPriceFeature](#ListingPriceFeature)? | yes | | | revenue_engine | [RevenueEngineFeature](#RevenueEngineFeature)? | yes | | | reward_points | [RewardPointsConfig](#RewardPointsConfig)? | yes | | @@ -5762,7 +6206,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [AppInventoryCompanies](#AppInventoryCompanies)? | yes | | + | items | [[AppInventoryCompanies](#AppInventoryCompanies)]? | yes | | | page | [Page](#Page)? | yes | | @@ -5825,7 +6269,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | app | [App](#App)? | yes | | - | configuration | [AppInventory](#AppInventory)? | yes | | + | configuration | [ApplicationInventory](#ApplicationInventory)? | yes | | | domain | [AppDomain](#AppDomain)? | yes | | @@ -5879,12 +6323,14 @@ Success | ---------- | ---- | -------- | ----------- | | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) of the current sales channel supported currency | | code | string? | yes | 3-character currency code, e.g. INR, USD, EUR. | + | country_code | string? | yes | | + | country_name | string? | yes | | | created_at | string? | yes | ISO 8601 timestamp of sales channel support currency creation | | decimal_digits | number? | yes | Acceptable decimal limits for a given currency, e.g. 1.05$ means upto 2 decimal digits can be accepted as a valid value of a currency. | | is_active | boolean? | yes | Shows currency is enabled or not in current sales channel | + | modified_at | string? | yes | ISO 8601 timestamp of sales channel support currency updation | | name | string? | yes | Name of the currency, e.g Indian Rupee | | symbol | string? | yes | Unique symbol for identifying the currency, e.g. ₹ | - | updated_at | string? | yes | ISO 8601 timestamp of sales channel support currency updation | --- @@ -5935,6 +6381,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | __v | number? | yes | | | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) of the ordering stores | | all_stores | boolean? | yes | Allow all stores from the ordering store | | app | string? | yes | Alphanumeric ID allotted to an application (sales channel website) created within a business account | @@ -5963,6 +6410,7 @@ Success | is_predefined | boolean? | yes | Domain is hosting domain or not. | | is_primary | boolean? | yes | Domain is primary or not. Primary domain is the default/main domain. | | is_shortlink | boolean? | yes | Shortlink is present or not for the domain | + | message | string? | yes | | | name | string? | yes | Full domain name, e.g. newton.com | | verified | boolean? | yes | Domain is verified or not. TXT and A records should propagate correctly. | @@ -6138,6 +6586,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | private_key | string? | yes | Public key for integrating with Fynd rewards. | | public_key | string? | yes | Public key for integrating with Fynd rewards. | @@ -6217,11 +6666,21 @@ Success | address_line | [string]? | yes | Contact address of the sales channel | | city | string? | yes | Name of the city, e.g. Mumbai | | country | string? | yes | Name of the country, e.g. India | - | loc | string? | yes | Co-ordinates of the location | + | loc | [InformationLoc](#InformationLoc)? | yes | | | phone | [[InformationPhone](#InformationPhone)]? | yes | | | pincode | number? | yes | 6-digit PIN Code of the city, e.g. 400001 | +--- + +#### [InformationLoc](#InformationLoc) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | coordinates | [number]? | yes | 10-digit mobile number | + | type | string? | yes | Country code for contact number, e.g. +91 (for India) | + + --- #### [InformationPhone](#InformationPhone) @@ -6238,11 +6697,32 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | email | [string]? | yes | | - | phone | [string]? | yes | | + | email | [[InformationSupportEmail](#InformationSupportEmail)]? | yes | | + | phone | [[InformationSupportPhone](#InformationSupportPhone)]? | yes | | | timing | string? | yes | Working hours of support team, e.g. 9 AM to 9 PM | +--- + +#### [InformationSupportEmail](#InformationSupportEmail) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | key | string? | yes | | + | value | string? | yes | Value of email. | + + +--- + +#### [InformationSupportPhone](#InformationSupportPhone) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | code | string? | yes | Country code for contact number, e.g. +91 (for India) | + | key | string? | yes | | + | number | string? | yes | 10-digit mobile number | + + --- #### [InstagramLink](#InstagramLink) @@ -6267,14 +6747,16 @@ Success | created_at | string? | yes | ISO 8601 timestamp of integration creation | | description | string? | yes | Basic description about the integration | | description_html | string? | yes | Basic HTML description about the integration | + | hidden | boolean? | yes | | | icon | string? | yes | Hosted URL of the icon image | | meta | [[IntegrationMeta](#IntegrationMeta)]? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of integration updation | | name | string? | yes | Name of the integration, e.g. SAP RBL Integration | | owner | string? | yes | The unique identifier (24-digit Mongo Object ID) of the user who created the integration | | secret | string? | yes | Randomly generated fixed-length string for opted integration. It is auto-generated. It would never change once it is generated. | + | slug | string? | yes | Name of the integration, e.g. SAP RBL Integration | | support | [string]? | yes | | | token | string? | yes | Randomly generated fixed-length string for opted integration. It is auto-generated. It would never change once it is generated. | - | updated_at | string? | yes | ISO 8601 timestamp of integration updation | | validators | [Validators](#Validators)? | yes | | @@ -6295,17 +6777,20 @@ Success | ---------- | ---- | -------- | ----------- | | __v | number? | yes | Version key for tracking revisions. Default value is zero. | | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) of the integration config | + | company_id | number? | yes | Unique id of company. | | created_at | string? | yes | ISO 8601 timestamp of integration config creation | | data | string? | yes | Schema data of the integration stored in key-value pairs | | integration | string? | yes | Integration id. Shows which integration you are enabling. | | last_patch | [[LastPatch](#LastPatch)]? | yes | | | level | string? | yes | Shows for what level the integration is set up. It can be company level or store level. | + | message | string? | yes | | | meta | [[IntegrationMeta](#IntegrationMeta)]? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of integration config updation | | opted | boolean? | yes | Shows this integration is opted or not opted for the current company | | permissions | [string]? | yes | | + | success | boolean? | yes | | | token | string? | yes | Randomly generated fixed-length string for opted integration. It is auto-generated. It would never change once it is generated. | | uid | number? | yes | It can be store uid or company uid. Depends on the level of integration. | - | updated_at | string? | yes | ISO 8601 timestamp of integration config updation | --- @@ -6333,17 +6818,38 @@ Success | created_at | string? | yes | ISO 8601 timestamp of integration creation | | description | string? | yes | Basic description about the opted integration | | description_html | string? | yes | Basic HTML description about the opted integration | + | hidden | boolean? | yes | | | icon | string? | yes | Hosted URL of the icon image | | meta | [[IntegrationMeta](#IntegrationMeta)]? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of integration updation | | name | string? | yes | Nmae of the opted integration, e.g. SAP RBL Integration | | owner | string? | yes | The unique identifier (24-digit Mongo Object ID) of the user who created the integration | | secret | string? | yes | Randomly generated fixed-length string for opted integration. It is auto-generated. It would never change once it is generated. | + | slug | string? | yes | Slug of the opted integration, e.g. ginesys | | support | [string]? | yes | | | token | string? | yes | Randomly generated fixed-length string for opted integration. It is auto-generated. It would never change once it is generated. | - | updated_at | string? | yes | ISO 8601 timestamp of integration updation | | validators | [Validators](#Validators)? | yes | | +--- + +#### [InternationalDeliveryCharges](#InternationalDeliveryCharges) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | charges | [[Charges](#Charges)]? | yes | | + | enabled | boolean? | yes | Allow international delivery charges | + + +--- + +#### [InternationalShipping](#InternationalShipping) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | enabled | boolean? | yes | International shipping is enabled or not. | + + --- #### [InvalidPayloadRequest](#InvalidPayloadRequest) @@ -6351,6 +6857,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | message | string? | yes | Error message when request body payload is improper | + | success | boolean? | yes | Flag for required not successfull. | --- @@ -6369,7 +6876,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brands | [any]? | yes | List of brands | + | brands | [number]? | yes | List of brands | | criteria | string? | yes | All brands or specific (explicit) brands to be shown on the website | @@ -6393,6 +6900,20 @@ Success | criteria | string? | yes | | +--- + +#### [InventoryConfig](#InventoryConfig) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | brand | [InventoryBrandRule](#InventoryBrandRule)? | yes | | + | franchise_enabled | boolean? | yes | Allow other businesses (companies) to consume the current sales channel's inventory and sell products | + | image | [string]? | yes | | + | only_verified_products | boolean? | yes | Show only verified products (the ones whose data have been verified by the admin) | + | out_of_stock | boolean? | yes | Indicates whether out of stock products are allowed to show up on the website. | + | store | [InventoryStoreRule](#InventoryStoreRule)? | yes | | + + --- #### [InventoryDiscount](#InventoryDiscount) @@ -6543,6 +7064,15 @@ Success | title | string? | yes | Name of the related page or link | +--- + +#### [ListingPageFeature](#ListingPageFeature) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | sort_on | string? | yes | | + + --- #### [ListingPriceFeature](#ListingPriceFeature) @@ -6615,10 +7145,10 @@ Success | created_at | string? | yes | ISO 8601 timestamp of application configuration creation | | is_active | boolean? | yes | Indicates the availability of the mobile build | | landing_image | [LandingImage](#LandingImage)? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of last known modifications to the app build | | package_name | string? | yes | Shows bundle identifier if device platform is iOS, and directory of the app if device platform is Android | | platform_type | string? | yes | Device platform for which the mobile app was built, e.g. android, ios. | | splash_image | [SplashImage](#SplashImage)? | yes | | - | updated_at | string? | yes | ISO 8601 timestamp of last known modifications to the app build | --- @@ -6647,6 +7177,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | message | string? | yes | Response message for not found | + | success | boolean? | yes | Flag for required not successfull. | --- @@ -6670,6 +7201,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | id | number? | yes | The unique identifier of the opted inventory company | | name | string? | yes | Name of the company opted by the other seller's sales channel in its inventory | | uid | number? | yes | Company UID opted by the other seller's sales channel in its inventory. It has unique value for the company. | @@ -6680,7 +7212,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | any? | yes | | + | items | [any]? | yes | | | opt_type | [OptType](#OptType)? | yes | | @@ -6711,9 +7243,12 @@ Success | address2 | string? | yes | Address of the opted store | | city | string? | yes | City of the opted store, e.g. Mumbai | | country | string? | yes | Country of the opted store, e.g. India | + | country_code | string? | yes | Country code of the selected country | | lat_long | [StoreLatLong](#StoreLatLong)? | yes | | | pincode | number? | yes | 6-digit PIN code of the opted store location | + | sector | string? | yes | Sector for the opted store. | | state | string? | yes | State of the opted store, e.g. Maharashtra | + | state_code | string? | yes | Selected state code | --- @@ -6851,11 +7386,11 @@ Success | last_patch | [[LastPatch](#LastPatch)]? | yes | | | level | string? | yes | Indicates integration level. It can be company level or store level. | | meta | [string]? | yes | | + | modified_at | string? | yes | ISO 8601 timestamp of other entity updation for opted store integration | | opted | boolean? | yes | Allow other entity opted in integration | | permissions | [string]? | yes | | | token | string? | yes | Randomly generated fixed-length string for opted integration. It is auto-generated. It would never change once it is generated. | | uid | number? | yes | It can be store uid or company uid. Depends on the level of integration. | - | updated_at | string? | yes | ISO 8601 timestamp of other entity updation for opted store integration | --- @@ -6956,6 +7491,15 @@ Success | staff_selection | boolean? | yes | Allow staff selection. Default value is false. | +--- + +#### [PiiMasking](#PiiMasking) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | enabled | boolean? | yes | | + + --- #### [PinterestLink](#PinterestLink) @@ -7159,7 +7703,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [AppInventoryStores](#AppInventoryStores)? | yes | | + | items | [[AppInventoryStores](#AppInventoryStores)]? | yes | | | page | [Page](#Page)? | yes | | @@ -7193,8 +7737,8 @@ Success | _id | string? | yes | The unique identifier (24-digit Mongo Object ID) of the token | | application | string? | yes | Alphanumeric ID allotted to the current application created within the current business account | | created_at | string? | yes | ISO 8601 timestamp of token creation | + | modified_at | string? | yes | ISO 8601 timestamp of token updation | | tokens | [Tokens](#Tokens)? | yes | | - | updated_at | string? | yes | ISO 8601 timestamp of token updation | --- @@ -7213,6 +7757,17 @@ Success | segment | [Segment](#Segment)? | yes | | +--- + +#### [TokenSchema](#TokenSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | created_at | string? | yes | ISO 8601 timestamp of when token created | + | created_by | string? | yes | | + | token | string? | yes | | + + --- #### [TwitterLink](#TwitterLink) diff --git a/documentation/platform/CONTENT.md b/documentation/platform/CONTENT.md index b84723808..477a38cf3 100644 --- a/documentation/platform/CONTENT.md +++ b/documentation/platform/CONTENT.md @@ -15,15 +15,30 @@ Default * [addInjectableTag](#addinjectabletag) * [addPathRedirectionRules](#addpathredirectionrules) * [createAnnouncement](#createannouncement) +* [createAppCustomFieldByResourceId](#createappcustomfieldbyresourceid) +* [createAppCustomFieldDefinition](#createappcustomfielddefinition) +* [createAppCustomObject](#createappcustomobject) +* [createAppCustomObjectDefinition](#createappcustomobjectdefinition) * [createBlog](#createblog) +* [createCustomFieldByResourceId](#createcustomfieldbyresourceid) +* [createCustomFieldDefinition](#createcustomfielddefinition) +* [createCustomObject](#createcustomobject) +* [createCustomObjectDefinition](#createcustomobjectdefinition) * [createFaqCategory](#createfaqcategory) * [createLandingPage](#createlandingpage) * [createNavigation](#createnavigation) * [createPage](#createpage) * [createPagePreview](#createpagepreview) +* [createSEOMarkupSchema](#createseomarkupschema) * [createSlideshow](#createslideshow) * [deleteAnnouncement](#deleteannouncement) +* [deleteAppCustomFieldDefinition](#deleteappcustomfielddefinition) +* [deleteAppCustomObject](#deleteappcustomobject) +* [deleteAppCustomObjectDefinition](#deleteappcustomobjectdefinition) * [deleteBlog](#deleteblog) +* [deleteCustomFieldDefinition](#deletecustomfielddefinition) +* [deleteCustomObject](#deletecustomobject) +* [deleteCustomObjectDefinition](#deletecustomobjectdefinition) * [deleteDataLoader](#deletedataloader) * [deleteFaq](#deletefaq) * [deleteFaqCategory](#deletefaqcategory) @@ -31,22 +46,49 @@ Default * [deleteNavigation](#deletenavigation) * [deletePage](#deletepage) * [deletePathRedirectionRules](#deletepathredirectionrules) +* [deleteSEOMarkupSchema](#deleteseomarkupschema) * [deleteSlideshow](#deleteslideshow) * [editDataLoader](#editdataloader) * [editInjectableTag](#editinjectabletag) +* [editSEOMarkupSchema](#editseomarkupschema) +* [exportAppCustomObjectEntries](#exportappcustomobjectentries) +* [exportCustomObjectEntries](#exportcustomobjectentries) * [generateSEOTitle](#generateseotitle) * [getAnnouncementById](#getannouncementbyid) * [getAnnouncementsList](#getannouncementslist) +* [getAppCustomFieldDefinition](#getappcustomfielddefinition) +* [getAppCustomFieldDefinitions](#getappcustomfielddefinitions) +* [getAppCustomFieldTypes](#getappcustomfieldtypes) +* [getAppCustomFields](#getappcustomfields) +* [getAppCustomFieldsByResourceId](#getappcustomfieldsbyresourceid) +* [getAppCustomObject](#getappcustomobject) +* [getAppCustomObjectDefinition](#getappcustomobjectdefinition) +* [getAppCustomObjectDefinitions](#getappcustomobjectdefinitions) +* [getAppCustomObjects](#getappcustomobjects) +* [getAppJobs](#getappjobs) +* [getAppResources](#getappresources) * [getBlogBySlug](#getblogbyslug) * [getBlogs](#getblogs) * [getComponentById](#getcomponentbyid) +* [getCustomFieldDefinition](#getcustomfielddefinition) +* [getCustomFieldDefinitions](#getcustomfielddefinitions) +* [getCustomFieldTypes](#getcustomfieldtypes) +* [getCustomFields](#getcustomfields) +* [getCustomFieldsByResourceId](#getcustomfieldsbyresourceid) +* [getCustomObject](#getcustomobject) +* [getCustomObjectDefinition](#getcustomobjectdefinition) +* [getCustomObjectDefinitions](#getcustomobjectdefinitions) +* [getCustomObjects](#getcustomobjects) * [getDataLoaders](#getdataloaders) +* [getDataLoadersByService](#getdataloadersbyservice) * [getDefaultNavigations](#getdefaultnavigations) +* [getDefaultSEOMarkupSchema](#getdefaultseomarkupschema) * [getFaqByIdOrSlug](#getfaqbyidorslug) * [getFaqCategories](#getfaqcategories) * [getFaqCategoryBySlugOrId](#getfaqcategorybyslugorid) * [getFaqsByCategoryIdOrSlug](#getfaqsbycategoryidorslug) * [getInjectableTags](#getinjectabletags) +* [getJobs](#getjobs) * [getLandingPages](#getlandingpages) * [getLegalInformation](#getlegalinformation) * [getNavigationBySlug](#getnavigationbyslug) @@ -57,16 +99,29 @@ Default * [getPages](#getpages) * [getPathRedirectionRule](#getpathredirectionrule) * [getPathRedirectionRules](#getpathredirectionrules) +* [getResources](#getresources) * [getSEOConfiguration](#getseoconfiguration) +* [getSEOMarkupSchema](#getseomarkupschema) +* [getSEOMarkupSchemas](#getseomarkupschemas) * [getSlideshowBySlug](#getslideshowbyslug) * [getSlideshows](#getslideshows) * [getSupportInformation](#getsupportinformation) +* [importAppCustomObjectEntries](#importappcustomobjectentries) +* [importCustomObjectEntries](#importcustomobjectentries) * [removeInjectableTag](#removeinjectabletag) * [resetDataLoader](#resetdataloader) +* [sampleAppCustomObjectBulkEntry](#sampleappcustomobjectbulkentry) +* [sampleCustomObjectBulkEntry](#samplecustomobjectbulkentry) * [selectDataLoader](#selectdataloader) * [updateAnnouncement](#updateannouncement) * [updateAnnouncementSchedule](#updateannouncementschedule) +* [updateAppCustomFieldDefinition](#updateappcustomfielddefinition) +* [updateAppCustomObject](#updateappcustomobject) +* [updateAppCustomObjectDefinition](#updateappcustomobjectdefinition) * [updateBlog](#updateblog) +* [updateCustomFieldDefinition](#updatecustomfielddefinition) +* [updateCustomObject](#updatecustomobject) +* [updateCustomObjectDefinition](#updatecustomobjectdefinition) * [updateFaq](#updatefaq) * [updateFaqCategory](#updatefaqcategory) * [updateInjectableTag](#updateinjectabletag) @@ -466,17 +521,21 @@ Success. Refer `CreateAnnouncementSchema` for more details. --- -### createBlog -Create a blog +### createAppCustomFieldByResourceId +Create custom field entries for gives resource and resource_id ```javascript // Promise -const promise = platformClient.application("").content.createBlog({ body : value }); +const promise = platformClient.application("").content.createAppCustomFieldByResourceId({ resource : value, + resourceId : value, + body : value }); // Async/Await -const data = await platformClient.application("").content.createBlog({ body : value }); +const data = await platformClient.application("").content.createAppCustomFieldByResourceId({ resource : value, + resourceId : value, + body : value }); ``` @@ -484,20 +543,22 @@ const data = await platformClient.application("").content.create | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [BlogRequest](#BlogRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| resource | string | yes | | +| resourceId | string | yes | | +| body | [CustomFieldRequestSchema](#CustomFieldRequestSchema) | yes | Request body | -Use this API to create a blog. +Use this API to create the custom field entry for given resource and resource_id in param. *Returned Response:* -[BlogSchema](#BlogSchema) +[CustomFieldsResponseByResourceIdSchema](#CustomFieldsResponseByResourceIdSchema) -Success. Refer `BlogSchema` for more details. +Success. Returns a list of custom fields. Refer `CustomFieldsResponseByResourceIdSchema` for more details. @@ -507,47 +568,85 @@ Success. Refer `BlogSchema` for more details.
-  default +  success ```json { "value": { - "_id": "5eaa451a21a4dd75f0fd96c5", - "application": "5d3ebd89f540e7506b8b3548", - "tags": [ - "abhinav" - ], - "title": "my first blog", - "slug": "1st_blog", - "feature_image": { - "secure_url": "https://google.com" - }, - "content": [ + "items": [ { - "type": "html", - "value": "

hey there!

" + "_id": "65705772a20cc45d3f2585b1", + "updated_by": "bd7223b6727eb087987eece7", + "namespace": "custom", + "key": "product-designer", + "resource": "product", + "resource_id": "7612437", + "type": "metaobject", + "multi_value": true, + "company_id": "2", + "creator": "company", + "invalid_value_errors": [], + "has_invalid_values": false, + "definition_id": "656d6bc9766f9511345091a6", + "value": [ + "65702b4574c5764716ee671d" + ] + }, + { + "_id": "65705772a20cc45d3f2585b2", + "updated_by": "bd7223b6727eb087987eece7", + "namespace": "custom", + "key": "validation-check", + "resource": "product", + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "creator": "company", + "invalid_value_errors": [], + "has_invalid_values": false, + "definition_id": "656866a30152b0584464d547", + "value": [ + "ram" + ] + }, + { + "_id": "65705772a20cc45d3f2585b3", + "updated_by": "bd7223b6727eb087987eece7", + "namespace": "custom", + "key": "designer-name", + "resource": "product", + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "creator": "company", + "invalid_value_errors": [], + "has_invalid_values": false, + "definition_id": "65604cdb6a78c23f082c850b", + "value": [ + "ramsons" + ] + }, + { + "_id": "65705772a20cc45d3f2585b4", + "updated_by": "bd7223b6727eb087987eece7", + "namespace": "custom", + "key": "manufactures", + "resource": "product", + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "creator": "company", + "invalid_value_errors": [], + "has_invalid_values": false, + "definition_id": "655f53ddca37f5deb832a185", + "value": [ + "kartik" + ] } - ], - "_schedule": { - "cron": "* 10 * * *", - "start": "2021-03-31T23:30:00.000Z", - "end": "2021-03-31T23:55:00.000Z", - "duration": 1000, - "next_schedule": [ - { - "start": "2021-03-17T04:30:00.000Z", - "end": "2021-03-17T04:46:40.000Z" - } - ] - }, - "published": true, - "author": { - "name": "Fynd App" - }, - "date_meta": { - "created_on": "2021-03-14T06:49:03.945Z", - "modified_on": "2021-03-14T06:49:03.945Z" - } + ] } } ``` @@ -566,17 +665,17 @@ Success. Refer `BlogSchema` for more details. --- -### createFaqCategory -Create an FAQ category +### createAppCustomFieldDefinition +Create custom field definition ```javascript // Promise -const promise = platformClient.application("").content.createFaqCategory({ body : value }); +const promise = platformClient.application("").content.createAppCustomFieldDefinition({ body : value }); // Async/Await -const data = await platformClient.application("").content.createFaqCategory({ body : value }); +const data = await platformClient.application("").content.createAppCustomFieldDefinition({ body : value }); ``` @@ -585,40 +684,87 @@ const data = await platformClient.application("").content.create | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [CreateFaqCategoryRequestSchema](#CreateFaqCategoryRequestSchema) | yes | Request body | +| body | [CustomFieldDefinitionRequestSchema](#CustomFieldDefinitionRequestSchema) | yes | Request body | -FAQs help users to solve an issue or know more about a process. FAQs can be categorized separately, for e.g. some questions can be related to payment, some could be related to purchase, shipping, navigating, etc. Use this API to create an FAQ category. +Use this API to create a custom field definition for your application. *Returned Response:* -[CreateFaqCategorySchema](#CreateFaqCategorySchema) +[CustomFieldDefinitionDetailResSchema](#CustomFieldDefinitionDetailResSchema) -Success. +Custom field definition created.
-  Example: +  Examples: + + +
+  success1 ```json { - "category": { - "index": 0, - "children": [], - "_id": "60263f80c83c1f89f2863a8a", - "slug": "test", - "application": "000000000000000000000001", - "title": "Test" + "value": { + "creator": "application", + "resource": "product", + "name": "name", + "namespace": "fname", + "key": "fname", + "description": "First name", + "type": "string_single_line", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "created_by": "000000000000000000000001", + "updated_by": "000000000000000000000001", + "required": false, + "is_deleted": false, + "_id": "65369654d436ae0e54147e7b", + "validations": [], + "created_at": "2023-10-23T15:50:44.143Z", + "updated_at": "2023-10-23T15:50:44.143Z" + } +} +``` +
+ +
+  success2 + +```json +{ + "value": { + "creator": "application", + "resource": "product", + "name": "name", + "namespace": "fname", + "key": "fname", + "description": "First name", + "type": "string_single_line", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "created_by": "000000000000000000000001", + "updated_by": "000000000000000000000001", + "required": false, + "is_deleted": false, + "_id": "65369654d436ae0e54147e7b", + "validations": [], + "created_at": "2023-10-23T15:50:44.143Z", + "updated_at": "2023-10-23T15:50:44.143Z" } } ```
+
+ @@ -630,17 +776,17 @@ Success. --- -### createLandingPage -Create a landing page +### createAppCustomObject +Create custom object entries ```javascript // Promise -const promise = platformClient.application("").content.createLandingPage({ body : value }); +const promise = platformClient.application("").content.createAppCustomObject({ body : value }); // Async/Await -const data = await platformClient.application("").content.createLandingPage({ body : value }); +const data = await platformClient.application("").content.createAppCustomObject({ body : value }); ``` @@ -649,19 +795,19 @@ const data = await platformClient.application("").content.create | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [LandingPageSchema](#LandingPageSchema) | yes | Request body | +| body | [CustomObjectRequestSchema](#CustomObjectRequestSchema) | yes | Request body | -Landing page is the first page that a prospect lands upon while visiting a website. Use this API to create a landing page. +Use this API to create the custom object entry. *Returned Response:* -[LandingPageSchema](#LandingPageSchema) +[CustomObjectSchema](#CustomObjectSchema) -Success. +Success. Returns a list of custom objects. Refer `CustomObjectSchema` for more details. @@ -671,33 +817,63 @@ Success.
-  default +  success ```json { "value": { - "_id": "5eaa451a21a4dd75f0fd96c5", - "application": "5d3ebd89f540e7506b8b3548", - "_custom_json": {}, - "slug": "pnc-landing", - "action": { - "page": { - "type": "home" + "_id": "65392bd912376081aafa90ff", + "creator": "application", + "company_id": "1", + "application_id": "000000000000000000000001", + "created_by": "000000000000000000000001", + "updated_by": "000000000000000000000001", + "status": "active", + "type": "painter", + "display_name": "painter #65392bd912376081aafa90ff", + "definition_id": "653907ced878d53c1a502d92", + "fields": [ + { + "_id": "65392bd912376081aafa9103", + "namespace": "painter", + "key": "name", + "resource": "metaobject", + "resource_id": "65392bd912376081aafa90ff", + "type": "string_single_line", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "creator": "application", + "invalid_value_errors": [], + "has_invalid_values": false, + "metaobject_definition_id": "653907ced878d53c1a502d92", + "definition_id": "653907ced878d53c1a502d95", + "value": [ + "Batman" + ], + "created_by": "000000000000000000000001" }, - "popup": {}, - "type": "page" - }, - "platform": [ - "web" - ], - "created_by": { - "id": "000000000000000000000000" - }, - "date_meta": { - "created_on": "2020-04-30T03:25:14.549Z", - "modified_on": "2020-04-30T03:25:14.549Z" - }, - "archived": false + { + "_id": "65392bd912376081aafa9104", + "namespace": "painter", + "key": "age", + "resource": "metaobject", + "resource_id": "65392bd912376081aafa90ff", + "type": "integer", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "creator": "application", + "invalid_value_errors": [], + "has_invalid_values": false, + "metaobject_definition_id": "653907ced878d53c1a502d92", + "definition_id": "653907ced878d53c1a502d96", + "value": [ + 50 + ], + "created_by": "000000000000000000000001" + } + ] } } ``` @@ -716,17 +892,17 @@ Success. --- -### createNavigation -Create a navigation +### createAppCustomObjectDefinition +Create custom object definition ```javascript // Promise -const promise = platformClient.application("").content.createNavigation({ body : value }); +const promise = platformClient.application("").content.createAppCustomObjectDefinition({ body : value }); // Async/Await -const data = await platformClient.application("").content.createNavigation({ body : value }); +const data = await platformClient.application("").content.createAppCustomObjectDefinition({ body : value }); ``` @@ -735,19 +911,19 @@ const data = await platformClient.application("").content.create | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [NavigationRequest](#NavigationRequest) | yes | Request body | +| body | [CustomObjectDefinitionRequestSchema](#CustomObjectDefinitionRequestSchema) | yes | Request body | -Navigation is the arrangement of navigational items to ease the accessibility of resources for users on a website. Use this API to create a navigation. +Use this API to create custom object defintion *Returned Response:* -[NavigationSchema](#NavigationSchema) +[CustomObjectDefinitionSchema](#CustomObjectDefinitionSchema) -Success. +Success. Returns the saved custom object defintion @@ -757,193 +933,86 @@ Success.
-  default +  success ```json { "value": { - "_id": "5ffbd9b90ac98678ae0458d7", - "application": "000000000000000000000001", - "_custom_json": null, - "name": "test-nav", - "slug": "test-nav", - "platform": [ - "ios", - "android" - ], - "orientation": { - "portrait": [ - "left" - ] - }, - "navigation": [ + "_id": "656db530766f951134509542", + "name": "customObject1", + "type": "customobject1", + "display_name_key": "cocustomfield2", + "description": "", + "creator": "company", + "created_by": "bd7223b6727eb087987eece7", + "updated_by": "bd7223b6727eb087987eece7", + "field_definitions": [ { - "display": "Home", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/", - "type": "home" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" + "creator": "company", + "resource": "metaobject", + "name": "coCustomField1", + "namespace": "customobject1", + "key": "cocustomfield1", + "description": "", + "type": "string_single_line", + "multi_value": false, + "validations": [ + { + "name": "min", + "type": "integer", + "value": 2 }, - "ar": { - "display": "" + { + "name": "max", + "type": "integer", + "value": 10 }, - "en_us": { - "display": "" - } - }, - "sub_navigation": [ { - "display": "Brands", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/brands/", - "type": "brands" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - } + "name": "regex", + "type": "string", + "value": "^[a-zA-Z]+$" } - ] + ], + "company_id": "1", + "created_by": "bd7223b6727eb087987eece7", + "metaobject_definition_id": "656db530766f951134509542", + "required": false, + "is_deleted": false, + "_id": "656db530766f951134509545", + "created_at": "2023-12-04T11:17:04.153Z", + "updated_at": "2023-12-04T11:17:04.153Z" }, { - "display": "Collections", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", - "sort_order": 2, - "type": "", - "action": { - "page": { - "url": "/collections/", - "type": "collections" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" + "creator": "company", + "resource": "metaobject", + "name": "coCustomField2", + "namespace": "customobject1", + "key": "cocustomfield2", + "description": "this is custom field 2 of custom object", + "type": "string_single_line", + "multi_value": false, + "validations": [ + { + "name": "min", + "type": "integer", + "value": 1 }, - "en_us": { - "display": "" - } - }, - "sub_navigation": [ { - "display": "Categories", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/categories/", - "type": "categories" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - } + "name": "max", + "type": "integer", + "value": 100 } - ] - }, - { - "display": "Primary Menu", - "image": "", - "sort_order": 3, - "type": "", - "action": { - "page": { - "type": "home" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - } + "company_id": "1", + "created_by": "bd7223b6727eb087987eece7", + "metaobject_definition_id": "656db530766f951134509542", + "required": false, + "is_deleted": false, + "_id": "656db530766f951134509546", + "created_at": "2023-12-04T11:17:04.154Z", + "updated_at": "2023-12-04T11:17:04.154Z" } - ], - "created_by": { - "id": "000000000000000000000000" - }, - "date_meta": { - "created_on": "2021-01-11T04:53:13.585Z", - "modified_on": "2021-01-14T10:24:34.485Z" - }, - "archived": false + ] } } ``` @@ -962,17 +1031,17 @@ Success. --- -### createPage -Create a page +### createBlog +Create a blog ```javascript // Promise -const promise = platformClient.application("").content.createPage({ body : value }); +const promise = platformClient.application("").content.createBlog({ body : value }); // Async/Await -const data = await platformClient.application("").content.createPage({ body : value }); +const data = await platformClient.application("").content.createBlog({ body : value }); ``` @@ -981,19 +1050,19 @@ const data = await platformClient.application("").content.create | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [PageRequest](#PageRequest) | yes | Request body | +| body | [BlogRequest](#BlogRequest) | yes | Request body | -Use this API to create a custom page using a title, seo, publish status, feature image, tags, meta, etc. +Use this API to create a blog. *Returned Response:* -[PageSchema](#PageSchema) +[BlogSchema](#BlogSchema) -Success. Refer `PageSchema` for more details. +Success. Refer `BlogSchema` for more details. @@ -1008,59 +1077,42 @@ Success. Refer `PageSchema` for more details. ```json { "value": { - "date_meta": { - "created_on": "2021-03-16T08:24:19.197Z", - "modified_on": "2021-03-16T08:24:19.197Z" - }, + "_id": "5eaa451a21a4dd75f0fd96c5", + "application": "5d3ebd89f540e7506b8b3548", "tags": [ - "my first page" + "abhinav" ], - "published": true, - "component_ids": [], - "archived": false, - "_id": "60506dcad18cb33946026862", - "title": "my first page", - "slug": "1st_page", + "title": "my first blog", + "slug": "1st_blog", "feature_image": { - "secure_url": "https://google.com/some-image" + "secure_url": "https://google.com" }, "content": [ { "type": "html", - "value": "
Emtpy Page. Create Page here.
hello there!
how are you doing

" - }, - { - "type": "css", - "value": "* { box-sizing: border-box; } body {margin: 0;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}#icfm{text-align:center;padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;}#izu5{padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;}#ibgj{color:black;}#izzl{float:none;display:flex;}.aa{float:right;}" - }, - { - "type": "js", - "value": "" + "value": "

hey there!

" } ], - "content_path": "https://hdn-1.fynd.com/company/1526/applications/61012f6a9250ccd1b9ef8a1d/pages/content/page_slug.html", - "platform": "web", - "description": "hey this is my first page", - "visibility": { - "test": true - }, "_schedule": { - "start": "2021-04-23T23:50:00.000Z", + "cron": "* 10 * * *", + "start": "2021-03-31T23:30:00.000Z", + "end": "2021-03-31T23:55:00.000Z", + "duration": 1000, "next_schedule": [ - {} + { + "start": "2021-03-17T04:30:00.000Z", + "end": "2021-03-17T04:46:40.000Z" + } ] }, - "seo": { - "title": "my first page", - "description": "hey this is my first page", - "image": { - "url": "" - } + "published": true, + "author": { + "name": "Fynd App" }, - "type": "rawhtml", - "application": "000000000000000000000001", - "orientation": "portrait", - "page_meta": [] + "date_meta": { + "created_on": "2021-03-14T06:49:03.945Z", + "modified_on": "2021-03-14T06:49:03.945Z" + } } } ``` @@ -1079,17 +1131,21 @@ Success. Refer `PageSchema` for more details. --- -### createPagePreview -Create a page preview +### createCustomFieldByResourceId +Create custom field entries for gives resource and resource_id ```javascript // Promise -const promise = platformClient.application("").content.createPagePreview({ body : value }); +const promise = platformClient.content.createCustomFieldByResourceId({ resource : value, + resourceId : value, + body : value }); // Async/Await -const data = await platformClient.application("").content.createPagePreview({ body : value }); +const data = await platformClient.content.createCustomFieldByResourceId({ resource : value, + resourceId : value, + body : value }); ``` @@ -1097,20 +1153,22 @@ const data = await platformClient.application("").content.create | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [PageRequest](#PageRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| resource | string | yes | | +| resourceId | string | yes | | +| body | [CustomFieldRequestSchema](#CustomFieldRequestSchema) | yes | Request body | -Use this API to create a page preview to check the appearance of a custom page. +Use this API to create the custom field entry for given resource and resource_id in param. *Returned Response:* -[PageSchema](#PageSchema) +[CustomFieldsResponseByResourceIdSchema](#CustomFieldsResponseByResourceIdSchema) -Success. Refer `PageSchema` for more details. +Success. Returns a list of custom fields. Refer `CustomFieldsResponseByResourceIdSchema` for more details. @@ -1120,64 +1178,85 @@ Success. Refer `PageSchema` for more details.
-  default +  success ```json { "value": { - "date_meta": { - "created_on": "2021-03-16T08:24:19.197Z", - "modified_on": "2021-03-16T08:24:19.197Z" - }, - "tags": [ - "my first page" - ], - "published": true, - "component_ids": [], - "archived": false, - "_id": "60506dcad18cb33946026862", - "title": "my first page", - "slug": "1st_page", - "feature_image": { - "secure_url": "https://google.com/some-image" - }, - "content": [ + "items": [ { - "type": "html", - "value": "
Emtpy Page. Create Page here.
hello there!
how are you doing

" + "_id": "65705772a20cc45d3f2585b1", + "updated_by": "bd7223b6727eb087987eece7", + "namespace": "custom", + "key": "product-designer", + "resource": "product", + "resource_id": "7612437", + "type": "metaobject", + "multi_value": true, + "company_id": "2", + "creator": "company", + "invalid_value_errors": [], + "has_invalid_values": false, + "definition_id": "656d6bc9766f9511345091a6", + "value": [ + "65702b4574c5764716ee671d" + ] }, { - "type": "css", - "value": "* { box-sizing: border-box; } body {margin: 0;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}#icfm{text-align:center;padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;}#izu5{padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;}#ibgj{color:black;}#izzl{float:none;display:flex;}.aa{float:right;}" + "_id": "65705772a20cc45d3f2585b2", + "updated_by": "bd7223b6727eb087987eece7", + "namespace": "custom", + "key": "validation-check", + "resource": "product", + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "creator": "company", + "invalid_value_errors": [], + "has_invalid_values": false, + "definition_id": "656866a30152b0584464d547", + "value": [ + "ram" + ] }, { - "type": "js", - "value": "" - } - ], - "content_path": "https://hdn-1.fynd.com/company/1526/applications/61012f6a9250ccd1b9ef8a1d/pages/content/page_slug.html", - "platform": "web", - "description": "hey this is my first page", - "visibility": { - "test": true - }, - "_schedule": { - "start": "2021-04-23T23:50:00.000Z", - "next_schedule": [ - {} - ] - }, - "seo": { - "title": "my first page", - "description": "hey this is my first page", - "image": { - "url": "" + "_id": "65705772a20cc45d3f2585b3", + "updated_by": "bd7223b6727eb087987eece7", + "namespace": "custom", + "key": "designer-name", + "resource": "product", + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "creator": "company", + "invalid_value_errors": [], + "has_invalid_values": false, + "definition_id": "65604cdb6a78c23f082c850b", + "value": [ + "ramsons" + ] + }, + { + "_id": "65705772a20cc45d3f2585b4", + "updated_by": "bd7223b6727eb087987eece7", + "namespace": "custom", + "key": "manufactures", + "resource": "product", + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "creator": "company", + "invalid_value_errors": [], + "has_invalid_values": false, + "definition_id": "655f53ddca37f5deb832a185", + "value": [ + "kartik" + ] } - }, - "type": "rawhtml", - "application": "000000000000000000000001", - "orientation": "portrait", - "page_meta": [] + ] } } ``` @@ -1196,17 +1275,17 @@ Success. Refer `PageSchema` for more details. --- -### createSlideshow -Create a slideshow +### createCustomFieldDefinition +Create custom field definition ```javascript // Promise -const promise = platformClient.application("").content.createSlideshow({ body : value }); +const promise = platformClient.content.createCustomFieldDefinition({ body : value }); // Async/Await -const data = await platformClient.application("").content.createSlideshow({ body : value }); +const data = await platformClient.content.createCustomFieldDefinition({ body : value }); ``` @@ -1215,19 +1294,19 @@ const data = await platformClient.application("").content.create | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [SlideshowRequest](#SlideshowRequest) | yes | Request body | +| body | [CustomFieldDefinitionRequestSchema](#CustomFieldDefinitionRequestSchema) | yes | Request body | -A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to create a slideshow. +Use this API to create a custom field definition for your application. *Returned Response:* -[SlideshowSchema](#SlideshowSchema) +[CustomFieldDefinitionDetailResSchema](#CustomFieldDefinitionDetailResSchema) -Success. Refer `SlideshowSchema` for more details. +Custom field definition created. @@ -1237,49 +1316,58 @@ Success. Refer `SlideshowSchema` for more details.
-  default +  success1 ```json { "value": { - "date_meta": { - "created_on": "2021-03-14T05:27:12.319Z", - "modified_on": "2021-03-14T05:27:12.319Z" - }, - "archived": false, - "_id": "604d9eb975e9d136bb1b8b83", - "configuration": { - "start_on_launch": false, - "duration": 50, - "sleep_time": 100, - "slide_direction": "horizontal" - }, - "slug": "ss-sfsd-updated", - "platform": "ios", - "media": [ - { - "auto_decide_duration": false, - "type": "image", - "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "bg_color": "#ffffff", - "duration": 10, - "action": { - "type": "" - } - }, - { - "auto_decide_duration": true, - "type": "youtube", - "url": "https://www.youtube.com/embed/9vJRopau0g0", - "bg_color": "#ffffff", - "duration": 909, - "action": { - "type": "" - } - } - ], - "application": "5cd3db5e9d692cfe5302a7bb", - "active": true + "creator": "application", + "resource": "product", + "name": "name", + "namespace": "fname", + "key": "fname", + "description": "First name", + "type": "string_single_line", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "created_by": "000000000000000000000001", + "updated_by": "000000000000000000000001", + "required": false, + "is_deleted": false, + "_id": "65369654d436ae0e54147e7b", + "validations": [], + "created_at": "2023-10-23T15:50:44.143Z", + "updated_at": "2023-10-23T15:50:44.143Z" + } +} +``` +
+ +
+  success2 + +```json +{ + "value": { + "creator": "application", + "resource": "product", + "name": "name", + "namespace": "fname", + "key": "fname", + "description": "First name", + "type": "string_single_line", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "created_by": "000000000000000000000001", + "updated_by": "000000000000000000000001", + "required": false, + "is_deleted": false, + "_id": "65369654d436ae0e54147e7b", + "validations": [], + "created_at": "2023-10-23T15:50:44.143Z", + "updated_at": "2023-10-23T15:50:44.143Z" } } ``` @@ -1298,17 +1386,17 @@ Success. Refer `SlideshowSchema` for more details. --- -### deleteAnnouncement -Delete announcement by id +### createCustomObject +Create custom object entries ```javascript // Promise -const promise = platformClient.application("").content.deleteAnnouncement({ announcementId : value }); +const promise = platformClient.content.createCustomObject({ body : value }); // Async/Await -const data = await platformClient.application("").content.deleteAnnouncement({ announcementId : value }); +const data = await platformClient.content.createCustomObject({ body : value }); ``` @@ -1316,21 +1404,20 @@ const data = await platformClient.application("").content.delete | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| announcementId | string | yes | ID allotted to the announcement. | - +| --------- | ----- | -------- | ----------- | +| body | [CustomObjectRequestSchema](#CustomObjectRequestSchema) | yes | Request body | -Use this API to delete an existing announcement. +Use this API to create the custom object entry. *Returned Response:* -[CreateAnnouncementSchema](#CreateAnnouncementSchema) +[CustomObjectSchema](#CustomObjectSchema) -Success. +Success. Returns a list of custom objects. Refer `CustomObjectSchema` for more details. @@ -1345,51 +1432,58 @@ Success. ```json { "value": { - "message": "Successfully deleted announcement", - "data": { - "value": { - "platforms": [ - "web", - "android", - "ios" + "_id": "65392bd912376081aafa90ff", + "creator": "application", + "company_id": "1", + "application_id": "000000000000000000000001", + "created_by": "000000000000000000000001", + "updated_by": "000000000000000000000001", + "status": "active", + "type": "painter", + "display_name": "painter #65392bd912376081aafa90ff", + "definition_id": "653907ced878d53c1a502d92", + "fields": [ + { + "_id": "65392bd912376081aafa9103", + "namespace": "painter", + "key": "name", + "resource": "metaobject", + "resource_id": "65392bd912376081aafa90ff", + "type": "string_single_line", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "creator": "application", + "invalid_value_errors": [], + "has_invalid_values": false, + "metaobject_definition_id": "653907ced878d53c1a502d92", + "definition_id": "653907ced878d53c1a502d95", + "value": [ + "Batman" ], - "_id": "6026283125f06a827dc1a5cc", - "title": "test", - "announcement": "

test123

\n", - "pages": [ - { - "page_slug": "$all", - "type": "custom" - } + "created_by": "000000000000000000000001" + }, + { + "_id": "65392bd912376081aafa9104", + "namespace": "painter", + "key": "age", + "resource": "metaobject", + "resource_id": "65392bd912376081aafa90ff", + "type": "integer", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "creator": "application", + "invalid_value_errors": [], + "has_invalid_values": false, + "metaobject_definition_id": "653907ced878d53c1a502d92", + "definition_id": "653907ced878d53c1a502d96", + "value": [ + 50 ], - "editor_meta": { - "foreground_color": "#000", - "background_color": "#fff", - "content_type": "markdown", - "content": "test" - }, - "_schedule": { - "published": true, - "next_schedule": [ - { - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z" - } - ], - "cron": null, - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z", - "duration": null - }, - "app": "000000000000000000000001", - "author": { - "created_by": "5e199e6998cfe1776f1385dc", - "modified_by": "5e199e6998cfe1776f1385dc" - }, - "created_at": "2021-02-12T07:03:13.503Z", - "modified_at": "2021-02-12T07:05:57.020Z" + "created_by": "000000000000000000000001" } - } + ] } } ``` @@ -1408,17 +1502,17 @@ Success. --- -### deleteBlog -Delete blogs +### createCustomObjectDefinition +Create custom object definition ```javascript // Promise -const promise = platformClient.application("").content.deleteBlog({ id : value }); +const promise = platformClient.content.createCustomObjectDefinition({ body : value }); // Async/Await -const data = await platformClient.application("").content.deleteBlog({ id : value }); +const data = await platformClient.content.createCustomObjectDefinition({ body : value }); ``` @@ -1426,21 +1520,20 @@ const data = await platformClient.application("").content.delete | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| id | string | yes | ID allotted to the blog. | - +| --------- | ----- | -------- | ----------- | +| body | [CustomObjectDefinitionRequestSchema](#CustomObjectDefinitionRequestSchema) | yes | Request body | -Use this API to delete a blog. +Use this API to create custom object defintion *Returned Response:* -[BlogSchema](#BlogSchema) +[CustomObjectDefinitionSchema](#CustomObjectDefinitionSchema) -Success. +Success. Returns the saved custom object defintion @@ -1450,47 +1543,86 @@ Success.
-  default +  success ```json { "value": { - "_id": "5eaa451a21a4dd75f0fd96c5", - "application": "5d3ebd89f540e7506b8b3548", - "tags": [ - "abhinav" - ], - "title": "my first blog", - "slug": "1st_blog", - "feature_image": { - "secure_url": "https://google.com" - }, - "content": [ + "_id": "656db530766f951134509542", + "name": "customObject1", + "type": "customobject1", + "display_name_key": "cocustomfield2", + "description": "", + "creator": "company", + "created_by": "bd7223b6727eb087987eece7", + "updated_by": "bd7223b6727eb087987eece7", + "field_definitions": [ { - "type": "html", - "value": "

hey there!

" + "creator": "company", + "resource": "metaobject", + "name": "coCustomField1", + "namespace": "customobject1", + "key": "cocustomfield1", + "description": "", + "type": "string_single_line", + "multi_value": false, + "validations": [ + { + "name": "min", + "type": "integer", + "value": 2 + }, + { + "name": "max", + "type": "integer", + "value": 10 + }, + { + "name": "regex", + "type": "string", + "value": "^[a-zA-Z]+$" + } + ], + "company_id": "1", + "created_by": "bd7223b6727eb087987eece7", + "metaobject_definition_id": "656db530766f951134509542", + "required": false, + "is_deleted": false, + "_id": "656db530766f951134509545", + "created_at": "2023-12-04T11:17:04.153Z", + "updated_at": "2023-12-04T11:17:04.153Z" + }, + { + "creator": "company", + "resource": "metaobject", + "name": "coCustomField2", + "namespace": "customobject1", + "key": "cocustomfield2", + "description": "this is custom field 2 of custom object", + "type": "string_single_line", + "multi_value": false, + "validations": [ + { + "name": "min", + "type": "integer", + "value": 1 + }, + { + "name": "max", + "type": "integer", + "value": 100 + } + ], + "company_id": "1", + "created_by": "bd7223b6727eb087987eece7", + "metaobject_definition_id": "656db530766f951134509542", + "required": false, + "is_deleted": false, + "_id": "656db530766f951134509546", + "created_at": "2023-12-04T11:17:04.154Z", + "updated_at": "2023-12-04T11:17:04.154Z" } - ], - "_schedule": { - "cron": "* 10 * * *", - "start": "2021-03-31T23:30:00.000Z", - "end": "2021-03-31T23:55:00.000Z", - "duration": 1000, - "next_schedule": [ - { - "start": "2021-03-17T04:30:00.000Z", - "end": "2021-03-17T04:46:40.000Z" - } - ] - }, - "published": true, - "author": { - "name": "Fynd App" - }, - "date_meta": { - "created_on": "2021-03-14T06:49:03.945Z", - "modified_on": "2021-03-14T06:49:03.945Z" - } + ] } } ``` @@ -1509,17 +1641,17 @@ Success. --- -### deleteDataLoader -Delete data loader in application +### createFaqCategory +Create an FAQ category ```javascript // Promise -const promise = platformClient.application("").content.deleteDataLoader({ dataLoaderId : value }); +const promise = platformClient.application("").content.createFaqCategory({ body : value }); // Async/Await -const data = await platformClient.application("").content.deleteDataLoader({ dataLoaderId : value }); +const data = await platformClient.application("").content.createFaqCategory({ body : value }); ``` @@ -1527,19 +1659,18 @@ const data = await platformClient.application("").content.delete | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| dataLoaderId | string | yes | ID allotted to the data loader. | - +| --------- | ----- | -------- | ----------- | +| body | [CreateFaqCategoryRequestSchema](#CreateFaqCategoryRequestSchema) | yes | Request body | -Use this API to delete data loader. +FAQs help users to solve an issue or know more about a process. FAQs can be categorized separately, for e.g. some questions can be related to payment, some could be related to purchase, shipping, navigating, etc. Use this API to create an FAQ category. *Returned Response:* -[DataLoaderResponseSchema](#DataLoaderResponseSchema) +[CreateFaqCategorySchema](#CreateFaqCategorySchema) Success. @@ -1551,13 +1682,14 @@ Success. ```json { - "_id": "601f77e7aa61066feda44487", - "name": "Search API from Algolia", - "service": "catalog", - "operation_id": "fetchSuggestions", - "type": "url", - "application": "000000000000000000000001", - "__v": 0 + "category": { + "index": 0, + "children": [], + "_id": "60263f80c83c1f89f2863a8a", + "slug": "test", + "application": "000000000000000000000001", + "title": "Test" + } } ```
@@ -1573,19 +1705,17 @@ Success. --- -### deleteFaq -Delete an FAQ +### createLandingPage +Create a landing page ```javascript // Promise -const promise = platformClient.application("").content.deleteFaq({ categoryId : value, - faqId : value }); +const promise = platformClient.application("").content.createLandingPage({ body : value }); // Async/Await -const data = await platformClient.application("").content.deleteFaq({ categoryId : value, - faqId : value }); +const data = await platformClient.application("").content.createLandingPage({ body : value }); ``` @@ -1593,20 +1723,18 @@ const data = await platformClient.application("").content.delete | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| categoryId | string | yes | ID allotted to an FAQ category. | -| faqId | string | yes | ID allotted to an FAQ. | - +| --------- | ----- | -------- | ----------- | +| body | [LandingPageSchema](#LandingPageSchema) | yes | Request body | -Use this API to delete an existing FAQ. +Landing page is the first page that a prospect lands upon while visiting a website. Use this API to create a landing page. *Returned Response:* -[CreateFaqResponseSchema](#CreateFaqResponseSchema) +[LandingPageSchema](#LandingPageSchema) Success. @@ -1614,21 +1742,44 @@ Success.
-  Example: +  Examples: + + +
+  default ```json { - "faq": { - "_id": "60265b64e507768b168dee4d", - "question": "question 1 updated", - "answer": "answer 1", - "slug": "question-1", - "application": "000000000000000000000001" + "value": { + "_id": "5eaa451a21a4dd75f0fd96c5", + "application": "5d3ebd89f540e7506b8b3548", + "_custom_json": {}, + "slug": "pnc-landing", + "action": { + "page": { + "type": "home" + }, + "popup": {}, + "type": "page" + }, + "platform": [ + "web" + ], + "created_by": { + "id": "000000000000000000000000" + }, + "date_meta": { + "created_on": "2020-04-30T03:25:14.549Z", + "modified_on": "2020-04-30T03:25:14.549Z" + }, + "archived": false } } ```
+
+ @@ -1640,17 +1791,17 @@ Success. --- -### deleteFaqCategory -Delete an FAQ category +### createNavigation +Create a navigation ```javascript // Promise -const promise = platformClient.application("").content.deleteFaqCategory({ id : value }); +const promise = platformClient.application("").content.createNavigation({ body : value }); // Async/Await -const data = await platformClient.application("").content.deleteFaqCategory({ id : value }); +const data = await platformClient.application("").content.createNavigation({ body : value }); ``` @@ -1658,19 +1809,18 @@ const data = await platformClient.application("").content.delete | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| id | string | yes | ID allotted to an FAQ category. | - +| --------- | ----- | -------- | ----------- | +| body | [NavigationRequest](#NavigationRequest) | yes | Request body | -Use this API to delete an FAQ category. +Navigation is the arrangement of navigational items to ease the accessibility of resources for users on a website. Use this API to create a navigation. *Returned Response:* -[FaqSchema](#FaqSchema) +[NavigationSchema](#NavigationSchema) Success. @@ -1678,174 +1828,24 @@ Success.
-  Example: +  Examples: + + +
+  default ```json { - "category": { - "index": 0, - "children": [], - "_id": "60263f80c83c1f89f2863a8a", - "slug": "test", - "title": "Test", + "value": { + "_id": "5ffbd9b90ac98678ae0458d7", "application": "000000000000000000000001", - "__v": 2 - } -} -``` -
- - - - - - - - - ---- - - -### deleteLandingPage -Delete a landing page - - - -```javascript -// Promise -const promise = platformClient.application("").content.deleteLandingPage({ id : value }); - -// Async/Await -const data = await platformClient.application("").content.deleteLandingPage({ id : value }); -``` - - - - - -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| id | string | yes | ID allotted to a landing page. | - - - -Use this API to delete an existing landing page. - -*Returned Response:* - - - - -[LandingPageSchema](#LandingPageSchema) - -Success. - - - - -
-  Examples: - - -
-  default - -```json -{ - "value": { - "_id": "5eaa451a21a4dd75f0fd96c5", - "application": "5d3ebd89f540e7506b8b3548", - "_custom_json": {}, - "slug": "pnc-landing", - "action": { - "page": { - "type": "home" - }, - "popup": {}, - "type": "page" - }, + "_custom_json": null, + "name": "test-nav", + "slug": "test-nav", "platform": [ - "web" + "ios", + "android" ], - "created_by": { - "id": "000000000000000000000000" - }, - "date_meta": { - "created_on": "2020-04-30T03:25:14.549Z", - "modified_on": "2020-04-30T03:25:14.549Z" - }, - "archived": true - } -} -``` -
- -
- - - - - - - - - ---- - - -### deleteNavigation -Delete a navigation - - - -```javascript -// Promise -const promise = platformClient.application("").content.deleteNavigation({ id : value }); - -// Async/Await -const data = await platformClient.application("").content.deleteNavigation({ id : value }); -``` - - - - - -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| id | string | yes | ID allotted to the navigation. | - - - -Use this API to delete an existing navigation. - -*Returned Response:* - - - - -[NavigationSchema](#NavigationSchema) - -Success. - - - - -
-  Examples: - - -
-  default - -```json -{ - "value": { - "_id": "5ffbd9b90ac98678ae0458d7", - "application": "000000000000000000000001", - "_custom_json": null, - "name": "temp", - "slug": "temp", - "platform": "[web]", "orientation": { "portrait": [ "left" @@ -2018,7 +2018,7 @@ Success. "created_on": "2021-01-11T04:53:13.585Z", "modified_on": "2021-01-14T10:24:34.485Z" }, - "archived": true + "archived": false } } ``` @@ -2037,17 +2037,17 @@ Success. --- -### deletePage -Delete a page +### createPage +Create a page ```javascript // Promise -const promise = platformClient.application("").content.deletePage({ id : value }); +const promise = platformClient.application("").content.createPage({ body : value }); // Async/Await -const data = await platformClient.application("").content.deletePage({ id : value }); +const data = await platformClient.application("").content.createPage({ body : value }); ``` @@ -2055,12 +2055,11 @@ const data = await platformClient.application("").content.delete | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| id | string | yes | ID allotted to the page. | - +| --------- | ----- | -------- | ----------- | +| body | [PageRequest](#PageRequest) | yes | Request body | -Use this API to delete an existing page. +Use this API to create a custom page using a title, seo, publish status, feature image, tags, meta, etc. *Returned Response:* @@ -2069,7 +2068,7 @@ Use this API to delete an existing page. [PageSchema](#PageSchema) -Success. +Success. Refer `PageSchema` for more details. @@ -2155,75 +2154,17 @@ Success. --- -### deletePathRedirectionRules -Delete path based redirection rules - - - -```javascript -// Promise -const promise = platformClient.application("").content.deletePathRedirectionRules({ pathId : value }); - -// Async/Await -const data = await platformClient.application("").content.deletePathRedirectionRules({ pathId : value }); -``` - - - - - -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pathId | string | yes | ID allotted to the path redirection rule. | - - - -Use this API to delete redirection rules - -*Returned Response:* - - - - -[Object](#Object) - -Success. - - - - -
-  Example: - -```json -{ - "message": "Redirection deleted successfully" -} -``` -
- - - - - - - - - ---- - - -### deleteSlideshow -Delete a slideshow +### createPagePreview +Create a page preview ```javascript // Promise -const promise = platformClient.application("").content.deleteSlideshow({ id : value }); +const promise = platformClient.application("").content.createPagePreview({ body : value }); // Async/Await -const data = await platformClient.application("").content.deleteSlideshow({ id : value }); +const data = await platformClient.application("").content.createPagePreview({ body : value }); ``` @@ -2231,21 +2172,20 @@ const data = await platformClient.application("").content.delete | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| id | string | yes | ID allotted to the slideshow. | - +| --------- | ----- | -------- | ----------- | +| body | [PageRequest](#PageRequest) | yes | Request body | -Use this API to delete an existing slideshow. +Use this API to create a page preview to check the appearance of a custom page. *Returned Response:* -[SlideshowSchema](#SlideshowSchema) +[PageSchema](#PageSchema) -Success. +Success. Refer `PageSchema` for more details. @@ -2261,43 +2201,58 @@ Success. { "value": { "date_meta": { - "created_on": "2021-03-14T05:27:12.319Z", - "modified_on": "2021-03-14T05:27:12.319Z" - }, - "archived": true, - "_id": "604d9eb975e9d136bb1b8b83", - "configuration": { - "start_on_launch": false, - "duration": 50, - "sleep_time": 100, - "slide_direction": "horizontal" + "created_on": "2021-03-16T08:24:19.197Z", + "modified_on": "2021-03-16T08:24:19.197Z" }, - "slug": "ss-sfsd-updated", - "platform": "ios", - "media": [ + "tags": [ + "my first page" + ], + "published": true, + "component_ids": [], + "archived": false, + "_id": "60506dcad18cb33946026862", + "title": "my first page", + "slug": "1st_page", + "feature_image": { + "secure_url": "https://google.com/some-image" + }, + "content": [ { - "auto_decide_duration": false, - "type": "image", - "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "bg_color": "#ffffff", - "duration": 10, - "action": { - "type": "" - } + "type": "html", + "value": "
Emtpy Page. Create Page here.
hello there!
how are you doing

" }, { - "auto_decide_duration": true, - "type": "youtube", - "url": "https://www.youtube.com/embed/9vJRopau0g0", - "bg_color": "#ffffff", - "duration": 909, - "action": { - "type": "" - } + "type": "css", + "value": "* { box-sizing: border-box; } body {margin: 0;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}#icfm{text-align:center;padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;}#izu5{padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;}#ibgj{color:black;}#izzl{float:none;display:flex;}.aa{float:right;}" + }, + { + "type": "js", + "value": "" } ], - "application": "5cd3db5e9d692cfe5302a7bb", - "active": true + "content_path": "https://hdn-1.fynd.com/company/1526/applications/61012f6a9250ccd1b9ef8a1d/pages/content/page_slug.html", + "platform": "web", + "description": "hey this is my first page", + "visibility": { + "test": true + }, + "_schedule": { + "start": "2021-04-23T23:50:00.000Z", + "next_schedule": [ + {} + ] + }, + "seo": { + "title": "my first page", + "description": "hey this is my first page", + "image": { + "url": "" + } + }, + "type": "rawhtml", + "application": "000000000000000000000001", + "orientation": "portrait", + "page_meta": [] } } ``` @@ -2316,19 +2271,17 @@ Success. --- -### editDataLoader -Edit a data loader by id +### createSEOMarkupSchema +Create a SEO Markup schema Template of a page type for an application ```javascript // Promise -const promise = platformClient.application("").content.editDataLoader({ dataLoaderId : value, - body : value }); +const promise = platformClient.application("").content.createSEOMarkupSchema({ body : value }); // Async/Await -const data = await platformClient.application("").content.editDataLoader({ dataLoaderId : value, - body : value }); +const data = await platformClient.application("").content.createSEOMarkupSchema({ body : value }); ``` @@ -2336,21 +2289,20 @@ const data = await platformClient.application("").content.editDa | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| dataLoaderId | string | yes | ID allotted to the data loader. | -| body | [DataLoaderSchema](#DataLoaderSchema) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| body | [SEOSchemaMarkupTemplateRequestBody](#SEOSchemaMarkupTemplateRequestBody) | yes | Request body | -Use this API to edit the details of an existing data loader by its ID. +Use this API to create a SEO Markup schema Template inside an application *Returned Response:* -[DataLoaderResponseSchema](#DataLoaderResponseSchema) +[SEOSchemaMarkupTemplate](#SEOSchemaMarkupTemplate) -Success. +Success. Refer `SEOSchemaMarkupTemplate` for more details. @@ -2359,15 +2311,7 @@ Success.   Example: ```json -{ - "_id": "601f77e7aa61066feda44487", - "name": "Search API from Algolia", - "service": "catalog", - "operation_id": "fetchSuggestions", - "type": "url", - "application": "000000000000000000000001", - "__v": 0 -} + ```
@@ -2382,19 +2326,17 @@ Success. --- -### editInjectableTag -Edit a tag by id +### createSlideshow +Create a slideshow ```javascript // Promise -const promise = platformClient.application("").content.editInjectableTag({ tagId : value, - body : value }); +const promise = platformClient.application("").content.createSlideshow({ body : value }); // Async/Await -const data = await platformClient.application("").content.editInjectableTag({ tagId : value, - body : value }); +const data = await platformClient.application("").content.createSlideshow({ body : value }); ``` @@ -2402,47 +2344,79 @@ const data = await platformClient.application("").content.editIn | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| tagId | string | yes | ID allotted to the tag. | -| body | [UpdateHandpickedSchema](#UpdateHandpickedSchema) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| body | [SlideshowRequest](#SlideshowRequest) | yes | Request body | -Use this API to edit the details of an existing tag by its ID. +A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to create a slideshow. *Returned Response:* -[TagsSchema](#TagsSchema) +[SlideshowSchema](#SlideshowSchema) -Success. +Success. Refer `SlideshowSchema` for more details.
-  Example: +  Examples: + + +
+  default ```json { - "_id": "602671b3c0bac99158b10874", - "application": "000000000000000000000001", - "tags": [ - { - "_id": "601f77e7aa61066feda44488", - "name": "floating whatsapp", - "sub_type": "inline", - "type": "css", - "position": "head", - "content": ".float{\n\tposition:fixed;\n\twidth:60px;\n\theight:60px;\n\tbottom:40px;\n\tright:40px;\n\tbackground-color:#25d366;\n\tcolor:#FFF;\n\tborder-radius:50px;\n\ttext-align:center;\n font-size:30px;\n\tbox-shadow: 2px 2px 3px #999;\n z-index:100;\n}\n\n.my-float{\n\tmargin-top:16px;\n}" - } - ], - "__v": 1 + "value": { + "date_meta": { + "created_on": "2021-03-14T05:27:12.319Z", + "modified_on": "2021-03-14T05:27:12.319Z" + }, + "archived": false, + "_id": "604d9eb975e9d136bb1b8b83", + "configuration": { + "start_on_launch": false, + "duration": 50, + "sleep_time": 100, + "slide_direction": "horizontal" + }, + "slug": "ss-sfsd-updated", + "platform": "ios", + "media": [ + { + "auto_decide_duration": false, + "type": "image", + "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "bg_color": "#ffffff", + "duration": 10, + "action": { + "type": "" + } + }, + { + "auto_decide_duration": true, + "type": "youtube", + "url": "https://www.youtube.com/embed/9vJRopau0g0", + "bg_color": "#ffffff", + "duration": 909, + "action": { + "type": "" + } + } + ], + "application": "5cd3db5e9d692cfe5302a7bb", + "active": true + } } ```
+
+ @@ -2454,19 +2428,17 @@ Success. --- -### generateSEOTitle -Get SEO meta tag title for content +### deleteAnnouncement +Delete announcement by id ```javascript // Promise -const promise = platformClient.application("").content.generateSEOTitle({ type : value, - body : value }); +const promise = platformClient.application("").content.deleteAnnouncement({ announcementId : value }); // Async/Await -const data = await platformClient.application("").content.generateSEOTitle({ type : value, - body : value }); +const data = await platformClient.application("").content.deleteAnnouncement({ announcementId : value }); ``` @@ -2475,20 +2447,20 @@ const data = await platformClient.application("").content.genera | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| type | GenerationEntityType | yes | String representing the type of SEO content to be generated. Possible values are: title, description | -| body | [GenerateSEOContent](#GenerateSEOContent) | yes | Request body | +| announcementId | string | yes | ID allotted to the announcement. | -Use this API to get GPT3 generated SEO meta tag title for content + +Use this API to delete an existing announcement. *Returned Response:* -[GeneratedSEOContent](#GeneratedSEOContent) +[CreateAnnouncementSchema](#CreateAnnouncementSchema) -Returns the generated SEO title +Success. @@ -2498,13 +2470,56 @@ Returns the generated SEO title
-  default +  success ```json { "value": { - "title": "SEO Title example", - "description": "SEO Description example" + "message": "Successfully deleted announcement", + "data": { + "value": { + "platforms": [ + "web", + "android", + "ios" + ], + "_id": "6026283125f06a827dc1a5cc", + "title": "test", + "announcement": "

test123

\n", + "pages": [ + { + "page_slug": "$all", + "type": "custom" + } + ], + "editor_meta": { + "foreground_color": "#000", + "background_color": "#fff", + "content_type": "markdown", + "content": "test" + }, + "_schedule": { + "published": true, + "next_schedule": [ + { + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z" + } + ], + "cron": null, + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z", + "duration": null + }, + "app": "000000000000000000000001", + "author": { + "created_by": "5e199e6998cfe1776f1385dc", + "modified_by": "5e199e6998cfe1776f1385dc" + }, + "created_at": "2021-02-12T07:03:13.503Z", + "modified_at": "2021-02-12T07:05:57.020Z" + } + } } } ``` @@ -2523,17 +2538,17 @@ Returns the generated SEO title --- -### getAnnouncementById -Get announcement by ID +### deleteAppCustomFieldDefinition +Delete custom fields definition. ```javascript // Promise -const promise = platformClient.application("").content.getAnnouncementById({ announcementId : value }); +const promise = platformClient.application("").content.deleteAppCustomFieldDefinition({ definitionId : value }); // Async/Await -const data = await platformClient.application("").content.getAnnouncementById({ announcementId : value }); +const data = await platformClient.application("").content.deleteAppCustomFieldDefinition({ definitionId : value }); ``` @@ -2542,20 +2557,20 @@ const data = await platformClient.application("").content.getAnn | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| announcementId | string | yes | ID allotted to the announcement. | +| definitionId | string | yes | | -Use this API to retrieve an announcement and its details such as the target platform and pages on which it's applicable +Use this API to delete the definitions of custom fields using definition_id. This will also delete related custom fields entries related to this definition. *Returned Response:* -[AdminAnnouncementSchema](#AdminAnnouncementSchema) +[CustomDataDeleteSchema](#CustomDataDeleteSchema) -Success. Refer `AdminAnnouncementSchema` for more details. +Success. It will returns the message for delete successfully. @@ -2570,46 +2585,8 @@ Success. Refer `AdminAnnouncementSchema` for more details. ```json { "value": { - "platforms": [ - "web", - "android", - "ios" - ], - "_id": "6026283125f06a827dc1a5cc", - "title": "test", - "announcement": "

test123

\n", - "pages": [ - { - "page_slug": "$all", - "type": "custom" - } - ], - "editor_meta": { - "foreground_color": "#000", - "background_color": "#fff", - "content_type": "markdown", - "content": "test" - }, - "_schedule": { - "published": true, - "next_schedule": [ - { - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z" - } - ], - "cron": "", - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z", - "duration": 0 - }, - "app": "000000000000000000000001", - "author": { - "created_by": "5e199e6998cfe1776f1385dc", - "modified_by": "5e199e6998cfe1776f1385dc" - }, - "created_at": "2021-02-12T07:03:13.503Z", - "modified_at": "2021-02-12T07:05:57.020Z" + "success": true, + "message": "Metafield definition deleted successfully" } } ``` @@ -2628,19 +2605,17 @@ Success. Refer `AdminAnnouncementSchema` for more details. --- -### getAnnouncementsList -Get a list of announcements +### deleteAppCustomObject +Delete custom object ```javascript // Promise -const promise = platformClient.application("").content.getAnnouncementsList({ pageNo : value, - pageSize : value }); +const promise = platformClient.application("").content.deleteAppCustomObject({ metaobjectId : value }); // Async/Await -const data = await platformClient.application("").content.getAnnouncementsList({ pageNo : value, - pageSize : value }); +const data = await platformClient.application("").content.deleteAppCustomObject({ metaobjectId : value }); ``` @@ -2648,22 +2623,21 @@ const data = await platformClient.application("").content.getAnn | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | -| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | +| --------- | ----- | -------- | ----------- | +| metaobjectId | string | yes | | -Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve a list of announcements. +Use this API to delete the custom object entry by id. This will also delete related custom fields entries related to this custom object. *Returned Response:* -[GetAnnouncementListSchema](#GetAnnouncementListSchema) +[CustomDataDeleteSchema](#CustomDataDeleteSchema) -Success. Refer `GetAnnouncementListSchema` for more details. +Success. It will returns the message for delete successfully. @@ -2678,58 +2652,8 @@ Success. Refer `GetAnnouncementListSchema` for more details. ```json { "value": { - "items": [ - { - "_id": "6026283125f06a827dc1a5cc", - "platforms": [ - "web", - "android", - "ios" - ], - "title": "test", - "announcement": "

test

\n", - "pages": [ - { - "page_slug": "$all", - "type": "custom" - } - ], - "editor_meta": { - "foreground_color": "#000", - "background_color": "#fff", - "content_type": "markdown", - "content": "test" - }, - "_schedule": { - "published": true, - "cron": "", - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z", - "duration": 0, - "next_schedule": [ - { - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z" - } - ] - }, - "app": "000000000000000000000001", - "author": { - "created_by": "5e199e6998cfe1776f1385dc", - "modified_by": "5e199e6998cfe1776f1385dc" - }, - "created_at": "2021-02-12T07:03:13.503Z", - "modified_at": "2021-02-12T07:03:13.503Z", - "id": "6026283125f06a827dc1a5cc" - } - ], - "page": { - "type": "number", - "current": 1, - "size": 10, - "item_total": 1, - "has_next": false - } + "success": true, + "message": "Metafield definition deleted successfully" } } ``` @@ -2748,17 +2672,17 @@ Success. Refer `GetAnnouncementListSchema` for more details. --- -### getBlogBySlug -Get blog by slug +### deleteAppCustomObjectDefinition +delete custom object definition by id ```javascript // Promise -const promise = platformClient.application("").content.getBlogBySlug({ slug : value }); +const promise = platformClient.application("").content.deleteAppCustomObjectDefinition({ definitionId : value }); // Async/Await -const data = await platformClient.application("").content.getBlogBySlug({ slug : value }); +const data = await platformClient.application("").content.deleteAppCustomObjectDefinition({ definitionId : value }); ``` @@ -2767,11 +2691,78 @@ const data = await platformClient.application("").content.getBlo | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| slug | string | yes | A short, human-readable, URL-friendly identifier of a blog page. You can get slug value of a blog from `getBlogs` API. | +| definitionId | string | yes | | -Use this API to retrieve the components of a blog, such as title, slug, feature image, content, schedule, publish status, author, etc. +Use this API to delete a custom object definition and related data for your application. + +*Returned Response:* + + + + +[CustomObjectDefinitionDeleteResponseSchema](#CustomObjectDefinitionDeleteResponseSchema) + +Custom object definition details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "success": true, + "message": "MetaObjectDefinition deleted successfully" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### deleteBlog +Delete blogs + + + +```javascript +// Promise +const promise = platformClient.application("").content.deleteBlog({ id : value }); + +// Async/Await +const data = await platformClient.application("").content.deleteBlog({ id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | ID allotted to the blog. | + + + +Use this API to delete a blog. *Returned Response:* @@ -2780,7 +2771,7 @@ Use this API to retrieve the components of a blog, such as title, slug, feature [BlogSchema](#BlogSchema) -Success. Returns a a JSON object with components. Refer `BlogSchema` for more details. +Success. @@ -2849,19 +2840,17 @@ Success. Returns a a JSON object with components. Refer `BlogSchema` for more de --- -### getBlogs -Get blogs +### deleteCustomFieldDefinition +Delete custom fields definition. ```javascript // Promise -const promise = platformClient.application("").content.getBlogs({ pageNo : value, - pageSize : value }); +const promise = platformClient.content.deleteCustomFieldDefinition({ definitionId : value }); // Async/Await -const data = await platformClient.application("").content.getBlogs({ pageNo : value, - pageSize : value }); +const data = await platformClient.content.deleteCustomFieldDefinition({ definitionId : value }); ``` @@ -2869,22 +2858,21 @@ const data = await platformClient.application("").content.getBlo | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | -| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | -Use this API to get a list of blogs along with their details, such as the title, reading time, publish status, feature image, tags, author, etc. +Use this API to delete the definitions of custom fields using definition_id. This will also delete related custom fields entries related to this definition. *Returned Response:* -[BlogGetResponse](#BlogGetResponse) +[CustomDataDeleteSchema](#CustomDataDeleteSchema) -Success. Refer `BlogGetResponse` for more details. +Success. It will returns the message for delete successfully. @@ -2894,51 +2882,13 @@ Success. Refer `BlogGetResponse` for more details.
-  default +  success ```json { "value": { - "items": [ - { - "date_meta": { - "created_on": "2021-03-14T06:49:03.945Z", - "modified_on": "2021-03-14T06:49:03.945Z" - }, - "tags": [], - "_id": "604db275b3ae202873964d94", - "content": [ - { - "type": "html", - "value": "

test abhinav

" - } - ], - "title": "1st Blog", - "slug": "1st-blog", - "published": true, - "_schedule": { - "next_schedule": [ - {} - ], - "start": "2021-04-08T07:15:13.000Z", - "end": "2021-04-10T02:00:00.000Z" - }, - "feature_image": { - "secure_url": "" - }, - "application": "000000000000000000000001", - "author": { - "name": "Fynd App" - } - } - ], - "page": { - "type": "number", - "current": 1, - "size": 1, - "item_total": 2, - "has_next": true - } + "success": true, + "message": "Metafield definition deleted successfully" } } ``` @@ -2957,17 +2907,17 @@ Success. Refer `BlogGetResponse` for more details. --- -### getComponentById -Get components of a blog +### deleteCustomObject +Delete custom object ```javascript // Promise -const promise = platformClient.application("").content.getComponentById({ slug : value }); +const promise = platformClient.content.deleteCustomObject({ metaobjectId : value }); // Async/Await -const data = await platformClient.application("").content.getComponentById({ slug : value }); +const data = await platformClient.content.deleteCustomObject({ metaobjectId : value }); ``` @@ -2976,20 +2926,20 @@ const data = await platformClient.application("").content.getCom | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| slug | string | yes | A short, human-readable, URL-friendly identifier of a blog page. You can get slug value of a blog from `getBlogs` API. | +| metaobjectId | string | yes | | -Use this API to retrieve the components of a blog, such as title, slug, feature image, content, schedule, publish status, author, etc. +Use this API to delete the custom object entry by id. This will also delete related custom fields entries related to this custom object. *Returned Response:* -[BlogSchema](#BlogSchema) +[CustomDataDeleteSchema](#CustomDataDeleteSchema) -Success. Returns a a JSON object with components. Refer `BlogSchema` for more details. +Success. It will returns the message for delete successfully. @@ -2999,47 +2949,13 @@ Success. Returns a a JSON object with components. Refer `BlogSchema` for more de
-  default +  success ```json { "value": { - "_id": "5eaa451a21a4dd75f0fd96c5", - "application": "5d3ebd89f540e7506b8b3548", - "tags": [ - "abhinav" - ], - "title": "my first blog", - "slug": "1st_blog", - "feature_image": { - "secure_url": "https://google.com" - }, - "content": [ - { - "type": "html", - "value": "

hey there!

" - } - ], - "_schedule": { - "cron": "* 10 * * *", - "start": "2021-03-31T23:30:00.000Z", - "end": "2021-03-31T23:55:00.000Z", - "duration": 1000, - "next_schedule": [ - { - "start": "2021-03-17T04:30:00.000Z", - "end": "2021-03-17T04:46:40.000Z" - } - ] - }, - "published": true, - "author": { - "name": "Fynd App" - }, - "date_meta": { - "created_on": "2021-03-14T06:49:03.945Z", - "modified_on": "2021-03-14T06:49:03.945Z" - } + "success": true, + "message": "Metafield definition deleted successfully" } } ``` @@ -3058,34 +2974,106 @@ Success. Returns a a JSON object with components. Refer `BlogSchema` for more de --- -### getDataLoaders -Get all the data loaders in an application +### deleteCustomObjectDefinition +delete custom object definition by id ```javascript // Promise -const promise = platformClient.application("").content.getDataLoaders(); +const promise = platformClient.content.deleteCustomObjectDefinition({ definitionId : value }); // Async/Await -const data = await platformClient.application("").content.getDataLoaders(); +const data = await platformClient.content.deleteCustomObjectDefinition({ definitionId : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | -Use this to get all data loaders of an application + + +Use this API to delete a custom object definition and related data for your application. *Returned Response:* -[DataLoadersSchema](#DataLoadersSchema) +[CustomObjectDefinitionDeleteResponseSchema](#CustomObjectDefinitionDeleteResponseSchema) -Success. Refer `DataLoadersSchema` for more details. +Custom object definition details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "success": true, + "message": "MetaObjectDefinition deleted successfully" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### deleteDataLoader +Delete data loader in application + + + +```javascript +// Promise +const promise = platformClient.application("").content.deleteDataLoader({ dataLoaderId : value }); + +// Async/Await +const data = await platformClient.application("").content.deleteDataLoader({ dataLoaderId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| dataLoaderId | string | yes | ID allotted to the data loader. | + + + +Use this API to delete data loader. + +*Returned Response:* + + + + +[DataLoaderResponseSchema](#DataLoaderResponseSchema) + +Success. @@ -3095,38 +3083,13 @@ Success. Refer `DataLoadersSchema` for more details. ```json { - "items": [ - { - "name": "Algolia", - "is_selected": false, - "type": "url", - "_id": "61bc4523a7ffc7504f4de4a5", - "service": "catalog", - "operation_id": "fetchSuggestions", - "url": "/ext/example/url", - "__source": { - "type": "extension", - "id": "000000000000000000000003" - }, - "application": "100000000000000000000001", - "__v": 0 - }, - { - "name": "Algolia v3", - "is_selected": false, - "type": "url", - "_id": "61bc452da7ffc7504f4de4a7", - "service": "catalog", - "operation_id": "fetchSuggestions", - "url": "/ext/example/url", - "__source": { - "type": "extension", - "id": "000000000000000000000003" - }, - "application": "100000000000000000000001", - "__v": 0 - } - ] + "_id": "601f77e7aa61066feda44487", + "name": "Search API from Algolia", + "service": "catalog", + "operation_id": "fetchSuggestions", + "type": "url", + "application": "000000000000000000000001", + "__v": 0 } ```
@@ -3142,709 +3105,6833 @@ Success. Refer `DataLoadersSchema` for more details. --- -### getDefaultNavigations -Get default navigations +### deleteFaq +Delete an FAQ ```javascript // Promise -const promise = platformClient.application("").content.getDefaultNavigations(); +const promise = platformClient.application("").content.deleteFaq({ categoryId : value, + faqId : value }); // Async/Await -const data = await platformClient.application("").content.getDefaultNavigations(); +const data = await platformClient.application("").content.deleteFaq({ categoryId : value, + faqId : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| categoryId | string | yes | ID allotted to an FAQ category. | +| faqId | string | yes | ID allotted to an FAQ. | + -On any website (application), there are navigations that are present by default. Use this API to retrieve those default navigations. + +Use this API to delete an existing FAQ. *Returned Response:* -[DefaultNavigationResponse](#DefaultNavigationResponse) +[CreateFaqResponseSchema](#CreateFaqResponseSchema) -Success. Refer `DefaultNavigationResponse` for more details. +Success.
-  Examples: +  Example: + +```json +{ + "faq": { + "_id": "60265b64e507768b168dee4d", + "question": "question 1 updated", + "answer": "answer 1", + "slug": "question-1", + "application": "000000000000000000000001" + } +} +``` +
+ + + + + + + + + +--- + + +### deleteFaqCategory +Delete an FAQ category + + + +```javascript +// Promise +const promise = platformClient.application("").content.deleteFaqCategory({ id : value }); + +// Async/Await +const data = await platformClient.application("").content.deleteFaqCategory({ id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | ID allotted to an FAQ category. | + + + +Use this API to delete an FAQ category. + +*Returned Response:* + + + + +[FaqSchema](#FaqSchema) + +Success. + +
-  default +  Example: ```json { - "value": { - "items": [ - { - "name": "default-bottom", - "slug": "default-bottom-vIhLiJKQvUZdQvGWzDdrzLP3CTC4Hbxg", - "orientation": { - "landscape": [ - "bottom" - ] - }, - "version": 3, - "navigation": [ - { - "display": "Home", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", - "sort_order": 1, - "acl": [ - "all" - ], - "action": { - "page": { - "type": "home" - }, - "type": "page" - }, - "active": true - }, - { - "display": "Brands", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "sort_order": 2, - "acl": [ - "all" - ], - "action": { - "page": { - "type": "brands" - }, - "type": "page" - }, - "active": true + "category": { + "index": 0, + "children": [], + "_id": "60263f80c83c1f89f2863a8a", + "slug": "test", + "title": "Test", + "application": "000000000000000000000001", + "__v": 2 + } +} +``` +
+ + + + + + + + + +--- + + +### deleteLandingPage +Delete a landing page + + + +```javascript +// Promise +const promise = platformClient.application("").content.deleteLandingPage({ id : value }); + +// Async/Await +const data = await platformClient.application("").content.deleteLandingPage({ id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | ID allotted to a landing page. | + + + +Use this API to delete an existing landing page. + +*Returned Response:* + + + + +[LandingPageSchema](#LandingPageSchema) + +Success. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "_id": "5eaa451a21a4dd75f0fd96c5", + "application": "5d3ebd89f540e7506b8b3548", + "_custom_json": {}, + "slug": "pnc-landing", + "action": { + "page": { + "type": "home" + }, + "popup": {}, + "type": "page" + }, + "platform": [ + "web" + ], + "created_by": { + "id": "000000000000000000000000" + }, + "date_meta": { + "created_on": "2020-04-30T03:25:14.549Z", + "modified_on": "2020-04-30T03:25:14.549Z" + }, + "archived": true + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### deleteNavigation +Delete a navigation + + + +```javascript +// Promise +const promise = platformClient.application("").content.deleteNavigation({ id : value }); + +// Async/Await +const data = await platformClient.application("").content.deleteNavigation({ id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | ID allotted to the navigation. | + + + +Use this API to delete an existing navigation. + +*Returned Response:* + + + + +[NavigationSchema](#NavigationSchema) + +Success. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "_id": "5ffbd9b90ac98678ae0458d7", + "application": "000000000000000000000001", + "_custom_json": null, + "name": "temp", + "slug": "temp", + "platform": "[web]", + "orientation": { + "portrait": [ + "left" + ] + }, + "navigation": [ + { + "display": "Home", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", + "sort_order": 1, + "type": "", + "action": { + "page": { + "url": "/", + "type": "home" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "acl": [ + "all" + ], + "_locale_language": { + "hi": { + "display": "" + }, + "ar": { + "display": "" }, + "en_us": { + "display": "" + } + }, + "sub_navigation": [ { - "display": "Collections", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", - "sort_order": 3, - "acl": [ - "all" - ], + "display": "Brands", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "sort_order": 1, + "type": "", "action": { "page": { - "type": "collections" + "url": "/brands/", + "type": "brands" }, + "popup": {}, "type": "page" }, - "active": true - }, - { - "display": "Categories", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", - "sort_order": 4, + "active": true, + "tags": null, "acl": [ "all" ], - "action": { - "page": { - "type": "categories" + "_locale_language": { + "hi": { + "display": "" }, - "type": "page" - }, - "active": true + "ar": { + "display": "" + }, + "en_us": { + "display": "" + } + } } - ], - "created_by": {}, - "_id": "6050244dbd9e072063f1586b", - "platform": [ - "android" ] }, { - "name": "default-bottom", - "slug": "default-bottom-SB0zLTfiPN4Z5doJQBKRagsLTDldm8Ug", - "orientation": { - "landscape": [ - "bottom" - ] - }, - "version": 3, - "navigation": [ - { - "display": "Home", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", - "sort_order": 1, - "acl": [ - "all" - ], - "action": { - "page": { - "type": "home" - }, - "type": "page" - }, - "active": true + "display": "Collections", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", + "sort_order": 2, + "type": "", + "action": { + "page": { + "url": "/collections/", + "type": "collections" }, - { - "display": "Brands", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "sort_order": 2, - "acl": [ - "all" - ], - "action": { - "page": { - "type": "brands" - }, - "type": "page" - }, - "active": true + "popup": {}, + "type": "page" + }, + "active": true, + "tags": null, + "acl": [ + "all" + ], + "_locale_language": { + "hi": { + "display": "" }, - { - "display": "Collections", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", - "sort_order": 3, - "acl": [ - "all" - ], - "action": { - "page": { - "type": "collections" - }, - "type": "page" - }, - "active": true + "ar": { + "display": "" }, - { - "display": "Categories", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", - "sort_order": 4, - "acl": [ - "all" - ], - "action": { - "page": { - "type": "categories" - }, - "type": "page" - }, - "active": true + "en_us": { + "display": "" } - ], - "created_by": {}, - "_id": "6050244dbd9e072063f1586c", - "platform": [ - "ios" - ] - }, - { - "name": "default-left", - "slug": "default-left-dWrrfpfcNw6Arl0QtmK5VgunYYAHhGRR", - "orientation": { - "portrait": [ - "left" - ] }, - "version": 3, - "navigation": [ + "sub_navigation": [ { - "display": "Profile", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938091/production/applications/app_000000000000000000000001/media/navigation/icon/hv0cd5jdo0rkhsqoizmi.png", + "display": "Categories", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", "sort_order": 1, "type": "", "action": { "page": { - "url": "/", - "type": "profile" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "registered" - ] - }, - { - "display": "Orders", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938144/production/applications/app_000000000000000000000001/media/navigation/icon/lmv4fzpxxk0a6acitlfg.png", - "sort_order": 2, - "type": "", - "action": { - "page": { - "url": "/", - "type": "orders" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "registered" - ] - }, - { - "display": "Track Order", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938144/production/applications/app_000000000000000000000001/media/navigation/icon/lmv4fzpxxk0a6acitlfg.png", - "sort_order": 3, - "type": "", - "action": { - "page": { - "type": "track-order" + "url": "/categories/", + "type": "categories" }, "popup": {}, "type": "page" }, "active": true, + "tags": null, "acl": [ - "anonymous" - ] - }, - { - "display": "Addresses", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938161/production/applications/app_000000000000000000000001/media/navigation/icon/qbod8vkjmot3qnaroibr.png", - "sort_order": 4, - "type": "", - "action": { - "page": { - "url": "/", - "type": "addresses" + "all" + ], + "_locale_language": { + "hi": { + "display": "" }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "registered" - ] - }, - { - "display": "Wishlist", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938125/production/applications/app_000000000000000000000001/media/navigation/icon/u8c7jdke4a3wwc0ftz8x.png", - "sort_order": 5, - "type": "", - "action": { - "page": { - "url": "/wishlist/", - "type": "wishlist" + "ar": { + "display": "" }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "registered" - ] + "en_us": { + "display": "" + } + } + } + ] + }, + { + "display": "Primary Menu", + "image": "", + "sort_order": 3, + "type": "", + "action": { + "page": { + "type": "home" }, - { - "display": "Settings", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1584003256/production/applications/app_000000000000000000000001/media/navigation/icon/vywbdiio1zi7cbnltvgz.png", - "sort_order": 6, - "type": "", - "action": { - "page": { - "url": "/", - "type": "settings" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "all" - ] + "popup": {}, + "type": "page" + }, + "active": true, + "tags": null, + "acl": [ + "all" + ], + "_locale_language": { + "hi": { + "display": "" }, - { - "display": "Policy", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939301/production/applications/app_000000000000000000000001/media/navigation/icon/bygqvme7hkrd45oemzy0.png", - "sort_order": 7, - "type": "", - "action": { - "page": { - "url": "/", - "type": "policy" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "all" - ] + "ar": { + "display": "" }, - { - "display": "Terms & Conditions", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939382/production/applications/app_000000000000000000000001/media/navigation/icon/eaq0aagqr0xirojbuki3.png", - "sort_order": 8, - "type": "", - "action": { - "page": { - "url": "/", - "type": "tnc" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "all" - ] - }, - { - "display": "Need Help", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939416/production/applications/app_000000000000000000000001/media/navigation/icon/xeqv7pzyxagwtxcwvxbw.png", - "sort_order": 9, - "type": "", - "action": { - "page": { - "url": "/faq/", - "type": "faq" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "all" - ] - }, - { - "display": "About Us", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939196/production/applications/app_000000000000000000000001/media/navigation/icon/dccm5et4sgylisbug9xr.png", - "sort_order": 10, - "type": "", - "action": { - "page": { - "url": "/", - "type": "about-us" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "all" - ] - }, - { - "display": "Rate Us", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1584091739/production/applications/app_000000000000000000000001/media/navigation/icon/afryyfeccqgjyeosdmbz.png", - "sort_order": 11, - "type": "", - "action": { - "page": { - "url": "/", - "type": "rate-us" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "registered" - ] + "en_us": { + "display": "" } + } + } + ], + "created_by": { + "id": "000000000000000000000000" + }, + "date_meta": { + "created_on": "2021-01-11T04:53:13.585Z", + "modified_on": "2021-01-14T10:24:34.485Z" + }, + "archived": true + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### deletePage +Delete a page + + + +```javascript +// Promise +const promise = platformClient.application("").content.deletePage({ id : value }); + +// Async/Await +const data = await platformClient.application("").content.deletePage({ id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | ID allotted to the page. | + + + +Use this API to delete an existing page. + +*Returned Response:* + + + + +[PageSchema](#PageSchema) + +Success. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "date_meta": { + "created_on": "2021-03-16T08:24:19.197Z", + "modified_on": "2021-03-16T08:24:19.197Z" + }, + "tags": [ + "my first page" + ], + "published": true, + "component_ids": [], + "archived": false, + "_id": "60506dcad18cb33946026862", + "title": "my first page", + "slug": "1st_page", + "feature_image": { + "secure_url": "https://google.com/some-image" + }, + "content": [ + { + "type": "html", + "value": "
Emtpy Page. Create Page here.
hello there!
how are you doing

" + }, + { + "type": "css", + "value": "* { box-sizing: border-box; } body {margin: 0;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}#icfm{text-align:center;padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;}#izu5{padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;}#ibgj{color:black;}#izzl{float:none;display:flex;}.aa{float:right;}" + }, + { + "type": "js", + "value": "" + } + ], + "content_path": "https://hdn-1.fynd.com/company/1526/applications/61012f6a9250ccd1b9ef8a1d/pages/content/page_slug.html", + "platform": "web", + "description": "hey this is my first page", + "visibility": { + "test": true + }, + "_schedule": { + "start": "2021-04-23T23:50:00.000Z", + "next_schedule": [ + {} + ] + }, + "seo": { + "title": "my first page", + "description": "hey this is my first page", + "image": { + "url": "" + } + }, + "type": "rawhtml", + "application": "000000000000000000000001", + "orientation": "portrait", + "page_meta": [] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### deletePathRedirectionRules +Delete path based redirection rules + + + +```javascript +// Promise +const promise = platformClient.application("").content.deletePathRedirectionRules({ pathId : value }); + +// Async/Await +const data = await platformClient.application("").content.deletePathRedirectionRules({ pathId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pathId | string | yes | ID allotted to the path redirection rule. | + + + +Use this API to delete redirection rules + +*Returned Response:* + + + + +[Object](#Object) + +Success. + + + + +
+  Example: + +```json +{ + "message": "Redirection deleted successfully" +} +``` +
+ + + + + + + + + +--- + + +### deleteSEOMarkupSchema +delete a particular SEO Markup schema of an application using its id + + + +```javascript +// Promise +const promise = platformClient.application("").content.deleteSEOMarkupSchema({ id : value }); + +// Async/Await +const data = await platformClient.application("").content.deleteSEOMarkupSchema({ id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | Alphanumeric ID allotted to a SEO Markup Schema Template created within a business. | + + + +Use this API to delete an existing SEO Markup schema an application + +*Returned Response:* + + + + +[SEOSchemaMarkupTemplate](#SEOSchemaMarkupTemplate) + +Success. Refer `SEOSchemaMarkupTemplate` for more details. + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### deleteSlideshow +Delete a slideshow + + + +```javascript +// Promise +const promise = platformClient.application("").content.deleteSlideshow({ id : value }); + +// Async/Await +const data = await platformClient.application("").content.deleteSlideshow({ id : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | ID allotted to the slideshow. | + + + +Use this API to delete an existing slideshow. + +*Returned Response:* + + + + +[SlideshowSchema](#SlideshowSchema) + +Success. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "date_meta": { + "created_on": "2021-03-14T05:27:12.319Z", + "modified_on": "2021-03-14T05:27:12.319Z" + }, + "archived": true, + "_id": "604d9eb975e9d136bb1b8b83", + "configuration": { + "start_on_launch": false, + "duration": 50, + "sleep_time": 100, + "slide_direction": "horizontal" + }, + "slug": "ss-sfsd-updated", + "platform": "ios", + "media": [ + { + "auto_decide_duration": false, + "type": "image", + "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "bg_color": "#ffffff", + "duration": 10, + "action": { + "type": "" + } + }, + { + "auto_decide_duration": true, + "type": "youtube", + "url": "https://www.youtube.com/embed/9vJRopau0g0", + "bg_color": "#ffffff", + "duration": 909, + "action": { + "type": "" + } + } + ], + "application": "5cd3db5e9d692cfe5302a7bb", + "active": true + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### editDataLoader +Edit a data loader by id + + + +```javascript +// Promise +const promise = platformClient.application("").content.editDataLoader({ dataLoaderId : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").content.editDataLoader({ dataLoaderId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| dataLoaderId | string | yes | ID allotted to the data loader. | +| body | [DataLoaderSchema](#DataLoaderSchema) | yes | Request body | + + +Use this API to edit the details of an existing data loader by its ID. + +*Returned Response:* + + + + +[DataLoaderResponseSchema](#DataLoaderResponseSchema) + +Success. + + + + +
+  Example: + +```json +{ + "_id": "601f77e7aa61066feda44487", + "name": "Search API from Algolia", + "service": "catalog", + "operation_id": "fetchSuggestions", + "type": "url", + "application": "000000000000000000000001", + "__v": 0 +} +``` +
+ + + + + + + + + +--- + + +### editInjectableTag +Edit a tag by id + + + +```javascript +// Promise +const promise = platformClient.application("").content.editInjectableTag({ tagId : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").content.editInjectableTag({ tagId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| tagId | string | yes | ID allotted to the tag. | +| body | [UpdateHandpickedSchema](#UpdateHandpickedSchema) | yes | Request body | + + +Use this API to edit the details of an existing tag by its ID. + +*Returned Response:* + + + + +[TagsSchema](#TagsSchema) + +Success. + + + + +
+  Example: + +```json +{ + "_id": "602671b3c0bac99158b10874", + "application": "000000000000000000000001", + "tags": [ + { + "_id": "601f77e7aa61066feda44488", + "name": "floating whatsapp", + "sub_type": "inline", + "type": "css", + "position": "head", + "content": ".float{\n\tposition:fixed;\n\twidth:60px;\n\theight:60px;\n\tbottom:40px;\n\tright:40px;\n\tbackground-color:#25d366;\n\tcolor:#FFF;\n\tborder-radius:50px;\n\ttext-align:center;\n font-size:30px;\n\tbox-shadow: 2px 2px 3px #999;\n z-index:100;\n}\n\n.my-float{\n\tmargin-top:16px;\n}" + } + ], + "__v": 1 +} +``` +
+ + + + + + + + + +--- + + +### editSEOMarkupSchema +Get a particular SEO Markup schema of an application using its id + + + +```javascript +// Promise +const promise = platformClient.application("").content.editSEOMarkupSchema({ id : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").content.editSEOMarkupSchema({ id : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | Alphanumeric ID allotted to a SEO Markup Schema Template created within a business. | +| body | [SEOSchemaMarkupTemplate](#SEOSchemaMarkupTemplate) | yes | Request body | + + +Use this API to edit an existing SEO Markup schema an application + +*Returned Response:* + + + + +[SEOSchemaMarkupTemplate](#SEOSchemaMarkupTemplate) + +Success. Refer `SEOSchemaMarkupTemplate` for more details. + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### exportAppCustomObjectEntries +Initiate download for bulk custom object entries + + + +```javascript +// Promise +const promise = platformClient.application("").content.exportAppCustomObjectEntries({ definitionId : value }); + +// Async/Await +const data = await platformClient.application("").content.exportAppCustomObjectEntries({ definitionId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | + + + +Use this api to initiate download of bulk entries + +*Returned Response:* + + + + +[CustomObjectBulkEntryInitiateDownload](#CustomObjectBulkEntryInitiateDownload) + +Success. Initiates bulk entries download + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "message": "Bulk download of Meta Objects started successfully", + "task_id": "65702d2aa20cc45d3f258358" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### exportCustomObjectEntries +Initiate download for bulk custom object entries + + + +```javascript +// Promise +const promise = platformClient.content.exportCustomObjectEntries({ definitionId : value }); + +// Async/Await +const data = await platformClient.content.exportCustomObjectEntries({ definitionId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | + + + +Use this api to initiate download of bulk entries + +*Returned Response:* + + + + +[CustomObjectBulkEntryInitiateDownload](#CustomObjectBulkEntryInitiateDownload) + +Success. Initiates bulk entries download + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "message": "Bulk download of Meta Objects started successfully", + "task_id": "65702d2aa20cc45d3f258358" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### generateSEOTitle +Get SEO meta tag title for content + + + +```javascript +// Promise +const promise = platformClient.application("").content.generateSEOTitle({ type : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").content.generateSEOTitle({ type : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| type | GenerationEntityType | yes | String representing the type of SEO content to be generated. Possible values are: title, description | +| body | [GenerateSEOContent](#GenerateSEOContent) | yes | Request body | + + +Use this API to get GPT3 generated SEO meta tag title for content + +*Returned Response:* + + + + +[GeneratedSEOContent](#GeneratedSEOContent) + +Returns the generated SEO title + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "title": "SEO Title example", + "description": "SEO Description example" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAnnouncementById +Get announcement by ID + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAnnouncementById({ announcementId : value }); + +// Async/Await +const data = await platformClient.application("").content.getAnnouncementById({ announcementId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| announcementId | string | yes | ID allotted to the announcement. | + + + +Use this API to retrieve an announcement and its details such as the target platform and pages on which it's applicable + +*Returned Response:* + + + + +[AdminAnnouncementSchema](#AdminAnnouncementSchema) + +Success. Refer `AdminAnnouncementSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "platforms": [ + "web", + "android", + "ios" + ], + "_id": "6026283125f06a827dc1a5cc", + "title": "test", + "announcement": "

test123

\n", + "pages": [ + { + "page_slug": "$all", + "type": "custom" + } + ], + "editor_meta": { + "foreground_color": "#000", + "background_color": "#fff", + "content_type": "markdown", + "content": "test" + }, + "_schedule": { + "published": true, + "next_schedule": [ + { + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z" + } + ], + "cron": "", + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z", + "duration": 0 + }, + "app": "000000000000000000000001", + "author": { + "created_by": "5e199e6998cfe1776f1385dc", + "modified_by": "5e199e6998cfe1776f1385dc" + }, + "created_at": "2021-02-12T07:03:13.503Z", + "modified_at": "2021-02-12T07:05:57.020Z" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAnnouncementsList +Get a list of announcements + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAnnouncementsList({ pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.application("").content.getAnnouncementsList({ pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | + + + +Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve a list of announcements. + +*Returned Response:* + + + + +[GetAnnouncementListSchema](#GetAnnouncementListSchema) + +Success. Refer `GetAnnouncementListSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "6026283125f06a827dc1a5cc", + "platforms": [ + "web", + "android", + "ios" + ], + "title": "test", + "announcement": "

test

\n", + "pages": [ + { + "page_slug": "$all", + "type": "custom" + } + ], + "editor_meta": { + "foreground_color": "#000", + "background_color": "#fff", + "content_type": "markdown", + "content": "test" + }, + "_schedule": { + "published": true, + "cron": "", + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z", + "duration": 0, + "next_schedule": [ + { + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z" + } + ] + }, + "app": "000000000000000000000001", + "author": { + "created_by": "5e199e6998cfe1776f1385dc", + "modified_by": "5e199e6998cfe1776f1385dc" + }, + "created_at": "2021-02-12T07:03:13.503Z", + "modified_at": "2021-02-12T07:03:13.503Z", + "id": "6026283125f06a827dc1a5cc" + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 1, + "has_next": false + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppCustomFieldDefinition +Get custom fields definition by id + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppCustomFieldDefinition({ definitionId : value }); + +// Async/Await +const data = await platformClient.application("").content.getAppCustomFieldDefinition({ definitionId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | + + + +Use this API to retrieve the definitions of custom fields using definition_id. + +*Returned Response:* + + + + +[CustomFieldDefinitionDetailResSchema](#CustomFieldDefinitionDetailResSchema) + +Success. Returns a object of custom field definition. Refer `CustomFieldDefinitionsSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "652e183347320aa8d8c28361", + "creator": "company", + "resource": "product", + "name": "new meta object", + "namespace": "custom", + "key": "new-meta-object", + "description": "", + "type": "metaobject", + "multi_value": false, + "validations": [ + { + "name": "metaobject_definition_id", + "type": "string", + "value": "652e1298b6ece12d06684c18" + } + ], + "company_id": "2", + "created_by": "5e5796c4fc10a0d133839372", + "updated_by": "5e5796c4fc10a0d133839372", + "required": false, + "is_deleted": false, + "created_at": "2023-10-17T05:14:27.960Z", + "updated_at": "2023-10-17T05:14:27.960Z", + "type_name": "Custom Object", + "invalid_fields_count": 0 + }, + { + "_id": "652826cd99822ff1f62cbf13", + "creator": "company", + "resource": "product", + "name": "single image", + "namespace": "custom", + "key": "single-image", + "description": "this is single", + "type": "file", + "multi_value": false, + "validations": [ + { + "name": "file_type_options", + "type": "string_array", + "value": [ + "image", + "audio", + "video", + "document", + "pdf" + ] + } + ], + "company_id": "2", + "created_by": "5e5796c4fc10a0d133839372", + "updated_by": "5e5796c4fc10a0d133839372", + "required": false, + "is_deleted": false, + "created_at": "2023-10-12T17:03:09.868Z", + "updated_at": "2023-10-12T17:03:09.868Z", + "type_name": "File", + "invalid_fields_count": 0 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 15, + "has_next": true + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppCustomFieldDefinitions +Get custom fields definitions + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppCustomFieldDefinitions({ pageNo : value, + pageSize : value, + resource : value, + type : value, + search : value }); + +// Async/Await +const data = await platformClient.application("").content.getAppCustomFieldDefinitions({ pageNo : value, + pageSize : value, + resource : value, + type : value, + search : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | string | yes | | +| pageSize | string | yes | | +| resource | string | no | | +| type | string | no | | +| search | string | no | | + + + +Use this API to retrieve the definitions of custom fields. + +*Returned Response:* + + + + +[CustomFieldDefinitionsSchema](#CustomFieldDefinitionsSchema) + +Success. Returns a list of custom fields definitions. Refer `CustomFieldDefinitionsSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "652e183347320aa8d8c28361", + "creator": "company", + "resource": "product", + "name": "new meta object", + "namespace": "custom", + "key": "new-meta-object", + "description": "", + "type": "metaobject", + "multi_value": false, + "validations": [ + { + "name": "metaobject_definition_id", + "type": "string", + "value": "652e1298b6ece12d06684c18" + } + ], + "company_id": "2", + "created_by": "5e5796c4fc10a0d133839372", + "updated_by": "5e5796c4fc10a0d133839372", + "required": false, + "is_deleted": false, + "created_at": "2023-10-17T05:14:27.960Z", + "updated_at": "2023-10-17T05:14:27.960Z", + "type_name": "Custom Object", + "invalid_fields_count": 0 + }, + { + "_id": "652826cd99822ff1f62cbf13", + "creator": "company", + "resource": "product", + "name": "single image", + "namespace": "custom", + "key": "single-image", + "description": "this is single", + "type": "file", + "multi_value": false, + "validations": [ + { + "name": "file_type_options", + "type": "string_array", + "value": [ + "image", + "audio", + "video", + "document", + "pdf" + ] + } + ], + "company_id": "2", + "created_by": "5e5796c4fc10a0d133839372", + "updated_by": "5e5796c4fc10a0d133839372", + "required": false, + "is_deleted": false, + "created_at": "2023-10-12T17:03:09.868Z", + "updated_at": "2023-10-12T17:03:09.868Z", + "type_name": "File", + "invalid_fields_count": 0 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 15, + "has_next": true + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppCustomFieldTypes +Get custom field types + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppCustomFieldTypes(); + +// Async/Await +const data = await platformClient.application("").content.getAppCustomFieldTypes(); +``` + + + + + + +Use this API to retrieve the custom field types + +*Returned Response:* + + + + +[CustomObjectByIdSchema](#CustomObjectByIdSchema) + +Success. Returns all custom field types. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "metafield_types": { + "string_single_line": { + "name": "Single Line Text", + "list_enabled": true, + "category": "TEXT", + "type": "string", + "supported_validations": [ + { + "name": "min", + "type": "integer", + "display": "Minimum Characters" + }, + { + "name": "max", + "type": "integer", + "display": "Maximum Characters" + }, + { + "name": "regex", + "type": "string", + "display": "Regular Expression", + "meta": { + "examples": [ + { + "name": "Alphabet Characters", + "value": "^[a-zA-Z]+$" + }, + { + "name": "Alphanumeric Characters", + "value": "^[a-zA-Z0-9]+$" + }, + { + "name": "Numeric Characters", + "value": "^[0-9]+$" + }, + { + "name": "Email Address", + "value": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$" + } + ] + } + }, + { + "name": "choices", + "type": "string_array", + "display": "Choices" + } + ] + }, + "string_multi_line": { + "name": "Multi Line Text", + "list_enabled": true, + "category": "TEXT", + "type": "string", + "supported_validations": [ + { + "name": "min", + "type": "integer", + "display": "Minimum Characters" + }, + { + "name": "max", + "type": "integer", + "display": "Maximum Characters" + } + ] + }, + "dropdown": { + "name": "Dropdown", + "list_enabled": true, + "category": "TEXT", + "type": "string", + "supported_validations": [ + { + "name": "choices", + "type": "string_array", + "display": "Choices", + "required": true + } + ] + }, + "integer": { + "name": "Integer", + "list_enabled": true, + "type": "integer", + "category": "NUMBER", + "supported_validations": [ + { + "name": "min", + "type": "integer", + "display": "Minimum Value" + }, + { + "name": "max", + "type": "integer", + "display": "Maximum Value" + }, + { + "name": "choices", + "type": "integer_array", + "display": "Choices" + } + ] + }, + "float_type": { + "name": "Decimal", + "list_enabled": true, + "type": "float", + "category": "NUMBER", + "supported_validations": [ + { + "name": "min", + "type": "float", + "display": "Minimum Value" + }, + { + "name": "max", + "type": "float", + "display": "Maximum Value" + }, + { + "name": "choices", + "type": "float_array", + "display": "Choices" + } + ] + }, + "boolean_type": { + "name": "Boolean", + "category": "TRUE_FALSE", + "list_enabled": false, + "type": "boolean", + "supported_validations": [] + }, + "date": { + "name": "Date", + "list_enabled": true, + "category": "DATETIME", + "type": "date", + "supported_validations": [ + { + "name": "min", + "type": "date", + "display": "From Date" + }, + { + "name": "max", + "type": "date", + "display": "To Date" + } + ] + }, + "datetime": { + "name": "Date - Time", + "category": "DATETIME", + "list_enabled": true, + "type": "datetime", + "supported_validations": [ + { + "name": "min", + "type": "date", + "display": "From Date & Time" + }, + { + "name": "max", + "type": "date", + "display": "To Date & Time" + } + ] + }, + "json": { + "name": "JSON", + "list_enabled": false, + "category": "ADVANCED", + "type": "json", + "supported_validations": [ + { + "name": "schema", + "type": "json", + "display": "JSON Schema" + } + ] + }, + "file": { + "name": "File", + "category": "REFERENCE", + "list_enabled": true, + "type": "string", + "supported_validations": [ + { + "name": "file_type_options", + "type": "string_array", + "meta": { + "options": [ + { + "image": { + "supported_types": [ + "jpeg", + "jpg", + "png", + "svg+xml", + "tiff", + "webp", + "gif" + ], + "max_size": 20971520 + }, + "video": { + "supported_types": [ + "x-flv", + "mp4", + "x-mpegURL", + "MP2T", + "3gpp", + "/quicktime", + "x-msvideo", + "x-ms-wmv", + "webm" + ], + "max_size": 1048576000 + } + } + ] + } + } + ] + }, + "url": { + "name": "URL", + "list_enabled": true, + "type": "string", + "supported_validations": [ + { + "name": "allowed_domains", + "display": "Allowed Domains", + "type": "string_array" + } + ] + }, + "metaobject": { + "name": "Custom Object", + "list_enabled": true, + "category": "REFERENCE", + "type": "string", + "supported_validations": [ + { + "name": "metaobject_definition_id", + "display": "Reference", + "type": "string", + "required": true + } + ] + }, + "product": { + "name": "Product", + "list_enabled": true, + "category": "REFERENCE", + "type": "string", + "supported_validations": [], + "scope": [ + "company", + "application" + ] + } + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppCustomFields +Get list of custom fields of given resource + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppCustomFields({ resource : value }); + +// Async/Await +const data = await platformClient.application("").content.getAppCustomFields({ resource : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| resource | string | yes | | + + + +Use this API to retrieve the custom fields for given resource in param. + +*Returned Response:* + + + + +[CustomFieldsResponseSchema](#CustomFieldsResponseSchema) + +Success. Returns a list of custom fields. Refer `CustomFieldsResponseSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "652f8c5b6c1643cbd1659d88", + "namespace": "product_test_2", + "key": "manufacturer", + "resource": "product", + "creator": "company", + "value": [ + "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/NWt9CSoYbo-airtel_money.png", + "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/QqkJBM4IQL-amazon-pay.png", + "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/2Ed7Pk03Z-amex.png" + ], + "resource_id": "64bb987e9a3c4b6c29d676bc", + "type": "file", + "multi_value": true, + "company_id": "1", + "definition_id": "650c4ea3e0e7980d14c16c06", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "000000000000000000000001", + "is_deleted": false, + "created_at": "2023-10-18T07:42:19.551Z", + "updated_at": "2023-10-18T07:42:19.551Z" + }, + { + "_id": "652f8b4628dd2571fe5e90d8", + "namespace": "product_test_1", + "key": "manufacturer", + "resource": "product", + "creator": "company", + "value": [ + "this", + "is", + "testing" + ], + "resource_id": "64ba480fdf9cbe3a90b052f4", + "type": "string_single_line", + "multi_value": true, + "company_id": "1", + "definition_id": "650ae0d67f9c7b2a7d56b409", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "000000000000000000000001", + "is_deleted": false, + "created_at": "2023-10-18T07:37:42.797Z", + "updated_at": "2023-10-18T07:37:42.797Z" + }, + { + "_id": "652f8b4628dd2571fe5e90d7", + "namespace": "product_test", + "key": "manufacturer", + "resource": "product", + "creator": "company", + "value": [ + "kuldeep", + "kumar", + "harshwal" + ], + "resource_id": "64ba32fbdf9cbe3a90b052f0", + "type": "string_single_line", + "multi_value": true, + "company_id": "1", + "definition_id": "650ae0b27f9c7b2a7d56b407", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "000000000000000000000001", + "is_deleted": false, + "created_at": "2023-10-18T07:37:42.796Z", + "updated_at": "2023-10-18T07:37:42.796Z" + } + ], + "page": { + "type": "number", + "current": 1, + "size": 20, + "item_total": 3, + "has_next": false + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppCustomFieldsByResourceId +Get list of custom fields of given resource and resource id + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppCustomFieldsByResourceId({ resource : value, + resourceId : value }); + +// Async/Await +const data = await platformClient.application("").content.getAppCustomFieldsByResourceId({ resource : value, + resourceId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| resource | string | yes | | +| resourceId | string | yes | | + + + +Use this API to retrieve the custom fields for given resource in param. + +*Returned Response:* + + + + +[CustomFieldsResponseByResourceIdSchema](#CustomFieldsResponseByResourceIdSchema) + +Success. Returns a list of custom fields. Refer `CustomFieldsResponseByResourceIdSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "65705772a20cc45d3f2585b3", + "namespace": "custom", + "key": "designer-name", + "resource": "product", + "creator": "company", + "value": [ + "ramsons" + ], + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "definition_id": "65604cdb6a78c23f082c850b", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "bd7223b6727eb087987eece7", + "is_deleted": false, + "created_at": "2023-12-06T11:13:54.217Z", + "updated_at": "2023-12-06T11:19:02.311Z", + "updated_by": "bd7223b6727eb087987eece7" + }, + { + "_id": "65705772a20cc45d3f2585b4", + "namespace": "custom", + "key": "manufactures", + "resource": "product", + "creator": "company", + "value": [ + "kartik" + ], + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "definition_id": "655f53ddca37f5deb832a185", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "bd7223b6727eb087987eece7", + "is_deleted": false, + "created_at": "2023-12-06T11:13:54.218Z", + "updated_at": "2023-12-06T11:19:02.311Z", + "updated_by": "bd7223b6727eb087987eece7" + }, + { + "_id": "65705772a20cc45d3f2585b1", + "namespace": "custom", + "key": "product-designer", + "resource": "product", + "creator": "company", + "value": [ + "65702b4574c5764716ee671d" + ], + "resource_id": "7612437", + "type": "metaobject", + "multi_value": true, + "company_id": "2", + "definition_id": "656d6bc9766f9511345091a6", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "bd7223b6727eb087987eece7", + "is_deleted": false, + "created_at": "2023-12-06T11:13:54.217Z", + "updated_at": "2023-12-06T11:19:02.311Z", + "updated_by": "bd7223b6727eb087987eece7" + }, + { + "_id": "65705772a20cc45d3f2585b2", + "namespace": "custom", + "key": "validation-check", + "resource": "product", + "creator": "company", + "value": [ + "ram" + ], + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "definition_id": "656866a30152b0584464d547", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "bd7223b6727eb087987eece7", + "is_deleted": false, + "created_at": "2023-12-06T11:13:54.217Z", + "updated_at": "2023-12-06T11:19:02.311Z", + "updated_by": "bd7223b6727eb087987eece7" + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppCustomObject +Get custom object details + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppCustomObject({ metaobjectId : value }); + +// Async/Await +const data = await platformClient.application("").content.getAppCustomObject({ metaobjectId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| metaobjectId | string | yes | | + + + +Use this API to retrieve the custom object details and their fields details and definitions and references. + +*Returned Response:* + + + + +[CustomObjectByIdSchema](#CustomObjectByIdSchema) + +Success. Returns a custom object. Refer `CustomObjectByIdSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "_id": "653929f012376081aafa90f1", + "status": "active", + "display_name": "painter #653929f012376081aafa90f1", + "definition": { + "_id": "653907ced878d53c1a502d92", + "name": "painter", + "type": "painter" + }, + "references": [], + "fields": [ + { + "_id": "653929f012376081aafa90f5", + "key": "name", + "value": [ + "Bruce Wayne" + ], + "type": "string_single_line", + "definition_id": "653907ced878d53c1a502d95" + }, + { + "_id": "653929f012376081aafa90f6", + "key": "age", + "value": [ + 5 + ], + "type": "integer", + "definition_id": "653907ced878d53c1a502d96" + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppCustomObjectDefinition +get custom object definition by id + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppCustomObjectDefinition({ definitionId : value }); + +// Async/Await +const data = await platformClient.application("").content.getAppCustomObjectDefinition({ definitionId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | + + + +Use this API to update a custom object definition for your application. + +*Returned Response:* + + + + +[CustomObjectDefinitionSchema](#CustomObjectDefinitionSchema) + +Custom object definition details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "_id": "656d67de766f95113450917b", + "name": "Designer", + "type": "designer", + "display_name_key": "name", + "description": "", + "creator": "company", + "created_by": "9759643b65ebc6bacb5275f5", + "updated_by": "bd7223b6727eb087987eece7", + "field_definitions": [ + { + "creator": "company", + "resource": "metaobject", + "name": "city2", + "namespace": "designer", + "key": "city", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "mobile", + "namespace": "designer", + "key": "mobile", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "name", + "namespace": "designer", + "key": "name", + "type": "string_single_line", + "description": "This is name of designer", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": true + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppCustomObjectDefinitions +Get custom object definitions + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppCustomObjectDefinitions({ pageNo : value, + pageSize : value, + search : value }); + +// Async/Await +const data = await platformClient.application("").content.getAppCustomObjectDefinitions({ pageNo : value, + pageSize : value, + search : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | string | yes | | +| pageSize | string | yes | | +| search | string | no | | + + + +Use this API to retrieve the custom object definitions + +*Returned Response:* + + + + +[CustomObjectDefinitionsSchema](#CustomObjectDefinitionsSchema) + +Success. Returns a list custom object definitions. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "656db530766f951134509542", + "name": "customObject1", + "type": "customobject1", + "updated_at": "2023-12-04T11:17:04.136Z", + "entries_count": 0, + "fields_count": 2 + }, + { + "_id": "656db2d9766f95113450952b", + "name": "sample", + "type": "sample", + "updated_at": "2023-12-04T11:07:05.705Z", + "entries_count": 0, + "fields_count": 1 + }, + { + "_id": "656495b58d3278a7c24260f8", + "name": "address", + "type": "address", + "updated_at": "2023-11-27T13:12:21.999Z", + "entries_count": 1, + "fields_count": 3 + }, + { + "_id": "655c706ad5ff69fd3b95a1d9", + "name": "coCustomObject", + "type": "cocustomobject", + "updated_at": "2023-11-21T08:55:06.013Z", + "entries_count": 0, + "fields_count": 2 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 4, + "has_next": false + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppCustomObjects +Get list of custom objects + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppCustomObjects(); + +// Async/Await +const data = await platformClient.application("").content.getAppCustomObjects(); +``` + + + + + + +Use this API to retrieve the custom objects. + +*Returned Response:* + + + + +[CustomObjectsSchema](#CustomObjectsSchema) + +Success. Returns a list of custom objects. Refer `CustomObjectsSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "653929f012376081aafa90f1", + "definition_id": "653907ced878d53c1a502d92", + "status": "active", + "updated_at": "2023-10-25T14:45:04.446Z", + "display_name": "painter #653929f012376081aafa90f1", + "definition": { + "_id": "653907ced878d53c1a502d92", + "name": "painter", + "type": "painter" + }, + "references": 0 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 1, + "has_next": false + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppJobs +Fetch bulk import and export job list. + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppJobs({ page : value, + pageSize : value, + actionType : value }); + +// Async/Await +const data = await platformClient.application("").content.getAppJobs({ page : value, + pageSize : value, + actionType : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| page | string | yes | | +| pageSize | string | yes | | +| actionType | string | yes | | + + + +Use this api to get list of jobs of bulk import and exports + +*Returned Response:* + + + + +[CustomObjectBulkEntry](#CustomObjectBulkEntry) + +Success. Returns all bulk entries history. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "6570124da20cc45d3f2582a7", + "jobs": [ + "2311" + ], + "finished_jobs": [ + "2311" + ], + "error_jobs": [], + "errors_occured": [], + "company_id": "2", + "creator": "company", + "URL": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/custom-data/CustomObject-designer-import-6570124da20cc45d3f2582a7.csv", + "status": "completed", + "action_type": "upload", + "entity": "metaobject", + "error_url": "", + "finished_count": 0, + "error_count": 0, + "success_count": 0, + "total_jobs": 1, + "meta": { + "mo_total_count": 2, + "mo_success_count": 2, + "mo_error_count": 0, + "mo_defintion_type": "designer" + }, + "created_by": "bd7223b6727eb087987eece7", + "created_at": "2023-12-06T06:18:53.219Z", + "updated_at": "2023-12-06T06:20:23.560Z", + "id": "6570124da20cc45d3f2582a7" + }, + { + "_id": "6558b8c49340c43a7015b4af", + "jobs": [ + "2297" + ], + "finished_jobs": [ + "2297" + ], + "error_jobs": [], + "errors_occured": [], + "company_id": "2", + "creator": "company", + "URL": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/custom-data/CustomObject-kuldeep-custom-import-6558b8c49340c43a7015b4af.csv", + "status": "completed", + "action_type": "upload", + "entity": "metaobject", + "error_url": "", + "finished_count": 0, + "error_count": 0, + "success_count": 0, + "total_jobs": 1, + "meta": { + "mo_total_count": 1, + "mo_success_count": 0, + "mo_error_count": 1, + "mo_defintion_type": "kuldeep-custom" + }, + "created_by": "9759643b65ebc6bacb5275f5", + "created_at": "2023-11-18T13:14:44.360Z", + "updated_at": "2023-11-18T13:17:19.765Z", + "id": "6558b8c49340c43a7015b4af" + } + ], + "page": { + "type": "number", + "current": 1, + "size": 20, + "item_total": 2, + "has_next": false + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getAppResources +Get resources + + + +```javascript +// Promise +const promise = platformClient.application("").content.getAppResources(); + +// Async/Await +const data = await platformClient.application("").content.getAppResources(); +``` + + + + + + +Use this API to retrieve the resources, such as products, collections, customers, selling locations, etc. + +*Returned Response:* + + + + +[ResourcesSchema](#ResourcesSchema) + +Success. Returns a JSON object of resources. Refer `ResourcesSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "resources": [ + { + "name": "product", + "key": "product", + "definitions_count": 0 + }, + { + "name": "Collection", + "key": "collection", + "definitions_count": 0 + }, + { + "name": "Page", + "key": "page", + "definitions_count": 0 + }, + { + "name": "Blog", + "key": "blog", + "definitions_count": 0 + }, + { + "name": "Customer", + "key": "customer", + "definitions_count": 0 + }, + { + "name": "Store", + "key": "store", + "definitions_count": 0 + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getBlogBySlug +Get blog by slug + + + +```javascript +// Promise +const promise = platformClient.application("").content.getBlogBySlug({ slug : value }); + +// Async/Await +const data = await platformClient.application("").content.getBlogBySlug({ slug : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| slug | string | yes | A short, human-readable, URL-friendly identifier of a blog page. You can get slug value of a blog from `getBlogs` API. | + + + +Use this API to retrieve the components of a blog, such as title, slug, feature image, content, schedule, publish status, author, etc. + +*Returned Response:* + + + + +[BlogSchema](#BlogSchema) + +Success. Returns a a JSON object with components. Refer `BlogSchema` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "_id": "5eaa451a21a4dd75f0fd96c5", + "application": "5d3ebd89f540e7506b8b3548", + "tags": [ + "abhinav" + ], + "title": "my first blog", + "slug": "1st_blog", + "feature_image": { + "secure_url": "https://google.com" + }, + "content": [ + { + "type": "html", + "value": "

hey there!

" + } + ], + "_schedule": { + "cron": "* 10 * * *", + "start": "2021-03-31T23:30:00.000Z", + "end": "2021-03-31T23:55:00.000Z", + "duration": 1000, + "next_schedule": [ + { + "start": "2021-03-17T04:30:00.000Z", + "end": "2021-03-17T04:46:40.000Z" + } + ] + }, + "published": true, + "author": { + "name": "Fynd App" + }, + "date_meta": { + "created_on": "2021-03-14T06:49:03.945Z", + "modified_on": "2021-03-14T06:49:03.945Z" + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getBlogs +Get blogs + + + +```javascript +// Promise +const promise = platformClient.application("").content.getBlogs({ pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.application("").content.getBlogs({ pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | + + + +Use this API to get a list of blogs along with their details, such as the title, reading time, publish status, feature image, tags, author, etc. + +*Returned Response:* + + + + +[BlogGetResponse](#BlogGetResponse) + +Success. Refer `BlogGetResponse` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "items": [ + { + "date_meta": { + "created_on": "2021-03-14T06:49:03.945Z", + "modified_on": "2021-03-14T06:49:03.945Z" + }, + "tags": [], + "_id": "604db275b3ae202873964d94", + "content": [ + { + "type": "html", + "value": "

test abhinav

" + } + ], + "title": "1st Blog", + "slug": "1st-blog", + "published": true, + "_schedule": { + "next_schedule": [ + {} + ], + "start": "2021-04-08T07:15:13.000Z", + "end": "2021-04-10T02:00:00.000Z" + }, + "feature_image": { + "secure_url": "" + }, + "application": "000000000000000000000001", + "author": { + "name": "Fynd App" + } + } + ], + "page": { + "type": "number", + "current": 1, + "size": 1, + "item_total": 2, + "has_next": true + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getComponentById +Get components of a blog + + + +```javascript +// Promise +const promise = platformClient.application("").content.getComponentById({ slug : value }); + +// Async/Await +const data = await platformClient.application("").content.getComponentById({ slug : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| slug | string | yes | A short, human-readable, URL-friendly identifier of a blog page. You can get slug value of a blog from `getBlogs` API. | + + + +Use this API to retrieve the components of a blog, such as title, slug, feature image, content, schedule, publish status, author, etc. + +*Returned Response:* + + + + +[BlogSchema](#BlogSchema) + +Success. Returns a a JSON object with components. Refer `BlogSchema` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "_id": "5eaa451a21a4dd75f0fd96c5", + "application": "5d3ebd89f540e7506b8b3548", + "tags": [ + "abhinav" + ], + "title": "my first blog", + "slug": "1st_blog", + "feature_image": { + "secure_url": "https://google.com" + }, + "content": [ + { + "type": "html", + "value": "

hey there!

" + } + ], + "_schedule": { + "cron": "* 10 * * *", + "start": "2021-03-31T23:30:00.000Z", + "end": "2021-03-31T23:55:00.000Z", + "duration": 1000, + "next_schedule": [ + { + "start": "2021-03-17T04:30:00.000Z", + "end": "2021-03-17T04:46:40.000Z" + } + ] + }, + "published": true, + "author": { + "name": "Fynd App" + }, + "date_meta": { + "created_on": "2021-03-14T06:49:03.945Z", + "modified_on": "2021-03-14T06:49:03.945Z" + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomFieldDefinition +Get custom fields definition by id + + + +```javascript +// Promise +const promise = platformClient.content.getCustomFieldDefinition({ definitionId : value }); + +// Async/Await +const data = await platformClient.content.getCustomFieldDefinition({ definitionId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | + + + +Use this API to retrieve the definitions of custom fields using definition_id. + +*Returned Response:* + + + + +[CustomFieldDefinitionDetailResSchema](#CustomFieldDefinitionDetailResSchema) + +Success. Returns a object of custom field definition. Refer `CustomFieldDefinitionsSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "652e183347320aa8d8c28361", + "creator": "company", + "resource": "product", + "name": "new meta object", + "namespace": "custom", + "key": "new-meta-object", + "description": "", + "type": "metaobject", + "multi_value": false, + "validations": [ + { + "name": "metaobject_definition_id", + "type": "string", + "value": "652e1298b6ece12d06684c18" + } + ], + "company_id": "2", + "created_by": "5e5796c4fc10a0d133839372", + "updated_by": "5e5796c4fc10a0d133839372", + "required": false, + "is_deleted": false, + "created_at": "2023-10-17T05:14:27.960Z", + "updated_at": "2023-10-17T05:14:27.960Z", + "type_name": "Custom Object", + "invalid_fields_count": 0 + }, + { + "_id": "652826cd99822ff1f62cbf13", + "creator": "company", + "resource": "product", + "name": "single image", + "namespace": "custom", + "key": "single-image", + "description": "this is single", + "type": "file", + "multi_value": false, + "validations": [ + { + "name": "file_type_options", + "type": "string_array", + "value": [ + "image", + "audio", + "video", + "document", + "pdf" + ] + } + ], + "company_id": "2", + "created_by": "5e5796c4fc10a0d133839372", + "updated_by": "5e5796c4fc10a0d133839372", + "required": false, + "is_deleted": false, + "created_at": "2023-10-12T17:03:09.868Z", + "updated_at": "2023-10-12T17:03:09.868Z", + "type_name": "File", + "invalid_fields_count": 0 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 15, + "has_next": true + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomFieldDefinitions +Get custom fields definitions + + + +```javascript +// Promise +const promise = platformClient.content.getCustomFieldDefinitions({ pageNo : value, + pageSize : value, + resource : value, + type : value, + search : value }); + +// Async/Await +const data = await platformClient.content.getCustomFieldDefinitions({ pageNo : value, + pageSize : value, + resource : value, + type : value, + search : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | string | yes | | +| pageSize | string | yes | | +| resource | string | no | | +| type | string | no | | +| search | string | no | | + + + +Use this API to retrieve the definitions of custom fields. + +*Returned Response:* + + + + +[CustomFieldDefinitionsSchema](#CustomFieldDefinitionsSchema) + +Success. Returns a list of custom fields definitions. Refer `CustomFieldDefinitionsSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "652e183347320aa8d8c28361", + "creator": "company", + "resource": "product", + "name": "new meta object", + "namespace": "custom", + "key": "new-meta-object", + "description": "", + "type": "metaobject", + "multi_value": false, + "validations": [ + { + "name": "metaobject_definition_id", + "type": "string", + "value": "652e1298b6ece12d06684c18" + } + ], + "company_id": "2", + "created_by": "5e5796c4fc10a0d133839372", + "updated_by": "5e5796c4fc10a0d133839372", + "required": false, + "is_deleted": false, + "created_at": "2023-10-17T05:14:27.960Z", + "updated_at": "2023-10-17T05:14:27.960Z", + "type_name": "Custom Object", + "invalid_fields_count": 0 + }, + { + "_id": "652826cd99822ff1f62cbf13", + "creator": "company", + "resource": "product", + "name": "single image", + "namespace": "custom", + "key": "single-image", + "description": "this is single", + "type": "file", + "multi_value": false, + "validations": [ + { + "name": "file_type_options", + "type": "string_array", + "value": [ + "image", + "audio", + "video", + "document", + "pdf" + ] + } + ], + "company_id": "2", + "created_by": "5e5796c4fc10a0d133839372", + "updated_by": "5e5796c4fc10a0d133839372", + "required": false, + "is_deleted": false, + "created_at": "2023-10-12T17:03:09.868Z", + "updated_at": "2023-10-12T17:03:09.868Z", + "type_name": "File", + "invalid_fields_count": 0 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 15, + "has_next": true + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomFieldTypes +Get custom field types + + + +```javascript +// Promise +const promise = platformClient.content.getCustomFieldTypes(); + +// Async/Await +const data = await platformClient.content.getCustomFieldTypes(); +``` + + + + + + +Use this API to retrieve the custom field types + +*Returned Response:* + + + + +[CustomObjectByIdSchema](#CustomObjectByIdSchema) + +Success. Returns all custom field types. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "metafield_types": { + "string_single_line": { + "name": "Single Line Text", + "list_enabled": true, + "category": "TEXT", + "type": "string", + "supported_validations": [ + { + "name": "min", + "type": "integer", + "display": "Minimum Characters" + }, + { + "name": "max", + "type": "integer", + "display": "Maximum Characters" + }, + { + "name": "regex", + "type": "string", + "display": "Regular Expression", + "meta": { + "examples": [ + { + "name": "Alphabet Characters", + "value": "^[a-zA-Z]+$" + }, + { + "name": "Alphanumeric Characters", + "value": "^[a-zA-Z0-9]+$" + }, + { + "name": "Numeric Characters", + "value": "^[0-9]+$" + }, + { + "name": "Email Address", + "value": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$" + } + ] + } + }, + { + "name": "choices", + "type": "string_array", + "display": "Choices" + } + ] + }, + "string_multi_line": { + "name": "Multi Line Text", + "list_enabled": true, + "category": "TEXT", + "type": "string", + "supported_validations": [ + { + "name": "min", + "type": "integer", + "display": "Minimum Characters" + }, + { + "name": "max", + "type": "integer", + "display": "Maximum Characters" + } + ] + }, + "dropdown": { + "name": "Dropdown", + "list_enabled": true, + "category": "TEXT", + "type": "string", + "supported_validations": [ + { + "name": "choices", + "type": "string_array", + "display": "Choices", + "required": true + } + ] + }, + "integer": { + "name": "Integer", + "list_enabled": true, + "type": "integer", + "category": "NUMBER", + "supported_validations": [ + { + "name": "min", + "type": "integer", + "display": "Minimum Value" + }, + { + "name": "max", + "type": "integer", + "display": "Maximum Value" + }, + { + "name": "choices", + "type": "integer_array", + "display": "Choices" + } + ] + }, + "float_type": { + "name": "Decimal", + "list_enabled": true, + "type": "float", + "category": "NUMBER", + "supported_validations": [ + { + "name": "min", + "type": "float", + "display": "Minimum Value" + }, + { + "name": "max", + "type": "float", + "display": "Maximum Value" + }, + { + "name": "choices", + "type": "float_array", + "display": "Choices" + } + ] + }, + "boolean_type": { + "name": "Boolean", + "category": "TRUE_FALSE", + "list_enabled": false, + "type": "boolean", + "supported_validations": [] + }, + "date": { + "name": "Date", + "list_enabled": true, + "category": "DATETIME", + "type": "date", + "supported_validations": [ + { + "name": "min", + "type": "date", + "display": "From Date" + }, + { + "name": "max", + "type": "date", + "display": "To Date" + } + ] + }, + "datetime": { + "name": "Date - Time", + "category": "DATETIME", + "list_enabled": true, + "type": "datetime", + "supported_validations": [ + { + "name": "min", + "type": "date", + "display": "From Date & Time" + }, + { + "name": "max", + "type": "date", + "display": "To Date & Time" + } + ] + }, + "json": { + "name": "JSON", + "list_enabled": false, + "category": "ADVANCED", + "type": "json", + "supported_validations": [ + { + "name": "schema", + "type": "json", + "display": "JSON Schema" + } + ] + }, + "file": { + "name": "File", + "category": "REFERENCE", + "list_enabled": true, + "type": "string", + "supported_validations": [ + { + "name": "file_type_options", + "type": "string_array", + "meta": { + "options": [ + { + "image": { + "supported_types": [ + "jpeg", + "jpg", + "png", + "svg+xml", + "tiff", + "webp", + "gif" + ], + "max_size": 20971520 + }, + "video": { + "supported_types": [ + "x-flv", + "mp4", + "x-mpegURL", + "MP2T", + "3gpp", + "/quicktime", + "x-msvideo", + "x-ms-wmv", + "webm" + ], + "max_size": 1048576000 + } + } + ] + } + } + ] + }, + "url": { + "name": "URL", + "list_enabled": true, + "type": "string", + "supported_validations": [ + { + "name": "allowed_domains", + "display": "Allowed Domains", + "type": "string_array" + } + ] + }, + "metaobject": { + "name": "Custom Object", + "list_enabled": true, + "category": "REFERENCE", + "type": "string", + "supported_validations": [ + { + "name": "metaobject_definition_id", + "display": "Reference", + "type": "string", + "required": true + } + ] + }, + "product": { + "name": "Product", + "list_enabled": true, + "category": "REFERENCE", + "type": "string", + "supported_validations": [], + "scope": [ + "company", + "application" + ] + } + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomFields +Get list of custom fields of given resource + + + +```javascript +// Promise +const promise = platformClient.content.getCustomFields({ resource : value }); + +// Async/Await +const data = await platformClient.content.getCustomFields({ resource : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| resource | string | yes | | + + + +Use this API to retrieve the custom fields for given resource in param. + +*Returned Response:* + + + + +[CustomFieldsResponseSchema](#CustomFieldsResponseSchema) + +Success. Returns a list of custom fields. Refer `CustomFieldsResponseSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "652f8c5b6c1643cbd1659d88", + "namespace": "product_test_2", + "key": "manufacturer", + "resource": "product", + "creator": "company", + "value": [ + "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/NWt9CSoYbo-airtel_money.png", + "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/QqkJBM4IQL-amazon-pay.png", + "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/2Ed7Pk03Z-amex.png" + ], + "resource_id": "64bb987e9a3c4b6c29d676bc", + "type": "file", + "multi_value": true, + "company_id": "1", + "definition_id": "650c4ea3e0e7980d14c16c06", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "000000000000000000000001", + "is_deleted": false, + "created_at": "2023-10-18T07:42:19.551Z", + "updated_at": "2023-10-18T07:42:19.551Z" + }, + { + "_id": "652f8b4628dd2571fe5e90d8", + "namespace": "product_test_1", + "key": "manufacturer", + "resource": "product", + "creator": "company", + "value": [ + "this", + "is", + "testing" + ], + "resource_id": "64ba480fdf9cbe3a90b052f4", + "type": "string_single_line", + "multi_value": true, + "company_id": "1", + "definition_id": "650ae0d67f9c7b2a7d56b409", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "000000000000000000000001", + "is_deleted": false, + "created_at": "2023-10-18T07:37:42.797Z", + "updated_at": "2023-10-18T07:37:42.797Z" + }, + { + "_id": "652f8b4628dd2571fe5e90d7", + "namespace": "product_test", + "key": "manufacturer", + "resource": "product", + "creator": "company", + "value": [ + "kuldeep", + "kumar", + "harshwal" + ], + "resource_id": "64ba32fbdf9cbe3a90b052f0", + "type": "string_single_line", + "multi_value": true, + "company_id": "1", + "definition_id": "650ae0b27f9c7b2a7d56b407", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "000000000000000000000001", + "is_deleted": false, + "created_at": "2023-10-18T07:37:42.796Z", + "updated_at": "2023-10-18T07:37:42.796Z" + } + ], + "page": { + "type": "number", + "current": 1, + "size": 20, + "item_total": 3, + "has_next": false + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomFieldsByResourceId +Get list of custom fields of given resource and resource id + + + +```javascript +// Promise +const promise = platformClient.content.getCustomFieldsByResourceId({ resource : value, + resourceId : value }); + +// Async/Await +const data = await platformClient.content.getCustomFieldsByResourceId({ resource : value, + resourceId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| resource | string | yes | | +| resourceId | string | yes | | + + + +Use this API to retrieve the custom fields for given resource in param. + +*Returned Response:* + + + + +[CustomFieldsResponseByResourceIdSchema](#CustomFieldsResponseByResourceIdSchema) + +Success. Returns a list of custom fields. Refer `CustomFieldsResponseByResourceIdSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "65705772a20cc45d3f2585b3", + "namespace": "custom", + "key": "designer-name", + "resource": "product", + "creator": "company", + "value": [ + "ramsons" + ], + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "definition_id": "65604cdb6a78c23f082c850b", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "bd7223b6727eb087987eece7", + "is_deleted": false, + "created_at": "2023-12-06T11:13:54.217Z", + "updated_at": "2023-12-06T11:19:02.311Z", + "updated_by": "bd7223b6727eb087987eece7" + }, + { + "_id": "65705772a20cc45d3f2585b4", + "namespace": "custom", + "key": "manufactures", + "resource": "product", + "creator": "company", + "value": [ + "kartik" + ], + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "definition_id": "655f53ddca37f5deb832a185", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "bd7223b6727eb087987eece7", + "is_deleted": false, + "created_at": "2023-12-06T11:13:54.218Z", + "updated_at": "2023-12-06T11:19:02.311Z", + "updated_by": "bd7223b6727eb087987eece7" + }, + { + "_id": "65705772a20cc45d3f2585b1", + "namespace": "custom", + "key": "product-designer", + "resource": "product", + "creator": "company", + "value": [ + "65702b4574c5764716ee671d" + ], + "resource_id": "7612437", + "type": "metaobject", + "multi_value": true, + "company_id": "2", + "definition_id": "656d6bc9766f9511345091a6", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "bd7223b6727eb087987eece7", + "is_deleted": false, + "created_at": "2023-12-06T11:13:54.217Z", + "updated_at": "2023-12-06T11:19:02.311Z", + "updated_by": "bd7223b6727eb087987eece7" + }, + { + "_id": "65705772a20cc45d3f2585b2", + "namespace": "custom", + "key": "validation-check", + "resource": "product", + "creator": "company", + "value": [ + "ram" + ], + "resource_id": "7612437", + "type": "string_single_line", + "multi_value": false, + "company_id": "2", + "definition_id": "656866a30152b0584464d547", + "has_invalid_values": false, + "invalid_value_errors": [], + "created_by": "bd7223b6727eb087987eece7", + "is_deleted": false, + "created_at": "2023-12-06T11:13:54.217Z", + "updated_at": "2023-12-06T11:19:02.311Z", + "updated_by": "bd7223b6727eb087987eece7" + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomObject +Get custom object details + + + +```javascript +// Promise +const promise = platformClient.content.getCustomObject({ metaobjectId : value }); + +// Async/Await +const data = await platformClient.content.getCustomObject({ metaobjectId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| metaobjectId | string | yes | | + + + +Use this API to retrieve the custom object details and their fields details and definitions and references. + +*Returned Response:* + + + + +[CustomObjectByIdSchema](#CustomObjectByIdSchema) + +Success. Returns a custom object. Refer `CustomObjectByIdSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "_id": "653929f012376081aafa90f1", + "status": "active", + "display_name": "painter #653929f012376081aafa90f1", + "definition": { + "_id": "653907ced878d53c1a502d92", + "name": "painter", + "type": "painter" + }, + "references": [], + "fields": [ + { + "_id": "653929f012376081aafa90f5", + "key": "name", + "value": [ + "Bruce Wayne" + ], + "type": "string_single_line", + "definition_id": "653907ced878d53c1a502d95" + }, + { + "_id": "653929f012376081aafa90f6", + "key": "age", + "value": [ + 5 + ], + "type": "integer", + "definition_id": "653907ced878d53c1a502d96" + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomObjectDefinition +get custom object definition by id + + + +```javascript +// Promise +const promise = platformClient.content.getCustomObjectDefinition({ definitionId : value }); + +// Async/Await +const data = await platformClient.content.getCustomObjectDefinition({ definitionId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | + + + +Use this API to update a custom object definition for your application. + +*Returned Response:* + + + + +[CustomObjectDefinitionSchema](#CustomObjectDefinitionSchema) + +Custom object definition details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "_id": "656d67de766f95113450917b", + "name": "Designer", + "type": "designer", + "display_name_key": "name", + "description": "", + "creator": "company", + "created_by": "9759643b65ebc6bacb5275f5", + "updated_by": "bd7223b6727eb087987eece7", + "field_definitions": [ + { + "creator": "company", + "resource": "metaobject", + "name": "city2", + "namespace": "designer", + "key": "city", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "mobile", + "namespace": "designer", + "key": "mobile", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "name", + "namespace": "designer", + "key": "name", + "type": "string_single_line", + "description": "This is name of designer", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": true + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomObjectDefinitions +Get custom object definitions + + + +```javascript +// Promise +const promise = platformClient.content.getCustomObjectDefinitions({ pageNo : value, + pageSize : value, + search : value }); + +// Async/Await +const data = await platformClient.content.getCustomObjectDefinitions({ pageNo : value, + pageSize : value, + search : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | string | yes | | +| pageSize | string | yes | | +| search | string | no | | + + + +Use this API to retrieve the custom object definitions + +*Returned Response:* + + + + +[CustomObjectDefinitionsSchema](#CustomObjectDefinitionsSchema) + +Success. Returns a list custom object definitions. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "656db530766f951134509542", + "name": "customObject1", + "type": "customobject1", + "updated_at": "2023-12-04T11:17:04.136Z", + "entries_count": 0, + "fields_count": 2 + }, + { + "_id": "656db2d9766f95113450952b", + "name": "sample", + "type": "sample", + "updated_at": "2023-12-04T11:07:05.705Z", + "entries_count": 0, + "fields_count": 1 + }, + { + "_id": "656495b58d3278a7c24260f8", + "name": "address", + "type": "address", + "updated_at": "2023-11-27T13:12:21.999Z", + "entries_count": 1, + "fields_count": 3 + }, + { + "_id": "655c706ad5ff69fd3b95a1d9", + "name": "coCustomObject", + "type": "cocustomobject", + "updated_at": "2023-11-21T08:55:06.013Z", + "entries_count": 0, + "fields_count": 2 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 4, + "has_next": false + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getCustomObjects +Get list of custom objects + + + +```javascript +// Promise +const promise = platformClient.content.getCustomObjects(); + +// Async/Await +const data = await platformClient.content.getCustomObjects(); +``` + + + + + + +Use this API to retrieve the custom objects. + +*Returned Response:* + + + + +[CustomObjectsSchema](#CustomObjectsSchema) + +Success. Returns a list of custom objects. Refer `CustomObjectsSchema` for more details. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "653929f012376081aafa90f1", + "definition_id": "653907ced878d53c1a502d92", + "status": "active", + "updated_at": "2023-10-25T14:45:04.446Z", + "display_name": "painter #653929f012376081aafa90f1", + "definition": { + "_id": "653907ced878d53c1a502d92", + "name": "painter", + "type": "painter" + }, + "references": 0 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 10, + "item_total": 1, + "has_next": false + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getDataLoaders +Get all the data loaders in an application + + + +```javascript +// Promise +const promise = platformClient.application("").content.getDataLoaders(); + +// Async/Await +const data = await platformClient.application("").content.getDataLoaders(); +``` + + + + + + +Use this to get all data loaders of an application + +*Returned Response:* + + + + +[DataLoadersSchema](#DataLoadersSchema) + +Success. Refer `DataLoadersSchema` for more details. + + + + +
+  Example: + +```json +{ + "items": [ + { + "name": "Algolia", + "is_selected": false, + "type": "url", + "_id": "61bc4523a7ffc7504f4de4a5", + "service": "catalog", + "operation_id": "fetchSuggestions", + "url": "/ext/example/url", + "__source": { + "type": "extension", + "id": "000000000000000000000003" + }, + "application": "100000000000000000000001", + "__v": 0 + }, + { + "name": "Algolia v3", + "is_selected": false, + "type": "url", + "_id": "61bc452da7ffc7504f4de4a7", + "service": "catalog", + "operation_id": "fetchSuggestions", + "url": "/ext/example/url", + "__source": { + "type": "extension", + "id": "000000000000000000000003" + }, + "application": "100000000000000000000001", + "__v": 0 + } + ] +} +``` +
+ + + + + + + + + +--- + + +### getDataLoadersByService +Get all the data loaders in an application by service name + + + +```javascript +// Promise +const promise = platformClient.application("").content.getDataLoadersByService({ serviceName : value }); + +// Async/Await +const data = await platformClient.application("").content.getDataLoadersByService({ serviceName : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| serviceName | string | yes | Service name of the data loader.. | + + + +Use this to get all data loaders of an application by service name + +*Returned Response:* + + + + +[DataLoaderResponseSchema](#DataLoaderResponseSchema) + +Success. Refer `DataLoaderResponseSchema` for more details. + + + + +
+  Example: + +```json +{ + "items": [ + { + "name": "Algolia", + "is_selected": false, + "type": "url", + "_id": "61bc4523a7ffc7504f4de4a5", + "service": "catalog", + "operation_id": "fetchSuggestions", + "url": "/ext/example/url", + "__source": { + "type": "extension", + "id": "000000000000000000000003" + }, + "application": "100000000000000000000001", + "__v": 0 + }, + { + "name": "Algolia v3", + "is_selected": false, + "type": "url", + "_id": "61bc452da7ffc7504f4de4a7", + "service": "catalog", + "operation_id": "fetchSuggestions", + "url": "/ext/example/url", + "__source": { + "type": "extension", + "id": "000000000000000000000003" + }, + "application": "100000000000000000000001", + "__v": 0 + } + ] +} +``` +
+ + + + + + + + + +--- + + +### getDefaultNavigations +Get default navigations + + + +```javascript +// Promise +const promise = platformClient.application("").content.getDefaultNavigations(); + +// Async/Await +const data = await platformClient.application("").content.getDefaultNavigations(); +``` + + + + + + +On any website (application), there are navigations that are present by default. Use this API to retrieve those default navigations. + +*Returned Response:* + + + + +[DefaultNavigationResponse](#DefaultNavigationResponse) + +Success. Refer `DefaultNavigationResponse` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "items": [ + { + "name": "default-bottom", + "slug": "default-bottom-vIhLiJKQvUZdQvGWzDdrzLP3CTC4Hbxg", + "orientation": { + "landscape": [ + "bottom" + ] + }, + "version": 3, + "navigation": [ + { + "display": "Home", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", + "sort_order": 1, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "home" + }, + "type": "page" + }, + "active": true + }, + { + "display": "Brands", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "sort_order": 2, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "brands" + }, + "type": "page" + }, + "active": true + }, + { + "display": "Collections", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", + "sort_order": 3, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "collections" + }, + "type": "page" + }, + "active": true + }, + { + "display": "Categories", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", + "sort_order": 4, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "categories" + }, + "type": "page" + }, + "active": true + } + ], + "created_by": {}, + "_id": "6050244dbd9e072063f1586b", + "platform": [ + "android" + ] + }, + { + "name": "default-bottom", + "slug": "default-bottom-SB0zLTfiPN4Z5doJQBKRagsLTDldm8Ug", + "orientation": { + "landscape": [ + "bottom" + ] + }, + "version": 3, + "navigation": [ + { + "display": "Home", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", + "sort_order": 1, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "home" + }, + "type": "page" + }, + "active": true + }, + { + "display": "Brands", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "sort_order": 2, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "brands" + }, + "type": "page" + }, + "active": true + }, + { + "display": "Collections", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", + "sort_order": 3, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "collections" + }, + "type": "page" + }, + "active": true + }, + { + "display": "Categories", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", + "sort_order": 4, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "categories" + }, + "type": "page" + }, + "active": true + } + ], + "created_by": {}, + "_id": "6050244dbd9e072063f1586c", + "platform": [ + "ios" + ] + }, + { + "name": "default-left", + "slug": "default-left-dWrrfpfcNw6Arl0QtmK5VgunYYAHhGRR", + "orientation": { + "portrait": [ + "left" + ] + }, + "version": 3, + "navigation": [ + { + "display": "Profile", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938091/production/applications/app_000000000000000000000001/media/navigation/icon/hv0cd5jdo0rkhsqoizmi.png", + "sort_order": 1, + "type": "", + "action": { + "page": { + "url": "/", + "type": "profile" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + }, + { + "display": "Orders", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938144/production/applications/app_000000000000000000000001/media/navigation/icon/lmv4fzpxxk0a6acitlfg.png", + "sort_order": 2, + "type": "", + "action": { + "page": { + "url": "/", + "type": "orders" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + }, + { + "display": "Track Order", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938144/production/applications/app_000000000000000000000001/media/navigation/icon/lmv4fzpxxk0a6acitlfg.png", + "sort_order": 3, + "type": "", + "action": { + "page": { + "type": "track-order" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "anonymous" + ] + }, + { + "display": "Addresses", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938161/production/applications/app_000000000000000000000001/media/navigation/icon/qbod8vkjmot3qnaroibr.png", + "sort_order": 4, + "type": "", + "action": { + "page": { + "url": "/", + "type": "addresses" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + }, + { + "display": "Wishlist", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938125/production/applications/app_000000000000000000000001/media/navigation/icon/u8c7jdke4a3wwc0ftz8x.png", + "sort_order": 5, + "type": "", + "action": { + "page": { + "url": "/wishlist/", + "type": "wishlist" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + }, + { + "display": "Settings", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1584003256/production/applications/app_000000000000000000000001/media/navigation/icon/vywbdiio1zi7cbnltvgz.png", + "sort_order": 6, + "type": "", + "action": { + "page": { + "url": "/", + "type": "settings" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "Policy", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939301/production/applications/app_000000000000000000000001/media/navigation/icon/bygqvme7hkrd45oemzy0.png", + "sort_order": 7, + "type": "", + "action": { + "page": { + "url": "/", + "type": "policy" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "Terms & Conditions", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939382/production/applications/app_000000000000000000000001/media/navigation/icon/eaq0aagqr0xirojbuki3.png", + "sort_order": 8, + "type": "", + "action": { + "page": { + "url": "/", + "type": "tnc" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "Need Help", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939416/production/applications/app_000000000000000000000001/media/navigation/icon/xeqv7pzyxagwtxcwvxbw.png", + "sort_order": 9, + "type": "", + "action": { + "page": { + "url": "/faq/", + "type": "faq" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "About Us", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939196/production/applications/app_000000000000000000000001/media/navigation/icon/dccm5et4sgylisbug9xr.png", + "sort_order": 10, + "type": "", + "action": { + "page": { + "url": "/", + "type": "about-us" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "Rate Us", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1584091739/production/applications/app_000000000000000000000001/media/navigation/icon/afryyfeccqgjyeosdmbz.png", + "sort_order": 11, + "type": "", + "action": { + "page": { + "url": "/", + "type": "rate-us" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + } + ], + "created_by": {}, + "_id": "6050244dbd9e072063f1586d", + "platform": [ + "android" + ] + }, + { + "name": "default-left", + "slug": "default-left-tRK1fsQVUD7BmdvX30Fb4u5ZVSrSi3KW", + "orientation": { + "portrait": [ + "left" + ] + }, + "version": 3, + "navigation": [ + { + "display": "Profile", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938091/production/applications/app_000000000000000000000001/media/navigation/icon/hv0cd5jdo0rkhsqoizmi.png", + "sort_order": 1, + "type": "", + "action": { + "page": { + "url": "/", + "type": "profile" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + }, + { + "display": "Orders", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938144/production/applications/app_000000000000000000000001/media/navigation/icon/lmv4fzpxxk0a6acitlfg.png", + "sort_order": 2, + "type": "", + "action": { + "page": { + "url": "/", + "type": "orders" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + }, + { + "display": "Track Order", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938144/production/applications/app_000000000000000000000001/media/navigation/icon/lmv4fzpxxk0a6acitlfg.png", + "sort_order": 3, + "type": "", + "action": { + "page": { + "type": "track-order" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "anonymous" + ] + }, + { + "display": "Addresses", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938161/production/applications/app_000000000000000000000001/media/navigation/icon/qbod8vkjmot3qnaroibr.png", + "sort_order": 4, + "type": "", + "action": { + "page": { + "url": "/", + "type": "addresses" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + }, + { + "display": "Wishlist", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938125/production/applications/app_000000000000000000000001/media/navigation/icon/u8c7jdke4a3wwc0ftz8x.png", + "sort_order": 5, + "type": "", + "action": { + "page": { + "url": "/wishlist/", + "type": "wishlist" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + }, + { + "display": "Settings", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1584003256/production/applications/app_000000000000000000000001/media/navigation/icon/vywbdiio1zi7cbnltvgz.png", + "sort_order": 6, + "type": "", + "action": { + "page": { + "url": "/", + "type": "settings" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "Policy", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939301/production/applications/app_000000000000000000000001/media/navigation/icon/bygqvme7hkrd45oemzy0.png", + "sort_order": 7, + "type": "", + "action": { + "page": { + "url": "/", + "type": "policy" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "Terms & Conditions", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939382/production/applications/app_000000000000000000000001/media/navigation/icon/eaq0aagqr0xirojbuki3.png", + "sort_order": 8, + "type": "", + "action": { + "page": { + "url": "/", + "type": "tnc" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "Need Help", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939416/production/applications/app_000000000000000000000001/media/navigation/icon/xeqv7pzyxagwtxcwvxbw.png", + "sort_order": 9, + "type": "", + "action": { + "page": { + "url": "/faq/", + "type": "faq" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "About Us", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939196/production/applications/app_000000000000000000000001/media/navigation/icon/dccm5et4sgylisbug9xr.png", + "sort_order": 10, + "type": "", + "action": { + "page": { + "url": "/", + "type": "about-us" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "all" + ] + }, + { + "display": "Rate Us", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1584091739/production/applications/app_000000000000000000000001/media/navigation/icon/afryyfeccqgjyeosdmbz.png", + "sort_order": 11, + "type": "", + "action": { + "page": { + "url": "/", + "type": "rate-us" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "acl": [ + "registered" + ] + } + ], + "created_by": {}, + "_id": "6050244dbd9e072063f1586e", + "platform": [ + "ios" + ] + }, + { + "name": "default-top", + "slug": "default-top-qrprb8dxqr3m698wwUGXWsvTfVkjt4cR", + "orientation": { + "landscape": [ + "top" + ] + }, + "version": 3, + "navigation": [ + { + "display": "Home", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", + "sort_order": 1, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "home" + }, + "type": "page" + }, + "active": true + }, + { + "display": "Brands", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "sort_order": 2, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "brands" + }, + "type": "page" + }, + "active": true + }, + { + "display": "Collections", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", + "sort_order": 3, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "collections" + }, + "type": "page" + }, + "active": true + }, + { + "display": "Categories", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", + "sort_order": 4, + "acl": [ + "all" + ], + "action": { + "page": { + "type": "categories" + }, + "type": "page" + }, + "active": true + } + ], + "created_by": {}, + "_id": "6050244dbd9e072063f1586f", + "platform": [ + "web" + ] + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getDefaultSEOMarkupSchema +Get Default SEO Markup schemas of an application + + + +```javascript +// Promise +const promise = platformClient.application("").content.getDefaultSEOMarkupSchema({ pageType : value }); + +// Async/Await +const data = await platformClient.application("").content.getDefaultSEOMarkupSchema({ pageType : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageType | string | no | The type of page against which schema template was created | + + + +Use this API to get the Default SEO Markup schema Templates setup for an application + +*Returned Response:* + + + + +[DefaultSchemaComponent](#DefaultSchemaComponent) + +Success. Refer `DefaultSchemaComponent` for more details. + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getFaqByIdOrSlug +Get an FAQ + + + +```javascript +// Promise +const promise = platformClient.application("").content.getFaqByIdOrSlug({ idOrSlug : value }); + +// Async/Await +const data = await platformClient.application("").content.getFaqByIdOrSlug({ idOrSlug : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| idOrSlug | string | yes | ID or the slug allotted to an FAQ category. Slug is a short, human-readable, URL-friendly identifier of an object. You can get slug value of an FAQ category from `getFaqCategories` API. | + + + +Use this API to retrieve a specific FAQ. You will get the question and answer of that FAQ. + +*Returned Response:* + + + + +[CreateFaqResponseSchema](#CreateFaqResponseSchema) + +Success. Refer `CreateFaqResponseSchema` for more details. + + + + +
+  Example: + +```json +{ + "faq": { + "_id": "60265b64e507768b168dee4d", + "question": "question 1", + "answer": "answer 1", + "slug": "question-1", + "application": "000000000000000000000001" + } +} +``` +
+ + + + + + + + + +--- + + +### getFaqCategories +Get a list of FAQ categories + + + +```javascript +// Promise +const promise = platformClient.application("").content.getFaqCategories(); + +// Async/Await +const data = await platformClient.application("").content.getFaqCategories(); +``` + + + + + + +FAQs can be divided into categories. Use this API to get a list of FAQ categories. + +*Returned Response:* + + + + +[GetFaqCategoriesSchema](#GetFaqCategoriesSchema) + +Success. Refer `GetFaqCategoriesSchema` for more details. + + + + +
+  Example: + +```json +{ + "categories": [ + { + "index": 0, + "children": [ + "6026426ae507768b168dee4b" + ], + "title": "Test", + "_id": "60263f80c83c1f89f2863a8a", + "slug": "test", + "application": "000000000000000000000001" + } + ] +} +``` +
+ + + + + + + + + +--- + + +### getFaqCategoryBySlugOrId +Get an FAQ category by slug or id + + + +```javascript +// Promise +const promise = platformClient.application("").content.getFaqCategoryBySlugOrId({ idOrSlug : value }); + +// Async/Await +const data = await platformClient.application("").content.getFaqCategoryBySlugOrId({ idOrSlug : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| idOrSlug | string | yes | ID or the slug allotted to an FAQ category. Slug is a short, human-readable, URL-friendly identifier of an object. You can get slug value of an FAQ category from `getFaqCategories` API. | + + + +FAQs can be divided into categories. Use this API to get an FAQ categories using its slug or ID. + +*Returned Response:* + + + + +[GetFaqCategoryBySlugSchema](#GetFaqCategoryBySlugSchema) + +Success. Refer `GetFaqCategoryBySlugSchema` for more details. + + + + +
+  Example: + +```json +{ + "category": { + "index": 0, + "children": [ + { + "_id": "6026426ae507768b168dee4b", + "question": "question 1", + "answer": "answer 1", + "slug": "question-1", + "application": "000000000000000000000001" + } + ], + "_id": "60263f80c83c1f89f2863a8a", + "slug": "test", + "title": "Test", + "application": "000000000000000000000001" + } +} +``` +
+ + + + + + + + + +--- + + +### getFaqsByCategoryIdOrSlug +Get question and answers within an FAQ category + + + +```javascript +// Promise +const promise = platformClient.application("").content.getFaqsByCategoryIdOrSlug({ idOrSlug : value }); + +// Async/Await +const data = await platformClient.application("").content.getFaqsByCategoryIdOrSlug({ idOrSlug : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| idOrSlug | string | yes | ID or the slug allotted to an FAQ category. Slug is a short, human-readable, URL-friendly identifier of an object. You can get slug value of an FAQ category from `getFaqCategories` API. | + + + +Use this API to retrieve all the commonly asked question and answers belonging to an FAQ category. + +*Returned Response:* + + + + +[GetFaqSchema](#GetFaqSchema) + +Success. Refer `GetFaqSchema` for more details. + + + + +
+  Example: + +```json +{ + "faqs": [ + { + "_id": "60265b64e507768b168dee4d", + "question": "question 1", + "answer": "answer 1", + "slug": "question-1", + "application": "000000000000000000000001" + } + ] +} +``` +
+ + + + + + + + + +--- + + +### getInjectableTags +Get all the tags in an application + + + +```javascript +// Promise +const promise = platformClient.application("").content.getInjectableTags({ all : value }); + +// Async/Await +const data = await platformClient.application("").content.getInjectableTags({ all : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| all | boolean | no | Get all tags irrespective of the creator of tags | + + + +Use this API to get the CSS and JS injected in the application in the form of tags. + +*Returned Response:* + + + + +[TagsSchema](#TagsSchema) + +Success. Refer `TagsSchema` for more details. + + + + +
+  Example: + +```json +{ + "_id": "601f77e7aa61066feda44487", + "tags": [ + { + "name": "Test", + "sub_type": "external", + "_id": "601f77e7aa61066feda44488", + "type": "js", + "url": "youtube.com/watch?v=AaxFIY-cWH0&list=PL3O3jhFJEElBHFbs6XsOqZAWZLtlEkZTw&index=31", + "position": "head" + }, + { + "name": "Test 2", + "sub_type": "external", + "_id": "601f77e7aa61066feda44489", + "type": "js", + "url": "youtube.com/watch?v=AaxFIY-cWH0&list=PL3O3jhFJEElBHFbs6XsOqZAWZLtlEkZTw&index=31", + "position": "head" + } + ], + "application": "000000000000000000000001", + "__v": 0 +} +``` +
+ + + + + + + + + +--- + + +### getJobs +Fetch bulk import and export job list. + + + +```javascript +// Promise +const promise = platformClient.content.getJobs({ page : value, + pageSize : value, + actionType : value }); + +// Async/Await +const data = await platformClient.content.getJobs({ page : value, + pageSize : value, + actionType : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| page | string | yes | | +| pageSize | string | yes | | +| actionType | string | yes | | + + + +Use this api to get list of jobs of bulk import and exports + +*Returned Response:* + + + + +[CustomObjectBulkEntry](#CustomObjectBulkEntry) + +Success. Returns all bulk entries history. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "6570124da20cc45d3f2582a7", + "jobs": [ + "2311" ], - "created_by": {}, - "_id": "6050244dbd9e072063f1586d", + "finished_jobs": [ + "2311" + ], + "error_jobs": [], + "errors_occured": [], + "company_id": "2", + "creator": "company", + "URL": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/custom-data/CustomObject-designer-import-6570124da20cc45d3f2582a7.csv", + "status": "completed", + "action_type": "upload", + "entity": "metaobject", + "error_url": "", + "finished_count": 0, + "error_count": 0, + "success_count": 0, + "total_jobs": 1, + "meta": { + "mo_total_count": 2, + "mo_success_count": 2, + "mo_error_count": 0, + "mo_defintion_type": "designer" + }, + "created_by": "bd7223b6727eb087987eece7", + "created_at": "2023-12-06T06:18:53.219Z", + "updated_at": "2023-12-06T06:20:23.560Z", + "id": "6570124da20cc45d3f2582a7" + }, + { + "_id": "6558b8c49340c43a7015b4af", + "jobs": [ + "2297" + ], + "finished_jobs": [ + "2297" + ], + "error_jobs": [], + "errors_occured": [], + "company_id": "2", + "creator": "company", + "URL": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/custom-data/CustomObject-kuldeep-custom-import-6558b8c49340c43a7015b4af.csv", + "status": "completed", + "action_type": "upload", + "entity": "metaobject", + "error_url": "", + "finished_count": 0, + "error_count": 0, + "success_count": 0, + "total_jobs": 1, + "meta": { + "mo_total_count": 1, + "mo_success_count": 0, + "mo_error_count": 1, + "mo_defintion_type": "kuldeep-custom" + }, + "created_by": "9759643b65ebc6bacb5275f5", + "created_at": "2023-11-18T13:14:44.360Z", + "updated_at": "2023-11-18T13:17:19.765Z", + "id": "6558b8c49340c43a7015b4af" + } + ], + "page": { + "type": "number", + "current": 1, + "size": 20, + "item_total": 2, + "has_next": false + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getLandingPages +Get landing pages + + + +```javascript +// Promise +const promise = platformClient.application("").content.getLandingPages({ pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.application("").content.getLandingPages({ pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | + + + +Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch a list of landing pages. + +*Returned Response:* + + + + +[LandingPageGetResponse](#LandingPageGetResponse) + +Success. Refer `LandingPageGetResponse` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "items": [ + { + "date_meta": { + "created_on": "2021-03-12T09:26:12.157Z", + "modified_on": "2021-03-12T09:26:12.157Z" + }, "platform": [ "android" - ] + ], + "_id": "604b342e29f19310d8ae9743", + "slug": "landing-page-default-2", + "action": { + "page": { + "type": "default" + }, + "popup": {}, + "type": "page" + }, + "application": "5cd3db5e9d692cfe5302a7bb", + "archived": false, + "_custom_json": {}, + "__v": 0 + } + ], + "page": { + "type": "number", + "current": 1, + "size": 1, + "item_total": 2, + "has_next": true + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getLegalInformation +Get legal information + + + +```javascript +// Promise +const promise = platformClient.application("").content.getLegalInformation(); + +// Async/Await +const data = await platformClient.application("").content.getLegalInformation(); +``` + + + + + + +Use this API to get the legal information of an application, which includes Policy, Terms and Conditions, Shipping Policy and FAQ regarding the application. + +*Returned Response:* + + + + +[ApplicationLegal](#ApplicationLegal) + +Success. Refer `ApplicationLegal` for more details. + + + + +
+  Examples: + + +
+  Success + +```json +{ + "value": { + "tnc": "**Terms and Conditions test**", + "policy": "**Privacy policy test**", + "shipping": "**Shipping term and conditions**", + "returns": "**Terms & conditions for returns **", + "_id": "5e8b2b96abe7dc94c02c9ac9", + "application": "000000000000000000000001", + "faq": [ + { + "question": "New Question", + "answer": "New Answer" }, { - "name": "default-left", - "slug": "default-left-tRK1fsQVUD7BmdvX30Fb4u5ZVSrSi3KW", - "orientation": { - "portrait": [ - "left" - ] - }, - "version": 3, - "navigation": [ - { - "display": "Profile", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938091/production/applications/app_000000000000000000000001/media/navigation/icon/hv0cd5jdo0rkhsqoizmi.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/", - "type": "profile" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "registered" - ] - }, - { - "display": "Orders", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938144/production/applications/app_000000000000000000000001/media/navigation/icon/lmv4fzpxxk0a6acitlfg.png", - "sort_order": 2, - "type": "", - "action": { - "page": { - "url": "/", - "type": "orders" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "registered" - ] - }, - { - "display": "Track Order", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938144/production/applications/app_000000000000000000000001/media/navigation/icon/lmv4fzpxxk0a6acitlfg.png", - "sort_order": 3, - "type": "", - "action": { - "page": { - "type": "track-order" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "anonymous" - ] - }, - { - "display": "Addresses", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938161/production/applications/app_000000000000000000000001/media/navigation/icon/qbod8vkjmot3qnaroibr.png", - "sort_order": 4, - "type": "", - "action": { - "page": { - "url": "/", - "type": "addresses" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "registered" - ] + "question": "New", + "answer": "sdfghjhg" + }, + { + "question": "test", + "answer": "test" + }, + { + "question": "New Test", + "answer": "New Test answer" + }, + { + "question": "test", + "answer": "test" + } + ], + "created_at": "2020-04-06T13:16:06.818Z", + "updated_at": "2020-07-16T09:47:40.751Z", + "__v": 260 + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getNavigationBySlug +Get a navigation by slug + + + +```javascript +// Promise +const promise = platformClient.application("").content.getNavigationBySlug({ slug : value, + devicePlatform : value }); + +// Async/Await +const data = await platformClient.application("").content.getNavigationBySlug({ slug : value, + devicePlatform : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| slug | string | yes | A short, human-readable, URL-friendly identifier of a navigation. You can get slug value of a navigation from `getNavigations` API. | +| devicePlatform | string | yes | Filter navigations by platform. Acceptable values are: web, android, ios, all | + + + +Use this API to retrieve a navigation by its slug. + +*Returned Response:* + + + + +[NavigationSchema](#NavigationSchema) + +Success. Refer `NavigationSchema` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "_id": "5ffbd9b90ac98678ae0458d7", + "application": "000000000000000000000001", + "_custom_json": null, + "name": "test-nav", + "slug": "test-nav", + "platform": [ + "ios", + "android" + ], + "orientation": { + "portrait": [ + "left" + ] + }, + "navigation": [ + { + "display": "Home", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", + "sort_order": 1, + "type": "", + "action": { + "page": { + "url": "/", + "type": "home" }, - { - "display": "Wishlist", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583938125/production/applications/app_000000000000000000000001/media/navigation/icon/u8c7jdke4a3wwc0ftz8x.png", - "sort_order": 5, - "type": "", - "action": { - "page": { - "url": "/wishlist/", - "type": "wishlist" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "registered" - ] + "popup": {}, + "type": "page" + }, + "active": true, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "acl": [ + "all" + ], + "_locale_language": { + "hi": { + "display": "" }, - { - "display": "Settings", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1584003256/production/applications/app_000000000000000000000001/media/navigation/icon/vywbdiio1zi7cbnltvgz.png", - "sort_order": 6, - "type": "", - "action": { - "page": { - "url": "/", - "type": "settings" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "all" - ] + "ar": { + "display": "" }, + "en_us": { + "display": "" + } + }, + "sub_navigation": [ { - "display": "Policy", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939301/production/applications/app_000000000000000000000001/media/navigation/icon/bygqvme7hkrd45oemzy0.png", - "sort_order": 7, + "display": "Brands", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "sort_order": 1, "type": "", "action": { "page": { - "url": "/", - "type": "policy" + "url": "/brands/", + "type": "brands" }, "popup": {}, "type": "page" }, "active": true, + "tags": null, "acl": [ "all" - ] - }, - { - "display": "Terms & Conditions", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939382/production/applications/app_000000000000000000000001/media/navigation/icon/eaq0aagqr0xirojbuki3.png", - "sort_order": 8, - "type": "", - "action": { - "page": { - "url": "/", - "type": "tnc" + ], + "_locale_language": { + "hi": { + "display": "" }, - "popup": {}, - "type": "page" - }, - "active": true, - "acl": [ - "all" - ] + "ar": { + "display": "" + }, + "en_us": { + "display": "" + } + } + } + ] + }, + { + "display": "Collections", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", + "sort_order": 2, + "type": "", + "action": { + "page": { + "url": "/collections/", + "type": "collections" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "tags": null, + "acl": [ + "all" + ], + "_locale_language": { + "hi": { + "display": "" + }, + "ar": { + "display": "" }, + "en_us": { + "display": "" + } + }, + "sub_navigation": [ { - "display": "Need Help", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939416/production/applications/app_000000000000000000000001/media/navigation/icon/xeqv7pzyxagwtxcwvxbw.png", - "sort_order": 9, + "display": "Categories", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", + "sort_order": 1, "type": "", "action": { "page": { - "url": "/faq/", - "type": "faq" + "url": "/categories/", + "type": "categories" }, "popup": {}, "type": "page" }, "active": true, + "tags": null, "acl": [ "all" - ] + ], + "_locale_language": { + "hi": { + "display": "" + }, + "ar": { + "display": "" + }, + "en_us": { + "display": "" + } + } + } + ] + }, + { + "display": "Primary Menu", + "image": "", + "sort_order": 3, + "type": "", + "action": { + "page": { + "type": "home" }, - { - "display": "About Us", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1583939196/production/applications/app_000000000000000000000001/media/navigation/icon/dccm5et4sgylisbug9xr.png", - "sort_order": 10, + "popup": {}, + "type": "page" + }, + "active": true, + "tags": null, + "acl": [ + "all" + ], + "_locale_language": { + "hi": { + "display": "" + }, + "ar": { + "display": "" + }, + "en_us": { + "display": "" + } + } + } + ], + "created_by": { + "id": "000000000000000000000000" + }, + "date_meta": { + "created_on": "2021-01-11T04:53:13.585Z", + "modified_on": "2021-01-14T10:24:34.485Z" + }, + "archived": false + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getNavigations +Get navigations + + + +```javascript +// Promise +const promise = platformClient.application("").content.getNavigations({ devicePlatform : value, + pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.application("").content.getNavigations({ devicePlatform : value, + pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| devicePlatform | string | yes | Filter navigations by platform. Acceptable values are: web, android, ios, all | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | + + + +Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the orientation, links, sub-navigations, etc. + +*Returned Response:* + + + + +[NavigationGetResponse](#NavigationGetResponse) + +Success. Refer `NavigationGetResponse` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "items": [ + { + "_id": "5ffbd9b90ac98678ae0458d7", + "application": "000000000000000000000001", + "_custom_json": null, + "name": "temp", + "slug": "temp", + "platform": "web", + "position": "top", + "orientation": "landscape", + "navigation": [ + { + "display": "Home", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", + "sort_order": 1, "type": "", "action": { "page": { "url": "/", - "type": "about-us" + "type": "home" }, "popup": {}, "type": "page" }, "active": true, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, "acl": [ "all" + ], + "_locale_language": { + "hi": { + "display": "" + }, + "ar": { + "display": "" + }, + "en_us": { + "display": "" + } + }, + "sub_navigation": [ + { + "display": "Brands", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "sort_order": 1, + "type": "", + "action": { + "page": { + "url": "/brands/", + "type": "brands" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "tags": null, + "acl": [ + "all" + ], + "_locale_language": { + "hi": { + "display": "" + }, + "ar": { + "display": "" + }, + "en_us": { + "display": "" + } + } + } ] }, { - "display": "Rate Us", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1584091739/production/applications/app_000000000000000000000001/media/navigation/icon/afryyfeccqgjyeosdmbz.png", - "sort_order": 11, + "display": "Collections", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", + "sort_order": 2, "type": "", "action": { "page": { - "url": "/", - "type": "rate-us" + "url": "/collections/", + "type": "collections" }, "popup": {}, "type": "page" }, "active": true, - "acl": [ - "registered" - ] - } - ], - "created_by": {}, - "_id": "6050244dbd9e072063f1586e", - "platform": [ - "ios" - ] - }, - { - "name": "default-top", - "slug": "default-top-qrprb8dxqr3m698wwUGXWsvTfVkjt4cR", - "orientation": { - "landscape": [ - "top" - ] - }, - "version": 3, - "navigation": [ - { - "display": "Home", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", - "sort_order": 1, + "tags": null, "acl": [ "all" ], - "action": { - "page": { - "type": "home" + "_locale_language": { + "hi": { + "display": "" }, - "type": "page" - }, - "active": true - }, - { - "display": "Brands", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "sort_order": 2, - "acl": [ - "all" - ], - "action": { - "page": { - "type": "brands" + "ar": { + "display": "" }, - "type": "page" + "en_us": { + "display": "" + } }, - "active": true + "sub_navigation": [ + { + "display": "Categories", + "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", + "sort_order": 1, + "type": "", + "action": { + "page": { + "url": "/categories/", + "type": "categories" + }, + "popup": {}, + "type": "page" + }, + "active": true, + "tags": null, + "acl": [ + "all" + ], + "_locale_language": { + "hi": { + "display": "" + }, + "ar": { + "display": "" + }, + "en_us": { + "display": "" + } + } + } + ] }, { - "display": "Collections", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", + "display": "Primary Menu", + "image": "", "sort_order": 3, - "acl": [ - "all" - ], + "type": "", "action": { "page": { - "type": "collections" + "type": "home" }, + "popup": {}, "type": "page" }, - "active": true - }, - { - "display": "Categories", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", - "sort_order": 4, + "active": true, + "tags": null, "acl": [ "all" ], - "action": { - "page": { - "type": "categories" + "_locale_language": { + "hi": { + "display": "" }, - "type": "page" - }, - "active": true + "ar": { + "display": "" + }, + "en_us": { + "display": "" + } + } } ], - "created_by": {}, - "_id": "6050244dbd9e072063f1586f", - "platform": [ - "web" - ] + "created_by": { + "id": "000000000000000000000000" + }, + "date_meta": { + "created_on": "2021-01-11T04:53:13.585Z", + "modified_on": "2021-01-14T10:24:34.485Z" + } + } + ], + "page": { + "type": "number", + "current": 1, + "size": 1, + "item_total": 2, + "has_next": true + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getPageBySlug +Get page by slug + + + +```javascript +// Promise +const promise = platformClient.application("").content.getPageBySlug({ slug : value }); + +// Async/Await +const data = await platformClient.application("").content.getPageBySlug({ slug : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| slug | string | yes | A short, human-readable, URL-friendly identifier of a page. You can get slug value of a page from `getPages` API. | + + + +Use this API to retrieve the components of a page, such as its title, seo, publish status, feature image, tags, schedule, etc. + +*Returned Response:* + + + + +[PageSchema](#PageSchema) + +Success. Returns a JSON object of components. Refer `PageSchema` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "date_meta": { + "created_on": "2021-03-16T08:24:19.197Z", + "modified_on": "2021-03-16T08:24:19.197Z" + }, + "tags": [ + "my first page" + ], + "published": true, + "component_ids": [], + "archived": false, + "_id": "60506dcad18cb33946026862", + "title": "my first page", + "slug": "1st_page", + "feature_image": { + "secure_url": "https://google.com/some-image" + }, + "content": [ + { + "type": "html", + "value": "
Emtpy Page. Create Page here.
hello there!
how are you doing

" + }, + { + "type": "css", + "value": "* { box-sizing: border-box; } body {margin: 0;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}#icfm{text-align:center;padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;}#izu5{padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;}#ibgj{color:black;}#izzl{float:none;display:flex;}.aa{float:right;}" + }, + { + "type": "js", + "value": "" } - ] + ], + "content_path": "https://hdn-1.fynd.com/company/1526/applications/61012f6a9250ccd1b9ef8a1d/pages/content/page_slug.html", + "platform": "web", + "description": "hey this is my first page", + "visibility": { + "test": true + }, + "_schedule": { + "start": "2021-04-23T23:50:00.000Z", + "next_schedule": [ + {} + ] + }, + "seo": { + "title": "my first page", + "description": "hey this is my first page", + "image": { + "url": "" + } + }, + "type": "rawhtml", + "application": "000000000000000000000001", + "orientation": "portrait", + "page_meta": [] } } ``` @@ -3863,59 +9950,108 @@ Success. Refer `DefaultNavigationResponse` for more details. --- -### getFaqByIdOrSlug -Get an FAQ +### getPageMeta +Get page meta ```javascript // Promise -const promise = platformClient.application("").content.getFaqByIdOrSlug({ idOrSlug : value }); +const promise = platformClient.application("").content.getPageMeta(); // Async/Await -const data = await platformClient.application("").content.getFaqByIdOrSlug({ idOrSlug : value }); +const data = await platformClient.application("").content.getPageMeta(); ``` -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| idOrSlug | string | yes | ID or the slug allotted to an FAQ category. Slug is a short, human-readable, URL-friendly identifier of an object. You can get slug value of an FAQ category from `getFaqCategories` API. | +Use this API to get the meta of custom pages (blog, page) and default system pages (e.g. home/brand/category/collection). +*Returned Response:* -Use this API to retrieve a specific FAQ. You will get the question and answer of that FAQ. -*Returned Response:* +[PageMetaSchema](#PageMetaSchema) +Success. Refer `PageMetaSchema` for more details. -[CreateFaqResponseSchema](#CreateFaqResponseSchema) -Success. Refer `CreateFaqResponseSchema` for more details. +
+  Examples:
-  Example: +  default ```json { - "faq": { - "_id": "60265b64e507768b168dee4d", - "question": "question 1", - "answer": "answer 1", - "slug": "question-1", - "application": "000000000000000000000001" + "value": { + "application_id": "000000000000000000000001", + "system_pages": [ + { + "display": "Home", + "action": { + "page": { + "type": "home" + }, + "type": "page" + }, + "page_type": "home" + }, + { + "display": "Brands", + "action": { + "page": { + "type": "brands" + }, + "type": "page" + }, + "page_type": "brands" + }, + { + "display": "Collections", + "action": { + "page": { + "type": "collections" + }, + "type": "page" + }, + "page_type": "collections" + }, + { + "display": "Categories", + "action": { + "page": { + "type": "categories" + }, + "type": "page" + }, + "page_type": "categories" + } + ], + "custom_pages": [ + { + "display": "my first page", + "slug": "first_page" + }, + { + "display": "my second page", + "slug": "second_page" + } + ] } } ```
+
+ @@ -3927,17 +10063,17 @@ Success. Refer `CreateFaqResponseSchema` for more details. --- -### getFaqCategories -Get a list of FAQ categories +### getPageSpec +Get page spec ```javascript // Promise -const promise = platformClient.application("").content.getFaqCategories(); +const promise = platformClient.application("").content.getPageSpec(); // Async/Await -const data = await platformClient.application("").content.getFaqCategories(); +const data = await platformClient.application("").content.getPageSpec(); ``` @@ -3945,41 +10081,62 @@ const data = await platformClient.application("").content.getFaq -FAQs can be divided into categories. Use this API to get a list of FAQ categories. +Use this API to get the specifications of a page, such as page type, display name, params and query. *Returned Response:* -[GetFaqCategoriesSchema](#GetFaqCategoriesSchema) +[PageSpec](#PageSpec) -Success. Refer `GetFaqCategoriesSchema` for more details. +Success. Refer `PageSpec` for more details.
-  Example: +  Examples: + + +
+  default ```json { - "categories": [ - { - "index": 0, - "children": [ - "6026426ae507768b168dee4b" - ], - "title": "Test", - "_id": "60263f80c83c1f89f2863a8a", - "slug": "test", - "application": "000000000000000000000001" - } - ] + "value": { + "specifications": [ + { + "page_type": "home", + "display_name": "Home", + "params": [], + "query": [] + }, + { + "page_type": "collections", + "display_name": "Collections", + "params": [], + "query": [] + }, + { + "page_type": "collection", + "display_name": "Collection", + "params": [ + { + "key": "slug", + "required": true + } + ], + "query": [] + } + ] + } } ```
+
+ @@ -3991,17 +10148,19 @@ Success. Refer `GetFaqCategoriesSchema` for more details. --- -### getFaqCategoryBySlugOrId -Get an FAQ category by slug or id +### getPages +Get a list of pages ```javascript // Promise -const promise = platformClient.application("").content.getFaqCategoryBySlugOrId({ idOrSlug : value }); +const promise = platformClient.application("").content.getPages({ pageNo : value, + pageSize : value }); // Async/Await -const data = await platformClient.application("").content.getFaqCategoryBySlugOrId({ idOrSlug : value }); +const data = await platformClient.application("").content.getPages({ pageNo : value, + pageSize : value }); ``` @@ -4009,50 +10168,87 @@ const data = await platformClient.application("").content.getFaq | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| idOrSlug | string | yes | ID or the slug allotted to an FAQ category. Slug is a short, human-readable, URL-friendly identifier of an object. You can get slug value of an FAQ category from `getFaqCategories` API. | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | -FAQs can be divided into categories. Use this API to get an FAQ categories using its slug or ID. +Use this API to retrieve a list of pages. *Returned Response:* -[GetFaqCategoryBySlugSchema](#GetFaqCategoryBySlugSchema) +[PageGetResponse](#PageGetResponse) -Success. Refer `GetFaqCategoryBySlugSchema` for more details. +Success. Refer `PageGetResponse` for more details.
-  Example: +  Examples: + + +
+  default ```json { - "category": { - "index": 0, - "children": [ + "value": { + "items": [ { - "_id": "6026426ae507768b168dee4b", - "question": "question 1", - "answer": "answer 1", - "slug": "question-1", - "application": "000000000000000000000001" + "date_meta": { + "created_on": "2021-03-14T06:49:03.945Z", + "modified_on": "2021-03-14T06:49:03.945Z" + }, + "tags": [ + "my first page" + ], + "_id": "604db275b3ae202873964d94", + "content_path": "https://hdn-1.fynd.com/company/1526/applications/61012f6a9250ccd1b9ef8a1d/pages/content/page_slug.html", + "title": "test-page", + "slug": "test-page", + "published": true, + "_schedule": { + "next_schedule": [ + {} + ], + "start": "2021-04-08T07:15:13.000Z", + "end": "2021-04-10T02:00:00.000Z" + }, + "feature_image": { + "secure_url": "https://google.com/some-image" + }, + "seo": { + "title": "my first page", + "description": "hey this is my first page", + "image": { + "url": "" + } + }, + "application": "000000000000000000000001", + "author": { + "name": "Abhinav Maurya" + } } ], - "_id": "60263f80c83c1f89f2863a8a", - "slug": "test", - "title": "Test", - "application": "000000000000000000000001" + "page": { + "type": "number", + "current": 1, + "size": 1, + "item_total": 2, + "has_next": true + } } } ```
+
+ @@ -4064,17 +10260,17 @@ Success. Refer `GetFaqCategoryBySlugSchema` for more details. --- -### getFaqsByCategoryIdOrSlug -Get question and answers within an FAQ category +### getPathRedirectionRule +Get path based redirection rule ```javascript // Promise -const promise = platformClient.application("").content.getFaqsByCategoryIdOrSlug({ idOrSlug : value }); +const promise = platformClient.application("").content.getPathRedirectionRule({ pathId : value }); // Async/Await -const data = await platformClient.application("").content.getFaqsByCategoryIdOrSlug({ idOrSlug : value }); +const data = await platformClient.application("").content.getPathRedirectionRule({ pathId : value }); ``` @@ -4083,42 +10279,47 @@ const data = await platformClient.application("").content.getFaq | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| idOrSlug | string | yes | ID or the slug allotted to an FAQ category. Slug is a short, human-readable, URL-friendly identifier of an object. You can get slug value of an FAQ category from `getFaqCategories` API. | +| pathId | string | yes | ID allotted to the path redirection rule. | -Use this API to retrieve all the commonly asked question and answers belonging to an FAQ category. +Use this API to get path based redirection rule. *Returned Response:* -[GetFaqSchema](#GetFaqSchema) +[PathMappingSchema](#PathMappingSchema) -Success. Refer `GetFaqSchema` for more details. +Success. Refer `PathMappingSchema` for more details.
-  Example: +  Examples: + + +
+  Success ```json { - "faqs": [ - { - "_id": "60265b64e507768b168dee4d", - "question": "question 1", - "answer": "answer 1", - "slug": "question-1", - "application": "000000000000000000000001" - } - ] + "value": { + "_id": "615188e9db1e444cb0f40837", + "application": "000000000000000000000002", + "redirect_from": "/from", + "redirect_to": "/to", + "createdAt": "2021-09-27T09:03:37.053Z", + "updatedAt": "2021-09-27T09:09:25.587Z" + } } ```
+
+ @@ -4130,17 +10331,19 @@ Success. Refer `GetFaqSchema` for more details. --- -### getInjectableTags -Get all the tags in an application +### getPathRedirectionRules +Get path based redirection rules ```javascript // Promise -const promise = platformClient.application("").content.getInjectableTags({ all : value }); +const promise = platformClient.application("").content.getPathRedirectionRules({ pageSize : value, + pageNo : value }); // Async/Await -const data = await platformClient.application("").content.getInjectableTags({ all : value }); +const data = await platformClient.application("").content.getPathRedirectionRules({ pageSize : value, + pageNo : value }); ``` @@ -4149,54 +10352,48 @@ const data = await platformClient.application("").content.getInj | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| all | boolean | no | Get all tags irrespective of the creator of tags | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 5. | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | -Use this API to get the CSS and JS injected in the application in the form of tags. +Use this API to get path based redirection rules. *Returned Response:* -[TagsSchema](#TagsSchema) +[PathMappingSchema](#PathMappingSchema) -Success. Refer `TagsSchema` for more details. +Success. Refer `PathMappingSchema` for more details.
-  Example: +  Examples: + + +
+  Success ```json { - "_id": "601f77e7aa61066feda44487", - "tags": [ - { - "name": "Test", - "sub_type": "external", - "_id": "601f77e7aa61066feda44488", - "type": "js", - "url": "youtube.com/watch?v=AaxFIY-cWH0&list=PL3O3jhFJEElBHFbs6XsOqZAWZLtlEkZTw&index=31", - "position": "head" - }, - { - "name": "Test 2", - "sub_type": "external", - "_id": "601f77e7aa61066feda44489", - "type": "js", - "url": "youtube.com/watch?v=AaxFIY-cWH0&list=PL3O3jhFJEElBHFbs6XsOqZAWZLtlEkZTw&index=31", - "position": "head" - } - ], - "application": "000000000000000000000001", - "__v": 0 + "value": { + "_id": "615188e9db1e444cb0f40837", + "application": "000000000000000000000002", + "redirect_from": "/from", + "redirect_to": "/to", + "createdAt": "2021-09-27T09:03:37.053Z", + "updatedAt": "2021-09-27T09:09:25.587Z" + } } ```
+
+ @@ -4208,42 +10405,34 @@ Success. Refer `TagsSchema` for more details. --- -### getLandingPages -Get landing pages +### getResources +Get resources ```javascript // Promise -const promise = platformClient.application("").content.getLandingPages({ pageNo : value, - pageSize : value }); +const promise = platformClient.content.getResources(); // Async/Await -const data = await platformClient.application("").content.getLandingPages({ pageNo : value, - pageSize : value }); +const data = await platformClient.content.getResources(); ``` -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | -| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | - - -Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch a list of landing pages. +Use this API to retrieve the resources, such as products, collections, customers, selling locations, etc. *Returned Response:* -[LandingPageGetResponse](#LandingPageGetResponse) +[ResourcesSchema](#ResourcesSchema) -Success. Refer `LandingPageGetResponse` for more details. +Success. Returns a JSON object of resources. Refer `ResourcesSchema` for more details. @@ -4253,42 +10442,43 @@ Success. Refer `LandingPageGetResponse` for more details.
-  default +  success ```json { "value": { - "items": [ + "resources": [ { - "date_meta": { - "created_on": "2021-03-12T09:26:12.157Z", - "modified_on": "2021-03-12T09:26:12.157Z" - }, - "platform": [ - "android" - ], - "_id": "604b342e29f19310d8ae9743", - "slug": "landing-page-default-2", - "action": { - "page": { - "type": "default" - }, - "popup": {}, - "type": "page" - }, - "application": "5cd3db5e9d692cfe5302a7bb", - "archived": false, - "_custom_json": {}, - "__v": 0 + "name": "product", + "key": "product", + "definitions_count": 0 + }, + { + "name": "Collection", + "key": "collection", + "definitions_count": 0 + }, + { + "name": "Page", + "key": "page", + "definitions_count": 0 + }, + { + "name": "Blog", + "key": "blog", + "definitions_count": 0 + }, + { + "name": "Customer", + "key": "customer", + "definitions_count": 0 + }, + { + "name": "Store", + "key": "store", + "definitions_count": 0 } - ], - "page": { - "type": "number", - "current": 1, - "size": 1, - "item_total": 2, - "has_next": true - } + ] } } ``` @@ -4307,17 +10497,17 @@ Success. Refer `LandingPageGetResponse` for more details. --- -### getLegalInformation -Get legal information +### getSEOConfiguration +Get SEO configuration of an application ```javascript // Promise -const promise = platformClient.application("").content.getLegalInformation(); +const promise = platformClient.application("").content.getSEOConfiguration(); // Async/Await -const data = await platformClient.application("").content.getLegalInformation(); +const data = await platformClient.application("").content.getSEOConfiguration(); ``` @@ -4325,16 +10515,16 @@ const data = await platformClient.application("").content.getLeg -Use this API to get the legal information of an application, which includes Policy, Terms and Conditions, Shipping Policy and FAQ regarding the application. +Use this API to know how the SEO is configured in the application. This includes the sitemap, robot.txt, custom meta tags, etc. *Returned Response:* -[ApplicationLegal](#ApplicationLegal) +[SeoComponent](#SeoComponent) -Success. Refer `ApplicationLegal` for more details. +Success. Refer `SeoComponent` for more details. @@ -4344,42 +10534,38 @@ Success. Refer `ApplicationLegal` for more details.
-  Success +  default ```json { "value": { - "tnc": "**Terms and Conditions test**", - "policy": "**Privacy policy test**", - "shipping": "**Shipping term and conditions**", - "returns": "**Terms & conditions for returns **", - "_id": "5e8b2b96abe7dc94c02c9ac9", - "application": "000000000000000000000001", - "faq": [ - { - "question": "New Question", - "answer": "New Answer" - }, - { - "question": "New", - "answer": "sdfghjhg" - }, - { - "question": "test", - "answer": "test" - }, - { - "question": "New Test", - "answer": "New Test answer" + "seo": { + "details": { + "title": "Zyosa Zyosa", + "description": "", + "image_url": "" }, - { - "question": "test", - "answer": "test" - } - ], - "created_at": "2020-04-06T13:16:06.818Z", - "updated_at": "2020-07-16T09:47:40.751Z", - "__v": 260 + "robots_txt": "User-agent: * \nAllow: / \nsancisciasn xwsaixjowqnxwsiwjs", + "sitemap_enabled": false, + "cannonical_enabled": false, + "_id": "6009819ee463ad40de397eb2", + "app": "000000000000000000000001", + "created_at": "2021-01-21T13:29:02.543Z", + "updated_at": "2021-02-05T06:36:16.048Z", + "__v": 11, + "custom_meta_tags": [ + { + "name": "test 0000", + "content": "", + "_id": "6017c301bde3c21dbb13b284" + }, + { + "name": "cwdcdc", + "content": "", + "_id": "6017c675bde3c22cfb13b290" + } + ] + } } } ``` @@ -4398,19 +10584,17 @@ Success. Refer `ApplicationLegal` for more details. --- -### getNavigationBySlug -Get a navigation by slug +### getSEOMarkupSchema +Get a particular SEO Markup schema of an application using its id ```javascript // Promise -const promise = platformClient.application("").content.getNavigationBySlug({ slug : value, - devicePlatform : value }); +const promise = platformClient.application("").content.getSEOMarkupSchema({ id : value }); // Async/Await -const data = await platformClient.application("").content.getNavigationBySlug({ slug : value, - devicePlatform : value }); +const data = await platformClient.application("").content.getSEOMarkupSchema({ id : value }); ``` @@ -4419,222 +10603,95 @@ const data = await platformClient.application("").content.getNav | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| slug | string | yes | A short, human-readable, URL-friendly identifier of a navigation. You can get slug value of a navigation from `getNavigations` API. | -| devicePlatform | string | yes | Filter navigations by platform. Acceptable values are: web, android, ios, all | +| id | string | yes | Alphanumeric ID allotted to a SEO Markup Schema Template created within a business. | -Use this API to retrieve a navigation by its slug. +Use this API to get a existing SEO Markup schema an application *Returned Response:* -[NavigationSchema](#NavigationSchema) - -Success. Refer `NavigationSchema` for more details. - +[SEOSchemaMarkupTemplate](#SEOSchemaMarkupTemplate) +Success. Refer `SEOSchemaMarkupTemplate` for more details. -
-  Examples:
-  default +  Example: ```json -{ - "value": { - "_id": "5ffbd9b90ac98678ae0458d7", - "application": "000000000000000000000001", - "_custom_json": null, - "name": "test-nav", - "slug": "test-nav", - "platform": [ - "ios", - "android" - ], - "orientation": { - "portrait": [ - "left" - ] - }, - "navigation": [ - { - "display": "Home", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/", - "type": "home" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - }, - "sub_navigation": [ - { - "display": "Brands", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/brands/", - "type": "brands" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - } - } - ] - }, - { - "display": "Collections", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", - "sort_order": 2, - "type": "", - "action": { - "page": { - "url": "/collections/", - "type": "collections" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - }, - "sub_navigation": [ - { - "display": "Categories", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/categories/", - "type": "categories" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - } - } - ] - }, - { - "display": "Primary Menu", - "image": "", - "sort_order": 3, - "type": "", - "action": { - "page": { - "type": "home" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - } - } - ], - "created_by": { - "id": "000000000000000000000000" - }, - "date_meta": { - "created_on": "2021-01-11T04:53:13.585Z", - "modified_on": "2021-01-14T10:24:34.485Z" - }, - "archived": false - } -} + ```
+ + + + + + + + +--- + + +### getSEOMarkupSchemas +Get SEO Markup schemas of an application + + + +```javascript +// Promise +const promise = platformClient.application("").content.getSEOMarkupSchemas({ title : value, + active : value, + pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.application("").content.getSEOMarkupSchemas({ title : value, + active : value, + pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| title | string | no | Title of the seo schema. | +| active | string | no | Boolean value for fetching seo schema. | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | + + + +Use this API to get all SEO Markup schema Templates setup for an application + +*Returned Response:* + + + + +[SeoSchemaComponent](#SeoSchemaComponent) + +Success. Refer `SeoSchemaComponent` for more details. + + + + +
+  Example: + +```json + +```
@@ -4648,21 +10705,19 @@ Success. Refer `NavigationSchema` for more details. --- -### getNavigations -Get navigations +### getSlideshowBySlug +Get slideshow by slug ```javascript // Promise -const promise = platformClient.application("").content.getNavigations({ devicePlatform : value, - pageNo : value, - pageSize : value }); +const promise = platformClient.application("").content.getSlideshowBySlug({ slug : value, + devicePlatform : value }); // Async/Await -const data = await platformClient.application("").content.getNavigations({ devicePlatform : value, - pageNo : value, - pageSize : value }); +const data = await platformClient.application("").content.getSlideshowBySlug({ slug : value, + devicePlatform : value }); ``` @@ -4671,22 +10726,21 @@ const data = await platformClient.application("").content.getNav | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| devicePlatform | string | yes | Filter navigations by platform. Acceptable values are: web, android, ios, all | -| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | -| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | +| slug | string | yes | A short, human-readable, URL-friendly identifier of a slideshow. You can get slug value of a page from `getSlideshows` API. | +| devicePlatform | string | yes | Filter slideshows by platform. Acceptable values are: web, android, ios and all | -Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the orientation, links, sub-navigations, etc. +Use this API to retrieve the details of a slideshow by its slug. *Returned Response:* -[NavigationGetResponse](#NavigationGetResponse) +[SlideshowSchema](#SlideshowSchema) -Success. Refer `NavigationGetResponse` for more details. +Success. Refer `SlideshowSchema` for more details. @@ -4701,192 +10755,44 @@ Success. Refer `NavigationGetResponse` for more details. ```json { "value": { - "items": [ + "date_meta": { + "created_on": "2021-03-14T05:27:12.319Z", + "modified_on": "2021-03-14T05:27:12.319Z" + }, + "archived": false, + "_id": "604d9eb975e9d136bb1b8b83", + "configuration": { + "start_on_launch": false, + "duration": 50, + "sleep_time": 100, + "slide_direction": "horizontal" + }, + "slug": "ss-sfsd-updated", + "platform": "ios", + "media": [ { - "_id": "5ffbd9b90ac98678ae0458d7", - "application": "000000000000000000000001", - "_custom_json": null, - "name": "temp", - "slug": "temp", - "platform": "web", - "position": "top", - "orientation": "landscape", - "navigation": [ - { - "display": "Home", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/mystore-tab_y0dqzt.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/", - "type": "home" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - }, - "sub_navigation": [ - { - "display": "Brands", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/brands/", - "type": "brands" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - } - } - ] - }, - { - "display": "Collections", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/collections-tab_a0tg9c.png", - "sort_order": 2, - "type": "", - "action": { - "page": { - "url": "/collections/", - "type": "collections" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - }, - "sub_navigation": [ - { - "display": "Categories", - "image": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148154/production/system/icons/categories-tab_ss8e0q.png", - "sort_order": 1, - "type": "", - "action": { - "page": { - "url": "/categories/", - "type": "categories" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - } - } - ] - }, - { - "display": "Primary Menu", - "image": "", - "sort_order": 3, - "type": "", - "action": { - "page": { - "type": "home" - }, - "popup": {}, - "type": "page" - }, - "active": true, - "tags": null, - "acl": [ - "all" - ], - "_locale_language": { - "hi": { - "display": "" - }, - "ar": { - "display": "" - }, - "en_us": { - "display": "" - } - } - } - ], - "created_by": { - "id": "000000000000000000000000" - }, - "date_meta": { - "created_on": "2021-01-11T04:53:13.585Z", - "modified_on": "2021-01-14T10:24:34.485Z" + "auto_decide_duration": false, + "type": "image", + "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "bg_color": "#ffffff", + "duration": 10, + "action": { + "type": "" + } + }, + { + "auto_decide_duration": true, + "type": "youtube", + "url": "https://www.youtube.com/embed/9vJRopau0g0", + "bg_color": "#ffffff", + "duration": 909, + "action": { + "type": "" } } ], - "page": { - "type": "number", - "current": 1, - "size": 1, - "item_total": 2, - "has_next": true - } + "application": "5cd3db5e9d692cfe5302a7bb", + "active": true } } ``` @@ -4905,17 +10811,21 @@ Success. Refer `NavigationGetResponse` for more details. --- -### getPageBySlug -Get page by slug - +### getSlideshows +Get slideshows + ```javascript // Promise -const promise = platformClient.application("").content.getPageBySlug({ slug : value }); +const promise = platformClient.application("").content.getSlideshows({ devicePlatform : value, + pageNo : value, + pageSize : value }); // Async/Await -const data = await platformClient.application("").content.getPageBySlug({ slug : value }); +const data = await platformClient.application("").content.getSlideshows({ devicePlatform : value, + pageNo : value, + pageSize : value }); ``` @@ -4924,20 +10834,22 @@ const data = await platformClient.application("").content.getPag | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| slug | string | yes | A short, human-readable, URL-friendly identifier of a page. You can get slug value of a page from `getPages` API. | +| devicePlatform | string | yes | Filter slideshows by platform. Acceptable values are: web, android, ios and all | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | -Use this API to retrieve the components of a page, such as its title, seo, publish status, feature image, tags, schedule, etc. +A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a list of slideshows. *Returned Response:* -[PageSchema](#PageSchema) +[SlideshowGetResponse](#SlideshowGetResponse) -Success. Returns a JSON object of components. Refer `PageSchema` for more details. +Success. Refer `SlideshowGetResponse` for more details. @@ -4952,59 +10864,56 @@ Success. Returns a JSON object of components. Refer `PageSchema` for more detail ```json { "value": { - "date_meta": { - "created_on": "2021-03-16T08:24:19.197Z", - "modified_on": "2021-03-16T08:24:19.197Z" - }, - "tags": [ - "my first page" - ], - "published": true, - "component_ids": [], - "archived": false, - "_id": "60506dcad18cb33946026862", - "title": "my first page", - "slug": "1st_page", - "feature_image": { - "secure_url": "https://google.com/some-image" - }, - "content": [ - { - "type": "html", - "value": "
Emtpy Page. Create Page here.
hello there!
how are you doing

" - }, - { - "type": "css", - "value": "* { box-sizing: border-box; } body {margin: 0;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}*{box-sizing:border-box;}body{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;}#icfm{text-align:center;padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px;}#izu5{padding-top:10px;padding-right:10px;padding-bottom:10px;padding-left:10px;}#ibgj{color:black;}#izzl{float:none;display:flex;}.aa{float:right;}" - }, + "items": [ { - "type": "js", - "value": "" + "date_meta": { + "created_on": "2021-03-14T05:27:12.319Z", + "modified_on": "2021-03-14T05:27:12.319Z" + }, + "archived": false, + "_id": "604d9eb975e9d136bb1b8b83", + "configuration": { + "start_on_launch": false, + "duration": 50, + "sleep_time": 100, + "slide_direction": "horizontal" + }, + "slug": "ss-sfsd-updated", + "platform": "ios", + "media": [ + { + "auto_decide_duration": false, + "type": "image", + "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "bg_color": "#ffffff", + "duration": 10, + "action": { + "type": "" + } + }, + { + "auto_decide_duration": true, + "type": "youtube", + "url": "https://www.youtube.com/embed/9vJRopau0g0", + "bg_color": "#ffffff", + "duration": 909, + "action": { + "type": "" + } + } + ], + "application": "5cd3db5e9d692cfe5302a7bb", + "active": true, + "__v": 0 } ], - "content_path": "https://hdn-1.fynd.com/company/1526/applications/61012f6a9250ccd1b9ef8a1d/pages/content/page_slug.html", - "platform": "web", - "description": "hey this is my first page", - "visibility": { - "test": true - }, - "_schedule": { - "start": "2021-04-23T23:50:00.000Z", - "next_schedule": [ - {} - ] - }, - "seo": { - "title": "my first page", - "description": "hey this is my first page", - "image": { - "url": "" - } - }, - "type": "rawhtml", - "application": "000000000000000000000001", - "orientation": "portrait", - "page_meta": [] + "page": { + "type": "number", + "current": 1, + "size": 1, + "item_total": 2, + "has_next": true + } } } ``` @@ -5023,17 +10932,17 @@ Success. Returns a JSON object of components. Refer `PageSchema` for more detail --- -### getPageMeta -Get page meta +### getSupportInformation +Get support information ```javascript // Promise -const promise = platformClient.application("").content.getPageMeta(); +const promise = platformClient.application("").content.getSupportInformation(); // Async/Await -const data = await platformClient.application("").content.getPageMeta(); +const data = await platformClient.application("").content.getSupportInformation(); ``` @@ -5041,16 +10950,16 @@ const data = await platformClient.application("").content.getPag -Use this API to get the meta of custom pages (blog, page) and default system pages (e.g. home/brand/category/collection). +Use this API to get the contact details for customer support, including emails and phone numbers. *Returned Response:* -[PageMetaSchema](#PageMetaSchema) +[Support](#Support) -Success. Refer `PageMetaSchema` for more details. +Success. Refer `Support` for more details. @@ -5065,59 +10974,28 @@ Success. Refer `PageMetaSchema` for more details. ```json { "value": { - "application_id": "000000000000000000000001", - "system_pages": [ - { - "display": "Home", - "action": { - "page": { - "type": "home" - }, - "type": "page" - }, - "page_type": "home" - }, - { - "display": "Brands", - "action": { - "page": { - "type": "brands" - }, - "type": "page" - }, - "page_type": "brands" - }, - { - "display": "Collections", - "action": { - "page": { - "type": "collections" - }, - "type": "page" - }, - "page_type": "collections" - }, - { - "display": "Categories", - "action": { - "page": { - "type": "categories" - }, - "type": "page" - }, - "page_type": "categories" - } - ], - "custom_pages": [ - { - "display": "my first page", - "slug": "first_page" + "_id": "5ea4980b87a7944094216193", + "config_type": "app", + "application": "000000000000000000000001", + "created_at": "2020-04-25T20:05:31.300Z", + "updated_at": "2020-12-04T10:48:12.194Z", + "contact": { + "phone": { + "active": true, + "phone": [ + { + "key": "Jane Doe", + "code": "91", + "number": "9988776655" + } + ] }, - { - "display": "my second page", - "slug": "second_page" + "email": { + "active": false, + "email": [] } - ] + }, + "created": true } } ``` @@ -5136,34 +11014,41 @@ Success. Refer `PageMetaSchema` for more details. --- -### getPageSpec -Get page spec +### importAppCustomObjectEntries +Bulk custom object entries upload ```javascript // Promise -const promise = platformClient.application("").content.getPageSpec(); +const promise = platformClient.application("").content.importAppCustomObjectEntries({ definitionId : value, + body : value }); // Async/Await -const data = await platformClient.application("").content.getPageSpec(); +const data = await platformClient.application("").content.importAppCustomObjectEntries({ definitionId : value, + body : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | +| body | [CustomObjectBulkSchema](#CustomObjectBulkSchema) | yes | Request body | -Use this API to get the specifications of a page, such as page type, display name, params and query. + +Use this API to upload custom object entries *Returned Response:* -[PageSpec](#PageSpec) +[CustomObjectEntryBulkUploadResponse](#CustomObjectEntryBulkUploadResponse) -Success. Refer `PageSpec` for more details. +Success. Returns confirmation that the upload has started @@ -5173,36 +11058,13 @@ Success. Refer `PageSpec` for more details.
-  default +  success ```json { "value": { - "specifications": [ - { - "page_type": "home", - "display_name": "Home", - "params": [], - "query": [] - }, - { - "page_type": "collections", - "display_name": "Collections", - "params": [], - "query": [] - }, - { - "page_type": "collection", - "display_name": "Collection", - "params": [ - { - "key": "slug", - "required": true - } - ], - "query": [] - } - ] + "message": "Bulk upload of Meta objects started successfully", + "task_id": "6570124da20cc45d3f2582a7" } } ``` @@ -5221,42 +11083,41 @@ Success. Refer `PageSpec` for more details. --- -### getPages -Get a list of pages +### importCustomObjectEntries +Bulk custom object entries upload ```javascript // Promise -const promise = platformClient.application("").content.getPages({ pageNo : value, - pageSize : value }); +const promise = platformClient.content.importCustomObjectEntries({ definitionId : value, + body : value }); // Async/Await -const data = await platformClient.application("").content.getPages({ pageNo : value, - pageSize : value }); +const data = await platformClient.content.importCustomObjectEntries({ definitionId : value, + body : value }); ``` -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | -| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | - - +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | +| body | [CustomObjectBulkSchema](#CustomObjectBulkSchema) | yes | Request body | -Use this API to retrieve a list of pages. + +Use this API to upload custom object entries *Returned Response:* -[PageGetResponse](#PageGetResponse) +[CustomObjectEntryBulkUploadResponse](#CustomObjectEntryBulkUploadResponse) -Success. Refer `PageGetResponse` for more details. +Success. Returns confirmation that the upload has started @@ -5266,55 +11127,13 @@ Success. Refer `PageGetResponse` for more details.
-  default +  success ```json { "value": { - "items": [ - { - "date_meta": { - "created_on": "2021-03-14T06:49:03.945Z", - "modified_on": "2021-03-14T06:49:03.945Z" - }, - "tags": [ - "my first page" - ], - "_id": "604db275b3ae202873964d94", - "content_path": "https://hdn-1.fynd.com/company/1526/applications/61012f6a9250ccd1b9ef8a1d/pages/content/page_slug.html", - "title": "test-page", - "slug": "test-page", - "published": true, - "_schedule": { - "next_schedule": [ - {} - ], - "start": "2021-04-08T07:15:13.000Z", - "end": "2021-04-10T02:00:00.000Z" - }, - "feature_image": { - "secure_url": "https://google.com/some-image" - }, - "seo": { - "title": "my first page", - "description": "hey this is my first page", - "image": { - "url": "" - } - }, - "application": "000000000000000000000001", - "author": { - "name": "Abhinav Maurya" - } - } - ], - "page": { - "type": "number", - "current": 1, - "size": 1, - "item_total": 2, - "has_next": true - } + "message": "Bulk upload of Meta objects started successfully", + "task_id": "6570124da20cc45d3f2582a7" } } ``` @@ -5333,17 +11152,17 @@ Success. Refer `PageGetResponse` for more details. --- -### getPathRedirectionRule -Get path based redirection rule +### removeInjectableTag +Remove a tag ```javascript // Promise -const promise = platformClient.application("").content.getPathRedirectionRule({ pathId : value }); +const promise = platformClient.application("").content.removeInjectableTag({ body : value }); // Async/Await -const data = await platformClient.application("").content.getPathRedirectionRule({ pathId : value }); +const data = await platformClient.application("").content.removeInjectableTag({ body : value }); ``` @@ -5351,48 +11170,34 @@ const data = await platformClient.application("").content.getPat | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pathId | string | yes | ID allotted to the path redirection rule. | - +| --------- | ----- | -------- | ----------- | +| body | [RemoveHandpickedSchema](#RemoveHandpickedSchema) | yes | Request body | -Use this API to get path based redirection rule. +Use this API to delete an existing tag. *Returned Response:* -[PathMappingSchema](#PathMappingSchema) - -Success. Refer `PathMappingSchema` for more details. - +[TagDeleteSuccessResponse](#TagDeleteSuccessResponse) +Success. -
-  Examples:
-  Success +  Example: ```json { - "value": { - "_id": "615188e9db1e444cb0f40837", - "application": "000000000000000000000002", - "redirect_from": "/from", - "redirect_to": "/to", - "createdAt": "2021-09-27T09:03:37.053Z", - "updatedAt": "2021-09-27T09:09:25.587Z" - } + "success": true } ```
-
- @@ -5404,19 +11209,19 @@ Success. Refer `PathMappingSchema` for more details. --- -### getPathRedirectionRules -Get path based redirection rules +### resetDataLoader +Reset a data loader by serive name and operation Id ```javascript // Promise -const promise = platformClient.application("").content.getPathRedirectionRules({ pageSize : value, - pageNo : value }); +const promise = platformClient.application("").content.resetDataLoader({ service : value, + operationId : value }); // Async/Await -const data = await platformClient.application("").content.getPathRedirectionRules({ pageSize : value, - pageNo : value }); +const data = await platformClient.application("").content.resetDataLoader({ service : value, + operationId : value }); ``` @@ -5424,49 +11229,36 @@ const data = await platformClient.application("").content.getPat | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageSize | number | no | The number of items to retrieve in each page. Default value is 5. | -| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | +| --------- | ----- | -------- | ----------- | +| service | string | yes | Name of service. | +| operationId | string | yes | Name of operation id of the service. | -Use this API to get path based redirection rules. +Use this API to reselect a data loader. *Returned Response:* -[PathMappingSchema](#PathMappingSchema) - -Success. Refer `PathMappingSchema` for more details. - +[DataLoaderResetResponseSchema](#DataLoaderResetResponseSchema) +Success. -
-  Examples:
-  Success +  Example: ```json { - "value": { - "_id": "615188e9db1e444cb0f40837", - "application": "000000000000000000000002", - "redirect_from": "/from", - "redirect_to": "/to", - "createdAt": "2021-09-27T09:03:37.053Z", - "updatedAt": "2021-09-27T09:09:25.587Z" - } + "reset": true } ```
-
- @@ -5478,34 +11270,39 @@ Success. Refer `PathMappingSchema` for more details. --- -### getSEOConfiguration -Get SEO configuration of an application +### sampleAppCustomObjectBulkEntry +download sample for custom object bulk entry ```javascript // Promise -const promise = platformClient.application("").content.getSEOConfiguration(); +const promise = platformClient.application("").content.sampleAppCustomObjectBulkEntry({ definitionId : value }); // Async/Await -const data = await platformClient.application("").content.getSEOConfiguration(); +const data = await platformClient.application("").content.sampleAppCustomObjectBulkEntry({ definitionId : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | -Use this API to know how the SEO is configured in the application. This includes the sitemap, robot.txt, custom meta tags, etc. + + +Use this api to get sample csv file *Returned Response:* -[SeoComponent](#SeoComponent) +[string](#string) -Success. Refer `SeoComponent` for more details. +Success. Get headers of custom object definition @@ -5515,39 +11312,11 @@ Success. Refer `SeoComponent` for more details.
-  default +  success ```json { - "value": { - "seo": { - "details": { - "title": "Zyosa Zyosa", - "description": "", - "image_url": "" - }, - "robots_txt": "User-agent: * \nAllow: / \nsancisciasn xwsaixjowqnxwsiwjs", - "sitemap_enabled": false, - "cannonical_enabled": false, - "_id": "6009819ee463ad40de397eb2", - "app": "000000000000000000000001", - "created_at": "2021-01-21T13:29:02.543Z", - "updated_at": "2021-02-05T06:36:16.048Z", - "__v": 11, - "custom_meta_tags": [ - { - "name": "test 0000", - "content": "", - "_id": "6017c301bde3c21dbb13b284" - }, - { - "name": "cwdcdc", - "content": "", - "_id": "6017c675bde3c22cfb13b290" - } - ] - } - } + "value": "city,mobile,name,custom_object_status" } ```
@@ -5565,19 +11334,17 @@ Success. Refer `SeoComponent` for more details. --- -### getSlideshowBySlug -Get slideshow by slug +### sampleCustomObjectBulkEntry +download sample for custom object bulk entry ```javascript // Promise -const promise = platformClient.application("").content.getSlideshowBySlug({ slug : value, - devicePlatform : value }); +const promise = platformClient.content.sampleCustomObjectBulkEntry({ definitionId : value }); // Async/Await -const data = await platformClient.application("").content.getSlideshowBySlug({ slug : value, - devicePlatform : value }); +const data = await platformClient.content.sampleCustomObjectBulkEntry({ definitionId : value }); ``` @@ -5586,21 +11353,20 @@ const data = await platformClient.application("").content.getSli | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| slug | string | yes | A short, human-readable, URL-friendly identifier of a slideshow. You can get slug value of a page from `getSlideshows` API. | -| devicePlatform | string | yes | Filter slideshows by platform. Acceptable values are: web, android, ios and all | +| definitionId | string | yes | | -Use this API to retrieve the details of a slideshow by its slug. +Use this api to get sample csv file *Returned Response:* -[SlideshowSchema](#SlideshowSchema) +[string](#string) -Success. Refer `SlideshowSchema` for more details. +Success. Get headers of custom object definition @@ -5610,56 +11376,81 @@ Success. Refer `SlideshowSchema` for more details.
-  default +  success ```json { - "value": { - "date_meta": { - "created_on": "2021-03-14T05:27:12.319Z", - "modified_on": "2021-03-14T05:27:12.319Z" - }, - "archived": false, - "_id": "604d9eb975e9d136bb1b8b83", - "configuration": { - "start_on_launch": false, - "duration": 50, - "sleep_time": 100, - "slide_direction": "horizontal" - }, - "slug": "ss-sfsd-updated", - "platform": "ios", - "media": [ - { - "auto_decide_duration": false, - "type": "image", - "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "bg_color": "#ffffff", - "duration": 10, - "action": { - "type": "" - } - }, - { - "auto_decide_duration": true, - "type": "youtube", - "url": "https://www.youtube.com/embed/9vJRopau0g0", - "bg_color": "#ffffff", - "duration": 909, - "action": { - "type": "" - } - } - ], - "application": "5cd3db5e9d692cfe5302a7bb", - "active": true - } + "value": "city,mobile,name,custom_object_status" +} +``` +
+ +
+ + + + + + + + + +--- + + +### selectDataLoader +Select a data loader by id + + + +```javascript +// Promise +const promise = platformClient.application("").content.selectDataLoader({ dataLoaderId : value }); + +// Async/Await +const data = await platformClient.application("").content.selectDataLoader({ dataLoaderId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| dataLoaderId | string | yes | ID allotted to the data loader. | + + + +Use this API to select a data loader to be used in applications. + +*Returned Response:* + + + + +[DataLoaderResponseSchema](#DataLoaderResponseSchema) + +Success. + + + + +
+  Example: + +```json +{ + "_id": "601f77e7aa61066feda44487", + "name": "Search API from Algolia", + "service": "catalog", + "operation_id": "fetchSuggestions", + "type": "url", + "application": "000000000000000000000001", + "__v": 0 } ```
-
- @@ -5671,21 +11462,19 @@ Success. Refer `SlideshowSchema` for more details. --- -### getSlideshows -Get slideshows +### updateAnnouncement +Update an announcement ```javascript // Promise -const promise = platformClient.application("").content.getSlideshows({ devicePlatform : value, - pageNo : value, - pageSize : value }); +const promise = platformClient.application("").content.updateAnnouncement({ announcementId : value, + body : value }); // Async/Await -const data = await platformClient.application("").content.getSlideshows({ devicePlatform : value, - pageNo : value, - pageSize : value }); +const data = await platformClient.application("").content.updateAnnouncement({ announcementId : value, + body : value }); ``` @@ -5694,22 +11483,20 @@ const data = await platformClient.application("").content.getSli | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| devicePlatform | string | yes | Filter slideshows by platform. Acceptable values are: web, android, ios and all | -| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | -| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | - +| announcementId | string | yes | ID allotted to the announcement. | +| body | [AdminAnnouncementSchema](#AdminAnnouncementSchema) | yes | Request body | -A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a list of slideshows. +Use this API to edit an existing announcement and its details such as the target platform and pages on which it's applicable *Returned Response:* -[SlideshowGetResponse](#SlideshowGetResponse) +[CreateAnnouncementSchema](#CreateAnnouncementSchema) -Success. Refer `SlideshowGetResponse` for more details. +Success. Refer `CreateAnnouncementSchema` for more details. @@ -5719,60 +11506,55 @@ Success. Refer `SlideshowGetResponse` for more details.
-  default +  success ```json { "value": { - "items": [ - { - "date_meta": { - "created_on": "2021-03-14T05:27:12.319Z", - "modified_on": "2021-03-14T05:27:12.319Z" - }, - "archived": false, - "_id": "604d9eb975e9d136bb1b8b83", - "configuration": { - "start_on_launch": false, - "duration": 50, - "sleep_time": 100, - "slide_direction": "horizontal" - }, - "slug": "ss-sfsd-updated", - "platform": "ios", - "media": [ - { - "auto_decide_duration": false, - "type": "image", - "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "bg_color": "#ffffff", - "duration": 10, - "action": { - "type": "" - } - }, + "message": "Successfully updated announcement", + "data": { + "value": { + "platforms": [ + "web", + "android", + "ios" + ], + "_id": "6026283125f06a827dc1a5cc", + "title": "test", + "announcement": "

test123

\n", + "pages": [ { - "auto_decide_duration": true, - "type": "youtube", - "url": "https://www.youtube.com/embed/9vJRopau0g0", - "bg_color": "#ffffff", - "duration": 909, - "action": { - "type": "" - } + "page_slug": "$all", + "type": "custom" } ], - "application": "5cd3db5e9d692cfe5302a7bb", - "active": true, - "__v": 0 + "editor_meta": { + "foreground_color": "#000", + "background_color": "#fff", + "content_type": "markdown", + "content": "test" + }, + "_schedule": { + "published": true, + "next_schedule": [ + { + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z" + } + ], + "cron": null, + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z", + "duration": null + }, + "app": "000000000000000000000001", + "author": { + "created_by": "5e199e6998cfe1776f1385dc", + "modified_by": "5e199e6998cfe1776f1385dc" + }, + "created_at": "2021-02-12T07:03:13.503Z", + "modified_at": "2021-02-12T07:05:57.020Z" } - ], - "page": { - "type": "number", - "current": 1, - "size": 1, - "item_total": 2, - "has_next": true } } } @@ -5792,34 +11574,41 @@ Success. Refer `SlideshowGetResponse` for more details. --- -### getSupportInformation -Get support information +### updateAnnouncementSchedule +Update the schedule and the publish status of an announcement ```javascript // Promise -const promise = platformClient.application("").content.getSupportInformation(); +const promise = platformClient.application("").content.updateAnnouncementSchedule({ announcementId : value, + body : value }); // Async/Await -const data = await platformClient.application("").content.getSupportInformation(); +const data = await platformClient.application("").content.updateAnnouncementSchedule({ announcementId : value, + body : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| announcementId | string | yes | ID allotted to the announcement. | +| body | [ScheduleSchema](#ScheduleSchema) | yes | Request body | + -Use this API to get the contact details for customer support, including emails and phone numbers. +Use this API to edit the duration, i.e. start date-time and end date-time of an announcement. Moreover, you can enable/disable an announcement using this API. *Returned Response:* -[Support](#Support) +[CreateAnnouncementSchema](#CreateAnnouncementSchema) -Success. Refer `Support` for more details. +Success. Refer `CreateAnnouncementSchema` for more details. @@ -5829,33 +11618,56 @@ Success. Refer `Support` for more details.
-  default +  success ```json { "value": { - "_id": "5ea4980b87a7944094216193", - "config_type": "app", - "application": "000000000000000000000001", - "created_at": "2020-04-25T20:05:31.300Z", - "updated_at": "2020-12-04T10:48:12.194Z", - "contact": { - "phone": { - "active": true, - "phone": [ + "message": "Announcement unpublished", + "data": { + "value": { + "platforms": [ + "web", + "android", + "ios" + ], + "_id": "6026283125f06a827dc1a5cc", + "title": "test", + "announcement": "

test123

\n", + "pages": [ { - "key": "Jane Doe", - "code": "91", - "number": "9988776655" + "page_slug": "$all", + "type": "custom" } - ] - }, - "email": { - "active": false, - "email": [] + ], + "editor_meta": { + "foreground_color": "#000", + "background_color": "#fff", + "content_type": "markdown", + "content": "test" + }, + "_schedule": { + "published": false, + "next_schedule": [ + { + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z" + } + ], + "cron": null, + "start": "2021-02-10T20:40:00.000Z", + "end": "2021-02-18T22:00:00.000Z", + "duration": null + }, + "app": "000000000000000000000001", + "author": { + "created_by": "5e199e6998cfe1776f1385dc", + "modified_by": "5e199e6998cfe1776f1385dc" + }, + "created_at": "2021-02-12T07:03:13.503Z", + "modified_at": "2021-02-12T07:05:57.020Z" } - }, - "created": true + } } } ``` @@ -5874,17 +11686,19 @@ Success. Refer `Support` for more details. --- -### removeInjectableTag -Remove a tag +### updateAppCustomFieldDefinition +Update custom field definition ```javascript // Promise -const promise = platformClient.application("").content.removeInjectableTag({ body : value }); +const promise = platformClient.application("").content.updateAppCustomFieldDefinition({ definitionId : value, + body : value }); // Async/Await -const data = await platformClient.application("").content.removeInjectableTag({ body : value }); +const data = await platformClient.application("").content.updateAppCustomFieldDefinition({ definitionId : value, + body : value }); ``` @@ -5892,34 +11706,60 @@ const data = await platformClient.application("").content.remove | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [RemoveHandpickedSchema](#RemoveHandpickedSchema) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| definitionId | string | yes | | +| body | [CustomFieldDefinitionRequestSchema](#CustomFieldDefinitionRequestSchema) | yes | Request body | -Use this API to delete an existing tag. +Use this API to update a custom field definition for your application. *Returned Response:* -[TagDeleteSuccessResponse](#TagDeleteSuccessResponse) +[CustomFieldDefinitionDetailResSchema](#CustomFieldDefinitionDetailResSchema) -Success. +Custom field definition created.
-  Example: +  Examples: + + +
+  success ```json { - "success": true + "value": { + "creator": "application", + "resource": "product", + "name": "name", + "namespace": "fname", + "key": "fname", + "description": "First name", + "type": "string_single_line", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "created_by": "000000000000000000000001", + "updated_by": "000000000000000000000001", + "required": false, + "is_deleted": false, + "_id": "65369654d436ae0e54147e7b", + "validations": [], + "created_at": "2023-10-23T15:50:44.143Z", + "updated_at": "2023-10-23T15:50:44.143Z" + } } ```
+
+ @@ -5931,19 +11771,19 @@ Success. --- -### resetDataLoader -Reset a data loader by serive name and operation Id +### updateAppCustomObject +Update custom object details ```javascript // Promise -const promise = platformClient.application("").content.resetDataLoader({ service : value, - operationId : value }); +const promise = platformClient.application("").content.updateAppCustomObject({ metaobjectId : value, + body : value }); // Async/Await -const data = await platformClient.application("").content.resetDataLoader({ service : value, - operationId : value }); +const data = await platformClient.application("").content.updateAppCustomObject({ metaobjectId : value, + body : value }); ``` @@ -5952,35 +11792,93 @@ const data = await platformClient.application("").content.resetD | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| service | string | yes | Name of service. | -| operationId | string | yes | Name of operation id of the service. | - +| metaobjectId | string | yes | | +| body | [CustomObjectRequestSchema](#CustomObjectRequestSchema) | yes | Request body | -Use this API to reselect a data loader. +Use this API to update a custom object detail for your application. *Returned Response:* -[DataLoaderResetResponseSchema](#DataLoaderResetResponseSchema) +[CustomObjectByIdSchema](#CustomObjectByIdSchema) -Success. +Custom field definition created.
-  Example: +  Examples: + + +
+  success ```json { - "reset": true + "value": { + "_id": "656d67de766f95113450917b", + "name": "Designer", + "type": "designer", + "display_name_key": "name", + "description": "", + "creator": "company", + "created_by": "9759643b65ebc6bacb5275f5", + "updated_by": "bd7223b6727eb087987eece7", + "field_definitions": [ + { + "creator": "company", + "resource": "metaobject", + "name": "city2", + "namespace": "designer", + "key": "city", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "mobile", + "namespace": "designer", + "key": "mobile", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "name", + "namespace": "designer", + "key": "name", + "type": "string_single_line", + "description": "This is name of designer", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": true + } + ] + } } ```
+
+ @@ -5992,17 +11890,19 @@ Success. --- -### selectDataLoader -Select a data loader by id +### updateAppCustomObjectDefinition +Update custom object definition ```javascript // Promise -const promise = platformClient.application("").content.selectDataLoader({ dataLoaderId : value }); +const promise = platformClient.application("").content.updateAppCustomObjectDefinition({ definitionId : value, + body : value }); // Async/Await -const data = await platformClient.application("").content.selectDataLoader({ dataLoaderId : value }); +const data = await platformClient.application("").content.updateAppCustomObjectDefinition({ definitionId : value, + body : value }); ``` @@ -6011,40 +11911,93 @@ const data = await platformClient.application("").content.select | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| dataLoaderId | string | yes | ID allotted to the data loader. | +| definitionId | string | yes | | +| body | [CustomObjectDefinitionUpdateRequestSchema](#CustomObjectDefinitionUpdateRequestSchema) | yes | Request body | - -Use this API to select a data loader to be used in applications. +Use this API to update a custom object definition for your application. *Returned Response:* -[DataLoaderResponseSchema](#DataLoaderResponseSchema) +[CustomObjectDefinitionSchema](#CustomObjectDefinitionSchema) -Success. +Custom field definition updated.
-  Example: +  Examples: + + +
+  success ```json { - "_id": "601f77e7aa61066feda44487", - "name": "Search API from Algolia", - "service": "catalog", - "operation_id": "fetchSuggestions", - "type": "url", - "application": "000000000000000000000001", - "__v": 0 + "value": { + "_id": "656d67de766f95113450917b", + "name": "Designer", + "type": "designer", + "display_name_key": "name", + "description": "", + "creator": "company", + "created_by": "9759643b65ebc6bacb5275f5", + "updated_by": "bd7223b6727eb087987eece7", + "field_definitions": [ + { + "creator": "company", + "resource": "metaobject", + "name": "city2", + "namespace": "designer", + "key": "city", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "mobile", + "namespace": "designer", + "key": "mobile", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "name", + "namespace": "designer", + "key": "name", + "type": "string_single_line", + "description": "This is name of designer", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": true + } + ] + } } ```
+
+ @@ -6056,18 +12009,18 @@ Success. --- -### updateAnnouncement -Update an announcement +### updateBlog +Update a blog ```javascript // Promise -const promise = platformClient.application("").content.updateAnnouncement({ announcementId : value, +const promise = platformClient.application("").content.updateBlog({ id : value, body : value }); // Async/Await -const data = await platformClient.application("").content.updateAnnouncement({ announcementId : value, +const data = await platformClient.application("").content.updateBlog({ id : value, body : value }); ``` @@ -6077,20 +12030,20 @@ const data = await platformClient.application("").content.update | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| announcementId | string | yes | ID allotted to the announcement. | -| body | [AdminAnnouncementSchema](#AdminAnnouncementSchema) | yes | Request body | +| id | string | yes | ID allotted to the blog. | +| body | [BlogRequest](#BlogRequest) | yes | Request body | -Use this API to edit an existing announcement and its details such as the target platform and pages on which it's applicable +Use this API to update the details of an existing blog which includes title, feature image, content, SEO details, expiry, etc. *Returned Response:* -[CreateAnnouncementSchema](#CreateAnnouncementSchema) +[BlogSchema](#BlogSchema) -Success. Refer `CreateAnnouncementSchema` for more details. +Success. @@ -6100,55 +12053,46 @@ Success. Refer `CreateAnnouncementSchema` for more details.
-  success +  default ```json { "value": { - "message": "Successfully updated announcement", - "data": { - "value": { - "platforms": [ - "web", - "android", - "ios" - ], - "_id": "6026283125f06a827dc1a5cc", - "title": "test", - "announcement": "

test123

\n", - "pages": [ - { - "page_slug": "$all", - "type": "custom" - } - ], - "editor_meta": { - "foreground_color": "#000", - "background_color": "#fff", - "content_type": "markdown", - "content": "test" - }, - "_schedule": { - "published": true, - "next_schedule": [ - { - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z" - } - ], - "cron": null, - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z", - "duration": null - }, - "app": "000000000000000000000001", - "author": { - "created_by": "5e199e6998cfe1776f1385dc", - "modified_by": "5e199e6998cfe1776f1385dc" - }, - "created_at": "2021-02-12T07:03:13.503Z", - "modified_at": "2021-02-12T07:05:57.020Z" + "_id": "5eaa451a21a4dd75f0fd96c5", + "application": "5d3ebd89f540e7506b8b3548", + "tags": [ + "abhinav" + ], + "title": "my first blog", + "slug": "1st_blog", + "feature_image": { + "secure_url": "https://google.com" + }, + "content": [ + { + "type": "html", + "value": "

hey there!

" } + ], + "_schedule": { + "cron": "* 10 * * *", + "start": "2021-03-31T23:30:00.000Z", + "end": "2021-03-31T23:55:00.000Z", + "duration": 1000, + "next_schedule": [ + { + "start": "2021-03-17T04:30:00.000Z", + "end": "2021-03-17T04:46:40.000Z" + } + ] + }, + "published": true, + "author": { + "name": "Fynd App" + }, + "date_meta": { + "created_on": "2021-03-14T06:49:03.945Z", + "modified_on": "2021-03-14T06:49:03.945Z" } } } @@ -6168,18 +12112,18 @@ Success. Refer `CreateAnnouncementSchema` for more details. --- -### updateAnnouncementSchedule -Update the schedule and the publish status of an announcement +### updateCustomFieldDefinition +Update custom field definition ```javascript // Promise -const promise = platformClient.application("").content.updateAnnouncementSchedule({ announcementId : value, +const promise = platformClient.content.updateCustomFieldDefinition({ definitionId : value, body : value }); // Async/Await -const data = await platformClient.application("").content.updateAnnouncementSchedule({ announcementId : value, +const data = await platformClient.content.updateCustomFieldDefinition({ definitionId : value, body : value }); ``` @@ -6189,20 +12133,20 @@ const data = await platformClient.application("").content.update | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| announcementId | string | yes | ID allotted to the announcement. | -| body | [ScheduleSchema](#ScheduleSchema) | yes | Request body | +| definitionId | string | yes | | +| body | [CustomFieldDefinitionRequestSchema](#CustomFieldDefinitionRequestSchema) | yes | Request body | -Use this API to edit the duration, i.e. start date-time and end date-time of an announcement. Moreover, you can enable/disable an announcement using this API. +Use this API to update a custom field definition for your application. *Returned Response:* -[CreateAnnouncementSchema](#CreateAnnouncementSchema) +[CustomFieldDefinitionDetailResSchema](#CustomFieldDefinitionDetailResSchema) -Success. Refer `CreateAnnouncementSchema` for more details. +Custom field definition created. @@ -6217,51 +12161,143 @@ Success. Refer `CreateAnnouncementSchema` for more details. ```json { "value": { - "message": "Announcement unpublished", - "data": { - "value": { - "platforms": [ - "web", - "android", - "ios" - ], - "_id": "6026283125f06a827dc1a5cc", - "title": "test", - "announcement": "

test123

\n", - "pages": [ - { - "page_slug": "$all", - "type": "custom" - } - ], - "editor_meta": { - "foreground_color": "#000", - "background_color": "#fff", - "content_type": "markdown", - "content": "test" - }, - "_schedule": { - "published": false, - "next_schedule": [ - { - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z" - } - ], - "cron": null, - "start": "2021-02-10T20:40:00.000Z", - "end": "2021-02-18T22:00:00.000Z", - "duration": null - }, - "app": "000000000000000000000001", - "author": { - "created_by": "5e199e6998cfe1776f1385dc", - "modified_by": "5e199e6998cfe1776f1385dc" - }, - "created_at": "2021-02-12T07:03:13.503Z", - "modified_at": "2021-02-12T07:05:57.020Z" + "creator": "application", + "resource": "product", + "name": "name", + "namespace": "fname", + "key": "fname", + "description": "First name", + "type": "string_single_line", + "multi_value": false, + "company_id": "1", + "application_id": "000000000000000000000001", + "created_by": "000000000000000000000001", + "updated_by": "000000000000000000000001", + "required": false, + "is_deleted": false, + "_id": "65369654d436ae0e54147e7b", + "validations": [], + "created_at": "2023-10-23T15:50:44.143Z", + "updated_at": "2023-10-23T15:50:44.143Z" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### updateCustomObject +Update custom object details + + + +```javascript +// Promise +const promise = platformClient.content.updateCustomObject({ metaobjectId : value, + body : value }); + +// Async/Await +const data = await platformClient.content.updateCustomObject({ metaobjectId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| metaobjectId | string | yes | | +| body | [CustomObjectRequestSchema](#CustomObjectRequestSchema) | yes | Request body | + + +Use this API to update a custom object detail for your application. + +*Returned Response:* + + + + +[CustomObjectByIdSchema](#CustomObjectByIdSchema) + +Custom field definition created. + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "_id": "656d67de766f95113450917b", + "name": "Designer", + "type": "designer", + "display_name_key": "name", + "description": "", + "creator": "company", + "created_by": "9759643b65ebc6bacb5275f5", + "updated_by": "bd7223b6727eb087987eece7", + "field_definitions": [ + { + "creator": "company", + "resource": "metaobject", + "name": "city2", + "namespace": "designer", + "key": "city", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "mobile", + "namespace": "designer", + "key": "mobile", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "name", + "namespace": "designer", + "key": "name", + "type": "string_single_line", + "description": "This is name of designer", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": true } - } + ] } } ``` @@ -6280,18 +12316,18 @@ Success. Refer `CreateAnnouncementSchema` for more details. --- -### updateBlog -Update a blog +### updateCustomObjectDefinition +Update custom object definition ```javascript // Promise -const promise = platformClient.application("").content.updateBlog({ id : value, +const promise = platformClient.content.updateCustomObjectDefinition({ definitionId : value, body : value }); // Async/Await -const data = await platformClient.application("").content.updateBlog({ id : value, +const data = await platformClient.content.updateCustomObjectDefinition({ definitionId : value, body : value }); ``` @@ -6301,20 +12337,20 @@ const data = await platformClient.application("").content.update | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| id | string | yes | ID allotted to the blog. | -| body | [BlogRequest](#BlogRequest) | yes | Request body | +| definitionId | string | yes | | +| body | [CustomObjectDefinitionUpdateRequestSchema](#CustomObjectDefinitionUpdateRequestSchema) | yes | Request body | -Use this API to update the details of an existing blog which includes title, feature image, content, SEO details, expiry, etc. +Use this API to update a custom object definition for your application. *Returned Response:* -[BlogSchema](#BlogSchema) +[CustomObjectDefinitionSchema](#CustomObjectDefinitionSchema) -Success. +Custom field definition updated. @@ -6324,47 +12360,63 @@ Success.
-  default +  success ```json { "value": { - "_id": "5eaa451a21a4dd75f0fd96c5", - "application": "5d3ebd89f540e7506b8b3548", - "tags": [ - "abhinav" - ], - "title": "my first blog", - "slug": "1st_blog", - "feature_image": { - "secure_url": "https://google.com" - }, - "content": [ + "_id": "656d67de766f95113450917b", + "name": "Designer", + "type": "designer", + "display_name_key": "name", + "description": "", + "creator": "company", + "created_by": "9759643b65ebc6bacb5275f5", + "updated_by": "bd7223b6727eb087987eece7", + "field_definitions": [ { - "type": "html", - "value": "

hey there!

" + "creator": "company", + "resource": "metaobject", + "name": "city2", + "namespace": "designer", + "key": "city", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "mobile", + "namespace": "designer", + "key": "mobile", + "type": "string_single_line", + "description": "", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": false + }, + { + "creator": "company", + "resource": "metaobject", + "name": "name", + "namespace": "designer", + "key": "name", + "type": "string_single_line", + "description": "This is name of designer", + "multi_value": false, + "validations": [], + "company_id": "2", + "metaobject_definition_id": "656d67de766f95113450917b", + "required": true } - ], - "_schedule": { - "cron": "* 10 * * *", - "start": "2021-03-31T23:30:00.000Z", - "end": "2021-03-31T23:55:00.000Z", - "duration": 1000, - "next_schedule": [ - { - "start": "2021-03-17T04:30:00.000Z", - "end": "2021-03-17T04:46:40.000Z" - } - ] - }, - "published": true, - "author": { - "name": "Fynd App" - }, - "date_meta": { - "created_on": "2021-03-14T06:49:03.945Z", - "modified_on": "2021-03-14T06:49:03.945Z" - } + ] } } ``` @@ -7311,17 +13363,210 @@ Success. Refer `PathMappingSchema` for more details. --- -### updateSEOConfiguration -Update SEO of application +### updateSEOConfiguration +Update SEO of application + + + +```javascript +// Promise +const promise = platformClient.application("").content.updateSEOConfiguration({ body : value }); + +// Async/Await +const data = await platformClient.application("").content.updateSEOConfiguration({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [SeoComponent](#SeoComponent) | yes | Request body | + + +Use this API to edit the SEO details of an application. This includes the sitemap, robot.txt, custom meta tags, etc. + +*Returned Response:* + + + + +[SeoSchema](#SeoSchema) + +Success. Refer `SeoSchema` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "details": { + "title": "Zyosa Zyosa", + "description": "", + "image_url": "" + }, + "robots_txt": "User-agent: * \nAllow: / \nsancisciasn xwsaixjowqnxwsiwjs", + "sitemap_enabled": false, + "_id": "6009819ee463ad40de397eb2", + "app": "000000000000000000000001", + "created_at": "2021-01-21T13:29:02.543Z", + "updated_at": "2021-02-05T06:36:16.048Z", + "__v": 11, + "custom_meta_tags": [ + { + "name": "test 0000", + "content": "", + "_id": "6017c301bde3c21dbb13b284" + }, + { + "name": "cwdcdc", + "content": "", + "_id": "6017c675bde3c22cfb13b290" + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### updateSlideshow +Update a slideshow + + + +```javascript +// Promise +const promise = platformClient.application("").content.updateSlideshow({ id : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").content.updateSlideshow({ id : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| id | string | yes | ID allotted to the slideshow. | +| body | [SlideshowRequest](#SlideshowRequest) | yes | Request body | + + +Use this API to edit the details of an existing slideshow. + +*Returned Response:* + + + + +[SlideshowSchema](#SlideshowSchema) + +Success. Refer `SlideshowSchema` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "date_meta": { + "created_on": "2021-03-14T05:27:12.319Z", + "modified_on": "2021-03-14T05:27:12.319Z" + }, + "archived": false, + "_id": "604d9eb975e9d136bb1b8b83", + "configuration": { + "start_on_launch": false, + "duration": 50, + "sleep_time": 100, + "slide_direction": "horizontal" + }, + "slug": "ss-sfsd-updated", + "platform": "ios", + "media": [ + { + "auto_decide_duration": false, + "type": "image", + "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", + "bg_color": "#ffffff", + "duration": 10, + "action": { + "type": "" + } + }, + { + "auto_decide_duration": true, + "type": "youtube", + "url": "https://www.youtube.com/embed/9vJRopau0g0", + "bg_color": "#ffffff", + "duration": 909, + "action": { + "type": "" + } + } + ], + "application": "5cd3db5e9d692cfe5302a7bb", + "active": true + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### updateSupportInformation +Update the support data of an application ```javascript // Promise -const promise = platformClient.application("").content.updateSEOConfiguration({ body : value }); +const promise = platformClient.application("").content.updateSupportInformation({ body : value }); // Async/Await -const data = await platformClient.application("").content.updateSEOConfiguration({ body : value }); +const data = await platformClient.application("").content.updateSupportInformation({ body : value }); ``` @@ -7330,19 +13575,19 @@ const data = await platformClient.application("").content.update | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [SeoComponent](#SeoComponent) | yes | Request body | +| body | [Support](#Support) | yes | Request body | -Use this API to edit the SEO details of an application. This includes the sitemap, robot.txt, custom meta tags, etc. +Use this API to edit the existing contact details for customer support, including emails and phone numbers. *Returned Response:* -[SeoSchema](#SeoSchema) +[Support](#Support) -Success. Refer `SeoSchema` for more details. +Success. Refer `Support` for more details. @@ -7357,30 +13602,28 @@ Success. Refer `SeoSchema` for more details. ```json { "value": { - "details": { - "title": "Zyosa Zyosa", - "description": "", - "image_url": "" - }, - "robots_txt": "User-agent: * \nAllow: / \nsancisciasn xwsaixjowqnxwsiwjs", - "sitemap_enabled": false, - "_id": "6009819ee463ad40de397eb2", - "app": "000000000000000000000001", - "created_at": "2021-01-21T13:29:02.543Z", - "updated_at": "2021-02-05T06:36:16.048Z", - "__v": 11, - "custom_meta_tags": [ - { - "name": "test 0000", - "content": "", - "_id": "6017c301bde3c21dbb13b284" + "_id": "5ea4980b87a7944094216193", + "config_type": "app", + "application": "000000000000000000000001", + "created_at": "2020-04-25T20:05:31.300Z", + "updated_at": "2020-12-04T10:48:12.194Z", + "contact": { + "phone": { + "active": true, + "phone": [ + { + "key": "Jane Doe", + "code": "91", + "number": "9988776655" + } + ] }, - { - "name": "cwdcdc", - "content": "", - "_id": "6017c675bde3c22cfb13b290" + "email": { + "active": false, + "email": [] } - ] + }, + "created": true } } ``` @@ -7399,553 +13642,832 @@ Success. Refer `SeoSchema` for more details. --- -### updateSlideshow -Update a slideshow +### Schemas -```javascript -// Promise -const promise = platformClient.application("").content.updateSlideshow({ id : value, - body : value }); -// Async/Await -const data = await platformClient.application("").content.updateSlideshow({ id : value, - body : value }); -``` +#### [Action](#Action) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | page | [ActionPage](#ActionPage)? | yes | | + | popup | [ActionPage](#ActionPage)? | yes | | + | type | string? | yes | | + +--- +#### [ActionPage](#ActionPage) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | params | [String: [string]]? | yes | | + | query | [String: [string]]? | yes | | + | type | string? | yes | | + | url | string? | yes | | + -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| id | string | yes | ID allotted to the slideshow. | -| body | [SlideshowRequest](#SlideshowRequest) | yes | Request body | +--- +#### [AdminAnnouncementSchema](#AdminAnnouncementSchema) -Use this API to edit the details of an existing slideshow. + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | _schedule | [ScheduleSchema](#ScheduleSchema)? | yes | | + | announcement | string? | yes | | + | app | string? | yes | | + | author | [AnnouncementAuthorSchema](#AnnouncementAuthorSchema)? | yes | | + | created_at | string? | yes | | + | editor_meta | [EditorMeta](#EditorMeta)? | yes | | + | modified_at | string? | yes | | + | pages | [[AnnouncementPageSchema](#AnnouncementPageSchema)]? | yes | | + | platforms | [string]? | yes | | + | title | string? | yes | | + -*Returned Response:* +--- +#### [AnnouncementAuthorSchema](#AnnouncementAuthorSchema) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | created_by | string? | yes | | + | modified_by | string? | yes | | + +--- -[SlideshowSchema](#SlideshowSchema) +#### [AnnouncementPageSchema](#AnnouncementPageSchema) -Success. Refer `SlideshowSchema` for more details. + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | page_slug | string? | yes | | + | type | string? | yes | | + + +--- + +#### [ApplicationLegal](#ApplicationLegal) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | application | string? | yes | | + | created_at | string? | yes | | + | faq | [[ApplicationLegalFAQ](#ApplicationLegalFAQ)]? | yes | | + | policy | string? | yes | | + | returns | string? | yes | | + | shipping | string? | yes | | + | tnc | string? | yes | | + | updated_at | string? | yes | | + + +--- + +#### [ApplicationLegalFAQ](#ApplicationLegalFAQ) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | answer | string? | yes | | + | question | string? | yes | | + + +--- + +#### [Asset](#Asset) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | aspect_ratio | string? | yes | | + | id | string? | yes | | + | secure_url | string? | yes | | + + +--- + +#### [Author](#Author) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | designation | string? | yes | | + | id | string? | yes | | + | name | string? | yes | | + + +--- + +#### [BlogGetResponse](#BlogGetResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[BlogSchema](#BlogSchema)]? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [BlogRequest](#BlogRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _custom_json | string? | yes | | + | _schedule | [CronSchedule](#CronSchedule)? | yes | | + | application | string? | yes | | + | author | [Author](#Author)? | yes | | + | content | [[ResourceContent](#ResourceContent)]? | yes | | + | feature_image | [Asset](#Asset)? | yes | | + | published | boolean? | yes | | + | reading_time | string? | yes | | + | seo | [SEO](#SEO)? | yes | | + | slug | string? | yes | | + | tags | [string]? | yes | | + | title | string? | yes | | + +--- + +#### [BlogSchema](#BlogSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _custom_json | string? | yes | | + | _id | string? | yes | | + | _schedule | [CronSchedule](#CronSchedule)? | yes | | + | application | string? | yes | | + | archived | boolean? | yes | | + | author | [Author](#Author)? | yes | | + | content | [[ResourceContent](#ResourceContent)]? | yes | | + | date_meta | [DateMeta](#DateMeta)? | yes | | + | feature_image | [Asset](#Asset)? | yes | | + | published | boolean? | yes | | + | reading_time | string? | yes | | + | seo | [SEO](#SEO)? | yes | | + | slug | string? | yes | | + | tags | [string]? | yes | | + | title | string? | yes | | + + +--- +#### [BooleanType](#BooleanType) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + +--- +#### [CategoryRequestSchema](#CategoryRequestSchema) -
-  Examples: + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | slug | string? | yes | | + | title | string? | yes | | + +--- -
-  default +#### [CategorySchema](#CategorySchema) -```json -{ - "value": { - "date_meta": { - "created_on": "2021-03-14T05:27:12.319Z", - "modified_on": "2021-03-14T05:27:12.319Z" - }, - "archived": false, - "_id": "604d9eb975e9d136bb1b8b83", - "configuration": { - "start_on_launch": false, - "duration": 50, - "sleep_time": 100, - "slide_direction": "horizontal" - }, - "slug": "ss-sfsd-updated", - "platform": "ios", - "media": [ - { - "auto_decide_duration": false, - "type": "image", - "url": "https://res.cloudinary.com/dwzm9bysq/image/upload/v1567148153/production/system/icons/brands-tab_sfinpk.png", - "bg_color": "#ffffff", - "duration": 10, - "action": { - "type": "" - } - }, - { - "auto_decide_duration": true, - "type": "youtube", - "url": "https://www.youtube.com/embed/9vJRopau0g0", - "bg_color": "#ffffff", - "duration": 909, - "action": { - "type": "" - } - } - ], - "application": "5cd3db5e9d692cfe5302a7bb", - "active": true - } -} -``` -
+ | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _custom_json | string? | yes | | + | _id | string? | yes | | + | application | string? | yes | | + | children | [string]? | yes | | + | description | string? | yes | | + | icon_url | string? | yes | | + | index | number? | yes | | + | slug | string? | yes | | + | title | string? | yes | | + -
+--- +#### [ChildrenSchema](#ChildrenSchema) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | answer | string? | yes | | + | application | string? | yes | | + | question | string? | yes | | + | slug | string? | yes | | + +--- +#### [CommonError](#CommonError) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + +--- +#### [ConfigurationSchema](#ConfigurationSchema) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | duration | number? | yes | | + | sleep_time | number? | yes | | + | slide_direction | string? | yes | | + | start_on_launch | boolean? | yes | | + --- +#### [ContactSchema](#ContactSchema) -### updateSupportInformation -Update the support data of an application + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | email | [EmailSchema](#EmailSchema)? | yes | | + | phone | [PhoneSchema](#PhoneSchema)? | yes | | + +--- +#### [ContentAPIError](#ContentAPIError) -```javascript -// Promise -const promise = platformClient.application("").content.updateSupportInformation({ body : value }); + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | code | string? | yes | | + | exception | string? | yes | | + | info | string? | yes | | + | message | string? | yes | | + | meta | string? | yes | | + | request_id | string? | yes | | + | stack_trace | string? | yes | | + | status | number? | yes | | + -// Async/Await -const data = await platformClient.application("").content.updateSupportInformation({ body : value }); -``` +--- +#### [CreateAnnouncementSchema](#CreateAnnouncementSchema) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | data | [AdminAnnouncementSchema](#AdminAnnouncementSchema)? | yes | | + | message | string? | yes | | + +--- +#### [CreatedBySchema](#CreatedBySchema) -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [Support](#Support) | yes | Request body | + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | id | string? | yes | | + +--- -Use this API to edit the existing contact details for customer support, including emails and phone numbers. +#### [CreateFaqCategoryRequestSchema](#CreateFaqCategoryRequestSchema) -*Returned Response:* + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | [CategoryRequestSchema](#CategoryRequestSchema)? | yes | | + +--- +#### [CreateFaqCategorySchema](#CreateFaqCategorySchema) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | [CategorySchema](#CategorySchema)? | yes | | + -[Support](#Support) +--- -Success. Refer `Support` for more details. +#### [CreateFaqResponseSchema](#CreateFaqResponseSchema) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | faq | [FaqSchema](#FaqSchema)? | yes | | + +--- +#### [CreateFaqSchema](#CreateFaqSchema) -
-  Examples: + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | faq | [FAQ](#FAQ)? | yes | | + +--- -
-  default +#### [CreateTagRequestSchema](#CreateTagRequestSchema) -```json -{ - "value": { - "_id": "5ea4980b87a7944094216193", - "config_type": "app", - "application": "000000000000000000000001", - "created_at": "2020-04-25T20:05:31.300Z", - "updated_at": "2020-12-04T10:48:12.194Z", - "contact": { - "phone": { - "active": true, - "phone": [ - { - "key": "Jane Doe", - "code": "91", - "number": "9988776655" - } - ] - }, - "email": { - "active": false, - "email": [] - } - }, - "created": true - } -} -``` -
+ | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | tags | [[CreateTagSchema](#CreateTagSchema)]? | yes | | + -
+--- +#### [CreateTagSchema](#CreateTagSchema) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | attributes | string? | yes | | + | content | string? | yes | | + | name | string? | yes | | + | pages | [string]? | yes | | + | position | string? | yes | | + | sub_type | string? | yes | | + | type | string? | yes | | + | url | string? | yes | | + +--- +#### [CronSchedule](#CronSchedule) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | cron | string? | yes | | + | duration | number? | yes | | + | end | string? | yes | | + | start | string? | yes | | + +--- +#### [CustomDataDeleteSchema](#CustomDataDeleteSchema) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + | success | boolean? | yes | | + --- +#### [CustomField](#CustomField) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | definition_id | string? | yes | | + | value | [any]? | yes | | + +--- -### Schemas +#### [CustomFieldDefinitionDetailResSchema](#CustomFieldDefinitionDetailResSchema) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | application_id | string? | yes | | + | company_id | string? | yes | | + | created_at | string? | yes | | + | created_by | string? | yes | | + | creator | string? | yes | | + | description | string? | yes | | + | is_deleted | boolean? | yes | | + | key | string? | yes | | + | multi_value | boolean? | yes | | + | name | string? | yes | | + | namespace | string? | yes | | + | required | boolean? | yes | | + | resource | string? | yes | | + | type | string? | yes | | + | updated_at | string? | yes | | + | updated_by | string? | yes | | + | validations | [any]? | yes | | + -#### [Action](#Action) +--- + +#### [CustomFieldDefinitionRequestSchema](#CustomFieldDefinitionRequestSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page | [ActionPage](#ActionPage)? | yes | | - | popup | [ActionPage](#ActionPage)? | yes | | + | description | string? | yes | | + | key | string? | yes | | + | multi_value | boolean? | yes | | + | name | string? | yes | | + | namespace | string? | yes | | + | resource | string? | yes | | | type | string? | yes | | + | validations | [[FieldValidations](#FieldValidations)]? | yes | | --- -#### [ActionPage](#ActionPage) +#### [CustomFieldDefinitionsSchema](#CustomFieldDefinitionsSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | params | [String: [string]]? | yes | | - | query | [String: [string]]? | yes | | - | type | string? | yes | | - | url | string? | yes | | + | items | [[FieldDefinitionSchema](#FieldDefinitionSchema)]? | yes | | + | page | [Page](#Page)? | yes | | --- -#### [AdminAnnouncementSchema](#AdminAnnouncementSchema) +#### [CustomFieldRequestSchema](#CustomFieldRequestSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | _id | string? | yes | | - | _schedule | [ScheduleSchema](#ScheduleSchema)? | yes | | - | announcement | string? | yes | | - | app | string? | yes | | - | author | [AnnouncementAuthorSchema](#AnnouncementAuthorSchema)? | yes | | - | created_at | string? | yes | | - | editor_meta | [EditorMeta](#EditorMeta)? | yes | | - | modified_at | string? | yes | | - | pages | [[AnnouncementPageSchema](#AnnouncementPageSchema)]? | yes | | - | platforms | [string]? | yes | | - | title | string? | yes | | + | fields | [[CustomField](#CustomField)]? | yes | | --- -#### [AnnouncementAuthorSchema](#AnnouncementAuthorSchema) +#### [CustomFieldSchema](#CustomFieldSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | company_id | string? | yes | | + | created_at | string? | yes | | | created_by | string? | yes | | - | modified_by | string? | yes | | + | creator | string? | yes | | + | definition_id | string? | yes | | + | has_invalid_values | boolean? | yes | | + | invalid_value_errors | [any]? | yes | | + | is_deleted | boolean? | yes | | + | key | string? | yes | | + | multi_value | boolean? | yes | | + | namespace | string? | yes | | + | resource | string? | yes | | + | resource_id | string? | yes | | + | type | string? | yes | | + | updated_at | string? | yes | | + | value | [[CustomFieldValue](#CustomFieldValue)]? | yes | | --- -#### [AnnouncementPageSchema](#AnnouncementPageSchema) +#### [CustomFieldsResponseByResourceIdSchema](#CustomFieldsResponseByResourceIdSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page_slug | string? | yes | | - | type | string? | yes | | + | items | [[CustomFieldSchema](#CustomFieldSchema)]? | yes | | --- -#### [ApplicationLegal](#ApplicationLegal) +#### [CustomFieldsResponseSchema](#CustomFieldsResponseSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | _id | string? | yes | | - | application | string? | yes | | - | created_at | string? | yes | | - | faq | [[ApplicationLegalFAQ](#ApplicationLegalFAQ)]? | yes | | - | policy | string? | yes | | - | returns | string? | yes | | - | shipping | string? | yes | | - | tnc | string? | yes | | - | updated_at | string? | yes | | + | items | [[CustomFieldSchema](#CustomFieldSchema)]? | yes | | + | page | [Page](#Page)? | yes | | --- -#### [ApplicationLegalFAQ](#ApplicationLegalFAQ) +#### [CustomFieldTypeSchema](#CustomFieldTypeSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | answer | string? | yes | | - | question | string? | yes | | + | boolean_type | [BooleanType](#BooleanType)? | yes | | + | date | [Date](#Date)? | yes | | + | datetime | [Datetime](#Datetime)? | yes | | + | dropdown | [Dropdown](#Dropdown)? | yes | | + | file | [File](#File)? | yes | | + | float_type | [FloatType](#FloatType)? | yes | | + | integer | [Integer](#Integer)? | yes | | + | json | [Json](#Json)? | yes | | + | metaobject | [Metaobject](#Metaobject)? | yes | | + | product | [Product](#Product)? | yes | | + | string_multi_line | [StringMultiLine](#StringMultiLine)? | yes | | + | string_single_line | [StringSingleLine](#StringSingleLine)? | yes | | + | url | [Url](#Url)? | yes | | --- -#### [Asset](#Asset) +#### [CustomFieldValue](#CustomFieldValue) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | aspect_ratio | string? | yes | | - | id | string? | yes | | - | secure_url | string? | yes | | + | value | any? | yes | | --- -#### [Author](#Author) +#### [CustomMetaTag](#CustomMetaTag) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | designation | string? | yes | | - | id | string? | yes | | + | _id | string? | yes | | + | content | string? | yes | | | name | string? | yes | | --- -#### [BlogGetResponse](#BlogGetResponse) +#### [CustomObjectBulkEntry](#CustomObjectBulkEntry) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[BlogSchema](#BlogSchema)]? | yes | | + | items | [[CustomObjectJobSchema](#CustomObjectJobSchema)]? | yes | | | page | [Page](#Page)? | yes | | --- -#### [BlogRequest](#BlogRequest) +#### [CustomObjectBulkEntryInitiateDownload](#CustomObjectBulkEntryInitiateDownload) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | _custom_json | string? | yes | | - | _schedule | [CronSchedule](#CronSchedule)? | yes | | - | application | string? | yes | | - | author | [Author](#Author)? | yes | | - | content | [[ResourceContent](#ResourceContent)]? | yes | | - | feature_image | [Asset](#Asset)? | yes | | - | published | boolean? | yes | | - | reading_time | string? | yes | | - | seo | [SEO](#SEO)? | yes | | - | slug | string? | yes | | - | tags | [string]? | yes | | - | title | string? | yes | | + | message | string? | yes | | + | task_id | string? | yes | | --- -#### [BlogSchema](#BlogSchema) +#### [CustomObjectBulkSchema](#CustomObjectBulkSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | _custom_json | string? | yes | | - | _id | string? | yes | | - | _schedule | [CronSchedule](#CronSchedule)? | yes | | - | application | string? | yes | | - | archived | boolean? | yes | | - | author | [Author](#Author)? | yes | | - | content | [[ResourceContent](#ResourceContent)]? | yes | | - | date_meta | [DateMeta](#DateMeta)? | yes | | - | feature_image | [Asset](#Asset)? | yes | | - | published | boolean? | yes | | - | reading_time | string? | yes | | - | seo | [SEO](#SEO)? | yes | | - | slug | string? | yes | | - | tags | [string]? | yes | | - | title | string? | yes | | + | total_records | number? | yes | | + | url | string? | yes | | --- -#### [CategoryRequestSchema](#CategoryRequestSchema) +#### [CustomObjectByIdSchema](#CustomObjectByIdSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | slug | string? | yes | | - | title | string? | yes | | + | _id | string? | yes | | + | definition | [CustomObjectListItemDefinationSchema](#CustomObjectListItemDefinationSchema)? | yes | | + | display_name | string? | yes | | + | fields | [[CustomObjectFieldSchema](#CustomObjectFieldSchema)]? | yes | | + | references | [any]? | yes | | + | status | string? | yes | | --- -#### [CategorySchema](#CategorySchema) +#### [CustomObjectCustomFieldDefinitionResSchema](#CustomObjectCustomFieldDefinitionResSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | _custom_json | string? | yes | | | _id | string? | yes | | - | application | string? | yes | | - | children | [string]? | yes | | + | company_id | string? | yes | | + | created_at | string? | yes | | + | created_by | string? | yes | | + | creator | string? | yes | | | description | string? | yes | | - | icon_url | string? | yes | | - | index | number? | yes | | - | slug | string? | yes | | - | title | string? | yes | | + | is_deleted | boolean? | yes | | + | key | string? | yes | | + | metaobject_definition_id | string? | yes | | + | multi_value | boolean? | yes | | + | name | string? | yes | | + | namespace | string? | yes | | + | required | boolean? | yes | | + | resource | string? | yes | | + | type | string? | yes | | + | updated_at | string? | yes | | + | validations | [[FieldValidations](#FieldValidations)]? | yes | | --- -#### [ChildrenSchema](#ChildrenSchema) +#### [CustomObjectCustomFieldDefinitions](#CustomObjectCustomFieldDefinitions) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | _id | string? | yes | | - | answer | string? | yes | | - | application | string? | yes | | - | question | string? | yes | | - | slug | string? | yes | | + | action | string? | yes | | + | description | string? | yes | | + | id | string? | yes | | + | key | string? | yes | | + | multi_value | boolean? | yes | | + | name | string? | yes | | + | required | boolean? | yes | | + | type | string? | yes | | + | validations | [[FieldValidations](#FieldValidations)]? | yes | | --- -#### [CommonError](#CommonError) +#### [CustomObjectDefinitionDeleteResponseSchema](#CustomObjectDefinitionDeleteResponseSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | message | string? | yes | | + | success | boolean? | yes | | --- -#### [ConfigurationSchema](#ConfigurationSchema) +#### [CustomObjectDefinitionRequestSchema](#CustomObjectDefinitionRequestSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | duration | number? | yes | | - | sleep_time | number? | yes | | - | slide_direction | string? | yes | | - | start_on_launch | boolean? | yes | | + | description | string? | yes | | + | display_name_key | string? | yes | | + | field_definitions | [[CustomObjectCustomFieldDefinitions](#CustomObjectCustomFieldDefinitions)]? | yes | | + | name | string? | yes | | + | type | string? | yes | | --- -#### [ContactSchema](#ContactSchema) +#### [CustomObjectDefinitionSchema](#CustomObjectDefinitionSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | email | [EmailSchema](#EmailSchema)? | yes | | - | phone | [PhoneSchema](#PhoneSchema)? | yes | | + | _id | string? | yes | | + | created_by | string? | yes | | + | creator | string? | yes | | + | description | string? | yes | | + | display_name_key | string? | yes | | + | field_definitions | [[CustomObjectCustomFieldDefinitionResSchema](#CustomObjectCustomFieldDefinitionResSchema)]? | yes | | + | name | string? | yes | | + | type | string? | yes | | + | updated_by | string? | yes | | --- -#### [ContentAPIError](#ContentAPIError) +#### [CustomObjectDefinitionsSchema](#CustomObjectDefinitionsSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | code | string? | yes | | - | exception | string? | yes | | - | info | string? | yes | | - | message | string? | yes | | - | meta | string? | yes | | - | request_id | string? | yes | | - | stack_trace | string? | yes | | - | status | number? | yes | | + | items | [[CustomObjectEntry](#CustomObjectEntry)]? | yes | | + | page | [Page](#Page)? | yes | | --- -#### [CreateAnnouncementSchema](#CreateAnnouncementSchema) +#### [CustomObjectDefinitionUpdateRequestSchema](#CustomObjectDefinitionUpdateRequestSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [AdminAnnouncementSchema](#AdminAnnouncementSchema)? | yes | | - | message | string? | yes | | + | description | string? | yes | | + | display_name_key | string? | yes | | + | field_definitions | [[CustomObjectCustomFieldDefinitions](#CustomObjectCustomFieldDefinitions)]? | yes | | + | name | string? | yes | | + | type | string? | yes | | --- -#### [CreatedBySchema](#CreatedBySchema) +#### [CustomObjectEntry](#CustomObjectEntry) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | id | string? | yes | | + | _id | string? | yes | | + | entries_count | number? | yes | | + | fields_count | number? | yes | | + | name | string? | yes | | + | type | string? | yes | | + | updated_at | string? | yes | | --- -#### [CreateFaqCategoryRequestSchema](#CreateFaqCategoryRequestSchema) +#### [CustomObjectEntryBulkUploadResponse](#CustomObjectEntryBulkUploadResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | category | [CategoryRequestSchema](#CategoryRequestSchema)? | yes | | + | total_records | number? | yes | | + | url | string? | yes | | --- -#### [CreateFaqCategorySchema](#CreateFaqCategorySchema) +#### [CustomObjectEntryFieldSchema](#CustomObjectEntryFieldSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | category | [CategorySchema](#CategorySchema)? | yes | | + | definition_id | string? | yes | | + | value | [any]? | yes | | --- -#### [CreateFaqResponseSchema](#CreateFaqResponseSchema) +#### [CustomObjectFieldSchema](#CustomObjectFieldSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | faq | [FaqSchema](#FaqSchema)? | yes | | + | _id | string? | yes | | + | definition_id | string? | yes | | + | key | string? | yes | | + | type | string? | yes | | + | value | [any]? | yes | | --- -#### [CreateFaqSchema](#CreateFaqSchema) +#### [CustomObjectJobSchema](#CustomObjectJobSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | faq | [FAQ](#FAQ)? | yes | | + | _id | string? | yes | | + | action_type | string? | yes | | + | company_id | string? | yes | | + | created_at | string? | yes | | + | created_by | string? | yes | | + | creator | string? | yes | | + | entity | string? | yes | | + | error_count | number? | yes | | + | error_jobs | [string]? | yes | | + | error_url | string? | yes | | + | errors_occured | [string]? | yes | | + | finished_count | number? | yes | | + | finished_jobs | [string]? | yes | | + | jobs | [string]? | yes | | + | meta | [CustomObjectMetaSchema](#CustomObjectMetaSchema)? | yes | | + | status | string? | yes | | + | success_count | number? | yes | | + | total_jobs | number? | yes | | + | updated_at | string? | yes | | + | url | string? | yes | | --- -#### [CreateTagRequestSchema](#CreateTagRequestSchema) +#### [CustomObjectListItemDefinationSchema](#CustomObjectListItemDefinationSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | tags | [[CreateTagSchema](#CreateTagSchema)]? | yes | | + | _id | string? | yes | | + | name | string? | yes | | + | type | string? | yes | | --- -#### [CreateTagSchema](#CreateTagSchema) +#### [CustomObjectListItemSchema](#CustomObjectListItemSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string? | yes | | - | attributes | string? | yes | | - | content | string? | yes | | - | name | string? | yes | | - | pages | [string]? | yes | | - | position | string? | yes | | - | sub_type | string? | yes | | - | type | string? | yes | | - | url | string? | yes | | + | definition | [CustomObjectListItemDefinationSchema](#CustomObjectListItemDefinationSchema)? | yes | | + | definition_id | string? | yes | | + | display_name | string? | yes | | + | references | number? | yes | | + | status | string? | yes | | + | updated_at | string? | yes | | --- -#### [CronSchedule](#CronSchedule) +#### [CustomObjectMetaSchema](#CustomObjectMetaSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cron | string? | yes | | - | duration | number? | yes | | - | end | string? | yes | | - | start | string? | yes | | + | mo_defintion_type | string? | yes | | + | mo_error_count | number? | yes | | + | mo_success_count | number? | yes | | + | mo_total_count | number? | yes | | --- -#### [CustomMetaTag](#CustomMetaTag) +#### [CustomObjectRequestSchema](#CustomObjectRequestSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | definition_id | string? | yes | | + | fields | [[CustomObjectEntryFieldSchema](#CustomObjectEntryFieldSchema)]? | yes | | + | status | string? | yes | | + + +--- + +#### [CustomObjectSchema](#CustomObjectSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string? | yes | | - | content | string? | yes | | - | name | string? | yes | | + | application_id | string? | yes | | + | company_id | string? | yes | | + | created_by | string? | yes | | + | creator | string? | yes | | + | definition_id | string? | yes | | + | display_name | string? | yes | | + | fields | [[CustomFieldSchema](#CustomFieldSchema)]? | yes | | + | status | string? | yes | | + | type | string? | yes | | + | updated_by | string? | yes | | + + +--- + +#### [CustomObjectsSchema](#CustomObjectsSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[CustomObjectListItemSchema](#CustomObjectListItemSchema)]? | yes | | + | page | [Page](#Page)? | yes | | --- @@ -7977,56 +14499,101 @@ Success. Refer `Support` for more details. --- -#### [DataLoaderSchema](#DataLoaderSchema) +#### [DataLoaderSchema](#DataLoaderSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | __source | [DataLoaderSourceSchema](#DataLoaderSourceSchema)? | yes | | + | _id | string? | yes | | + | content | string? | yes | | + | name | string? | yes | | + | operation_id | string? | yes | | + | service | string? | yes | | + | type | string? | yes | | + | url | string? | yes | | + + +--- + +#### [DataLoaderSourceSchema](#DataLoaderSourceSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | id | string? | yes | | + | type | string? | yes | | + + +--- + +#### [DataLoadersSchema](#DataLoadersSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[DataLoaderSchema](#DataLoaderSchema)]? | yes | | + + +--- + +#### [Date](#Date) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | __source | [DataLoaderSourceSchema](#DataLoaderSourceSchema)? | yes | | - | _id | string? | yes | | - | content | string? | yes | | + | category | string? | yes | | + | list_enabled | boolean? | yes | | | name | string? | yes | | - | operation_id | string? | yes | | - | service | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | | type | string? | yes | | - | url | string? | yes | | --- -#### [DataLoaderSourceSchema](#DataLoaderSourceSchema) +#### [DateMeta](#DateMeta) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | id | string? | yes | | + | created_on | string? | yes | | + | modified_on | string? | yes | | + + +--- + +#### [Datetime](#Datetime) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | | type | string? | yes | | --- -#### [DataLoadersSchema](#DataLoadersSchema) +#### [DefaultNavigationResponse](#DefaultNavigationResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[DataLoaderSchema](#DataLoaderSchema)]? | yes | | + | items | [[NavigationSchema](#NavigationSchema)]? | yes | | --- -#### [DateMeta](#DateMeta) +#### [DefaultSchemaComponent](#DefaultSchemaComponent) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | created_on | string? | yes | | - | modified_on | string? | yes | | + | items | [[DefaultSEOSchemaMarkupTemplate](#DefaultSEOSchemaMarkupTemplate)]? | yes | | --- -#### [DefaultNavigationResponse](#DefaultNavigationResponse) +#### [DefaultSEOSchemaMarkupTemplate](#DefaultSEOSchemaMarkupTemplate) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[NavigationSchema](#NavigationSchema)]? | yes | | + | page_type | string? | yes | | + | schema | string? | yes | | --- @@ -8040,6 +14607,19 @@ Success. Refer `Support` for more details. | title | string? | yes | | +--- + +#### [Dropdown](#Dropdown) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + --- #### [EditorMeta](#EditorMeta) @@ -8114,6 +14694,70 @@ Success. Refer `Support` for more details. | tags | [string]? | yes | | +--- + +#### [FieldDefinitionSchema](#FieldDefinitionSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | company_id | string? | yes | | + | created_at | string? | yes | | + | created_by | string? | yes | | + | creator | string? | yes | | + | description | string? | yes | | + | invalid_fields_count | number? | yes | | + | is_deleted | boolean? | yes | | + | key | string? | yes | | + | multi_value | boolean? | yes | | + | name | string? | yes | | + | namespace | string? | yes | | + | required | boolean? | yes | | + | resource | string? | yes | | + | type | string? | yes | | + | type_name | string? | yes | | + | updated_at | string? | yes | | + | updated_by | string? | yes | | + | validations | [[FieldValidations](#FieldValidations)]? | yes | | + + +--- + +#### [FieldValidations](#FieldValidations) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | name | string? | yes | | + | type | string? | yes | | + | value | any? | yes | | + + +--- + +#### [File](#File) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + +--- + +#### [FloatType](#FloatType) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + --- #### [GeneratedSEOContent](#GeneratedSEOContent) @@ -8188,6 +14832,32 @@ Success. Refer `Support` for more details. | url | string? | yes | | +--- + +#### [Integer](#Integer) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + +--- + +#### [Json](#Json) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + --- #### [LandingPageGetResponse](#LandingPageGetResponse) @@ -8235,6 +14905,19 @@ Success. Refer `Support` for more details. | hi | [Language](#Language)? | yes | | +--- + +#### [Metaobject](#Metaobject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + --- #### [NavigationGetResponse](#NavigationGetResponse) @@ -8488,6 +15171,19 @@ Success. Refer `Support` for more details. | phone | [[PhoneProperties](#PhoneProperties)]? | yes | | +--- + +#### [Product](#Product) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + --- #### [RemoveHandpickedSchema](#RemoveHandpickedSchema) @@ -8507,6 +15203,26 @@ Success. Refer `Support` for more details. | value | string? | yes | | +--- + +#### [ResourceSchema](#ResourceSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | definitions_count | number? | yes | Number of definitions | + | key | string? | yes | Resource key | + | name | string? | yes | Resource name | + + +--- + +#### [ResourcesSchema](#ResourcesSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | resources | [[ResourceSchema](#ResourceSchema)]? | yes | | + + --- #### [ScheduleSchema](#ScheduleSchema) @@ -8526,11 +15242,25 @@ Success. Refer `Support` for more details. | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | breadcrumb | [[SEObreadcrumb](#SEObreadcrumb)]? | yes | | + | canonical_url | string? | yes | | | description | string? | yes | | | image | [SEOImage](#SEOImage)? | yes | | + | meta_tags | [[SEOMetaItem](#SEOMetaItem)]? | yes | | + | sitemap | [SEOSitemap](#SEOSitemap)? | yes | | | title | string? | yes | | +--- + +#### [SEObreadcrumb](#SEObreadcrumb) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action | [Action](#Action)? | yes | | + | url | string? | yes | | + + --- #### [SeoComponent](#SeoComponent) @@ -8549,6 +15279,26 @@ Success. Refer `Support` for more details. | url | string? | yes | | +--- + +#### [SEOMetaItem](#SEOMetaItem) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[SEOMetaItems](#SEOMetaItems)]? | yes | | + | title | string? | yes | | + + +--- + +#### [SEOMetaItems](#SEOMetaItems) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | key | string? | yes | | + | value | string? | yes | | + + --- #### [SeoSchema](#SeoSchema) @@ -8556,6 +15306,7 @@ Success. Refer `Support` for more details. | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string? | yes | | + | additional_sitemap | string? | yes | | | app | string? | yes | | | cannonical_enabled | boolean? | yes | | | created_at | string? | yes | | @@ -8566,6 +15317,58 @@ Success. Refer `Support` for more details. | updated_at | string? | yes | | +--- + +#### [SeoSchemaComponent](#SeoSchemaComponent) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[SEOSchemaMarkupTemplate](#SEOSchemaMarkupTemplate)]? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [SEOSchemaMarkupTemplate](#SEOSchemaMarkupTemplate) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | active | boolean? | yes | | + | application | string? | yes | | + | created_at | string? | yes | | + | description | string? | yes | | + | id | string? | yes | | + | page_type | string? | yes | | + | schema | string? | yes | | + | title | string? | yes | | + | updated_at | string? | yes | | + + +--- + +#### [SEOSchemaMarkupTemplateRequestBody](#SEOSchemaMarkupTemplateRequestBody) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | active | boolean? | yes | | + | created_at | string? | yes | | + | description | string? | yes | | + | page_type | string? | yes | | + | schema | string? | yes | | + | title | string? | yes | | + | updated_at | string? | yes | | + + +--- + +#### [SEOSitemap](#SEOSitemap) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | frequency | string? | yes | | + | priority | number? | yes | | + + --- #### [SlideshowGetResponse](#SlideshowGetResponse) @@ -8621,6 +15424,32 @@ Success. Refer `Support` for more details. | slug | string? | yes | | +--- + +#### [StringMultiLine](#StringMultiLine) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + +--- + +#### [StringSingleLine](#StringSingleLine) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category | string? | yes | | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + --- #### [Support](#Support) @@ -8636,6 +15465,38 @@ Success. Refer `Support` for more details. | updated_at | string? | yes | | +--- + +#### [SupportedValidationsMetaExampleSchema](#SupportedValidationsMetaExampleSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | name | string? | yes | | + | value | string? | yes | | + + +--- + +#### [SupportedValidationsMetaSchema](#SupportedValidationsMetaSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | examples | [[SupportedValidationsMetaExampleSchema](#SupportedValidationsMetaExampleSchema)]? | yes | | + + +--- + +#### [SupportedValidationsSchema](#SupportedValidationsSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display | string? | yes | | + | meta | [SupportedValidationsMetaSchema](#SupportedValidationsMetaSchema)? | yes | | + | name | string? | yes | | + | required | boolean? | yes | | + | type | string? | yes | | + + --- #### [TagDeleteSuccessResponse](#TagDeleteSuccessResponse) @@ -8704,6 +15565,18 @@ Success. Refer `Support` for more details. --- +#### [Url](#Url) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | list_enabled | boolean? | yes | | + | name | string? | yes | | + | supported_validations | [[SupportedValidationsSchema](#SupportedValidationsSchema)]? | yes | | + | type | string? | yes | | + + +--- + diff --git a/documentation/platform/DISCOUNT.md b/documentation/platform/DISCOUNT.md index 231643d82..bf3724159 100644 --- a/documentation/platform/DISCOUNT.md +++ b/documentation/platform/DISCOUNT.md @@ -69,13 +69,23 @@ Success
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "success": true + } +} ```
+
+ @@ -125,13 +135,23 @@ Success
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "success": true + } +} ```
+
+ @@ -180,13 +200,105 @@ Success
-  Example: +  Examples: + + +
+  success_basic ```json +{ + "value": { + "_id": "64a7c915c160922f34ba4f12", + "name": "Contract Discount Name", + "company_id": 90, + "is_active": true, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "job_type": "app", + "discount_type": "flat", + "discount_level": "application", + "value": 10, + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ], + "discount_meta": { + "timer": true, + "hours": 20, + "minutes": 35 + }, + "validity": { + "start": "2090-04-07T08:19:12.007Z", + "end": "2090-04-10T08:19:12.007Z" + }, + "created_on": "2021-04-06T08:19:12.007Z", + "modified_on": "2021-04-06T08:19:12.007Z", + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + } + } +} +``` +
+ +
+  success_custom +```json +{ + "value": { + "_id": "64a7c915c160922f34ba4f12", + "name": "Contract Discount Name", + "company_id": 90, + "is_active": true, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "job_type": "app", + "discount_type": "flat", + "discount_level": "application", + "value": 10, + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ], + "discount_meta": { + "timer": true, + "hours": 20, + "minutes": 35 + }, + "validity": { + "start": "2090-04-07T08:19:12.007Z", + "end": "2090-04-10T08:19:12.007Z" + }, + "created_on": "2021-04-06T08:19:12.007Z", + "modified_on": "2021-04-06T08:19:12.007Z", + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + } + } +} ```
+
+ @@ -238,13 +350,64 @@ Success
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "_id": "xxxxxxxxxxxx", + "stage": "processing", + "total": 10, + "failed": 0, + "company_id": 90, + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "body": { + "is_active": false, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "_id": "xxxxxxxxxxxx", + "name": "Discount", + "job_type": "app", + "discount_type": "percentage", + "discount_level": "application", + "company_id": 90, + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "validity": { + "start": "2021-04-06T08:25:34.110Z", + "end": "2021-04-22T18:30:00.000Z" + }, + "value": null, + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "created_on": "2021-04-06T08:10:16.609Z", + "modified_on": "2021-04-07T08:19:12.007Z", + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ] + }, + "type": "download", + "file_type": "product" + } +} ```
+
+ @@ -294,13 +457,106 @@ Success
-  Example: +  Examples: + + +
+  success_basic ```json +{ + "value": { + "_id": "64a7c915c160922f34ba4f12", + "name": "Discount Name", + "company_id": 90, + "is_active": true, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "job_type": "app", + "discount_type": "flat", + "discount_level": "application", + "value": 10, + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ], + "discount_meta": { + "timer": true, + "hours": 20, + "minutes": 35 + }, + "validity": { + "start": "2021-04-07T08:19:12.007Z", + "end": "2021-04-10T08:19:12.007Z" + }, + "created_on": "2021-04-06T08:19:12.007Z", + "modified_on": "2021-04-06T08:19:12.007Z", + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + } + } +} +``` +
+ +
+  success_custom +```json +{ + "value": { + "_id": "62c538dd6c0f710007ac6dbf", + "name": "Discount Name", + "company_id": 90, + "is_active": true, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "job_type": "app|brand|product", + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "discount_type": "flat", + "discount_level": "application", + "value": 10, + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ], + "discount_meta": { + "timer": true, + "hours": 20, + "minutes": 35 + }, + "validity": { + "start": "2021-04-07T08:19:12.007Z", + "end": "2021-04-10T08:19:12.007Z" + }, + "created_on": "2021-04-06T08:19:12.007Z", + "modified_on": "2021-04-06T08:19:12.007Z", + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + } + } +} ```
+
+ @@ -374,13 +630,120 @@ Success
-  Example: +  Examples: + + +
+  success_basic ```json +{ + "value": { + "items": [ + { + "is_active": false, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "_id": "xxxxxxxxxxxx", + "name": "Discount Basic", + "job_type": "app", + "discount_type": "percentage", + "discount_level": "application", + "company_id": 90, + "validity": { + "start": "2021-04-06T08:25:34.110Z", + "end": "2021-04-22T18:30:00.000Z" + }, + "value": 0, + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "created_on": "2021-04-06T08:10:16.609Z", + "modified_on": "2021-04-07T08:19:12.007Z", + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ] + } + ], + "page": { + "current": 1, + "item_total": 1, + "type": "number", + "size": 1, + "has_previous": true, + "has_next": false + } + } +} +``` +
+ +
+  success_custom +```json +{ + "value": { + "items": [ + { + "is_active": false, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "_id": "xxxxxxxxxxxx", + "name": "Discount", + "job_type": "app|brand|product", + "discount_type": "percentage", + "discount_level": "application", + "company_id": 90, + "validity": { + "start": "2021-04-06T08:25:34.110Z", + "end": "2021-04-22T18:30:00.000Z" + }, + "value": 0, + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "created_on": "2021-04-06T08:10:16.609Z", + "modified_on": "2021-04-07T08:19:12.007Z", + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ] + } + ], + "page": { + "current": 1, + "item_total": 1, + "type": "number", + "size": 1, + "has_previous": true, + "has_next": false + } + } +} ```
+
+ @@ -430,13 +793,64 @@ Success
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "_id": "651b00ef29aedf98f98a8cbd", + "stage": "processing", + "total": 10, + "failed": 0, + "company_id": 90, + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "body": { + "is_active": false, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "_id": "64a7c915c160922f34ba4f12", + "name": "Discount", + "job_type": "app", + "discount_type": "percentage", + "discount_level": "application", + "company_id": 90, + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "validity": { + "start": "2021-04-06T08:25:34.110Z", + "end": "2021-04-22T18:30:00.000Z" + }, + "value": null, + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "created_on": "2021-04-06T08:10:16.609Z", + "modified_on": "2021-04-07T08:19:12.007Z", + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ] + }, + "type": "download", + "file_type": "product" + } +} ```
+
+ @@ -486,13 +900,64 @@ Success
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "_id": "6519669e7fc0cd03ce111ab9", + "stage": "processing", + "total": 10, + "failed": 0, + "company_id": 90, + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "body": { + "is_active": false, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "_id": "64a7c915c160922f34ba4f12", + "name": "Discount", + "job_type": "app", + "discount_type": "percentage", + "discount_level": "application", + "company_id": 90, + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "validity": { + "start": "2021-04-06T08:25:34.110Z", + "end": "2021-04-22T18:30:00.000Z" + }, + "value": null, + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "created_on": "2021-04-06T08:10:16.609Z", + "modified_on": "2021-04-07T08:19:12.007Z", + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ] + }, + "type": "download", + "file_type": "product" + } +} ```
+
+ @@ -505,7 +970,7 @@ Success ### updateDiscount -Create Discount. +Update Discount. @@ -529,7 +994,7 @@ const data = await platformClient.discount.updateDiscount({ id : value, | body | [CreateUpdateDiscount](#CreateUpdateDiscount) | yes | Request body | -Create Discount. +Update Discount. *Returned Response:* @@ -544,13 +1009,102 @@ Success
-  Example: +  Examples: + + +
+  success_basic ```json +{ + "value": { + "_id": "64a7c915c160922f34ba4f12", + "name": "Discount Name", + "company_id": 90, + "is_active": true, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "job_type": "app", + "discount_type": "flat", + "discount_level": "application", + "value": 10, + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ], + "discount_meta": { + "timer": true, + "hours": 20, + "minutes": 35 + }, + "validity": { + "start": "2021-04-07T08:19:12.007Z", + "end": "2021-04-10T08:19:12.007Z" + }, + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + } + } +} +``` +
+
+  success_custom + +```json +{ + "value": { + "_id": "64a7c915c160922f34ba4f12", + "name": "Discount Name", + "company_id": 90, + "is_active": true, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "job_type": "app", + "discount_type": "flat", + "discount_level": "application", + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "value": 10, + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ], + "discount_meta": { + "timer": true, + "hours": 20, + "minutes": 35 + }, + "validity": { + "start": "2021-04-07T08:19:12.007Z", + "end": "2021-04-10T08:19:12.007Z" + }, + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + } + } +} ```
+
+ @@ -602,13 +1156,35 @@ Success
-  Example: +  Examples: + + +
+  success_product ```json +{ + "value": { + "success": true + } +} +``` +
+ +
+  success_inventory +```json +{ + "value": { + "success": true + } +} ```
+
+ @@ -660,13 +1236,64 @@ Success
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "_id": "xxxxxxxxxxxx", + "stage": "processing", + "total": 10, + "failed": 0, + "company_id": 90, + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "body": { + "is_active": false, + "app_ids": [ + "646f43ee3b7f8c2847e31fb0" + ], + "_id": "xxxxxxxxxxxx", + "name": "Discount", + "job_type": "app|brand|product", + "discount_type": "percentage", + "discount_level": "application", + "company_id": 90, + "file_path": "https://xxx.xxx.xxx/file.xlsx", + "validity": { + "start": "2090-04-06T08:25:34.110Z", + "end": "2090-04-22T18:30:00.000Z" + }, + "value": null, + "created_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "modified_by": { + "username": "narutouzumaki", + "user_id": "0" + }, + "created_on": "2021-04-06T08:10:16.609Z", + "modified_on": "2021-04-07T08:19:12.007Z", + "brand_ids": [ + 90 + ], + "store_ids": [ + 1001 + ] + }, + "type": "download", + "file_type": "product" + } +} ```
+
+ @@ -683,6 +1310,15 @@ Success ### Schemas +#### [BadRequestData](#BadRequestData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + + +--- + #### [BadRequestObject](#BadRequestObject) | Properties | Type | Nullable | Description | @@ -690,6 +1326,17 @@ Success | message | string | no | | +--- + +#### [BadRequestObjectGet](#BadRequestObjectGet) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | data | [BadRequestData](#BadRequestData)? | yes | | + | error | string? | yes | | + | message | string? | yes | | + + --- #### [BulkDiscount](#BulkDiscount) @@ -721,7 +1368,7 @@ Success | discount_level | string | no | | | discount_meta | [DiscountMeta](#DiscountMeta)? | yes | | | discount_type | string | no | | - | extension_ids | [string] | no | | + | extension_ids | [string]? | yes | | | file_path | string? | yes | | | is_active | boolean | no | | | job_type | string | no | | @@ -729,7 +1376,6 @@ Success | store_ids | [number]? | yes | | | validity | [ValidityObject](#ValidityObject) | no | | | value | number? | yes | | - | zone_ids | [string]? | yes | | --- @@ -738,7 +1384,7 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | brand_uid | number? | yes | | + | brand_name | string? | yes | | | discount_meta | [DiscountMeta](#DiscountMeta)? | yes | | | discount_type | string | no | | | item_code | string? | yes | | @@ -771,6 +1417,7 @@ Success | store_ids | [number]? | yes | | | validity | [ValidityObject](#ValidityObject) | no | | | value | number? | yes | | + | zone_ids | [string]? | yes | | --- @@ -794,6 +1441,34 @@ Success | store_ids | [number]? | yes | | +--- + +#### [FileJobBody](#FileJobBody) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | app_ids | [string]? | yes | | + | brand_ids | [number]? | yes | | + | company_id | number? | yes | | + | created_by | [UserDetails](#UserDetails)? | yes | | + | created_on | string? | yes | | + | discount_level | string? | yes | | + | discount_meta | [DiscountMeta](#DiscountMeta)? | yes | | + | discount_type | string? | yes | | + | extension_ids | [string]? | yes | | + | file_path | string? | yes | | + | is_active | boolean? | yes | | + | job_type | string? | yes | | + | meta | string? | yes | | + | modified_by | [UserDetails](#UserDetails)? | yes | | + | modified_on | string? | yes | | + | name | string? | yes | | + | store_ids | [number]? | yes | | + | validity | [ValidityObject](#ValidityObject)? | yes | | + | value | number? | yes | | + | zone_ids | [string]? | yes | | + + --- #### [FileJobRequest](#FileJobRequest) @@ -802,6 +1477,7 @@ Success | ---------- | ---- | -------- | ----------- | | app_ids | [string]? | yes | | | brand_ids | [number]? | yes | | + | company_id | number | no | | | discount_level | string? | yes | | | discount_type | string? | yes | | | file_path | string? | yes | | @@ -820,14 +1496,20 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string | no | A unique identifier to distinguish and identify a job. | - | body | string? | yes | | + | body | [FileJobBody](#FileJobBody)? | yes | | | company_id | number | no | | + | created_by | [UserDetails](#UserDetails)? | yes | | + | created_on | string? | yes | | + | extension_ids | [string]? | yes | | | failed | number | no | | - | file_path | string | no | | - | file_type | string | no | | + | file_path | string? | yes | | + | file_type | string? | yes | | + | modified_on | string? | yes | | + | progress | number? | yes | | | stage | string | no | | | total | number | no | | | type | string | no | | + | zone_ids | [string]? | yes | | --- @@ -852,7 +1534,7 @@ Success | item_total | number? | yes | | | next_id | string? | yes | | | size | number? | yes | | - | type | number | no | | + | type | string | no | | --- diff --git a/documentation/platform/FILESTORAGE.md b/documentation/platform/FILESTORAGE.md index 6d5caa5cc..f5b40c814 100644 --- a/documentation/platform/FILESTORAGE.md +++ b/documentation/platform/FILESTORAGE.md @@ -18,6 +18,7 @@ Default * [appStartUpload](#appstartupload) * [appbrowse](#appbrowse) * [browse](#browse) +* [browsefiles](#browsefiles) * [completeUpload](#completeupload) * [copyFiles](#copyfiles) * [generatePaymentReceipt](#generatepaymentreceipt) @@ -440,12 +441,14 @@ Browse Files // Promise const promise = platformClient.application("").fileStorage.appbrowse({ namespace : value, page : value, - limit : value }); + limit : value, + search : value }); // Async/Await const data = await platformClient.application("").fileStorage.appbrowse({ namespace : value, page : value, - limit : value }); + limit : value, + search : value }); ``` @@ -456,7 +459,8 @@ const data = await platformClient.application("").fileStorage.ap | --------- | ----- | -------- | ----------- | | namespace | string | yes | Segregation of different types of 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. | | page | number | no | page no | -| limit | number | no | Limit | +| limit | number | no | Limit | +| search | string | no | Search | @@ -644,6 +648,119 @@ Success +--- + + +### browsefiles +Browse Files + + + +```javascript +// Promise +const promise = platformClient.application("").fileStorage.browsefiles({ namespace : value, + body : value, + page : value, + limit : value, + search : value }); + +// Async/Await +const data = await platformClient.application("").fileStorage.browsefiles({ namespace : value, + body : value, + page : value, + limit : value, + search : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| namespace | string | yes | Segregation of different types of 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. | +| page | number | no | page no | +| limit | number | no | Limit | +| search | string | no | Search | +| body | [ExtensionSlug](#ExtensionSlug) | yes | Request body | + + +Browse Files + +*Returned Response:* + + + + +[Object](#Object) + +Success + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "items": [ + { + "_id": "64e1e6fe0153e1a6d3e101f4", + "file_name": "logo.png", + "file_path": "/brands/pictures/square-logo/original/uY0P_ZtIz-logo.png", + "success": true, + "namespace": "brand-square-logo", + "content_type": "image/png", + "size": 3298, + "operation": "putObject", + "tags": [], + "cdn": { + "url": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/brands/pictures/square-logo/original/uY0P_ZtIz-logo.png", + "absolute_url": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/brands/pictures/square-logo/original/uY0P_ZtIz-logo.png", + "relative_url": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/brands/pictures/square-logo/original/uY0P_ZtIz-logo.png" + }, + "upload": { + "url": "https://fynd-staging-assets.s3-accelerate.amazonaws.com/addsale/brands/pictures/square-logo/original/uY0P_ZtIz-logo.png?Content-Type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=%2F20230820%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230820T101213Z&X-Amz-Expires=1800&X-Amz-Signature=04915b14aec15712abdea3c340d5dc43729e7c982a4994650488c0150c22b0ae&X-Amz-SignedHeaders=host%3Bx-amz-acl&x-amz-acl=public-read", + "expiry": 1800 + }, + "created_by": { + "username": "fp_sdet_gofynd_com_65071" + }, + "company_id": 6520, + "bucket_key": "addsale/brands/pictures/square-logo/original/uY0P_ZtIz-logo.png", + "createdAt": "2023-08-20T10:12:14.118Z", + "updatedAt": "2023-08-20T10:12:14.118Z", + "__v": 0 + } + ], + "page": { + "current": 1, + "has_previous": false, + "has_next": true, + "item_total": 481, + "type": "number" + } + } +} +``` +
+ +
+ + + + + + + + + --- @@ -927,11 +1044,13 @@ Get html template for sales channel ```javascript // Promise const promise = platformClient.application("").fileStorage.getDefaultHtmlTemplate({ pdfTypeId : value, - format : value }); + format : value, + countryCode : value }); // Async/Await const data = await platformClient.application("").fileStorage.getDefaultHtmlTemplate({ pdfTypeId : value, - format : value }); + format : value, + countryCode : value }); ``` @@ -941,7 +1060,8 @@ const data = await platformClient.application("").fileStorage.ge | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | pdfTypeId | number | yes | | -| format | string | yes | | +| format | string | yes | | +| countryCode | string | no | | @@ -1019,10 +1139,12 @@ Get Dummy pdf data for invoice or label ```javascript // Promise -const promise = platformClient.application("").fileStorage.getDefaultPdfData({ pdfTypeId : value }); +const promise = platformClient.application("").fileStorage.getDefaultPdfData({ pdfTypeId : value, + countryCode : value }); // Async/Await -const data = await platformClient.application("").fileStorage.getDefaultPdfData({ pdfTypeId : value }); +const data = await platformClient.application("").fileStorage.getDefaultPdfData({ pdfTypeId : value, + countryCode : value }); ``` @@ -1031,7 +1153,8 @@ const data = await platformClient.application("").fileStorage.ge | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| pdfTypeId | number | yes | | +| pdfTypeId | number | yes | | +| countryCode | string | no | | @@ -1064,7 +1187,7 @@ Get dummy json data for invoice "_id": "64b7f52d56a0cba5231964b0", "pdf_type_id": 1, "payload": { - "is_international": false, + "is_export": false, "app_domain_name": "https://shop.fynd.com", "conversion_rate": { "base": "INR", @@ -1327,6 +1450,7 @@ Get dummy json data for invoice "awb_number_barcode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHsAAABICAYAAADWKYp8AAAABmJLR0QA/wD/AP+gvaeTAAAHTklEQVR4nO2db0hTXRzHv1elP7M/oILonKjL6dyyWMrE/FOkgSiNTCoriajAjKI3FQsFw15lrSLJwAL7B9ILEenFsNRKapVFShtRhkNp5SJXpm7Jtvt73jzdx/mnhJ584DnnA3txz/ndc7/nfHbvPe+uAIAAgIggCAKICAAgCAJ+MLntR93k9h/M5fzZrjV5rMnnTq2fOu7ULDNlmC3/bNmmzudn+WbLNjXfXNZx6nV+VTtT3p/lCgKHGbhshuCyGYLLZggumyG4bIbgshmCy2YILpshuGyG4LIZgstmCC6bIbhshuCyGYLLZggumyG4bIbgshmCy2YILpshuGyG4LIZgstmCC6bIbhshuCyGYLLZggumyG4bIbgshmCy2YILpshuGyG4LIZgstmCC6bIbhshuCyGYLLZggumyG4bIbgshmCy2YILpshuGyG4LIZgstmCC6bIbhshuCyGYLLZggumyG4bIbgshmCy2YILpshuGyG4LIZQqCpH3/k/G/hdzZDcNkMwWUzxLzIHhsbgyAIAT+DwQAAuHjxIuRyOXQ6Hfr6+gAA/f39yMzMhFKpRGFhIVwuFwCgtrYW8fHxUKlUaG5uBgDodLqAccPCwgAAjY2NSEpKglqtRlNTEwDA4/Fg69atUCqVWLNmDXp7e2G326dl27dvn5S9paUFJpNJOn769Cl0Oh0SExNhNBoDvl9NRMjPz8f9+/cBAKOjo8jLy0NMTAwOHDgAURQBAOfOnYNKpYJGo4HZbP4jaz4j9B9QWVlJd+7cocHBQUpOTqbx8XEym81UWFhIRETbt2+n69evExFRdXU1HT16lN6/f09qtZrcbjd9+vSJ4uPjSRTFgHHNZjMdP36cBgYGSKvV0sjICA0PD5NWq6XR0VG6dOkS7d+/n4iI2tvbSa/XT8tWXl5OFouFRFGkyspKioqKorNnz0r9KSkpZLPZyOfzkcFgoAcPHkh9DQ0NJJPJqLOzk4iIqqqqqKamhkRRpOLiYmptbaWenh7S6/XkdrvJ4XCQVqslr9f77y7wLMz7Y7y/vx9v3rxBYWEhOjo6sHnzZshkMmzcuBGvXr2CKIpYsmQJtmzZAgBYt24d+vr6sGjRIgQHB0MURfj9fvj9/oC7yuv1ora2FlVVVbDZbNDr9Vi2bBnCwsKQnp4Oi8UCr9eLvXv3AgCysrJgt9sDsr18+RI+nw8ZGRkAgNzcXBQXF0v9o6Oj8Pl8SElJQXBwMAwGA+7duwcAcDgcaGpqwqZNm6T69vZ2lJWVQRAElJWVoa2tDb29vVi/fj0WL16M6OhoxMXFwWq1/pnFnsK8yz516hSOHTsGAHA6nZDL5QAAQRAQERGBL1++oKGhATKZDF6vFyaTCRs2bEB4eDjy8/Mhl8uhVCphNBoRFPRP/Bs3bqCoqAihoaFISkqCxWLB169fMTQ0hM7OTjidThw+fBh6vR4AYDKZkJubG5Dt5MmTMBqNUp68vDyoVCqpf+nSpRBFEVarFRMTE2hubobT6QQAHDp0CCaTCSEhIVK90+lEdHQ0ACAmJgZDQ0NISUlBR0cH3G437HY7njx5Io3xpwn5dcm/h8PhwODgINLS0qQ2QRACan6816xWK3bv3o3s7GxUVFSgu7sbz549g8PhwNjYGAwGA0pLS7F8+XIQEerr66V3ZUJCAo4cOYK1a9dCLpdj9erVkMlkAACXy4Xy8nK4XC7cvn1buq7VakVISAgSEhJ+OofGxkbs2bMHgiAgPT0dCxYswK1bt7By5UqkpqZOq588P1EUkZaWhpKSEqSnp0OpVAZk+9PM653d1NQU8FiMjIzEx48fpePh4WGEh4fDYrGgpKQEdXV1OH/+PIKCgvD8+XMUFBQgNDQUkZGRSE5ORnd3NwCgu7sbiYmJCA0NBQD4/X6UlpbCZrOhra0NAKBQKPD582fk5OSgoKAAd+/elTZzAHDz5k1s27btl3PQarXSHy8hIQGxsbF4/Pgxrl27BqVSiZaWFuzYsQMdHR0B8/vw4QOioqLg8/lQUVEBm82G1tZWeDweKBSK31/cuTAvO4O/yc7OJrvdLh07HA5KTU2liYkJevjwobRBy8rKIpvNFnDuo0ePKCcnh75//04ul4uSkpJoYGCAiIhOnDghbeiIiMbGxigqKopcLhe9ffuW1Go1+f1+MhqNdPny5RmzaTQaGhkZmdZ+4cKFgA1aZmYmdXV10fj4OK1atYrevXsXUL9r1y5pg1ZdXU1nzpwhIqKdO3dSa2srORwOio+PJ7fbTS9evKC0tLQ5r9/vMm+yPR4PKRSKae11dXWk1WopIyOD+vr6yO/308KFCwmA9CsuLiYiopqaGlIqlbRixQq6evWqNEZWVha9fv06YNwrV65QXFwcqVQq6urqIiKivLy8gHEjIiKIiMjpdJJGo5kx91TZFouF1Go1KRQKqq+vn1Y/Wfa3b9+oqKiINBoNHTx4kPx+PxERnT59mmJjY0mr1VJPT8+c1/B3+QsIrdSMoNwxhQAAAABJRU5ErkJggg==", "uid": "16915832909421966006" }, + "country_code": "IN", "__v": 0 } ], @@ -1370,11 +1494,13 @@ Default html template ```javascript // Promise const promise = platformClient.application("").fileStorage.getDefaultPdfTemplate({ pdfTypeId : value, - format : value }); + format : value, + countryCode : value }); // Async/Await const data = await platformClient.application("").fileStorage.getDefaultPdfTemplate({ pdfTypeId : value, - format : value }); + format : value, + countryCode : value }); ``` @@ -1384,7 +1510,8 @@ const data = await platformClient.application("").fileStorage.ge | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | pdfTypeId | number | yes | | -| format | string | yes | | +| format | string | yes | | +| countryCode | string | no | | @@ -1461,18 +1588,23 @@ Get all the supported invoice pdf types ```javascript // Promise -const promise = platformClient.application("").fileStorage.getPdfTypes(); +const promise = platformClient.application("").fileStorage.getPdfTypes({ countryCode : value }); // Async/Await -const data = await platformClient.application("").fileStorage.getPdfTypes(); +const data = await platformClient.application("").fileStorage.getPdfTypes({ countryCode : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| countryCode | string | no | | + -Get all the supported invoice pdf types such as Invoice, Label, Deliver challan + +Get all the supported invoice pdf types such as Invoice, Label, Delivery challan *Returned Response:* @@ -2125,6 +2257,7 @@ Update html template for invoice | ---------- | ---- | -------- | ----------- | | __v | number? | yes | | | _id | string? | yes | | + | country_code | string? | yes | | | payload | [DummyTemplateDataPayload](#DummyTemplateDataPayload) | no | | | pdf_type_id | number? | yes | | @@ -2161,7 +2294,7 @@ Update html template for invoice | disclaimer | string? | yes | | | image | [Image](#Image)? | yes | | | invoice_detail | [InvoiceDetail](#InvoiceDetail)? | yes | | - | is_international | boolean? | yes | | + | is_export | boolean? | yes | | | is_self_pickup | boolean? | yes | | | is_self_ship | boolean? | yes | | | meta | [Meta](#Meta)? | yes | | @@ -2182,6 +2315,15 @@ Update html template for invoice | waybills | [string]? | yes | | +--- + +#### [ExtensionSlug](#ExtensionSlug) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | extension_slug | string? | yes | | + + --- #### [FailedResponse](#FailedResponse) @@ -2245,7 +2387,7 @@ Update html template for invoice | ---------- | ---- | -------- | ----------- | | __v | number | no | | | _id | string | no | | - | country_code | string? | yes | | + | country_code | string | no | | | format | [string] | no | | | name | string | no | | | pdf_type_id | number | no | | diff --git a/documentation/platform/FINANCE.md b/documentation/platform/FINANCE.md index d445c4f75..25c0c2bd9 100644 --- a/documentation/platform/FINANCE.md +++ b/documentation/platform/FINANCE.md @@ -28,12 +28,15 @@ Default * [getReason](#getreason) * [getReportList](#getreportlist) * [getReportingFilters](#getreportingfilters) +* [invoiceActivityLogs](#invoiceactivitylogs) * [invoiceListing](#invoicelisting) * [invoicePDF](#invoicepdf) +* [invoicePaymentDetails](#invoicepaymentdetails) * [invoiceType](#invoicetype) * [isCnRefundMethod](#iscnrefundmethod) * [isCreditlinePlatform](#iscreditlineplatform) * [paymentProcess](#paymentprocess) +* [unlockCreditNote](#unlockcreditnote) @@ -1758,6 +1761,73 @@ Success +--- + + +### invoiceActivityLogs +Display activity log details of an invoice. + + + +```javascript +// Promise +const promise = platformClient.finance.invoiceActivityLogs({ invoiceNumber : value }); + +// Async/Await +const data = await platformClient.finance.invoiceActivityLogs({ invoiceNumber : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| invoiceNumber | string | yes | Invoice Number for which the data will be returned. Invoice_number is required. | + + + +Display activity log details of invoice. + +*Returned Response:* + + + + +[InvoiceActivityLogsResponse](#InvoiceActivityLogsResponse) + +Success + + + + +
+  Example: + +```json +{ + "data": [ + { + "performed_by": "system", + "status": "processed", + "reason": "", + "is_resolved": true, + "retry_attempts": 0, + "max_retry_attempts": 3 + } + ] +} +``` +
+ + + + + + + + + --- @@ -1828,7 +1898,12 @@ Success "status": "UNPAID", "is_downloadable": true, "invoice_id": "18d6bf81-21f8-4dd7-9c37-72751173a24a", - "source_id": "" + "source_id": "", + "currency": { + "code": "INR", + "symbol": "r", + "name": "Indian Rupee" + } } ], "unpaid_invoice_data": { @@ -1927,6 +2002,89 @@ Success +--- + + +### invoicePaymentDetails +Display payment details of an invoice. + + + +```javascript +// Promise +const promise = platformClient.finance.invoicePaymentDetails({ invoiceNumber : value }); + +// Async/Await +const data = await platformClient.finance.invoicePaymentDetails({ invoiceNumber : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| invoiceNumber | string | yes | Invoice Number for which the data will be returned.Invoice_Number is required. | + + + +Display payment details of invoice. + +*Returned Response:* + + + + +[InvoicePaymentDetailsResponse](#InvoicePaymentDetailsResponse) + +Success + + + + +
+  Example: + +```json +{ + "payment_details_visible": true, + "paid_invoice_payment_details": [ + { + "payment_details": [ + { + "display_name": "Type of Payment", + "value": "Online" + }, + { + "display_name": "Mode of Payment", + "value": "Upi" + }, + { + "display_name": "UPI ID", + "value": "8787987654@ybl" + }, + { + "display_name": "Reference Number", + "value": "882648404204" + } + ], + "date_of_payment": "2023-07-19 13:12:15.901928", + "amount": 8000 + } + ], + "failed_attempts_details": [] +} +``` +
+ + + + + + + + + --- @@ -2213,6 +2371,67 @@ Success +--- + + +### unlockCreditNote +Unlocks credit notes. + + + +```javascript +// Promise +const promise = platformClient.finance.unlockCreditNote({ body : value }); + +// Async/Await +const data = await platformClient.finance.unlockCreditNote({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [UnlockCreditNoteRequest](#UnlockCreditNoteRequest) | yes | Request body | + + +Used to unlock all request credit notes. + +*Returned Response:* + + + + +[UnlockCreditNoteResponse](#UnlockCreditNoteResponse) + +Success + + + + +
+  Example: + +```json +{ + "success": true, + "data": { + "is_cn_unlocked": true, + "status": "completed" + } +} +``` +
+ + + + + + + + + --- @@ -2398,7 +2617,7 @@ Success | item_count | number? | yes | | | items | [string]? | yes | | | message | string? | yes | | - | page | string? | yes | | + | page | [Page](#Page)? | yes | | | show_mr | boolean? | yes | | @@ -2419,7 +2638,7 @@ Success | ---------- | ---- | -------- | ----------- | | available_cn_balance | number? | yes | | | cn_amount | number? | yes | | - | cn_details | string? | yes | | + | cn_details | [CnDetails](#CnDetails)? | yes | | | cn_reference_number | string? | yes | | | cn_status | string? | yes | | | customer_mobile_number | string? | yes | | @@ -2446,6 +2665,17 @@ Success | success | boolean? | yes | | +--- + +#### [Currency](#Currency) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | code | string? | yes | | + | name | string? | yes | | + | symbol | string? | yes | | + + --- #### [DeleteConfig](#DeleteConfig) @@ -2968,6 +3198,38 @@ Success | payment_status | [string]? | yes | | +--- + +#### [InvoiceActivityLogError](#InvoiceActivityLogError) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | reason | string? | yes | | + + +--- + +#### [InvoiceActivityLogsResponse](#InvoiceActivityLogsResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | data | [[InvoiceActivityLogsResponseData](#InvoiceActivityLogsResponseData)]? | yes | | + + +--- + +#### [InvoiceActivityLogsResponseData](#InvoiceActivityLogsResponseData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | is_resolved | boolean? | yes | | + | max_retry_attempts | number? | yes | | + | performed_by | string? | yes | | + | reason | string? | yes | | + | retry_attempts | number? | yes | | + | status | string? | yes | | + + --- #### [InvoiceListingPayloadData](#InvoiceListingPayloadData) @@ -3011,6 +3273,7 @@ Success | ---------- | ---- | -------- | ----------- | | amount | string? | yes | | | company | string? | yes | | + | currency | [Currency](#Currency)? | yes | | | due_date | string? | yes | | | invoice_date | string? | yes | | | invoice_id | string? | yes | | @@ -3021,6 +3284,27 @@ Success | status | string? | yes | | +--- + +#### [InvoicePaymentDetailsResponse](#InvoicePaymentDetailsResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | data | [InvoicePaymentDetailsResponseData](#InvoicePaymentDetailsResponseData)? | yes | | + | payment_details_visible | boolean? | yes | | + | success | boolean? | yes | | + + +--- + +#### [InvoicePaymentDetailsResponseData](#InvoicePaymentDetailsResponseData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | failed_attempts_details | [string]? | yes | | + | paid_invoice_payment_details | [[PaidInvoicePaymentDetail](#PaidInvoicePaymentDetail)]? | yes | | + + --- #### [InvoicePdfPayloadData](#InvoicePdfPayloadData) @@ -3164,11 +3448,32 @@ Success | ---------- | ---- | -------- | ----------- | | current | number? | yes | | | has_next | boolean? | yes | | - | item_total | number? | yes | | + | item_count | number? | yes | | | size | number? | yes | | | type | string? | yes | | +--- + +#### [PaidInvoicePaymentDetail](#PaidInvoicePaymentDetail) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | amount | number? | yes | | + | date_of_payment | string? | yes | | + | payment_details | [[PaymentDetail](#PaymentDetail)]? | yes | | + + +--- + +#### [PaymentDetail](#PaymentDetail) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display_name | string? | yes | | + | value | string? | yes | | + + --- #### [PaymentProcessPayload](#PaymentProcessPayload) @@ -3251,6 +3556,47 @@ Success | report_type | string? | yes | | +--- + +#### [UnlockCreditNoteRequest](#UnlockCreditNoteRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | data | [UnlockCreditNoteRequestData](#UnlockCreditNoteRequestData)? | yes | | + + +--- + +#### [UnlockCreditNoteRequestData](#UnlockCreditNoteRequestData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | description | string? | yes | | + | locked_credit_notes | [string]? | yes | | + | seller_id | string? | yes | | + | unlock_reason | string? | yes | | + + +--- + +#### [UnlockCreditNoteResponse](#UnlockCreditNoteResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | data | [UnlockCreditNoteResponseData](#UnlockCreditNoteResponseData)? | yes | | + | success | boolean? | yes | | + + +--- + +#### [UnlockCreditNoteResponseData](#UnlockCreditNoteResponseData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | is_cn_unlocked | boolean? | yes | | + | status | string? | yes | | + + --- #### [UnpaidInvoiceDataItems](#UnpaidInvoiceDataItems) diff --git a/documentation/platform/LEAD.md b/documentation/platform/LEAD.md index 6e9a87e07..293f8e120 100644 --- a/documentation/platform/LEAD.md +++ b/documentation/platform/LEAD.md @@ -6,32 +6,33 @@ ##### [Back to Platform docs](./README.md) ## Lead Methods -Handles communication between Administrator +Handles communication between Administrator-Staff and Staff-Users Default * [closeVideoRoom](#closevideoroom) * [createCustomForm](#createcustomform) -* [createHistory](#createhistory) +* [createNewHistory](#createnewhistory) * [createPlatformTicketHistory](#createplatformtickethistory) * [createTicket](#createticket) +* [deleteCustomForm](#deletecustomform) * [editCustomForm](#editcustomform) +* [editNewTicket](#editnewticket) * [editPlatformTicket](#editplatformticket) -* [editTicket](#editticket) * [getCustomForm](#getcustomform) * [getCustomForms](#getcustomforms) * [getFeedbacks](#getfeedbacks) * [getGeneralConfig](#getgeneralconfig) +* [getNewTicket](#getnewticket) +* [getNewTicketHistory](#getnewtickethistory) +* [getNewTickets](#getnewtickets) +* [getNewTokenForVideoRoom](#getnewtokenforvideoroom) +* [getNewVideoParticipants](#getnewvideoparticipants) * [getPlatformTicket](#getplatformticket) * [getPlatformTicketHistory](#getplatformtickethistory) * [getPlatformTickets](#getplatformtickets) * [getPlatformVideoParticipants](#getplatformvideoparticipants) -* [getTicket](#getticket) -* [getTicketHistory](#gettickethistory) -* [getTickets](#gettickets) * [getTokenForPlatformVideoRoom](#gettokenforplatformvideoroom) -* [getTokenForVideoRoom](#gettokenforvideoroom) -* [getVideoParticipants](#getvideoparticipants) * [openVideoRoom](#openvideoroom) * [submitFeedback](#submitfeedback) @@ -230,18 +231,18 @@ Success --- -### createHistory +### createNewHistory Create history for specific application level ticket ```javascript // Promise -const promise = platformClient.application("").lead.createHistory({ id : value, +const promise = platformClient.application("").lead.createNewHistory({ id : value, body : value }); // Async/Await -const data = await platformClient.application("").lead.createHistory({ id : value, +const data = await platformClient.application("").lead.createNewHistory({ id : value, body : value }); ``` @@ -684,6 +685,127 @@ Success +--- + + +### deleteCustomForm +Delete a custom form + + + +```javascript +// Promise +const promise = platformClient.application("").lead.deleteCustomForm({ slug : value }); + +// Async/Await +const data = await platformClient.application("").lead.deleteCustomForm({ slug : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| slug | string | yes | Slug of form whose response is getting submitted | + + + +Delete a custom form using it's slug + +*Returned Response:* + + + + +[CustomForm](#CustomForm) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": [ + { + "required": false, + "login_required": false, + "should_notify": false, + "inputs": [ + { + "type": "email", + "showRegexInput": true, + "enum": [], + "regex": "\\S+@\\S+\\.\\S+", + "display": "email", + "required": true, + "key": "email" + }, + { + "type": "number", + "showRegexInput": false, + "enum": [], + "display": "Enter your fav number", + "placeholder": "123", + "key": "enter-your-fav-number" + } + ], + "available_assignees": [], + "_id": "602e900a2042255c03cadaf0", + "title": "service-test-satyen", + "description": "testing form from service", + "slug": "service-test-satyen", + "header_image": "https://hdn-1.addsale.com/x0/support-ticket/files/free/original/KZL86aN5l-service-test-satyen.jpeg", + "application_id": "000000000000000000000001", + "created_on": { + "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36", + "platform": "web", + "meta": { + "browser": { + "name": "Chrome", + "version": "88.0.4324.150" + }, + "os": { + "name": "macOS", + "version": "11.2.0" + }, + "platform": { + "type": "desktop", + "vendor": "Apple" + }, + "engine": { + "name": "Blink" + } + } + }, + "created_by": "5f8147abbd1a0a870f61f1a6", + "createdAt": "2021-02-18T16:04:26.495Z", + "updatedAt": "2021-02-26T10:16:49.272Z", + "__v": 0 + } + ] +} +``` +
+ +
+ + + + + + + + + --- @@ -810,18 +932,18 @@ Success --- -### editPlatformTicket -Edits ticket details of a company level ticket +### editNewTicket +Edits ticket details of a application level ticket ```javascript // Promise -const promise = platformClient.lead.editPlatformTicket({ id : value, +const promise = platformClient.application("").lead.editNewTicket({ id : value, body : value }); // Async/Await -const data = await platformClient.lead.editPlatformTicket({ id : value, +const data = await platformClient.application("").lead.editNewTicket({ id : value, body : value }); ``` @@ -835,7 +957,7 @@ const data = await platformClient.lead.editPlatformTicket({ id : value, | body | [EditTicketPayload](#EditTicketPayload) | yes | Request body | -Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes +Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes *Returned Response:* @@ -860,7 +982,8 @@ Success { "value": { "context": { - "company_id": "1" + "application_id": "000000000000000000000003", + "company_id": "884" }, "content": { "title": "SOme title Response", @@ -1066,18 +1189,18 @@ Success --- -### editTicket -Edits ticket details of a application level ticket +### editPlatformTicket +Edits ticket details of a company level ticket ```javascript // Promise -const promise = platformClient.application("").lead.editTicket({ id : value, +const promise = platformClient.lead.editPlatformTicket({ id : value, body : value }); // Async/Await -const data = await platformClient.application("").lead.editTicket({ id : value, +const data = await platformClient.lead.editPlatformTicket({ id : value, body : value }); ``` @@ -1091,7 +1214,7 @@ const data = await platformClient.application("").lead.editTicke | body | [EditTicketPayload](#EditTicketPayload) | yes | Request body | -Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes +Edits ticket details of a company level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes *Returned Response:* @@ -1116,8 +1239,7 @@ Success { "value": { "context": { - "application_id": "000000000000000000000003", - "company_id": "884" + "company_id": "1" }, "content": { "title": "SOme title Response", @@ -1779,17 +1901,17 @@ Success --- -### getPlatformTicket -Retreives ticket details of a company level ticket with ticket ID +### getNewTicket +Retreives ticket details of a application level ticket ```javascript // Promise -const promise = platformClient.lead.getPlatformTicket({ id : value }); +const promise = platformClient.application("").lead.getNewTicket({ id : value }); // Async/Await -const data = await platformClient.lead.getPlatformTicket({ id : value }); +const data = await platformClient.application("").lead.getNewTicket({ id : value }); ``` @@ -1802,7 +1924,7 @@ const data = await platformClient.lead.getPlatformTicket({ id : value }); -Retreives ticket details of a company level ticket +Retreives ticket details of a application level ticket with ticket ID *Returned Response:* @@ -1827,7 +1949,8 @@ Success { "value": { "context": { - "company_id": "1" + "application_id": "000000000000000000000003", + "company_id": "884" }, "content": { "title": "SOme title Response", @@ -2033,17 +2156,17 @@ Success --- -### getPlatformTicketHistory -Gets history list for specific company level ticket +### getNewTicketHistory +Gets history list for specific application level ticket ```javascript // Promise -const promise = platformClient.lead.getPlatformTicketHistory({ id : value }); +const promise = platformClient.application("").lead.getNewTicketHistory({ id : value }); // Async/Await -const data = await platformClient.lead.getPlatformTicketHistory({ id : value }); +const data = await platformClient.application("").lead.getNewTicketHistory({ id : value }); ``` @@ -2056,7 +2179,7 @@ const data = await platformClient.lead.getPlatformTicketHistory({ id : value }) -Gets history list for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating. +Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. *Returned Response:* @@ -2237,31 +2360,27 @@ Success --- -### getPlatformTickets -Gets the list of company level tickets and/or ticket filters depending on query params +### getNewTickets +Gets the list of Application level Tickets and/or ticket filters depending on query params ```javascript // Promise -const promise = platformClient.lead.getPlatformTickets({ items : value, +const promise = platformClient.application("").lead.getNewTickets({ items : value, filters : value, q : value, status : value, priority : value, - category : value, - pageNo : value, - pageSize : value }); + category : value }); // Async/Await -const data = await platformClient.lead.getPlatformTickets({ items : value, +const data = await platformClient.application("").lead.getNewTickets({ items : value, filters : value, q : value, status : value, priority : value, - category : value, - pageNo : value, - pageSize : value }); + category : value }); ``` @@ -2275,13 +2394,11 @@ const data = await platformClient.lead.getPlatformTickets({ items : value, | q | string | no | Search through ticket titles and description | | status | string | no | Filter tickets on status | | priority | PriorityEnum | no | Filter tickets on priority | -| category | string | no | Filter tickets on category | -| pageNo | number | no | The page number to navigate through the given set of results. | -| pageSize | number | no | Number of items to retrieve in each page. Default is 12. | +| category | string | no | Filter tickets on category | -Gets the list of company level tickets and/or ticket filters +Gets the list of Application level Tickets and/or ticket filters *Returned Response:* @@ -2688,17 +2805,83 @@ Success --- -### getPlatformVideoParticipants +### getNewTokenForVideoRoom +Get Token to join a specific Video Room using it's unqiue name + + + +```javascript +// Promise +const promise = platformClient.application("").lead.getNewTokenForVideoRoom({ uniqueName : value }); + +// Async/Await +const data = await platformClient.application("").lead.getNewTokenForVideoRoom({ uniqueName : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| uniqueName | string | yes | Unique name of video room | + + + +Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. + +*Returned Response:* + + + + +[GetTokenForVideoRoomResponse](#GetTokenForVideoRoomResponse) + +Success + + + + +
+  Examples: + + +
+  Default + +```json +{ + "value": { + "access_token": "your_token_to_the_room" + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getNewVideoParticipants Get participants of a specific Video Room using it's unique name ```javascript // Promise -const promise = platformClient.lead.getPlatformVideoParticipants({ uniqueName : value }); +const promise = platformClient.application("").lead.getNewVideoParticipants({ uniqueName : value }); // Async/Await -const data = await platformClient.lead.getPlatformVideoParticipants({ uniqueName : value }); +const data = await platformClient.application("").lead.getNewVideoParticipants({ uniqueName : value }); ``` @@ -2754,17 +2937,17 @@ Success --- -### getTicket -Retreives ticket details of a application level ticket +### getPlatformTicket +Retreives ticket details of a company level ticket with ticket ID ```javascript // Promise -const promise = platformClient.application("").lead.getTicket({ id : value }); +const promise = platformClient.lead.getPlatformTicket({ id : value }); // Async/Await -const data = await platformClient.application("").lead.getTicket({ id : value }); +const data = await platformClient.lead.getPlatformTicket({ id : value }); ``` @@ -2777,7 +2960,7 @@ const data = await platformClient.application("").lead.getTicket -Retreives ticket details of a application level ticket with ticket ID +Retreives ticket details of a company level ticket *Returned Response:* @@ -2802,8 +2985,7 @@ Success { "value": { "context": { - "application_id": "000000000000000000000003", - "company_id": "884" + "company_id": "1" }, "content": { "title": "SOme title Response", @@ -3009,17 +3191,17 @@ Success --- -### getTicketHistory -Gets history list for specific application level ticket +### getPlatformTicketHistory +Gets history list for specific company level ticket ```javascript // Promise -const promise = platformClient.application("").lead.getTicketHistory({ id : value }); +const promise = platformClient.lead.getPlatformTicketHistory({ id : value }); // Async/Await -const data = await platformClient.application("").lead.getTicketHistory({ id : value }); +const data = await platformClient.lead.getPlatformTicketHistory({ id : value }); ``` @@ -3032,7 +3214,7 @@ const data = await platformClient.application("").lead.getTicket -Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. +Gets history list for specific company level ticket, this history is seen on ticket detail page, this can be comment, log or rating. *Returned Response:* @@ -3213,27 +3395,31 @@ Success --- -### getTickets -Gets the list of Application level Tickets and/or ticket filters depending on query params +### getPlatformTickets +Gets the list of company level tickets and/or ticket filters depending on query params ```javascript // Promise -const promise = platformClient.application("").lead.getTickets({ items : value, +const promise = platformClient.lead.getPlatformTickets({ items : value, filters : value, q : value, status : value, priority : value, - category : value }); + category : value, + pageNo : value, + pageSize : value }); // Async/Await -const data = await platformClient.application("").lead.getTickets({ items : value, +const data = await platformClient.lead.getPlatformTickets({ items : value, filters : value, q : value, status : value, priority : value, - category : value }); + category : value, + pageNo : value, + pageSize : value }); ``` @@ -3247,11 +3433,13 @@ const data = await platformClient.application("").lead.getTicket | q | string | no | Search through ticket titles and description | | status | string | no | Filter tickets on status | | priority | PriorityEnum | no | Filter tickets on priority | -| category | string | no | Filter tickets on category | +| category | string | no | Filter tickets on category | +| pageNo | number | no | The page number to navigate through the given set of results. | +| pageSize | number | no | Number of items to retrieve in each page. Default is 12. | -Gets the list of Application level Tickets and/or ticket filters +Gets the list of company level tickets and/or ticket filters *Returned Response:* @@ -3658,17 +3846,17 @@ Success --- -### getTokenForPlatformVideoRoom -Get Token to join a specific Video Room using it's unqiue name +### getPlatformVideoParticipants +Get participants of a specific Video Room using it's unique name ```javascript // Promise -const promise = platformClient.lead.getTokenForPlatformVideoRoom({ uniqueName : value }); +const promise = platformClient.lead.getPlatformVideoParticipants({ uniqueName : value }); // Async/Await -const data = await platformClient.lead.getTokenForPlatformVideoRoom({ uniqueName : value }); +const data = await platformClient.lead.getPlatformVideoParticipants({ uniqueName : value }); ``` @@ -3677,18 +3865,18 @@ const data = await platformClient.lead.getTokenForPlatformVideoRoom({ uniqueNam | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| uniqueName | string | yes | Unique name of video room | +| uniqueName | string | yes | Unique name of Video Room | -Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. +Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. *Returned Response:* -[GetTokenForVideoRoomResponse](#GetTokenForVideoRoomResponse) +[GetParticipantsInsideVideoRoomResponse](#GetParticipantsInsideVideoRoomResponse) Success @@ -3705,7 +3893,7 @@ Success ```json { "value": { - "access_token": "your_token_to_the_room" + "participants": [] } } ``` @@ -3724,17 +3912,17 @@ Success --- -### getTokenForVideoRoom +### getTokenForPlatformVideoRoom Get Token to join a specific Video Room using it's unqiue name ```javascript // Promise -const promise = platformClient.application("").lead.getTokenForVideoRoom({ uniqueName : value }); +const promise = platformClient.lead.getTokenForPlatformVideoRoom({ uniqueName : value }); // Async/Await -const data = await platformClient.application("").lead.getTokenForVideoRoom({ uniqueName : value }); +const data = await platformClient.lead.getTokenForPlatformVideoRoom({ uniqueName : value }); ``` @@ -3787,72 +3975,6 @@ Success ---- - - -### getVideoParticipants -Get participants of a specific Video Room using it's unique name - - - -```javascript -// Promise -const promise = platformClient.application("").lead.getVideoParticipants({ uniqueName : value }); - -// Async/Await -const data = await platformClient.application("").lead.getVideoParticipants({ uniqueName : value }); -``` - - - - - -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| uniqueName | string | yes | Unique name of Video Room | - - - -Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. - -*Returned Response:* - - - - -[GetParticipantsInsideVideoRoomResponse](#GetParticipantsInsideVideoRoomResponse) - -Success - - - - -
-  Examples: - - -
-  Default - -```json -{ - "value": { - "participants": [] - } -} -``` -
- -
- - - - - - - - - --- @@ -4176,6 +4298,15 @@ Success | verified | boolean? | yes | Denotes it's a verified email | +--- + +#### [ErrorMessage](#ErrorMessage) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + + --- #### [FeedbackForm](#FeedbackForm) @@ -4530,6 +4661,7 @@ Success | rating | rating | This means history event is a rating | | log | log | This means history event is a changelog | | comment | comment | This means history event is a comment | + | thread | thread | This means history event is a thread | --- diff --git a/documentation/platform/ORDER.md b/documentation/platform/ORDER.md index 5c7fbc114..75ef0210b 100644 --- a/documentation/platform/ORDER.md +++ b/documentation/platform/ORDER.md @@ -11,19 +11,23 @@ Handles all platform order and shipment api(s) Default * [attachOrderUser](#attachorderuser) +* [bulkListing](#bulklisting) +* [bulkStateTransistion](#bulkstatetransistion) * [checkOrderStatus](#checkorderstatus) * [click2Call](#click2call) * [createChannelConfig](#createchannelconfig) * [createOrder](#createorder) -* [dispatchManifest](#dispatchmanifest) +* [dispatchManifests](#dispatchmanifests) * [downloadBulkActionTemplate](#downloadbulkactiontemplate) * [downloadLanesReport](#downloadlanesreport) * [eInvoiceRetry](#einvoiceretry) +* [failedOrderLogDetails](#failedorderlogdetails) +* [failedOrderLogs](#failedorderlogs) * [fetchCreditBalanceDetail](#fetchcreditbalancedetail) * [fetchRefundModeConfig](#fetchrefundmodeconfig) -* [generateInvoiceID](#generateinvoiceid) * [generatePOSReceiptByOrderId](#generateposreceiptbyorderid) * [getAllowedStateTransition](#getallowedstatetransition) +* [getAllowedTemplatesForBulk](#getallowedtemplatesforbulk) * [getAnnouncements](#getannouncements) * [getApplicationShipments](#getapplicationshipments) * [getBagById](#getbagbyid) @@ -31,7 +35,12 @@ Default * [getBulkActionTemplate](#getbulkactiontemplate) * [getBulkShipmentExcelFile](#getbulkshipmentexcelfile) * [getChannelConfig](#getchannelconfig) +* [getFileByStatus](#getfilebystatus) * [getLaneConfig](#getlaneconfig) +* [getManifestDetails](#getmanifestdetails) +* [getManifestShipments](#getmanifestshipments) +* [getManifestfilters](#getmanifestfilters) +* [getManifests](#getmanifests) * [getOrderById](#getorderbyid) * [getOrders](#getorders) * [getPlatformShipmentReasons](#getplatformshipmentreasons) @@ -41,12 +50,21 @@ Default * [getShipmentHistory](#getshipmenthistory) * [getShipmentReasons](#getshipmentreasons) * [getShipments](#getshipments) +* [getStateManagerStates](#getstatemanagerstates) +* [getStateManagerTaskById](#getstatemanagertaskbyid) +* [getStateManagerTasks](#getstatemanagertasks) +* [getStateTransitionFilters](#getstatetransitionfilters) +* [getStateTransitionFiltersById](#getstatetransitionfiltersbyid) +* [getStateTransitionFlags](#getstatetransitionflags) +* [getStateTransitionFlagsById](#getstatetransitionflagsbyid) * [getStateTransitionMap](#getstatetransitionmap) +* [getTemplate](#gettemplate) * [getfilters](#getfilters) * [invalidateShipmentCache](#invalidateshipmentcache) +* [jobDetails](#jobdetails) * [orderUpdate](#orderupdate) * [postShipmentHistory](#postshipmenthistory) -* [processManifest](#processmanifest) +* [processManifests](#processmanifests) * [reassignLocation](#reassignlocation) * [sendSmsNinja](#sendsmsninja) * [sendUserMobileOTP](#sendusermobileotp) @@ -57,7 +75,7 @@ Default * [updateShipmentLock](#updateshipmentlock) * [updateShipmentStatus](#updateshipmentstatus) * [updateShipmentTracking](#updateshipmenttracking) -* [uploadConsent](#uploadconsent) +* [uploadConsents](#uploadconsents) * [verifyMobileOTP](#verifymobileotp) @@ -121,6 +139,371 @@ Attach user to order +--- + + +### bulkListing + + + + +```javascript +// Promise +const promise = platformClient.order.bulkListing({ pageSize : value, + pageNo : value, + startDate : value, + endDate : value, + status : value, + bulkActionType : value, + searchKey : value }); + +// Async/Await +const data = await platformClient.order.bulkListing({ pageSize : value, + pageNo : value, + startDate : value, + endDate : value, + status : value, + bulkActionType : value, + searchKey : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageSize | number | yes | page size | +| pageNo | number | yes | page number | +| startDate | string | yes | UTC start date in ISO format | +| endDate | string | yes | UTC end date in ISO format | +| status | string | no | status for which to fetch the jobs. | +| bulkActionType | string | no | job type. | +| searchKey | string | no | search_key. | + + + +Fetches of previous or running bulk jobs. + + +*Returned Response:* + + + + +[BulkListingResponse](#BulkListingResponse) + +Fetches Bulk Action Listing + + + + +
+  Examples: + + +
+  BulkListingPartiallyCompletedEventSample + +```json +{ + "value": { + "success": true, + "page": [ + { + "current": 1, + "has_previous": false, + "has_next": false, + "total": 1, + "item_total": 1, + "type": "number", + "size": 10 + } + ], + "total_count": 1, + "data": [ + { + "store_id": 1462, + "uploaded_on": "2023-09-05T15:01:28+00:00", + "company_id": 2, + "shipments_action_info": { + "label": [], + "invoice": [], + "failed_shipments": [ + { + "16938979620571207303": "got error for tag_loops: Field cannot be empty." + } + ], + "processing_shipments": [], + "successful_shipments": [ + "16939056920921266090", + "16939056919331910027" + ], + "invoiceable_shipments": [], + "failed_invoiced_shipments": {}, + "processing_invoice_shipments": [], + "successful_invoiced_shipments": [] + }, + "is_invoiceable": false, + "user_name": "sonalnalawade_gofynd_com_18670", + "file_url": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/fTPuVwPj2-store_reassigned_and_placed_and__1462_1693905700.6916761.xlsx", + "meta": null, + "invoice_document_type": "", + "file_name": "store_reassigned_and_placed_and__1462_1693905700.6916761.xlsx", + "store_name": "DK Store", + "label_document_type": "", + "updated_ts": 1693906287, + "status": "PARTIALLY COMPLETED", + "store_code": "28", + "bulk_action_type": "order_processing", + "created_ts": "2023-09-12T06:05:53.395Z", + "invoice_status": "yet_to_initiate", + "do_invoice_label_generated": false, + "id": 340, + "user_id": "eaad334a6fc2a3f6fd004e88", + "last_selected_invoice_label_type": "a4", + "batch_id": "d2cd3858-a4f2-4faa-bb86-f7dbc228d277", + "uploaded_by": null, + "failed_sh_count": 1, + "successful_sh_count": 2, + "total_count": 3, + "failed_shipments": [ + { + "16938979620571207303": "got error for tag_loops: Field cannot be empty." + } + ], + "successful_invoiced_count": 0, + "failed_invoiced_count": 0, + "total_invoiced_count": 0 + } + ] + } +} +``` +
+ +
+  BulkListingCompletedEventSample + +```json +{ + "value": { + "success": true, + "page": { + "current": 1, + "has_previous": false, + "has_next": false, + "total": 1, + "item_total": 1, + "type": "number", + "size": 10 + }, + "total_count": 1, + "data": [ + { + "store_id": 2, + "uploaded_on": "2023-09-07T13:10:14+00:00", + "company_id": 2, + "shipments_action_info": { + "label": [], + "invoice": [], + "failed_shipments": [], + "processing_shipments": [], + "successful_shipments": [ + "16940656109321358201", + "16940123806821572491" + ], + "invoiceable_shipments": [], + "failed_invoiced_shipments": {}, + "processing_invoice_shipments": [], + "successful_invoiced_shipments": [] + }, + "is_invoiceable": false, + "user_name": "hansrajdeghun_gofynd_com_07968", + "file_url": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/50sqxcYl3-gM0qwREGq-store_reassigned_and_placed_and__2_1694072387.2223.csv", + "meta": null, + "invoice_document_type": "", + "file_name": "gM0qwREGq-store_reassigned_and_placed_and__2_1694072387.2223.csv", + "store_name": "Maryam2948442024720231628917", + "label_document_type": "", + "updated_ts": 1694072414, + "status": "COMPLETED", + "store_code": "Maryam2948442024720231628917", + "bulk_action_type": "order_processing", + "created_ts": "2023-09-12T06:05:53.395Z", + "invoice_status": "yet_to_initiate", + "do_invoice_label_generated": false, + "id": 385, + "user_id": "a735b8f3fe2200e3de562c63", + "last_selected_invoice_label_type": "a4", + "batch_id": "4552cc62-688d-45f3-a5e4-dd5c9367daf0", + "uploaded_by": null, + "failed_sh_count": 0, + "successful_sh_count": 2, + "total_count": 2, + "failed_shipments": [], + "successful_invoiced_count": 0, + "failed_invoiced_count": 0, + "total_invoiced_count": 0 + } + ] + } +} +``` +
+ +
+  BulkListingFailedEventSample + +```json +{ + "value": { + "success": true, + "data": [ + { + "store_id": 1, + "uploaded_on": "2023-09-07T13:07:13+00:00", + "company_id": 2, + "shipments_action_info": { + "label": [], + "invoice": [], + "failed_shipments": [ + { + "all": "due to no of rows being less than 2 or greater than 5000" + } + ], + "processing_shipments": [], + "successful_shipments": [], + "invoiceable_shipments": [], + "failed_invoiced_shipments": {}, + "processing_invoice_shipments": [], + "successful_invoiced_shipments": [] + }, + "is_invoiceable": false, + "user_name": "hansrajdeghun_gofynd_com_07968", + "file_url": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/1IWqTaL6e-rZjSQ5aR0-store_reassigned_and_placed_and__3935_1694072101.4739661.csv", + "meta": null, + "invoice_document_type": "", + "file_name": "rZjSQ5aR0-store_reassigned_and_placed_and__3935_1694072101.4739661.csv", + "store_name": null, + "label_document_type": "", + "updated_ts": 1694072233, + "status": "FAILED", + "store_code": null, + "bulk_action_type": "order_processing", + "created_ts": "2023-09-12T06:05:53.395Z", + "invoice_status": "yet_to_initiate", + "do_invoice_label_generated": false, + "id": 384, + "user_id": "a735b8f3fe2200e3de562c63", + "last_selected_invoice_label_type": "a4", + "batch_id": "219bfed9-6347-4b7f-96cf-9b7f528c57a1", + "uploaded_by": null, + "failed_sh_count": 1, + "successful_sh_count": 0, + "total_count": 1, + "failed_shipments": [ + { + "all": "due to no of rows being less than 2 or greater than 5000" + } + ], + "successful_invoiced_count": 0, + "failed_invoiced_count": 0, + "total_invoiced_count": 0 + } + ], + "page": { + "current": 1, + "has_previous": false, + "has_next": false, + "total": 1, + "item_total": 1, + "type": "number", + "size": 10 + }, + "total_count": 1 + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### bulkStateTransistion + + + + +```javascript +// Promise +const promise = platformClient.order.bulkStateTransistion({ body : value }); + +// Async/Await +const data = await platformClient.order.bulkStateTransistion({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [BulkStateTransistionRequest](#BulkStateTransistionRequest) | yes | Request body | + + +Performs State Transisiton in Bulk for the given shipments in the excel/csv file url. + +*Returned Response:* + + + + +[BulkStateTransistionResponse](#BulkStateTransistionResponse) + +Bulk State Transistion Sucessfully Initiated Response. + + + + +
+  Examples: + + +
+  BulkReportsSucessfulEventSample + +```json +{ + "value": { + "status": true, + "message": "Successfully started processing with batch_id: 0000-1111-2222-3333", + "batch_id": "0000-1111-2222-3333" + } +} +``` +
+ +
+ + + + + + + + + --- @@ -366,17 +749,19 @@ Successfully created an order! --- -### dispatchManifest +### dispatchManifests ```javascript // Promise -const promise = platformClient.order.dispatchManifest({ body : value }); +const promise = platformClient.order.dispatchManifests({ manifestId : value, + body : value }); // Async/Await -const data = await platformClient.order.dispatchManifest({ body : value }); +const data = await platformClient.order.dispatchManifests({ manifestId : value, + body : value }); ``` @@ -384,7 +769,8 @@ const data = await platformClient.order.dispatchManifest({ body : value }); | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | +| --------- | ----- | -------- | ----------- | +| manifestId | string | yes | | | body | [DispatchManifest](#DispatchManifest) | yes | Request body | @@ -590,7 +976,7 @@ Retry e-invoice after failure [EInvoiceRetryResponse](#EInvoiceRetryResponse) -E-invoice Retry Successfully!! +E-invoice generated successfully for all/few shipments from given list of shipments. @@ -608,13 +994,121 @@ E-invoice Retry Successfully!! "response_data": [ { "shipment_id": "16342342342343423", - "success": true, - "message": "IRN already generated, for e-invoice type: invoice" + "einvoice_type": "invoice", + "status": 200, + "message": "E-invoice generated for given shipment", + "einvoice_info": { + "irn_details": { + "ack_no": "172313559180590", + "ack_dt": "2023-10-01 12:09:00", + "irn": "5ac2752f161c356d6957d5e7e52759343acfa516638b92718a1309dc25ee0015", + "signed_invoice": "d6GXwwhz86_aRlXmueRHboFRB8UhnWGU3CREZKesJkYz42e2HduZ5_d29zoh7yhIiIDC5TLueWHIMHE0UJ5C1z5i0QQSdjMrqBcamu7rpS6wOVIEt6RMs2CZulKt", + "signed_qr_code": "d6GXwwhz86_aRlXmueRHboFRB8UhnWGU3CREZKesJkYz42e2HduZ5_d29zoh7yhIiIDC5TLueWHIMHE0UJ5C1z5i0QQSdjMrqBcamu7rpS6wOVIEt6RMs2CZulKt" + } + } + }, + { + "shipment_id": "16342342342343424", + "einvoice_type": "invoice", + "status": 200, + "message": "E-invoice generated for given shipment", + "einvoice_info": { + "irn_details": { + "ack_no": "172313559180590", + "ack_dt": "2023-10-01 12:09:00", + "irn": "5ac2752f161c356d6957d5e7e52759343acfa516638b92718a1309dc25ee0015", + "signed_invoice": "d6GXwwhz86_aRlXmueRHboFRB8UhnWGU3CREZKesJkYz42e2HduZ5_d29zoh7yhIiIDC5TLueWHIMHE0UJ5C1z5i0QQSdjMrqBcamu7rpS6wOVIEt6RMs2CZulKt", + "signed_qr_code": "d6GXwwhz86_aRlXmueRHboFRB8UhnWGU3CREZKesJkYz42e2HduZ5_d29zoh7yhIiIDC5TLueWHIMHE0UJ5C1z5i0QQSdjMrqBcamu7rpS6wOVIEt6RMs2CZulKt" + } + } } - ], - "success_count": 1, - "message": "Success Count: 1 out of 1", - "success": true + ] + } +} +``` +
+ +
+  sample2 + +```json +{ + "value": { + "response_data": [ + { + "shipment_id": "16342342342343423", + "einvoice_type": "invoice", + "status": 200, + "message": "E-invoice generated for given shipment", + "einvoice_info": { + "irn_details": null, + "ack_no": "172313559180590", + "ack_dt": "2023-10-01 12:09:00", + "irn": "5ac2752f161c356d6957d5e7e52759343acfa516638b92718a1309dc25ee0015", + "signed_invoice": "d6GXwwhz86_aRlXmueRHboFRB8UhnWGU3CREZKesJkYz42e2HduZ5_d29zoh7yhIiIDC5TLueWHIMHE0UJ5C1z5i0QQSdjMrqBcamu7rpS6wOVIEt6RMs2CZulKt", + "signed_qr_code": "d6GXwwhz86_aRlXmueRHboFRB8UhnWGU3CREZKesJkYz42e2HduZ5_d29zoh7yhIiIDC5TLueWHIMHE0UJ5C1z5i0QQSdjMrqBcamu7rpS6wOVIEt6RMs2CZulKt" + } + }, + { + "shipment_id": "16342342342343424", + "einvoice_type": "invoice", + "status": 400, + "message": "E-invoice generation failed for shipment", + "einvoice_info": { + "error_details": [ + { + "error_code": "3028", + "error_message": "GSTIN -22AQDPK3837A1Z5 is invalid." + }, + { + "error_code": "2265", + "error_message": "Recipient GSTIN state code does not match with the state code passed in recipient details" + } + ] + } + } + ] + } +} +``` +
+ +
+  sample3 + +```json +{ + "value": { + "response_data": [ + { + "shipment_id": "16342342342343423", + "einvoice_type": "invoice", + "status": 200, + "message": "E-invoice generated for given shipment", + "einvoice_info": { + "irn_details": null, + "ack_no": "172313559180590", + "ack_dt": "2023-10-01 12:09:00", + "irn": "5ac2752f161c356d6957d5e7e52759343acfa516638b92718a1309dc25ee0015", + "signed_invoice": "d6GXwwhz86_aRlXmueRHboFRB8UhnWGU3CREZKesJkYz42e2HduZ5_d29zoh7yhIiIDC5TLueWHIMHE0UJ5C1z5i0QQSdjMrqBcamu7rpS6wOVIEt6RMs2CZulKt", + "signed_qr_code": "d6GXwwhz86_aRlXmueRHboFRB8UhnWGU3CREZKesJkYz42e2HduZ5_d29zoh7yhIiIDC5TLueWHIMHE0UJ5C1z5i0QQSdjMrqBcamu7rpS6wOVIEt6RMs2CZulKt" + } + }, + { + "shipment_id": "16342342342343424", + "einvoice_type": "invoice", + "status": 400, + "message": "E-invoice generation cannot processed because invoice id is not present in shipment", + "einvoice_info": {} + }, + { + "shipment_id": "16342342342343425", + "einvoice_type": "invoice", + "status": 500, + "message": "Error while generatin E-invoice for shipment, please contact platform support team for assistance", + "einvoice_info": {} + } + ] } } ``` @@ -633,17 +1127,17 @@ E-invoice Retry Successfully!! --- -### fetchCreditBalanceDetail - +### failedOrderLogDetails +Get failed order logs according to the filter provided ```javascript // Promise -const promise = platformClient.order.fetchCreditBalanceDetail({ body : value }); +const promise = platformClient.order.failedOrderLogDetails({ logId : value }); // Async/Await -const data = await platformClient.order.fetchCreditBalanceDetail({ body : value }); +const data = await platformClient.order.failedOrderLogDetails({ logId : value }); ``` @@ -651,20 +1145,21 @@ const data = await platformClient.order.fetchCreditBalanceDetail({ body : value | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [FetchCreditBalanceRequestPayload](#FetchCreditBalanceRequestPayload) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| logId | string | yes | Log Error ID | -Fetch Credit Balance Detail + +This endpoint allows users to get the exact error trace from the log id provided *Returned Response:* -[FetchCreditBalanceResponsePayload](#FetchCreditBalanceResponsePayload) +[FailedOrderLogDetails](#FailedOrderLogDetails) -Credit Balance will be fetched +Order Logs listing fetched successfully @@ -688,17 +1183,23 @@ Credit Balance will be fetched --- -### fetchRefundModeConfig - +### failedOrderLogs +Get failed order logs according to the filter provided ```javascript // Promise -const promise = platformClient.order.fetchRefundModeConfig({ body : value }); +const promise = platformClient.application("").order.failedOrderLogs({ pageNo : value, + pageSize : value, + searchType : value, + searchValue : value }); // Async/Await -const data = await platformClient.order.fetchRefundModeConfig({ body : value }); +const data = await platformClient.application("").order.failedOrderLogs({ pageNo : value, + pageSize : value, + searchType : value, + searchValue : value }); ``` @@ -706,20 +1207,24 @@ const data = await platformClient.order.fetchRefundModeConfig({ body : value }) | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [RefundModeConfigRequestPayload](#RefundModeConfigRequestPayload) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | Page Number | +| pageSize | number | no | Page Size | +| searchType | string | no | Search type for filter | +| searchValue | string | no | Search value for filter | -Fetch Refund Mode Config + +This endpoint allows users to get failed order logs listing for filters based on order id, user contact number, user email id and sales channel id. *Returned Response:* -[RefundModeConfigResponsePayload](#RefundModeConfigResponsePayload) +[FailedOrderLogs](#FailedOrderLogs) -Refund mode config is returned based on input parameter +Order Logs listing fetched successfully @@ -743,19 +1248,17 @@ Refund mode config is returned based on input parameter --- -### generateInvoiceID +### fetchCreditBalanceDetail ```javascript // Promise -const promise = platformClient.order.generateInvoiceID({ invoiceType : value, - body : value }); +const promise = platformClient.order.fetchCreditBalanceDetail({ body : value }); // Async/Await -const data = await platformClient.order.generateInvoiceID({ invoiceType : value, - body : value }); +const data = await platformClient.order.fetchCreditBalanceDetail({ body : value }); ``` @@ -763,21 +1266,20 @@ const data = await platformClient.order.generateInvoiceID({ invoiceType : value | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| invoiceType | string | yes | mention the type of invoice id to generate | -| body | [GenerateInvoiceIDRequest](#GenerateInvoiceIDRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| body | [FetchCreditBalanceRequestPayload](#FetchCreditBalanceRequestPayload) | yes | Request body | -This API is used to manually generate Invoice ID against shipments. +Fetch Credit Balance Detail *Returned Response:* -[GenerateInvoiceIDResponse](#GenerateInvoiceIDResponse) +[FetchCreditBalanceResponsePayload](#FetchCreditBalanceResponsePayload) -NOTE success response can contains success and failed result as well +Credit Balance will be fetched @@ -786,16 +1288,62 @@ NOTE success response can contains success and failed result as well   Example: ```json -{ - "items": [ - { - "shipment_id": "16838049724111283577", - "success": true, - "invoice_id": "A0B1C2D3", - "error_message": null - } - ] -} + +``` +
+ + + + + + + + + +--- + + +### fetchRefundModeConfig + + + + +```javascript +// Promise +const promise = platformClient.order.fetchRefundModeConfig({ body : value }); + +// Async/Await +const data = await platformClient.order.fetchRefundModeConfig({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [RefundModeConfigRequestPayload](#RefundModeConfigRequestPayload) | yes | Request body | + + +Fetch Refund Mode Config + +*Returned Response:* + + + + +[RefundModeConfigResponsePayload](#RefundModeConfigResponsePayload) + +Refund mode config is returned based on input parameter + + + + +
+  Example: + +```json + ```
@@ -945,6 +1493,79 @@ Role wise state transition mapping, for next possible state +--- + + +### getAllowedTemplatesForBulk + + + + +```javascript +// Promise +const promise = platformClient.order.getAllowedTemplatesForBulk(); + +// Async/Await +const data = await platformClient.order.getAllowedTemplatesForBulk(); +``` + + + + + + +Gets All the allowed Templates to perform Bulk Operations. + +*Returned Response:* + + + + +[AllowedTemplatesResponse](#AllowedTemplatesResponse) + +Successfully Found the templates. + + + + +
+  Examples: + + +
+  AllowedTemplatesResponseExample + +```json +{ + "value": { + "template_x_slug": [ + { + "text": "DP Assignment", + "value": "MANUAL_DP_ASSIGNMENT" + }, + { + "text": "Fluid", + "value": "MOVE_TO_FLUID_STATE" + }, + { + "text": "Cancellation" + } + ] + } +} +``` +
+ +
+ + + + + + + + + --- @@ -1069,7 +1690,7 @@ const data = await platformClient.application("").order.getAppli - +Get cross selling platform shipments *Returned Response:* @@ -1311,8 +1932,8 @@ Slug names // Promise const promise = platformClient.order.getBulkShipmentExcelFile({ salesChannels : value, dpIds : value, - fromDate : value, - toDate : value, + startDate : value, + endDate : value, stores : value, tags : value, bagStatus : value, @@ -1325,8 +1946,8 @@ const promise = platformClient.order.getBulkShipmentExcelFile({ salesChannels : // Async/Await const data = await platformClient.order.getBulkShipmentExcelFile({ salesChannels : value, dpIds : value, - fromDate : value, - toDate : value, + startDate : value, + endDate : value, stores : value, tags : value, bagStatus : value, @@ -1345,8 +1966,8 @@ const data = await platformClient.order.getBulkShipmentExcelFile({ salesChannel | --------- | ----- | -------- | ----------- | | salesChannels | string | no | Comma separated values of sales channel ids | | dpIds | string | no | Comma separated values of delivery partner ids | -| fromDate | string | no | Start Date in DD-MM-YYYY format | -| toDate | string | no | End Date in DD-MM-YYYY format | +| startDate | string | no | UTC start date in ISO format | +| endDate | string | no | UTC end date in ISO format | | stores | string | no | Comma separated values of store ids | | tags | string | no | Comma separated values of tags | | bagStatus | string | no | Comma separated values of bag statuses | @@ -1478,6 +2099,82 @@ Successfully created the config data +--- + + +### getFileByStatus + + + + +```javascript +// Promise +const promise = platformClient.order.getFileByStatus({ batchId : value, + status : value, + fileType : value, + reportType : value }); + +// Async/Await +const data = await platformClient.order.getFileByStatus({ batchId : value, + status : value, + fileType : value, + reportType : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| batchId | string | yes | | +| status | string | yes | | +| fileType | string | yes | | +| reportType | string | no | | + + + +Get the file URL consisting Records of the provided status. + +*Returned Response:* + + + + +[JobFailedResponse](#JobFailedResponse) + +Job details. + + + + +
+  Examples: + + +
+  DetailsForFailedJobResponse + +```json +{ + "value": { + "file_name": "failed_reason.csv", + "url": "www.fynd.com/excelfile.csv" + } +} +``` +
+ +
+ + + + + + + + + --- @@ -1492,6 +2189,8 @@ const promise = platformClient.order.getLaneConfig({ superLane : value, groupEntity : value, fromDate : value, toDate : value, + startDate : value, + endDate : value, dpIds : value, stores : value, salesChannels : value, @@ -1511,6 +2210,8 @@ const data = await platformClient.order.getLaneConfig({ superLane : value, groupEntity : value, fromDate : value, toDate : value, + startDate : value, + endDate : value, dpIds : value, stores : value, salesChannels : value, @@ -1536,6 +2237,8 @@ const data = await platformClient.order.getLaneConfig({ superLane : value, | groupEntity | string | no | Name of group entity | | fromDate | string | no | Start Date in DD-MM-YYYY format | | toDate | string | no | End Date in DD-MM-YYYY format | +| startDate | string | no | UTC Start Date in ISO format | +| endDate | string | no | UTC End Date in ISO format | | dpIds | string | no | Comma separated values of delivery partner ids | | stores | string | no | Comma separated values of store ids | | salesChannels | string | no | | @@ -1658,19 +2361,17 @@ Response containing count of shipments of the given status --- -### getOrderById +### getManifestDetails ```javascript // Promise -const promise = platformClient.order.getOrderById({ orderId : value, - myOrders : value }); +const promise = platformClient.order.getManifestDetails({ manifestId : value }); // Async/Await -const data = await platformClient.order.getOrderById({ orderId : value, - myOrders : value }); +const data = await platformClient.order.getManifestDetails({ manifestId : value }); ``` @@ -1679,21 +2380,20 @@ const data = await platformClient.order.getOrderById({ orderId : value, | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| orderId | string | yes | | -| myOrders | boolean | no | | +| manifestId | string | yes | | -Get Order Details by ID +get Manifest Details. *Returned Response:* -[OrderDetailsResponse](#OrderDetailsResponse) +[ManifestDetails](#ManifestDetails) -We are processing the report! +Successful Manifest upload! @@ -1702,50 +2402,331 @@ We are processing the report!   Example: ```json -{ - "success": true, - "order": { - "fynd_order_id": "FY637CFCC00177713D47", - "meta": { - "files": [], - "staff": {}, - "cart_id": 1835, - "comment": "", - "extra_meta": {}, - "order_tags": null, - "order_type": "HomeDelivery", - "employee_id": null, - "payment_type": "self", - "mongo_cart_id": 1835, - "order_platform": "platform-site", - "ordering_store": 1, - "order_child_entities": [ - "bag", - "shipment" - ] - }, - "affiliate_id": "62f35968d101a6d38c886d85", - "ordering_channel": "Ecomm", - "source": "uniket-desktop", - "tax_details": { - "gstin": null - }, - "order_date": "2022-11-22T22:15:53+00:00", - "prices": { - "amount_paid": 948.5, - "refund_amount": 948.5, - "price_marked": 1398, - "cod_charges": 0, - "discount": 349.5, - "cashback_applied": 0, - "delivery_charge": 0, - "fynd_credits": 0, - "cashback": 0, - "price_effective": 1048.5, - "refund_credit": 0, - "value_of_good": 803.82, - "coupon_value": 0, - "tax_collected_at_source": 0, + +``` +
+ + + + + + + + + +--- + + +### getManifestShipments + + + + +```javascript +// Promise +const promise = platformClient.order.getManifestShipments({ dpIds : value, + stores : value, + toDate : value, + fromDate : value, + dpName : value, + salesChannels : value, + searchType : value, + searchValue : value, + pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.order.getManifestShipments({ dpIds : value, + stores : value, + toDate : value, + fromDate : value, + dpName : value, + salesChannels : value, + searchType : value, + searchValue : value, + pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| dpIds | number | yes | | +| stores | string | yes | | +| toDate | string | yes | | +| fromDate | string | yes | | +| dpName | string | no | | +| salesChannels | string | no | | +| searchType | string | no | | +| searchValue | string | no | | +| pageNo | string | no | | +| pageSize | string | no | | + + + +get Manifest Shipments. + +*Returned Response:* + + + + +[ManifestShipmentListing](#ManifestShipmentListing) + +Successful Manifest upload! + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getManifestfilters + + + + +```javascript +// Promise +const promise = platformClient.order.getManifestfilters({ view : value }); + +// Async/Await +const data = await platformClient.order.getManifestfilters({ view : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| view | string | yes | Name of View | + + + +get Manifest Filters. + +*Returned Response:* + + + + +[ManifestFiltersResponse](#ManifestFiltersResponse) + +List of filters + + + + +
+  Example: + +```json +{} +``` +
+ + + + + + + + + +--- + + +### getManifests + + + + +```javascript +// Promise +const promise = platformClient.order.getManifests({ status : value, + startDate : value, + endDate : value, + searchType : value, + storeId : value, + searchValue : value, + dpIds : value, + pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.order.getManifests({ status : value, + startDate : value, + endDate : value, + searchType : value, + storeId : value, + searchValue : value, + dpIds : value, + pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| status | string | no | Possible Status [ active, closed ] | +| startDate | string | no | UTC Start Date in ISO format | +| endDate | string | no | UTC End Date in ISO format | +| searchType | string | no | Search type options [ fynd_order_id, shipment_id, manifest_id, dp_name, awb_no ] | +| storeId | number | no | Fetch manifests for a Store. | +| searchValue | string | no | Search value for selected search type | +| dpIds | string | no | DP Ids separated by ',' (comma) | +| pageNo | number | no | | +| pageSize | number | no | | + + + +Fetch Manifests + +*Returned Response:* + + + + +[ManifestList](#ManifestList) + +Successful Manifest upload! + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getOrderById + + + + +```javascript +// Promise +const promise = platformClient.order.getOrderById({ orderId : value, + myOrders : value, + allowInactive : value }); + +// Async/Await +const data = await platformClient.order.getOrderById({ orderId : value, + myOrders : value, + allowInactive : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| orderId | string | yes | | +| myOrders | boolean | no | | +| allowInactive | boolean | no | Flag to allow inactive shipments | + + + +Get Order Details by ID + +*Returned Response:* + + + + +[OrderDetailsResponse](#OrderDetailsResponse) + +We are processing the report! + + + + +
+  Example: + +```json +{ + "success": true, + "order": { + "fynd_order_id": "FY637CFCC00177713D47", + "meta": { + "files": [], + "staff": {}, + "cart_id": 1835, + "comment": "", + "extra_meta": {}, + "order_tags": null, + "order_type": "HomeDelivery", + "employee_id": null, + "payment_type": "self", + "mongo_cart_id": 1835, + "order_platform": "platform-site", + "ordering_store": 1, + "order_child_entities": [ + "bag", + "shipment" + ] + }, + "affiliate_id": "62f35968d101a6d38c886d85", + "ordering_channel": "Ecomm", + "source": "uniket-desktop", + "tax_details": { + "gstin": null + }, + "order_date": "2022-11-22T22:15:53+00:00", + "prices": { + "amount_paid": 948.5, + "refund_amount": 948.5, + "price_marked": 1398, + "cod_charges": 0, + "discount": 349.5, + "cashback_applied": 0, + "delivery_charge": 0, + "fynd_credits": 0, + "cashback": 0, + "price_effective": 1048.5, + "refund_credit": 0, + "value_of_good": 803.82, + "coupon_value": 0, + "tax_collected_at_source": 0, "promotion_effective_discount": 100, "amount_paid_roundoff": 948 }, @@ -2457,6 +3438,8 @@ const promise = platformClient.order.getOrders({ lane : value, searchValue : value, fromDate : value, toDate : value, + startDate : value, + endDate : value, dpIds : value, stores : value, salesChannels : value, @@ -2479,6 +3462,8 @@ const data = await platformClient.order.getOrders({ lane : value, searchValue : value, fromDate : value, toDate : value, + startDate : value, + endDate : value, dpIds : value, stores : value, salesChannels : value, @@ -2507,6 +3492,8 @@ const data = await platformClient.order.getOrders({ lane : value, | searchValue | string | no | search_value is matched against the field specified by the search_type | | fromDate | string | no | | | toDate | string | no | | +| startDate | string | no | | +| endDate | string | no | | | dpIds | string | no | Delivery Partner IDs to which shipments are assigned. | | stores | string | no | | | salesChannels | string | no | | @@ -2844,7 +3831,10 @@ We are processing the report! "city": "MUMBAI", "state": "MAHARASHTRA", "country": "INDIA", - "pincode": "400093" + "pincode": "400093", + "tags": [ + "infibeam" + ] }, "delivery_details": { "name": "Manish Prakash", @@ -3181,19 +4171,462 @@ We are processing the report! --- -### getShipmentHistory +### getShipmentHistory + + + + +```javascript +// Promise +const promise = platformClient.order.getShipmentHistory({ shipmentId : value, + bagId : value }); + +// Async/Await +const data = await platformClient.order.getShipmentHistory({ shipmentId : value, + bagId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| shipmentId | string | no | Shipment Id | +| bagId | number | no | Bag/Product Id | + + + +Get Shipment History + +*Returned Response:* + + + + +[ShipmentHistoryResponse](#ShipmentHistoryResponse) + +It shows the journey of the shipment! + + + + +
+  Example: + +```json +{ + "activity_history": [ + { + "message": "Bag status changed to pending", + "store_id": 10, + "store_code": "SF94", + "store_name": "shub", + "reason": {}, + "createdat": "01 Apr 2022, 17:57:PM", + "user": "system", + "type": "activity_status", + "l1_detail": "", + "l2_detail": "", + "l3_detail": "", + "ticket_id": "", + "ticket_url": "" + }, + { + "message": "Bag status changed to placed", + "store_id": 10, + "store_code": "SF94", + "store_name": "shub", + "reason": {}, + "createdat": "01 Apr 2022, 17:57:PM", + "user": "system", + "type": "activity_status", + "l1_detail": "", + "l2_detail": "", + "l3_detail": "", + "ticket_id": "", + "ticket_url": "" + } + ] +} +``` +
+ + + + + + + + + +--- + + +### getShipmentReasons +Get reasons behind full or partial cancellation of a shipment + + + +```javascript +// Promise +const promise = platformClient.order.getShipmentReasons({ shipmentId : value, + bagId : value, + state : value }); + +// Async/Await +const data = await platformClient.order.getShipmentReasons({ shipmentId : value, + bagId : value, + state : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| shipmentId | string | yes | ID of the shipment. An order may contain multiple items and may get divided into one or more shipment, each having its own ID. | +| bagId | string | yes | ID of the bag. An order may contain multiple items and may get divided into one or more shipment, each having its own ID. | +| state | string | yes | State for which reasons are required. | + + + +Use this API to retrieve the issues that led to the cancellation of bags within a shipment. + +*Returned Response:* + + + + +[PlatformShipmentReasonsResponse](#PlatformShipmentReasonsResponse) + +Success. Check the example shown below or refer `PlatformShipmentReasonsResponse` for more details. + + + + +
+  Example: + +```json +{ + "success": true, + "reasons": [ + { + "id": 84, + "display_name": "Not Available to accept the Order", + "qc_type": [], + "question_set": [] + }, + { + "id": 85, + "display_name": "Store Bulk Order", + "qc_type": [], + "question_set": [] + }, + { + "id": 86, + "display_name": "Cancelled due to delayed delivery", + "qc_type": [], + "question_set": [] + }, + { + "id": 87, + "display_name": "Others", + "qc_type": [], + "question_set": [] + } + ] +} +``` +
+ + + + + + + + + +--- + + +### getShipments + + + + +```javascript +// Promise +const promise = platformClient.order.getShipments({ lane : value, + bagStatus : value, + statusOverrideLane : value, + timeToDispatch : value, + searchType : value, + searchValue : value, + fromDate : value, + toDate : value, + startDate : value, + endDate : value, + dpIds : value, + stores : value, + salesChannels : value, + pageNo : value, + pageSize : value, + fetchActiveShipment : value, + allowInactive : value, + excludeLockedShipments : value, + paymentMethods : value, + channelShipmentId : value, + channelOrderId : value, + customMeta : value, + orderingChannel : value, + companyAffiliateTag : value, + myOrders : value, + platformUserId : value, + sortType : value, + showCrossCompanyData : value, + tags : value, + customerId : value, + orderType : value }); + +// Async/Await +const data = await platformClient.order.getShipments({ lane : value, + bagStatus : value, + statusOverrideLane : value, + timeToDispatch : value, + searchType : value, + searchValue : value, + fromDate : value, + toDate : value, + startDate : value, + endDate : value, + dpIds : value, + stores : value, + salesChannels : value, + pageNo : value, + pageSize : value, + fetchActiveShipment : value, + allowInactive : value, + excludeLockedShipments : value, + paymentMethods : value, + channelShipmentId : value, + channelOrderId : value, + customMeta : value, + orderingChannel : value, + companyAffiliateTag : value, + myOrders : value, + platformUserId : value, + sortType : value, + showCrossCompanyData : value, + tags : value, + customerId : value, + orderType : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| lane | string | no | Name of lane for which data is to be fetched | +| bagStatus | string | no | Comma separated values of bag statuses | +| statusOverrideLane | boolean | no | Use this flag to fetch by bag_status and override lane | +| timeToDispatch | number | no | | +| searchType | string | no | Search type key | +| searchValue | string | no | Search type value | +| fromDate | string | no | Start Date in DD-MM-YYYY format | +| toDate | string | no | End Date in DD-MM-YYYY format | +| startDate | string | no | UTC Start Date in ISO format | +| endDate | string | no | UTC End Date in ISO format | +| dpIds | string | no | Comma separated values of delivery partner ids | +| stores | string | no | Comma separated values of store ids | +| salesChannels | string | no | Comma separated values of sales channel ids | +| pageNo | number | no | Page number for paginated data | +| pageSize | number | no | Page size of data received per page | +| fetchActiveShipment | boolean | no | flag to fetch active shipments | +| allowInactive | boolean | no | Flag to allow inactive shipments | +| excludeLockedShipments | boolean | no | flag to fetch locked shipments | +| paymentMethods | string | no | Comma separated values of payment methods | +| channelShipmentId | string | no | App Shipment Id | +| channelOrderId | string | no | App Order Id | +| customMeta | string | no | | +| orderingChannel | string | no | | +| companyAffiliateTag | string | no | | +| myOrders | boolean | no | | +| platformUserId | string | no | | +| sortType | string | no | Sort the result data on basis of input | +| showCrossCompanyData | boolean | no | Flag to view cross & non-cross company order | +| tags | string | no | Comma separated values of tags | +| customerId | string | no | | +| orderType | string | no | | + + + +Get Shipments Listing for the company id + +*Returned Response:* + + + + +[ShipmentInternalPlatformViewResponse](#ShipmentInternalPlatformViewResponse) + +We are processing the report! + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getStateManagerStates +Get all states for a company and channel + + + +```javascript +// Promise +const promise = platformClient.application("").order.getStateManagerStates({ pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.application("").order.getStateManagerStates({ pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | | +| pageSize | number | no | | + + + + + +*Returned Response:* + + + +[PaginatedStates](#PaginatedStates) + +Successful operation + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getStateManagerTaskById +Fetch a specific State Transition task ```javascript // Promise -const promise = platformClient.order.getShipmentHistory({ shipmentId : value, - bagId : value }); +const promise = platformClient.order.getStateManagerTaskById({ taskId : value }); // Async/Await -const data = await platformClient.order.getShipmentHistory({ shipmentId : value, - bagId : value }); +const data = await platformClient.order.getStateManagerTaskById({ taskId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| taskId | number | yes | | + + + + + +*Returned Response:* + + + + +[Object](#Object) + +Successful operation + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getStateManagerTasks +Fetch all State Transition tasks + + + +```javascript +// Promise +const promise = platformClient.order.getStateManagerTasks({ pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.order.getStateManagerTasks({ pageNo : value, + pageSize : value }); ``` @@ -3202,21 +4635,21 @@ const data = await platformClient.order.getShipmentHistory({ shipmentId : value | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| shipmentId | string | no | Shipment Id | -| bagId | number | no | Bag/Product Id | +| pageNo | number | no | | +| pageSize | number | no | | + -Get Shipment History *Returned Response:* -[ShipmentHistoryResponse](#ShipmentHistoryResponse) +[Object](#Object) -It shows the journey of the shipment! +Successful operation @@ -3225,40 +4658,122 @@ It shows the journey of the shipment!   Example: ```json -{ - "activity_history": [ - { - "message": "Bag status changed to pending", - "store_id": 10, - "store_code": "SF94", - "store_name": "shub", - "reason": {}, - "createdat": "01 Apr 2022, 17:57:PM", - "user": "system", - "type": "activity_status", - "l1_detail": "", - "l2_detail": "", - "l3_detail": "", - "ticket_id": "", - "ticket_url": "" - }, - { - "message": "Bag status changed to placed", - "store_id": 10, - "store_code": "SF94", - "store_name": "shub", - "reason": {}, - "createdat": "01 Apr 2022, 17:57:PM", - "user": "system", - "type": "activity_status", - "l1_detail": "", - "l2_detail": "", - "l3_detail": "", - "ticket_id": "", - "ticket_url": "" - } - ] -} + +``` +
+ + + + + + + + + +--- + + +### getStateTransitionFilters +Fetch all State Transition filters + + + +```javascript +// Promise +const promise = platformClient.order.getStateTransitionFilters({ pageNo : value, + pageSize : value }); + +// Async/Await +const data = await platformClient.order.getStateTransitionFilters({ pageNo : value, + pageSize : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | | +| pageSize | number | no | | + + + + + +*Returned Response:* + + + + +[Object](#Object) + +Successful operation + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getStateTransitionFiltersById +Fetch a specific State Transition filter + + + +```javascript +// Promise +const promise = platformClient.order.getStateTransitionFiltersById({ filterId : value }); + +// Async/Await +const data = await platformClient.order.getStateTransitionFiltersById({ filterId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| filterId | number | yes | | + + + + + +*Returned Response:* + + + + +[Object](#Object) + +Successful operation + + + + +
+  Example: + +```json + ```
@@ -3273,21 +4788,19 @@ It shows the journey of the shipment! --- -### getShipmentReasons -Get reasons behind full or partial cancellation of a shipment +### getStateTransitionFlags + ```javascript // Promise -const promise = platformClient.order.getShipmentReasons({ shipmentId : value, - bagId : value, - state : value }); +const promise = platformClient.order.getStateTransitionFlags({ pageNo : value, + pageSize : value }); // Async/Await -const data = await platformClient.order.getShipmentReasons({ shipmentId : value, - bagId : value, - state : value }); +const data = await platformClient.order.getStateTransitionFlags({ pageNo : value, + pageSize : value }); ``` @@ -3295,23 +4808,22 @@ const data = await platformClient.order.getShipmentReasons({ shipmentId : value | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| shipmentId | string | yes | ID of the shipment. An order may contain multiple items and may get divided into one or more shipment, each having its own ID. | -| bagId | string | yes | ID of the bag. An order may contain multiple items and may get divided into one or more shipment, each having its own ID. | -| state | string | yes | State for which reasons are required. | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | The page number for pagination. | +| pageSize | number | no | The number of items to be returned per page for pagination. | -Use this API to retrieve the issues that led to the cancellation of bags within a shipment. +Fetch all state transition flags for a company. *Returned Response:* -[PlatformShipmentReasonsResponse](#PlatformShipmentReasonsResponse) +[Object](#Object) -Success. Check the example shown below or refer `PlatformShipmentReasonsResponse` for more details. +Successfully fetched the state transition flags. @@ -3320,35 +4832,7 @@ Success. Check the example shown below or refer `PlatformShipmentReasonsResponse   Example: ```json -{ - "success": true, - "reasons": [ - { - "id": 84, - "display_name": "Not Available to accept the Order", - "qc_type": [], - "question_set": [] - }, - { - "id": 85, - "display_name": "Store Bulk Order", - "qc_type": [], - "question_set": [] - }, - { - "id": 86, - "display_name": "Cancelled due to delayed delivery", - "qc_type": [], - "question_set": [] - }, - { - "id": 87, - "display_name": "Others", - "qc_type": [], - "question_set": [] - } - ] -} + ```
@@ -3363,73 +4847,17 @@ Success. Check the example shown below or refer `PlatformShipmentReasonsResponse --- -### getShipments +### getStateTransitionFlagsById ```javascript // Promise -const promise = platformClient.order.getShipments({ lane : value, - bagStatus : value, - statusOverrideLane : value, - timeToDispatch : value, - searchType : value, - searchValue : value, - fromDate : value, - toDate : value, - dpIds : value, - stores : value, - salesChannels : value, - pageNo : value, - pageSize : value, - fetchActiveShipment : value, - allowInactive : value, - excludeLockedShipments : value, - paymentMethods : value, - channelShipmentId : value, - channelOrderId : value, - customMeta : value, - orderingChannel : value, - companyAffiliateTag : value, - myOrders : value, - platformUserId : value, - sortType : value, - showCrossCompanyData : value, - tags : value, - customerId : value, - orderType : value }); +const promise = platformClient.order.getStateTransitionFlagsById({ flagId : value }); // Async/Await -const data = await platformClient.order.getShipments({ lane : value, - bagStatus : value, - statusOverrideLane : value, - timeToDispatch : value, - searchType : value, - searchValue : value, - fromDate : value, - toDate : value, - dpIds : value, - stores : value, - salesChannels : value, - pageNo : value, - pageSize : value, - fetchActiveShipment : value, - allowInactive : value, - excludeLockedShipments : value, - paymentMethods : value, - channelShipmentId : value, - channelOrderId : value, - customMeta : value, - orderingChannel : value, - companyAffiliateTag : value, - myOrders : value, - platformUserId : value, - sortType : value, - showCrossCompanyData : value, - tags : value, - customerId : value, - orderType : value }); +const data = await platformClient.order.getStateTransitionFlagsById({ flagId : value }); ``` @@ -3437,49 +4865,21 @@ const data = await platformClient.order.getShipments({ lane : value, | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| lane | string | no | Name of lane for which data is to be fetched | -| bagStatus | string | no | Comma separated values of bag statuses | -| statusOverrideLane | boolean | no | Use this flag to fetch by bag_status and override lane | -| timeToDispatch | number | no | | -| searchType | string | no | Search type key | -| searchValue | string | no | Search type value | -| fromDate | string | no | Start Date in DD-MM-YYYY format | -| toDate | string | no | End Date in DD-MM-YYYY format | -| dpIds | string | no | Comma separated values of delivery partner ids | -| stores | string | no | Comma separated values of store ids | -| salesChannels | string | no | Comma separated values of sales channel ids | -| pageNo | number | no | Page number for paginated data | -| pageSize | number | no | Page size of data received per page | -| fetchActiveShipment | boolean | no | flag to fetch active shipments | -| allowInactive | boolean | no | Flag to allow inactive shipments | -| excludeLockedShipments | boolean | no | flag to fetch locked shipments | -| paymentMethods | string | no | Comma separated values of payment methods | -| channelShipmentId | string | no | App Shipment Id | -| channelOrderId | string | no | App Order Id | -| customMeta | string | no | | -| orderingChannel | string | no | | -| companyAffiliateTag | string | no | | -| myOrders | boolean | no | | -| platformUserId | string | no | | -| sortType | string | no | Sort the result data on basis of input | -| showCrossCompanyData | boolean | no | Flag to view cross & non-cross company order | -| tags | string | no | Comma separated values of tags | -| customerId | string | no | | -| orderType | string | no | | +| --------- | ----- | -------- | ----------- | +| flagId | number | yes | | -Get Shipments Listing for the company id +Fetch a specific state transition flag for a company. *Returned Response:* -[ShipmentInternalPlatformViewResponse](#ShipmentInternalPlatformViewResponse) +[Object](#Object) -We are processing the report! +Successfully fetched the state transition flags. @@ -3738,6 +5138,73 @@ State Transition Mapping, for next possible state +--- + + +### getTemplate + + + + +```javascript +// Promise +const promise = platformClient.order.getTemplate({ templateName : value }); + +// Async/Await +const data = await platformClient.order.getTemplate({ templateName : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| templateName | string | yes | | + + + +Get the Excel file URL for the Template. + +*Returned Response:* + + + + +[TemplateDownloadResponse](#TemplateDownloadResponse) + +Sucessfully Created the Template Url. + + + + +
+  Examples: + + +
+  AllowedTemplatesResponseExample + +```json +{ + "value": { + "file_name": "template.xlsx", + "url": "www.fynd.com/excelfile.xlsx" + } +} +``` +
+ +
+ + + + + + + + + --- @@ -4221,6 +5688,93 @@ Successfully updated shipment cache! +--- + + +### jobDetails + + + + +```javascript +// Promise +const promise = platformClient.order.jobDetails({ batchId : value }); + +// Async/Await +const data = await platformClient.order.jobDetails({ batchId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| batchId | string | yes | | + + + +Fetches details for the job of the provided batch_id + +*Returned Response:* + + + + +[JobDetailsResponse](#JobDetailsResponse) + +Job details. + + + + +
+  Examples: + + +
+  JobDetailsSucessfulEventSample + +```json +{ + "value": { + "success": true, + "data": [ + { + "batch_id": "1dc51db3-89fc-4985-9237-d96efb9060ae", + "total_shipments_count": 1, + "successful_shipment_ids": [], + "successful_shipments_count": 0, + "failed_shipments_count": 1, + "processing_shipments_count": 0, + "company_id": "2" + } + ], + "file_url": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/misc/general/free/original/kctNhcXxX-UV71fzH2U-store_reassigned_and_placed_and__3809_1694082156.8009899.csv", + "failed_records": [ + { + "all": "due to no of rows being less than 2 or greater than 5000" + } + ], + "uploaded_by": "mohitmahatme_gofynd_com_31814", + "user_id": "d7595ec4e390849545a68c92", + "uploaded_on": "2023-09-07T15:55:24+00:00", + "status": "FAILED" + } +} +``` +
+ +
+ + + + + + + + + --- @@ -4368,17 +5922,17 @@ It shows the journey of the shipment! --- -### processManifest +### processManifests ```javascript // Promise -const promise = platformClient.order.processManifest({ body : value }); +const promise = platformClient.order.processManifests({ body : value }); // Async/Await -const data = await platformClient.order.processManifest({ body : value }); +const data = await platformClient.order.processManifests({ body : value }); ``` @@ -4387,17 +5941,17 @@ const data = await platformClient.order.processManifest({ body : value }); | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [CreateOrderPayload](#CreateOrderPayload) | yes | Request body | +| body | [ProcessManifest](#ProcessManifest) | yes | Request body | -Process Manifest +Process Manifest. *Returned Response:* -[CreateOrderResponse](#CreateOrderResponse) +[ProcessManifestItemResponse](#ProcessManifestItemResponse) Manifest will be processed! @@ -4601,7 +6155,7 @@ Send OTP to user mobile ### trackShipment -Get courier partner tracking details + @@ -4673,11 +6227,11 @@ Shipment Tracking fetched successfully } ], "page": { - "type": "number", - "size": 200, "current": 1, "has_next": true, - "item_total": 3 + "item_total": 3, + "size": 200, + "type": "number" } } } @@ -5152,17 +6706,19 @@ Shipment Tracking updated successfully --- -### uploadConsent +### uploadConsents ```javascript // Promise -const promise = platformClient.order.uploadConsent({ body : value }); +const promise = platformClient.order.uploadConsents({ manifestId : value, + body : value }); // Async/Await -const data = await platformClient.order.uploadConsent({ body : value }); +const data = await platformClient.order.uploadConsents({ manifestId : value, + body : value }); ``` @@ -5170,7 +6726,8 @@ const data = await platformClient.order.uploadConsent({ body : value }); | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | +| --------- | ----- | -------- | ----------- | +| manifestId | string | yes | | | body | [UploadConsent](#UploadConsent) | yes | Request body | @@ -5508,6 +7065,15 @@ Verify OTP | store_id | number | no | | +--- + +#### [AllowedTemplatesResponse](#AllowedTemplatesResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | template_x_slug | [[Templates](#Templates)]? | yes | | + + --- #### [AnnouncementResponse](#AnnouncementResponse) @@ -5588,10 +7154,18 @@ Verify OTP | category | string | no | | | dimension | string | no | | | quantity | number | no | | - | status | string? | yes | | | weight | string | no | | +--- + +#### [ArticleStatusDetails](#ArticleStatusDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | status | string? | yes | | + + --- #### [AttachOrderUser](#AttachOrderUser) @@ -5651,20 +7225,6 @@ Verify OTP | primary_material | string? | yes | | ---- - -#### [B2BPODetails](#B2BPODetails) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | docker_number | string? | yes | | - | item_base_price | number? | yes | | - | partial_can_ret | boolean? | yes | | - | po_line_amount | number? | yes | | - | po_tax_amount | number? | yes | | - | total_gst_percentage | number? | yes | | - - --- #### [BagConfigs](#BagConfigs) @@ -5689,7 +7249,7 @@ Verify OTP | affiliate_details | [AffiliateDetails](#AffiliateDetails)? | yes | | | applied_promos | [string]? | yes | | | article | [Article](#Article)? | yes | | - | article_details | [ArticleDetails](#ArticleDetails)? | yes | | + | article_details | [ArticleStatusDetails](#ArticleStatusDetails)? | yes | | | bag_status | [[BagStatusHistory](#BagStatusHistory)]? | yes | | | bag_status_history | [BagStatusHistory](#BagStatusHistory)? | yes | | | bag_update_time | number? | yes | | @@ -5721,75 +7281,11 @@ Verify OTP | restore_promos | string? | yes | | | seller_identifier | string? | yes | | | shipment_id | string? | yes | | - | status | [BagReturnableCancelableStatus1](#BagReturnableCancelableStatus1)? | yes | | + | status | [BagReturnableCancelableStatus](#BagReturnableCancelableStatus)? | yes | | | tags | [string]? | yes | | | type | string? | yes | | ---- - -#### [BagGST](#BagGST) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | brand_calculated_amount | number? | yes | | - | cgst_gst_fee | string? | yes | | - | cgst_tax_percentage | number? | yes | | - | gst_fee | number? | yes | | - | gst_tag | string? | yes | | - | gst_tax_percentage | number? | yes | | - | gstin_code | string? | yes | | - | hsn_code | string? | yes | | - | hsn_code_id | string? | yes | | - | igst_gst_fee | string? | yes | | - | igst_tax_percentage | number? | yes | | - | is_default_hsn_code | boolean? | yes | | - | sgst_gst_fee | string? | yes | | - | sgst_tax_percentage | number? | yes | | - | tax_collected_at_source | number? | yes | | - | value_of_good | number? | yes | | - - ---- - -#### [BagGSTDetails](#BagGSTDetails) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | brand_calculated_amount | number | no | | - | cgst_gst_fee | string | no | | - | cgst_tax_percentage | number | no | | - | gst_fee | number | no | | - | gst_tag | string | no | | - | gst_tax_percentage | number | no | | - | gstin_code | string? | yes | | - | hsn_code | string | no | | - | hsn_code_id | string | no | | - | igst_gst_fee | string | no | | - | igst_tax_percentage | number | no | | - | is_default_hsn_code | boolean? | yes | | - | sgst_gst_fee | string | no | | - | sgst_tax_percentage | number | no | | - | tax_collected_at_source | number | no | | - | value_of_good | number | no | | - - ---- - -#### [BagMeta](#BagMeta) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | b2b_po_details | [B2BPODetails](#B2BPODetails)? | yes | | - | custom_json | string? | yes | | - | custom_message | string? | yes | | - | docket_number | string? | yes | | - | extra_meta | string? | yes | | - | gift_card | [GiftCard](#GiftCard)? | yes | | - | group_id | string? | yes | | - | partial_can_ret | boolean? | yes | | - - --- #### [BagPaymentMethods](#BagPaymentMethods) @@ -5836,19 +7332,6 @@ Verify OTP | is_returnable | boolean | no | | ---- - -#### [BagReturnableCancelableStatus1](#BagReturnableCancelableStatus1) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | can_be_cancelled | boolean | no | | - | enable_tracking | boolean | no | | - | is_active | boolean | no | | - | is_customer_return_allowed | boolean | no | | - | is_returnable | boolean | no | | - - --- #### [Bags](#Bags) @@ -5913,6 +7396,7 @@ Verify OTP | bag_state_mapper | [BagStateMapper](#BagStateMapper)? | yes | | | bsh_id | number? | yes | | | created_at | string? | yes | | + | created_ts | string? | yes | | | delivery_awb_number | string? | yes | | | delivery_partner_id | number? | yes | | | display_name | string? | yes | | @@ -5925,6 +7409,7 @@ Verify OTP | status | string | no | | | store_id | number? | yes | | | updated_at | string? | yes | | + | updated_ts | string? | yes | | --- @@ -5975,42 +7460,30 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address1 | string | no | | + | address | string? | yes | | + | address1 | string? | yes | | | address2 | string? | yes | | | alternate_email | string? | yes | | | alternate_mobile_number | string? | yes | | - | city | string | no | | - | country | string | no | | + | city | string? | yes | | + | country | string? | yes | | | country_code | string? | yes | | | customer_code | string? | yes | | | external_customer_code | string? | yes | | - | first_name | string | no | | + | first_name | string? | yes | | | floor_no | string? | yes | | | gender | string? | yes | | | house_no | string? | yes | | | last_name | string? | yes | | | middle_name | string? | yes | | - | pincode | string | no | | - | primary_email | string | no | | - | primary_mobile_number | string | no | | - | state | string | no | | + | pincode | string? | yes | | + | primary_email | string? | yes | | + | primary_mobile_number | string? | yes | | + | state | string? | yes | | | state_code | string? | yes | | | title | string? | yes | | ---- - -#### [BillingStaffDetails](#BillingStaffDetails) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | employee_code | string? | yes | | - | first_name | string? | yes | | - | last_name | string? | yes | | - | staff_id | number? | yes | | - | user | string? | yes | | - - --- #### [Brand](#Brand) @@ -6032,6 +7505,38 @@ Verify OTP | start_date | string? | yes | | +--- + +#### [BulkActionListingData](#BulkActionListingData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | batch_id | string? | yes | | + | bulk_action_type | string? | yes | | + | company_id | number? | yes | | + | created_ts | string? | yes | | + | do_invoice_label_generated | boolean? | yes | | + | file_name | string? | yes | | + | file_url | string? | yes | | + | id | number? | yes | | + | invoice_document_type | string? | yes | | + | invoice_status | string? | yes | | + | is_invoiceable | boolean? | yes | | + | label_document_type | string? | yes | | + | last_selected_invoice_label_type | string? | yes | | + | meta | string? | yes | | + | shipments_action_info | [ShipmentActionInfo](#ShipmentActionInfo)? | yes | | + | status | boolean? | yes | | + | store_code | string? | yes | | + | store_id | number? | yes | | + | store_name | string? | yes | | + | updated_ts | number? | yes | | + | uploaded_by | string? | yes | | + | uploaded_on | string? | yes | | + | user_id | string? | yes | | + | user_name | string? | yes | | + + --- #### [BulkActionTemplate](#BulkActionTemplate) @@ -6053,7 +7558,7 @@ Verify OTP --- -#### [BulkReportsDownloadFailedResponse](#BulkReportsDownloadFailedResponse) +#### [BulkFailedResponse](#BulkFailedResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | @@ -6061,6 +7566,33 @@ Verify OTP | status | boolean? | yes | | +--- + +#### [BulkListingResponse](#BulkListingResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | data | [[BulkActionListingData](#BulkActionListingData)]? | yes | | + | page | [BulkListinPage](#BulkListinPage)? | yes | | + | success | boolean? | yes | | + | total_count | number? | yes | | + + +--- + +#### [BulkListinPage](#BulkListinPage) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | current | number? | yes | | + | has_next | boolean? | yes | | + | has_previous | boolean? | yes | | + | item_total | number? | yes | | + | size | number? | yes | | + | total | number? | yes | | + | type | string? | yes | | + + --- #### [BulkReportsDownloadRequest](#BulkReportsDownloadRequest) @@ -6069,14 +7601,14 @@ Verify OTP | ---------- | ---- | -------- | ----------- | | custom_filters_for_lane | string? | yes | | | custom_headers | string? | yes | Download report with specific headers | + | end_date | string? | yes | UTC end date in ISO format | | entities | [string]? | yes | Download for specific enitites, entities can be bag, shipment or order_id, etc. | | filter_type | string? | yes | | - | from_date | string? | yes | | | is_cross_company_enabled | boolean? | yes | Download lanes for cross company. | | lane_type | string? | yes | | | report_type | string? | yes | Type of report | + | start_date | string? | yes | UTC start date in ISO format | | store_ids | [string]? | yes | Download for specific store ids. | - | to_date | string? | yes | | --- @@ -6089,6 +7621,27 @@ Verify OTP | success | boolean? | yes | | +--- + +#### [BulkStateTransistionRequest](#BulkStateTransistionRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | file_name | string? | yes | | + | url | string? | yes | | + + +--- + +#### [BulkStateTransistionResponse](#BulkStateTransistionResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | batch_id | string? | yes | | + | message | string? | yes | | + | status | boolean? | yes | | + + --- #### [BuyerDetails](#BuyerDetails) @@ -6178,6 +7731,16 @@ Verify OTP | phone | [[PhoneDetails](#PhoneDetails)]? | yes | | +--- + +#### [ConversionRate](#ConversionRate) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | base | string? | yes | | + | rates | string? | yes | | + + --- #### [CourierPartnerTrackingDetails](#CourierPartnerTrackingDetails) @@ -6330,6 +7893,26 @@ Verify OTP | total_credited_balance | string? | yes | | +--- + +#### [Currency](#Currency) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | currency_code | string? | yes | | + | currency_symbol | string? | yes | | + + +--- + +#### [CurrencyInfo](#CurrencyInfo) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | conversion_rate | [ConversionRate](#ConversionRate)? | yes | | + | ordering_currency | [OrderingCurrency](#OrderingCurrency)? | yes | | + + --- #### [CurrentStatus](#CurrentStatus) @@ -6339,6 +7922,7 @@ Verify OTP | bag_id | number? | yes | | | bag_state_mapper | [BagStateMapper](#BagStateMapper)? | yes | | | created_at | string? | yes | | + | created_ts | string? | yes | | | delivery_awb_number | string? | yes | | | delivery_partner_id | number? | yes | | | id | number | no | | @@ -6362,6 +7946,16 @@ Verify OTP | products | [[ProductsDataUpdates](#ProductsDataUpdates)]? | yes | | +--- + +#### [DateRange](#DateRange) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | from_date | string? | yes | | + | to_date | string? | yes | | + + --- #### [Dates](#Dates) @@ -6464,6 +8058,68 @@ Verify OTP | track_url | string? | yes | | +--- + +#### [EInvoiceDetails](#EInvoiceDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | error_details | [[EInvoiceErrorDetails](#EInvoiceErrorDetails)]? | yes | | + | irn_details | [EInvoiceIrnDetails](#EInvoiceIrnDetails)? | yes | | + + +--- + +#### [EInvoiceErrorDetails](#EInvoiceErrorDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | error_code | string? | yes | | + | error_message | string | no | | + + +--- + +#### [EInvoiceErrorInfo](#EInvoiceErrorInfo) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | error_details | [[EInvoiceErrorDetails](#EInvoiceErrorDetails)]? | yes | | + + +--- + +#### [EInvoiceErrorResponse](#EInvoiceErrorResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + | response_data | [[EInvoiceErrorResponseData](#EInvoiceErrorResponseData)]? | yes | | + + +--- + +#### [EInvoiceErrorResponseData](#EInvoiceErrorResponseData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | einvoice_info | [EInvoiceErrorInfo](#EInvoiceErrorInfo)? | yes | | + | einvoice_type | string | no | | + | message | string | no | | + | shipment_id | string | no | | + | status | number | no | | + + +--- + +#### [EInvoiceErrorResponseDetails](#EInvoiceErrorResponseDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + | response_data | [[EInvoiceErrorResponseData](#EInvoiceErrorResponseData)] | no | | + + --- #### [EinvoiceInfo](#EinvoiceInfo) @@ -6474,6 +8130,19 @@ Verify OTP | invoice | string? | yes | | +--- + +#### [EInvoiceIrnDetails](#EInvoiceIrnDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | ack_dt | string | no | | + | ack_no | string | no | | + | irn | string | no | | + | signed_invoice | string | no | | + | signed_qr_code | string | no | | + + --- #### [EInvoicePortalDetails](#EInvoicePortalDetails) @@ -6491,14 +8160,11 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | ack_dt | string? | yes | | - | ack_no | string? | yes | | - | irn | string? | yes | | + | einvoice_info | [EInvoiceDetails](#EInvoiceDetails)? | yes | | + | einvoice_type | string | no | | | message | string | no | | | shipment_id | string | no | | - | success | boolean | no | | - | timeout | number? | yes | | - | timeout_unit | string? | yes | | + | status | number | no | | --- @@ -6516,10 +8182,7 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | string? | yes | | | response_data | [[EInvoiceResponseData](#EInvoiceResponseData)] | no | | - | success | boolean? | yes | | - | success_count | number | no | | --- @@ -6528,6 +8191,7 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | einvoice_type | string | no | | | shipment_id | string | no | | @@ -6601,13 +8265,50 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | error | string | no | | + | error | string? | yes | | | error_trace | string? | yes | | | message | string | no | | | status | number? | yes | | | success | boolean? | yes | | +--- + +#### [FailedOrderLogDetails](#FailedOrderLogDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | error_trace | string | no | | + | exception | string | no | | + + +--- + +#### [FailedOrderLogs](#FailedOrderLogs) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [FailedOrdersItem](#FailedOrdersItem) | no | | + | page | [PageDetails](#PageDetails) | no | | + + +--- + +#### [FailedOrdersItem](#FailedOrdersItem) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | channel | [LogsChannelDetails](#LogsChannelDetails) | no | | + | created_at | string | no | | + | display_message | string | no | | + | error_message | string | no | | + | log_id | number | no | | + | meta | string | no | | + | method_name | string | no | | + | order_id | string | no | | + | payment | [LogPaymentDetails](#LogPaymentDetails) | no | | + + --- #### [FetchCreditBalanceRequestPayload](#FetchCreditBalanceRequestPayload) @@ -6653,6 +8354,24 @@ Verify OTP | value | string? | yes | | +--- + +#### [Filters](#Filters) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | date_range | [DateRange](#DateRange)? | yes | | + | dp_ids | number? | yes | | + | dp_name | string? | yes | | + | from_date | string? | yes | | + | lane | string? | yes | | + | logo | string? | yes | | + | selected_shipments | string? | yes | | + | store_name | string? | yes | | + | stores | number? | yes | | + | to_date | string? | yes | | + + --- #### [FiltersInfo](#FiltersInfo) @@ -6667,6 +8386,21 @@ Verify OTP | value | string | no | | +--- + +#### [FiltersRequest](#FiltersRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | date_range | [DateRange](#DateRange)? | yes | | + | dp_ids | number | no | | + | dp_name | string | no | | + | lane | string | no | | + | logo | string? | yes | | + | store_name | string | no | | + | stores | number | no | | + + --- #### [FiltersResponse](#FiltersResponse) @@ -6751,57 +8485,6 @@ Verify OTP | fynd_order_id | [string]? | yes | | ---- - -#### [GenerateInvoiceIDErrorResponse](#GenerateInvoiceIDErrorResponse) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | items | [[GenerateInvoiceIDErrorResponseData](#GenerateInvoiceIDErrorResponseData)]? | yes | | - - ---- - -#### [GenerateInvoiceIDErrorResponseData](#GenerateInvoiceIDErrorResponseData) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | error_message | string? | yes | | - | invoice_id | boolean? | yes | | - | shipment_id | string? | yes | | - | success | boolean? | yes | | - - ---- - -#### [GenerateInvoiceIDRequest](#GenerateInvoiceIDRequest) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | shipment_ids | [string] | no | | - - ---- - -#### [GenerateInvoiceIDResponse](#GenerateInvoiceIDResponse) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | items | [[GenerateInvoiceIDResponseData](#GenerateInvoiceIDResponseData)]? | yes | | - - ---- - -#### [GenerateInvoiceIDResponseData](#GenerateInvoiceIDResponseData) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | error_message | boolean? | yes | | - | invoice_id | string? | yes | | - | shipment_id | string? | yes | | - | success | boolean? | yes | | - - --- #### [GeneratePosOrderReceiptResponse](#GeneratePosOrderReceiptResponse) @@ -6809,10 +8492,13 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | customer_cn_receipt | string? | yes | | + | customer_cn_receipt_template | string? | yes | | | invoice_receipt | string? | yes | | + | invoice_receipt_template | string? | yes | | | merchant_cn_receipt | string? | yes | | | order_id | string? | yes | | | payment_receipt | string? | yes | | + | payment_receipt_template | string? | yes | | | success | boolean? | yes | | @@ -6835,18 +8521,6 @@ Verify OTP | page | [BagsPage](#BagsPage) | no | | ---- - -#### [GiftCard](#GiftCard) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | display_text | string? | yes | | - | gift_message | string? | yes | | - | gift_price | number? | yes | | - | is_gift_applied | boolean? | yes | | - - --- #### [GSTDetailsData](#GSTDetailsData) @@ -7031,56 +8705,252 @@ Verify OTP --- -#### [ItemCriterias](#ItemCriterias) +#### [ItemCriterias](#ItemCriterias) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | item_brand | [number]? | yes | | + + +--- + +#### [JobDetailsData](#JobDetailsData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | batch_id | string? | yes | | + | company_id | string? | yes | | + | failed_shipments_count | number? | yes | | + | processing_shipments_count | number? | yes | | + | successful_shipment_ids | [string]? | yes | | + | successful_shipments_count | number? | yes | | + | total_shipments_count | number? | yes | | + + +--- + +#### [JobDetailsResponse](#JobDetailsResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | created_ts | string? | yes | | + | data | [[JobDetailsData](#JobDetailsData)]? | yes | | + | failed_records | [[String: string]]? | yes | | + | file_url | string? | yes | | + | message | string? | yes | | + | status | string? | yes | | + | success | boolean? | yes | | + | uploaded_by | string? | yes | | + | uploaded_on | string? | yes | | + | user_id | string? | yes | | + + +--- + +#### [JobFailedResponse](#JobFailedResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | file_name | string? | yes | | + | url | string? | yes | | + + +--- + +#### [LaneConfigResponse](#LaneConfigResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | super_lanes | [[SuperLane](#SuperLane)]? | yes | | + + +--- + +#### [LineItem](#LineItem) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | charges | [[Charge](#Charge)]? | yes | | + | custom_message | string? | yes | | + | external_line_id | string? | yes | | + | meta | string? | yes | | + | quantity | number? | yes | | + | seller_identifier | string | no | | + + +--- + +#### [LocationDetails](#LocationDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | articles | [[ArticleDetails](#ArticleDetails)] | no | | + | fulfillment_id | number | no | | + | fulfillment_type | string | no | | + + +--- + +#### [LockData](#LockData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | lock_message | string? | yes | | + | locked | boolean? | yes | | + | mto | boolean? | yes | | + + +--- + +#### [LogPaymentDetails](#LogPaymentDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | amount_paid | string? | yes | | + | payment_mode | string? | yes | | + + +--- + +#### [LogsChannelDetails](#LogsChannelDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | channel_id | string? | yes | | + | channel_shipment_id | string? | yes | | + | logo | string? | yes | | + | name | string? | yes | | + + +--- + +#### [Manifest](#Manifest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | company_id | number | no | | + | created_at | string | no | | + | created_by | string | no | | + | created_ts | string? | yes | | + | filters | [Filters](#Filters)? | yes | | + | id | number | no | | + | is_active | boolean | no | | + | manifest_id | string | no | | + | meta | [ManifestMeta](#ManifestMeta)? | yes | | + | pdf_meta | [PDFMeta](#PDFMeta)? | yes | | + | status | string | no | | + | uid | string | no | | + | user_id | string | no | | + + +--- + +#### [ManifestDetails](#ManifestDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | additional_shipment_count | number? | yes | | + | items | [[ManifestItemDetails](#ManifestItemDetails)]? | yes | | + | manifest_details | [[Manifest](#Manifest)]? | yes | | + | page | [ManifestPageInfo](#ManifestPageInfo)? | yes | | + + +--- + +#### [ManifestFile](#ManifestFile) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | bucket | string? | yes | | + | key | string? | yes | | + | region | string? | yes | | + + +--- + +#### [ManifestFiltersResponse](#ManifestFiltersResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | advance_filter | [[FiltersInfo](#FiltersInfo)]? | yes | | + | global_filter | [[FiltersInfo](#FiltersInfo)]? | yes | | + + +--- + +#### [ManifestItemDetails](#ManifestItemDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | awb_number | string? | yes | | + | invoice_id | string? | yes | | + | order_id | string | no | | + | quantity | number? | yes | | + | shipment_created_at | string? | yes | | + | shipment_id | string | no | | + + +--- + +#### [ManifestList](#ManifestList) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | item_brand | [number]? | yes | | + | items | [[Manifest](#Manifest)]? | yes | | + | page | [ManifestPageInfo](#ManifestPageInfo)? | yes | | --- -#### [LaneConfigResponse](#LaneConfigResponse) +#### [ManifestMediaUpdate](#ManifestMediaUpdate) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | super_lanes | [[SuperLane](#SuperLane)]? | yes | | + | code | number? | yes | | + | entity | string? | yes | | + | file | [ManifestFile](#ManifestFile)? | yes | | + | link | string? | yes | | + | media_type | string? | yes | | + | status | boolean? | yes | | --- -#### [LineItem](#LineItem) +#### [ManifestMeta](#ManifestMeta) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | charges | [[Charge](#Charge)]? | yes | | - | custom_message | string? | yes | | - | external_line_id | string? | yes | | - | meta | string? | yes | | - | quantity | number? | yes | | - | seller_identifier | string | no | | + | filters | [Filters](#Filters)? | yes | | + | total_shipment_prices_count | [TotalShipmentPricesCount](#TotalShipmentPricesCount)? | yes | | --- -#### [LocationDetails](#LocationDetails) +#### [ManifestPageInfo](#ManifestPageInfo) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | articles | [[ArticleDetails](#ArticleDetails)] | no | | - | fulfillment_id | number | no | | - | fulfillment_type | string | no | | + | current | number | no | | + | has_next | boolean | no | | + | has_previous | boolean | no | | + | size | number | no | | + | total | number | no | | + | type | string | no | | --- -#### [LockData](#LockData) +#### [ManifestShipmentListing](#ManifestShipmentListing) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | lock_message | string? | yes | | - | locked | boolean? | yes | | - | mto | boolean? | yes | | + | items | [[ManifestItemDetails](#ManifestItemDetails)]? | yes | | + | lane | string? | yes | | + | message | string? | yes | | + | page | [ManifestPageInfo](#ManifestPageInfo) | no | | + | status | number | no | | + | success | boolean | no | | + | total_count | number | no | | --- @@ -7110,7 +8980,7 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | identifiers | string? | yes | | - | return_config | [ReturnConfig1](#ReturnConfig1)? | yes | | + | return_config | [ReturnConfig](#ReturnConfig)? | yes | | | size | string? | yes | | | uid | string? | yes | | @@ -7183,6 +9053,7 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | created_ts | string? | yes | | | fynd_order_id | string | no | | | meta | string? | yes | | | order_date | string | no | | @@ -7209,6 +9080,7 @@ Verify OTP | ---------- | ---- | -------- | ----------- | | affiliate_id | string? | yes | | | cod_charges | string? | yes | | + | created_ts | string? | yes | | | fynd_order_id | string | no | | | meta | string? | yes | | | order_date | string? | yes | | @@ -7253,6 +9125,18 @@ Verify OTP | user | [UserData](#UserData) | no | | +--- + +#### [OrderingCurrency](#OrderingCurrency) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | currency_code | string? | yes | | + | currency_name | string? | yes | | + | currency_sub_unit | string? | yes | | + | currency_symbol | string? | yes | | + + --- #### [OrderingStoreDetails](#OrderingStoreDetails) @@ -7295,34 +9179,6 @@ Verify OTP | total_count | number? | yes | | ---- - -#### [OrderMeta](#OrderMeta) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | billing_staff_details | [BillingStaffDetails](#BillingStaffDetails)? | yes | | - | cart_id | number? | yes | | - | cart_object_id | string? | yes | | - | comment | string? | yes | | - | company_logo | string? | yes | | - | currency_symbol | string? | yes | | - | customer_note | string? | yes | | - | employee_id | string? | yes | | - | extra_meta | string? | yes | | - | files | [string]? | yes | | - | mongo_cart_id | number? | yes | | - | order_child_entities | [string]? | yes | | - | order_platform | string? | yes | | - | order_tags | [string]? | yes | | - | order_type | string? | yes | | - | ordering_store | number? | yes | | - | payment_type | string? | yes | | - | platform_user_details | [PlatformUserDetails](#PlatformUserDetails)? | yes | | - | staff | string? | yes | | - | transaction_data | [TransactionData](#TransactionData)? | yes | | - - --- #### [OrderPriority](#OrderPriority) @@ -7418,11 +9274,37 @@ Verify OTP | ---------- | ---- | -------- | ----------- | | current | number? | yes | Current page number | | has_next | boolean? | yes | if next page contains any result | + | has_previous | boolean? | yes | if previous page contains any result | | item_total | number | no | Total count of the results present in the requested filter | | size | number? | yes | Page size | | type | string? | yes | Type of the page | +--- + +#### [PaginatedStates](#PaginatedStates) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[StateManagerState](#StateManagerState)]? | yes | | + | page | [PaginationInfo](#PaginationInfo)? | yes | | + + +--- + +#### [PaginationInfo](#PaginationInfo) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | current | number? | yes | | + | has_next | boolean? | yes | | + | has_previous | boolean? | yes | | + | item_total | number? | yes | | + | size | number? | yes | | + | total | number? | yes | | + | type | string? | yes | | + + --- #### [PaymentInfo](#PaymentInfo) @@ -7483,6 +9365,16 @@ Verify OTP | po_invoice | string? | yes | | +--- + +#### [PDFMeta](#PDFMeta) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | consent | string? | yes | | + | media_updates | [[ManifestMediaUpdate](#ManifestMediaUpdate)]? | yes | | + + --- #### [PhoneDetails](#PhoneDetails) @@ -7586,8 +9478,11 @@ Verify OTP | ---------- | ---- | -------- | ----------- | | breakup_values | [[PlatformBreakupValues](#PlatformBreakupValues)]? | yes | | | channel | [PlatformChannel](#PlatformChannel)? | yes | | + | currency | [Currency](#Currency)? | yes | | + | currency_info | [CurrencyInfo](#CurrencyInfo)? | yes | | | meta | string? | yes | | | order_created_time | string? | yes | | + | order_created_ts | string? | yes | | | order_id | string? | yes | | | order_value | number? | yes | | | payment_mode | string? | yes | | @@ -7619,6 +9514,8 @@ Verify OTP | company_details | [CompanyDetails](#CompanyDetails)? | yes | | | coupon | string? | yes | | | credit_note_id | string? | yes | | + | currency | [Currency](#Currency)? | yes | | + | currency_info | [CurrencyInfo](#CurrencyInfo)? | yes | | | custom_message | string? | yes | | | custom_meta | [string]? | yes | | | delivery_details | [UserDetailsData](#UserDetailsData)? | yes | | @@ -7627,6 +9524,7 @@ Verify OTP | dp_details | [DPDetailsData](#DPDetailsData)? | yes | | | enable_dp_tracking | boolean? | yes | | | estimated_sla_time | string? | yes | | + | estimated_sla_ts | string? | yes | | | forward_shipment_id | string? | yes | | | fulfilling_store | [FulfillingStore](#FulfillingStore)? | yes | | | fulfilment_priority | number? | yes | | @@ -7654,7 +9552,8 @@ Verify OTP | priority_text | string? | yes | | | rto_address | [PlatformDeliveryAddress](#PlatformDeliveryAddress)? | yes | | | shipment_created_at | string? | yes | | - | shipment_details | [ShipmentDetails](#ShipmentDetails)? | yes | | + | shipment_created_ts | string? | yes | | + | shipment_details | [ShipmentLockDetails](#ShipmentLockDetails)? | yes | | | shipment_id | string | no | | | shipment_images | [string]? | yes | | | shipment_quantity | number? | yes | | @@ -7707,18 +9606,6 @@ Verify OTP | updated_time | string? | yes | | ---- - -#### [PlatformUserDetails](#PlatformUserDetails) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | platform_user_employee_code | string? | yes | | - | platform_user_first_name | string? | yes | | - | platform_user_id | string? | yes | | - | platform_user_last_name | string? | yes | | - - --- #### [PointBlankOtpData](#PointBlankOtpData) @@ -7823,6 +9710,42 @@ Verify OTP | pack_by_date | string? | yes | | +--- + +#### [ProcessManifest](#ProcessManifest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action | string | no | | + | filters | [FiltersRequest](#FiltersRequest) | no | | + | manifest_id | string? | yes | | + | unique_id | string | no | | + + +--- + +#### [ProcessManifestItemResponse](#ProcessManifestItemResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [ProcessManifestResponse](#ProcessManifestResponse)? | yes | | + + +--- + +#### [ProcessManifestResponse](#ProcessManifestResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action | string? | yes | | + | company_id | number? | yes | | + | created_by | string? | yes | | + | filters | [Filters](#Filters)? | yes | | + | manifest_id | string? | yes | | + | uid | string? | yes | | + | user_id | string? | yes | | + + --- #### [Products](#Products) @@ -7994,17 +9917,6 @@ Verify OTP | unit | string? | yes | | ---- - -#### [ReturnConfig1](#ReturnConfig1) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | returnable | boolean? | yes | | - | time | number? | yes | | - | unit | string? | yes | | - - --- #### [RoleBaseStateTransitionMapping](#RoleBaseStateTransitionMapping) @@ -8062,6 +9974,23 @@ Verify OTP | processing_dates | [ProcessingDates](#ProcessingDates)? | yes | | +--- + +#### [ShipmentActionInfo](#ShipmentActionInfo) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | failed_invoiced_shipments | [String: string]? | yes | | + | failed_shipments | [[String: string]]? | yes | | + | invoice | [string]? | yes | | + | invoiceable_shipments | [string]? | yes | | + | label | [string]? | yes | | + | processing_invoice_shipments | [string]? | yes | | + | processing_shipments | [string]? | yes | | + | successful_invoiced_shipments | [string]? | yes | | + | successful_shipments | [string]? | yes | | + + --- #### [ShipmentBagReasons](#ShipmentBagReasons) @@ -8117,14 +10046,11 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | action_to_status | string? | yes | | | affiliate_shipment_id | string | no | | | articles | [[ArticleDetails](#ArticleDetails)] | no | | | box_type | string? | yes | | | dp_id | number? | yes | | | fulfillment_id | number | no | | - | lock_message | string? | yes | | - | lock_status | boolean? | yes | | | meta | string? | yes | | | shipments | number | no | | @@ -8173,15 +10099,19 @@ Verify OTP | bags | [[BagUnit](#BagUnit)]? | yes | | | can_process | boolean? | yes | | | channel | [ShipmentListingChannel](#ShipmentListingChannel)? | yes | | + | currency | [Currency](#Currency)? | yes | | + | currency_info | [CurrencyInfo](#CurrencyInfo)? | yes | | | customer_note | string? | yes | | | delivery_address | [PlatformDeliveryAddress](#PlatformDeliveryAddress)? | yes | | | display_name | string? | yes | | | estimated_sla_time | string? | yes | | + | estimated_sla_ts | string? | yes | | | fulfilling_store | [ShipmentItemFulFillingStore](#ShipmentItemFulFillingStore)? | yes | | | invoice_id | string? | yes | | | lock_status | boolean? | yes | | | meta | string? | yes | | | mode_of_payment | string? | yes | | + | order_created_ts | string? | yes | | | order_date | string? | yes | | | order_id | string | no | | | ordering_channnel | string? | yes | | @@ -8190,9 +10120,11 @@ Verify OTP | previous_shipment_id | string? | yes | | | prices | [Prices](#Prices)? | yes | | | shipment_created_at | string | no | | + | shipment_created_ts | string? | yes | | | shipment_id | string? | yes | | | shipment_status | [ShipmentStatus](#ShipmentStatus)? | yes | | | status_created_at | string? | yes | | + | status_created_ts | string? | yes | | | total_bags | number | no | | | user | [UserDataInfo](#UserDataInfo)? | yes | | @@ -8204,7 +10136,7 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | address | string? | yes | | - | brand_store_tags | string? | yes | | + | brand_store_tags | [string]? | yes | | | city | string? | yes | | | code | string | no | | | id | number | no | | @@ -8215,44 +10147,7 @@ Verify OTP | pincode | string? | yes | | | state | string? | yes | | | store_email | string? | yes | | - - ---- - -#### [ShipmentItemMeta](#ShipmentItemMeta) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | activity_comment | string? | yes | | - | assign_dp_from_sb | boolean? | yes | | - | auto_trigger_dp_assignment_acf | boolean | no | | - | bag_weight | string? | yes | | - | debug_info | string? | yes | | - | dp_options | string? | yes | | - | dp_sort_key | string? | yes | | - | ewaybill_info | string? | yes | | - | existing_dp_list | [string]? | yes | | - | external | string? | yes | | - | formatted | [Formatted](#Formatted)? | yes | | - | fulfilment_priority_text | string? | yes | | - | is_international | boolean? | yes | | - | is_self_ship | boolean? | yes | | - | lock_data | [LockData](#LockData)? | yes | | - | order_type | string? | yes | | - | packaging_name | string? | yes | | - | parent_dp_id | string? | yes | | - | pdf_media | [string]? | yes | | - | same_store_available | boolean? | yes | | - | shipment_chargeable_weight | number? | yes | | - | shipment_tags | [[ShipmentTags](#ShipmentTags)]? | yes | | - | shipment_volumetric_weight | number? | yes | | - | shipment_weight | number? | yes | | - | shipping_zone | string? | yes | | - | sla | number? | yes | | - | store_invoice_updated_date | string? | yes | | | tags | [string]? | yes | | - | timestamp | [ShipmentTimeStamp](#ShipmentTimeStamp)? | yes | | - | weight | number? | yes | | --- @@ -8279,6 +10174,17 @@ Verify OTP | name | string? | yes | | +--- + +#### [ShipmentLockDetails](#ShipmentLockDetails) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action_to_status | string? | yes | | + | lock_message | string? | yes | | + | lock_status | boolean? | yes | | + + --- #### [ShipmentMeta](#ShipmentMeta) @@ -8398,12 +10304,14 @@ Verify OTP | ---------- | ---- | -------- | ----------- | | bag_list | [string]? | yes | | | created_at | string? | yes | | + | created_ts | string? | yes | | | current_shipment_status | string? | yes | | | meta | string? | yes | | | shipment_id | string? | yes | | | shipment_status_id | number? | yes | | | status | string | no | | | status_created_at | string? | yes | | + | status_created_ts | string? | yes | | | title | string | no | | @@ -8415,6 +10323,7 @@ Verify OTP | ---------- | ---- | -------- | ----------- | | bag_list | [string]? | yes | | | created_at | string? | yes | | + | created_ts | string? | yes | | | current_shipment_status | string? | yes | | | display_name | string? | yes | | | id | number? | yes | | @@ -8450,17 +10359,18 @@ Verify OTP | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address1 | string | no | | + | address | string? | yes | | + | address1 | string? | yes | | | address2 | string? | yes | | | address_type | string? | yes | | | alternate_email | string? | yes | | | alternate_mobile_number | string? | yes | | - | city | string | no | | - | country | string | no | | + | city | string? | yes | | + | country | string? | yes | | | country_code | string? | yes | | | customer_code | string? | yes | | | external_customer_code | string? | yes | | - | first_name | string | no | | + | first_name | string? | yes | | | floor_no | string? | yes | | | gender | string? | yes | | | geo_location | string? | yes | | @@ -8468,12 +10378,12 @@ Verify OTP | landmark | string? | yes | | | last_name | string? | yes | | | middle_name | string? | yes | | - | pincode | string | no | | - | primary_email | string | no | | - | primary_mobile_number | string | no | | + | pincode | string? | yes | | + | primary_email | string? | yes | | + | primary_mobile_number | string? | yes | | | shipping_type | string? | yes | | | slot | [string]? | yes | | - | state | string | no | | + | state | string? | yes | | | state_code | string? | yes | | | title | string? | yes | | @@ -8495,6 +10405,66 @@ Verify OTP | shipment_id | number | no | ShipmentId | +--- + +#### [StateManagerFilter](#StateManagerFilter) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | default_value | string? | yes | | + | description | string? | yes | | + | display_name | string? | yes | | + | id | number? | yes | | + | name | string? | yes | | + | options | string? | yes | | + | type | string? | yes | | + + +--- + +#### [StateManagerState](#StateManagerState) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | app_display_name | string? | yes | The application display name | + | app_facing | boolean? | yes | Whether state is for app facing or not | + | id | number? | yes | Unique identifier for the state | + | is_active | boolean? | yes | Whether state is active or not | + | journey_type | string? | yes | Type of the journey | + | platform_display_name | string? | yes | The platform display name | + | state | string? | yes | The name of the state | + | state_type | string? | yes | Type of the state | + + +--- + +#### [StateManagerTask](#StateManagerTask) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | description | string? | yes | | + | display_name | string? | yes | | + | doc_string | string? | yes | | + | id | number? | yes | | + | kwargs | string? | yes | | + | name | string? | yes | | + + +--- + +#### [StateTransitionFlag](#StateTransitionFlag) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | default_value | string? | yes | | + | description | string? | yes | | + | display_name | string? | yes | | + | id | number? | yes | | + | name | string? | yes | | + | options | string? | yes | | + | type | string? | yes | | + + --- #### [StatuesRequest](#StatuesRequest) @@ -8743,31 +10713,46 @@ Verify OTP --- -#### [TrackingList](#TrackingList) +#### [TemplateDownloadResponse](#TemplateDownloadResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | is_current | boolean? | yes | | - | is_passed | boolean? | yes | | - | status | string | no | | - | text | string | no | | - | time | string? | yes | | + | file_name | string? | yes | | + | url | string? | yes | | --- -#### [TransactionData](#TransactionData) +#### [Templates](#Templates) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | amount_paid | number? | yes | | - | currency | string? | yes | | - | entity | string? | yes | | - | payment_id | string? | yes | | - | status | string? | yes | | - | terminal_id | string? | yes | | - | transaction_id | string? | yes | | - | unique_reference_number | string? | yes | | + | text | string? | yes | | + | value | string? | yes | | + + +--- + +#### [TotalShipmentPricesCount](#TotalShipmentPricesCount) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | shipment_count | number? | yes | | + | total_price | number? | yes | | + + +--- + +#### [TrackingList](#TrackingList) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | created_ts | string? | yes | | + | is_current | boolean? | yes | | + | is_passed | boolean? | yes | | + | status | string | no | | + | text | string | no | | + | time | string? | yes | | --- @@ -8895,12 +10880,15 @@ Verify OTP | area | string? | yes | | | city | string | no | | | country | string | no | | + | country_iso_code | string? | yes | | + | country_phone_code | string? | yes | | | email | string? | yes | | | landmark | string? | yes | | | name | string | no | | | phone | string | no | | | pincode | string | no | | | state | string | no | | + | state_code | string? | yes | | --- diff --git a/documentation/platform/PAYMENT.md b/documentation/platform/PAYMENT.md index 4e1c51192..103c80715 100644 --- a/documentation/platform/PAYMENT.md +++ b/documentation/platform/PAYMENT.md @@ -18,6 +18,7 @@ Default * [confirmPayment](#confirmpayment) * [createMerchantRefundPriority](#createmerchantrefundpriority) * [createPaymentLink](#createpaymentlink) +* [createPaymentOrder](#createpaymentorder) * [deletePayout](#deletepayout) * [deleteSubscriptionPaymentMethod](#deletesubscriptionpaymentmethod) * [edcAggregatorsAndModelList](#edcaggregatorsandmodellist) @@ -27,13 +28,17 @@ Default * [getBankAccountDetailsOpenAPI](#getbankaccountdetailsopenapi) * [getBrandPaymentGatewayConfig](#getbrandpaymentgatewayconfig) * [getEdcDevice](#getedcdevice) +* [getMerchantAggregatorAppVersion](#getmerchantaggregatorappversion) * [getMerchantAggregatorPaymentModeDetails](#getmerchantaggregatorpaymentmodedetails) * [getMerchantPaymentOption](#getmerchantpaymentoption) * [getMerchantRefundPriority](#getmerchantrefundpriority) * [getPGConfigAggregators](#getpgconfigaggregators) * [getPaymentCodeOption](#getpaymentcodeoption) * [getPaymentLink](#getpaymentlink) +* [getPaymentModeControlRoutes](#getpaymentmodecontrolroutes) +* [getPaymentModeCustomConfig](#getpaymentmodecustomconfig) * [getPaymentModeRoutes](#getpaymentmoderoutes) +* [getPaymentSession](#getpaymentsession) * [getPosPaymentModeRoutes](#getpospaymentmoderoutes) * [getSubscriptionConfig](#getsubscriptionconfig) * [getSubscriptionPaymentMethod](#getsubscriptionpaymentmethod) @@ -45,6 +50,7 @@ Default * [oauthGetUrl](#oauthgeturl) * [patchMerchantAggregatorPaymentModeDetails](#patchmerchantaggregatorpaymentmodedetails) * [patchMerchantPaymentOption](#patchmerchantpaymentoption) +* [patchMerchantPaymentOptionVersion](#patchmerchantpaymentoptionversion) * [paymentStatusBulk](#paymentstatusbulk) * [pollingPaymentLink](#pollingpaymentlink) * [repaymentDetails](#repaymentdetails) @@ -54,6 +60,8 @@ Default * [saveBrandPaymentGatewayConfig](#savebrandpaymentgatewayconfig) * [savePayout](#savepayout) * [saveSubscriptionSetupIntent](#savesubscriptionsetupintent) +* [setMerchantModeControlRoutes](#setmerchantmodecontrolroutes) +* [setPaymentModeCustomConfig](#setpaymentmodecustomconfig) * [setUserCODlimitRoutes](#setusercodlimitroutes) * [updateEdcDevice](#updateedcdevice) * [updateMerchantRefundPriority](#updatemerchantrefundpriority) @@ -584,6 +592,80 @@ Success. Check the example shown below +--- + + +### createPaymentOrder +Create Order + + + +```javascript +// Promise +const promise = platformClient.application("").payment.createPaymentOrder({ body : value }); + +// Async/Await +const data = await platformClient.application("").payment.createPaymentOrder({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [PaymentOrderRequest](#PaymentOrderRequest) | yes | Request body | + + +Use this API to create a order and payment on aggregator side + +*Returned Response:* + + + + +[PaymentOrderResponse](#PaymentOrderResponse) + +Success. Check the example shown below + + + + +
+  Example: + +```json +{ + "message": "", + "success": true, + "status_code": 200, + "data": { + "amount": 2190000, + "order_id": "order_JeaZ5ryKO01rno", + "email": "abc@example.com", + "contact": "9999999999", + "currency": "INR", + "customer_id": "cust_CZgcLVGsGP8BUQ", + "callback_url": "https://api.fyndx0.com/service/webhooks/payment/v1.0/callback/link/?razorpay_order_id=order_JeaZ5ryKO01rno", + "method": "upi", + "aggregator": "Razorpay", + "merchant_order_id": "FY629EDC0980B6A8C1EA" + }, + "callback_url": "https://api.fyndx0.com/service/webhooks/payment/v1.0/callback/link/?razorpay_order_id=order_JeaZ5ryKO01rno", + "payment_confirm_url": "https://api.fyndx0.com/service/webhooks/payment/v1.0/callback/link/?razorpay_order_id=order_JeaZ5ryKO01rno", + "order_id": "FY629EDC0980B6A8C1EA" +} +``` +
+ + + + + + + + + --- @@ -1357,6 +1439,91 @@ Success. Returns the single edc device mapped to the terminal. Check the example +--- + + +### getMerchantAggregatorAppVersion +Get app version required for Payment Mode. + + + +```javascript +// Promise +const promise = platformClient.application("").payment.getMerchantAggregatorAppVersion({ aggregatorId : value, + businessUnit : value, + device : value, + paymentModeId : value, + subPaymentMode : value }); + +// Async/Await +const data = await platformClient.application("").payment.getMerchantAggregatorAppVersion({ aggregatorId : value, + businessUnit : value, + device : value, + paymentModeId : value, + subPaymentMode : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| aggregatorId | number | yes | Aggregators Id | +| businessUnit | string | yes | | +| device | string | yes | | +| paymentModeId | number | no | | +| subPaymentMode | string | no | | + + + +This api provide read operations on the app version required for Payment Mode or sub payment mode for an Aggregator. + +*Returned Response:* + + + + +[AggregatorVersionResponse](#AggregatorVersionResponse) + +Success. + + + + +
+  Examples: + + +
+  merchant_payment_response_success + +```json +{ + "summary": "List of active PGs for merchant and its offline payment configurations", + "value": { + "success": true, + "message": "", + "items": { + "is_equal_to": 13, + "is_less_than": 12, + "is_greater_than\"": 10 + } + } +} +``` +
+ +
+ + + + + + + + + --- @@ -1396,7 +1563,7 @@ Get Aggregator, payment mode and sub payment mode details. -[MerchnatPaymentModeResponse](#MerchnatPaymentModeResponse) +[PlatformPaymentModeResponse](#PlatformPaymentModeResponse) Success. @@ -1458,7 +1625,7 @@ This api fetches all the available PGs for merchant and its offline payment mode -[MerchnatPaymentModeResponse](#MerchnatPaymentModeResponse) +[PlatformPaymentModeResponse](#PlatformPaymentModeResponse) Success. @@ -1495,21 +1662,28 @@ Success. "payment_modes": { "cod": [ { - "user_cod_limit": 0, - "cod_charges": 0, - "anonymous_cod": false, - "cod_max_order_value": 0, - "cod_min_order_value": 0, - "cod_charges_max_value": 0, - "cod_charges_min_value": 0 + "name": "Cash on Delivery", + "slug": "cod", + "is_active": true, + "logos": { + "small": "https://hdn-1.fynd.com/payment/cod.png", + "large": "https://hdn-1.fynd.com/payment/cod.png" + } } ] } }, - "split": { + "advance": { "is_active": true, "payment_modes": { - "split_payment": {} + "split": [ + { + "name": "Split Payment", + "slug": "split", + "id": 48, + "is_active": true + } + ] } } } @@ -1649,7 +1823,7 @@ Get Aggregators available to be added as PG. -[MerchnatPaymentModeResponse](#MerchnatPaymentModeResponse) +[PlatformPaymentModeResponse](#PlatformPaymentModeResponse) Success. @@ -1863,6 +2037,208 @@ Success. Check the example shown below +--- + + +### getPaymentModeControlRoutes +Get details for the given offline / advance payment mode for merchant + + + +```javascript +// Promise +const promise = platformClient.application("").payment.getPaymentModeControlRoutes({ mode : value }); + +// Async/Await +const data = await platformClient.application("").payment.getPaymentModeControlRoutes({ mode : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| mode | string | yes | offline / advance modes to get the payment modes | + + + +Use this API to get details for the given offline / advance payment mode for merchant + +*Returned Response:* + + + + +[PlatformPaymentModeResponse](#PlatformPaymentModeResponse) + +Success. Returns user cod limit , remaining limit and usage of user for COD. Check the example shown below or refer `GetUserCODLimitResponseSchema` for more details. + + + + +
+  Example: + +```json +{ + "success": true, + "message": "get offline / advance payment mode details", + "items": [ + { + "display_name": "Store OS", + "business_unit": "pos", + "config": [ + { + "anonymous": false, + "charges": 100, + "charges_max_value": 1000, + "charges_min_value": 0, + "max_order_value": 30000, + "min_order_value": 0, + "is_active": true, + "name": "Cash on Delivery (COD)", + "slug": "cod", + "user_limit": 10000 + } + ] + } + ] +} +``` +
+ + + + + + + + + +--- + + +### getPaymentModeCustomConfig +Get details of advance payment custom configurations of merchant + + + +```javascript +// Promise +const promise = platformClient.application("").payment.getPaymentModeCustomConfig({ mode : value }); + +// Async/Await +const data = await platformClient.application("").payment.getPaymentModeCustomConfig({ mode : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| mode | string | yes | offline / advance mode | + + + +Use this API to Get details of advance payment custom configurations of merchant + +*Returned Response:* + + + + +[PaymentCustomConfigResponseSchema](#PaymentCustomConfigResponseSchema) + +Success. Get Advance Payment Custom Configurations. + + + + +
+  Example: + +```json +{ + "success": true, + "message": "", + "items": [ + { + "display_name": "Store OS", + "business_unit": "pos", + "custom_config": { + "customer": { + "restriction": "ALL_CUSTOMER", + "groups": [ + 1, + 2, + 3 + ], + "types": [ + "ALL_CUSTOMER", + "CUSTOMER_GROUP", + "REGISTERED_CUSTOMER" + ] + }, + "payment_mode": { + "available": true, + "pre_order": [ + "NB", + "UPI" + ], + "post_order": [ + "NB", + "UPI" + ] + }, + "min_order_value": 50 + } + }, + { + "display_name": "StoreFront", + "business_unit": "storefront", + "custom_config": { + "customer": { + "restriction": "ALL_CUSTOMER", + "groups": [ + 1, + 2, + 3 + ], + "types": [ + "ALL_CUSTOMER", + "CUSTOMER_GROUP", + "REGISTERED_CUSTOMER" + ] + }, + "payment_mode": { + "available": true, + "pre_order": [ + "NB", + "UPI" + ], + "post_order": [ + "NB", + "UPI" + ] + }, + "min_order_value": 50 + } + } + ] +} +``` +
+ + + + + + + + + --- @@ -1874,11 +2250,15 @@ Get All Valid Payment Options ```javascript // Promise const promise = platformClient.application("").payment.getPaymentModeRoutes({ refresh : value, - requestType : value }); + requestType : value, + orderId : value, + shipmentId : value }); // Async/Await const data = await platformClient.application("").payment.getPaymentModeRoutes({ refresh : value, - requestType : value }); + requestType : value, + orderId : value, + shipmentId : value }); ``` @@ -1888,7 +2268,9 @@ const data = await platformClient.application("").payment.getPay | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | refresh | boolean | yes | | -| requestType | string | yes | | +| requestType | string | yes | | +| orderId | string | no | | +| shipmentId | string | no | | @@ -3075,6 +3457,107 @@ Success +--- + + +### getPaymentSession +API to get payment session details + + + +```javascript +// Promise +const promise = platformClient.application("").payment.getPaymentSession({ gid : value, + lineItem : value }); + +// Async/Await +const data = await platformClient.application("").payment.getPaymentSession({ gid : value, + lineItem : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| gid | string | yes | 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. | +| lineItem | boolean | no | line-item to add extra data into response (e.g. cart details) | + + + +Use this API to fetch the payment session details for given order ID or Transaction ID. + +*Returned Response:* + + + + +[PaymentSessionSerializer](#PaymentSessionSerializer) + +Success. Returns the details of payment session. Check the example shown below or refer `PaymentSessionSerializer` for more details. + + + + +
+  Example: + +```json +{ + "gid": "TR9C4AF3A615DE251A23", + "status": "complete", + "total_amount": 10000, + "currency": "INR", + "payment_details": { + "gid": "TR9C4AF3A615DE251A23", + "payment_mode": "JIOPAY", + "aggregator_order_id": "10772307355840195000", + "aggregator_customer_id": "63073b48e8d90abe20c42eb8", + "payment_mode_identifier": "JIOPAY", + "g_user_id": "63073b48e8d90abe20c42eb8", + "payment_id": "10772307355847914000", + "mode": "live", + "amount": 56700, + "currency": "INR", + "cancel_url": "", + "success_url": "", + "amount_captured": 56700, + "status": "refund_done", + "payment_methods": [], + "meta": { + "cod_eligibile": true + } + }, + "refund_details": [ + { + "currency": "INR", + "request_id": "16787880654271907518", + "status": "refund_done", + "created": "2023-03-14 10:54:24", + "payment_id": "10772307355847914000", + "refund_utr": "10772307355847914000", + "amount": 56700 + } + ], + "cart_details": { + "cart_value": 56700, + "total_quantity": 10, + "articles": [], + "items": {} + } +} +``` +
+ + + + + + + + + --- @@ -3086,23 +3569,31 @@ Get All Valid Payment Options ```javascript // Promise const promise = platformClient.application("").payment.getPosPaymentModeRoutes({ amount : value, - cartId : value, pincode : value, - checkoutMode : value, orderType : value, + cartId : value, + checkoutMode : value, refresh : value, + orderId : value, cardReference : value, - userDetails : value }); + userDetails : value, + displaySplit : value, + advancePayment : value, + shipmentId : value }); // Async/Await const data = await platformClient.application("").payment.getPosPaymentModeRoutes({ amount : value, - cartId : value, pincode : value, - checkoutMode : value, orderType : value, + cartId : value, + checkoutMode : value, refresh : value, + orderId : value, cardReference : value, - userDetails : value }); + userDetails : value, + displaySplit : value, + advancePayment : value, + shipmentId : value }); ``` @@ -3111,14 +3602,18 @@ const data = await platformClient.application("").payment.getPos | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| amount | number | yes | Payable amount. | -| cartId | string | yes | Identifier of the cart. | -| pincode | string | yes | The PIN Code of the destination address, e.g. 400059 | -| checkoutMode | string | yes | Option to checkout for self or for others. | +| amount | number | yes | Payable amount. | +| cartId | string | no | Identifier of the cart. | +| pincode | string | yes | The PIN Code of the destination address, e.g. 400059 | +| checkoutMode | string | no | Option to checkout for self or for others. | | refresh | boolean | no | This is a boolean value. Select `true` to remove temporary cache files on payment gateway and replace with the latest one. | +| orderId | string | no | | | cardReference | string | no | Card reference id of user's debit or credit card. | | orderType | string | yes | 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. | -| userDetails | string | no | URIencoded JSON containing details of an anonymous user. | +| userDetails | string | no | URIencoded JSON containing details of an anonymous user. | +| displaySplit | boolean | no | Display Split Payment Option or not | +| advancePayment | boolean | no | Display Advance Payment Options or Normal | +| shipmentId | string | no | | @@ -3129,7 +3624,7 @@ Use this API to get Get All Valid Payment Options for making payment -[PaymentOptionsResponse](#PaymentOptionsResponse) +[PaymentModeRouteResponse](#PaymentModeRouteResponse) Success @@ -4292,7 +4787,66 @@ Success ] } ] - } + }, + "advance_payment": [ + { + "name": "SPLIT", + "display_priority": 22, + "payment_mode_id": 34, + "display_name": "Split Payment", + "list": [ + { + "aggregator_name": "Fynd", + "name": "Split Payment", + "display_name": "Split Payment", + "code": "SPLIT", + "logo_url": { + "small": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/testz0/misc/default-assets/original/yDRf9iyLbH-PosLogo.png", + "large": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/testz0/misc/default-assets/original/yDRf9iyLbH-PosLogo.png" + }, + "merchant_code": "SPLIT" + } + ], + "split": { + "total_number_of_splits": 7, + "splits_remaining": 7 + } + }, + { + "name": "ADVANCE", + "display_priority": 22, + "payment_mode_id": 35, + "display_name": "Advance Payment", + "list": [ + { + "aggregator_name": "Fynd", + "name": "Advance Payment", + "display_name": "Advance Payment", + "code": "ADVANCE", + "logo_url": { + "small": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/testz0/misc/default-assets/original/yDRf9iyLbH-PosLogo.png", + "large": "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/fyndnp/wrkr/testz0/misc/default-assets/original/yDRf9iyLbH-PosLogo.png" + }, + "merchant_code": "ADVANCE" + } + ], + "advance": { + "is_active": true, + "time_unit": "DAYS", + "description": "Pay Rs 3000 or more of the total amount", + "display_name": "Pay using Advance Payment", + "prepayment_type": "PERCENTAGE", + "prepayment_value": 20, + "cancellation_type": "AUTO", + "refund_time_limit": 4, + "all_prepayment_type": [ + "PERCENTAGE", + "FIXED" + ], + "allow_custom_advance_amount": true + } + } + ] } ```
@@ -4996,7 +5550,7 @@ const data = await platformClient.application("").payment.patchM | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | | aggregatorId | number | yes | Aggregators Id | -| body | [MerchnatPaymentModeResponse](#MerchnatPaymentModeResponse) | yes | Request body | +| body | [PlatformPaymentModeResponse](#PlatformPaymentModeResponse) | yes | Request body | Update Aggregator, payment mode and sub payment mode details. @@ -5006,7 +5560,7 @@ Update Aggregator, payment mode and sub payment mode details. -[MerchnatPaymentModeResponse](#MerchnatPaymentModeResponse) +[PlatformPaymentModeResponse](#PlatformPaymentModeResponse) Success. @@ -5072,7 +5626,7 @@ To updated online payment as active/inactive or offline payment configuration li -[MerchnatPaymentModeResponse](#MerchnatPaymentModeResponse) +[PlatformPaymentModeResponse](#PlatformPaymentModeResponse) Success. @@ -5106,16 +5660,9 @@ Success. "is_active": true, "payment_modes": { "cod": { - "cod_charges": 0, - "user_cod_limit": 0, - "cod_min_order_value": 0, - "cod_max_order_value": 10000, - "cod_charges_min_value": 100, - "cod_charges_max_value": 49000, - "anonymous_cod": false - }, - "split": { - "is_active": false + "name": "Cash on Delivery (COD)", + "slug": "cod", + "is_active": true } } } @@ -5134,6 +5681,77 @@ Success. +--- + + +### patchMerchantPaymentOptionVersion +Update app version required for Payment Mode. + + + +```javascript +// Promise +const promise = platformClient.application("").payment.patchMerchantPaymentOptionVersion({ aggregatorId : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").payment.patchMerchantPaymentOptionVersion({ aggregatorId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| aggregatorId | number | yes | Aggregators Id | +| body | [AggregatorControlRequest](#AggregatorControlRequest) | yes | Request body | + + +This api provide wrote operations on the app version required for Payment Mode or sub payment mode for an Aggregator. + +*Returned Response:* + + + + +[PlatformPaymentModeResponse](#PlatformPaymentModeResponse) + +Success. + + + + +
+  Examples: + + +
+  merchant_payment_response_success + +```json +{ + "summary": "updated payment mode configurations.", + "value": { + "success": true, + "message": "request is being performed", + "items": null + } +} +``` +
+ +
+ + + + + + + + + --- @@ -5797,6 +6415,206 @@ Save Subscription Setup Intent Response. +--- + + +### setMerchantModeControlRoutes +Update offline payment mode details for the merchant + + + +```javascript +// Promise +const promise = platformClient.application("").payment.setMerchantModeControlRoutes({ mode : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").payment.setMerchantModeControlRoutes({ mode : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| mode | string | yes | offline / advance payment mode | +| body | [MerchantPaymentModeRequest](#MerchantPaymentModeRequest) | yes | Request body | + + +Use this API to update given offline / advance payment mode details for the merchant + +*Returned Response:* + + + + +[PlatformPaymentModeResponse](#PlatformPaymentModeResponse) + +Success. Returns true or false for user cod option for payment. Check the example shown below or refer `GetUserCODLimitResponseSchema` for more details. + + + + +
+  Example: + +```json +{ + "success": true, + "message": "", + "items": [ + { + "anonymous": false, + "charges": 100, + "charges_max_value": 1000, + "charges_min_value": 0, + "max_order_value": 30000, + "min_order_value": 0, + "is_active": true, + "name": "Cash on Delivery (COD)", + "slug": "cod", + "user_limit": 10000 + } + ] +} +``` +
+ + + + + + + + + +--- + + +### setPaymentModeCustomConfig +Update details of advance payment custom configurations of merchant + + + +```javascript +// Promise +const promise = platformClient.application("").payment.setPaymentModeCustomConfig({ mode : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").payment.setPaymentModeCustomConfig({ mode : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| mode | string | yes | offline / advance payment mode | +| body | [PaymentCustomConfigRequestSchema](#PaymentCustomConfigRequestSchema) | yes | Request body | + + +Use this API to update given details of advance payment custom configurations of merchant + +*Returned Response:* + + + + +[PaymentCustomConfigResponseSchema](#PaymentCustomConfigResponseSchema) + +Success. + + + + +
+  Example: + +```json +{ + "success": true, + "message": "", + "items": [ + { + "display_name": "Store OS", + "business_unit": "pos", + "custom_config": { + "customer": { + "restriction": "ALL_CUSTOMER", + "groups": [ + 1, + 2, + 3 + ], + "types": [ + "ALL_CUSTOMER", + "CUSTOMER_GROUP", + "REGISTERED_CUSTOMER" + ] + }, + "payment_mode": { + "available": true, + "pre_order": [ + "NB", + "UPI" + ], + "post_order": [ + "NB", + "UPI" + ] + }, + "min_order_value": 50 + } + }, + { + "display_name": "StoreFront", + "business_unit": "storefront", + "custom_config": { + "customer": { + "restriction": "ALL_CUSTOMER", + "groups": [ + 1, + 2, + 3 + ], + "types": [ + "ALL_CUSTOMER", + "CUSTOMER_GROUP", + "REGISTERED_CUSTOMER" + ] + }, + "payment_mode": { + "available": true, + "pre_order": [ + "NB", + "UPI" + ], + "post_order": [ + "NB", + "UPI" + ] + }, + "min_order_value": 50 + } + } + ] +} +``` +
+ + + + + + + + + --- @@ -5831,7 +6649,7 @@ Use this API to set cod option as true or false for the payment [SetCODOptionResponse](#SetCODOptionResponse) -Success. Returns true/false for user cod option for payment. Check the example shown below or refer `GetUserCODLimitResponseSchema` for more details. +Success. Returns true or false for user cod option for payment. Check the example shown below or refer `GetUserCODLimitResponseSchema` for more details. @@ -6364,7 +7182,7 @@ const data = await platformClient.payment.verifyIfscCode({ ifscCode : value }); -Get True/False for correct IFSC Code for adding bank details for refund +Get True or False for correct IFSC Code for adding bank details for refund *Returned Response:* @@ -6419,42 +7237,133 @@ Bank details on correct Ifsc Code -### Schemas - - -#### [AddBeneficiaryDetailsOTPRequest](#AddBeneficiaryDetailsOTPRequest) +### Schemas + + +#### [AddBeneficiaryDetailsOTPRequest](#AddBeneficiaryDetailsOTPRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | details | [BankDetailsForOTP](#BankDetailsForOTP) | no | | + | order_id | string | no | | + + +--- + +#### [AddressDetail](#AddressDetail) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | address | string | no | address details | + | address_type | string? | yes | address type e.g. home, office | + | area | string | no | area details | + | area_code | string | no | customer pin/zip code | + | area_code_slug | string | no | area slug code, use pin or zip code if not available | + | city | string | no | city name | + | country | string | no | country name | + | country_iso_code | string | no | country's code name e.g. `IN`, `GB` | + | country_phone_code | string | no | country's phone code | + | email | string? | yes | customer email | + | expire_at | string? | yes | address expiry timestamp | + | g_address_id | string | no | unique address id generated by Fynd platform | + | geo_location | string? | yes | location latitude and logitude | + | google_map_point | string? | yes | google map point of location | + | landmark | string? | yes | landmark | + | name | string | no | customer name | + | phone | string | no | phone number | + | state | string | no | state of the customer | + | tags | [string]? | yes | optional address tag | + + +--- + +#### [AdvanceObject](#AdvanceObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | all_prepayment_type | [string]? | yes | All available types of prepayment | + | allow_custom_advance_amount | boolean? | yes | Is custom advance amount allowed? | + | amount | number? | yes | Amount for Payment Breakdown | + | cancellation_type | string? | yes | Type of cancellation | + | description | string? | yes | The description for Advance Payment (user configured) | + | display_name | string? | yes | The display name for Advance payment | + | is_active | boolean? | yes | Is Advance Payment active | + | prepayment_type | string? | yes | Type of prepayment value | + | prepayment_value | number? | yes | Value for prepayment in advance payment | + | refund_time_limit | number? | yes | time limit for processing refund | + | time_unit | string? | yes | Time unit for refunds | + + +--- + +#### [AdvancePaymentObject](#AdvancePaymentObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | advance | [AdvanceObject](#AdvanceObject)? | yes | | + | display_name | string? | yes | Display name for Advance Payment Mode | + | display_priority | number? | yes | Display Priority for Payment Option | + | list | [[PaymentModeList](#PaymentModeList)]? | yes | Payment mode | + | name | string? | yes | Name of Advance Payment Mode | + | payment_mode_id | number? | yes | Payment Mode ID for Advance Payment Option | + | split | [SplitObject](#SplitObject)? | yes | | + + +--- + +#### [AggregatorControlRequest](#AggregatorControlRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | business_unit | string? | yes | Business unit | + | device | string? | yes | Device name | + | items | [string]? | yes | List of item details with respect to payment_mode | + | version | [AggregatorVersionRequestSchema](#AggregatorVersionRequestSchema)? | yes | | + + +--- + +#### [AggregatorRoute](#AggregatorRoute) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | api_link | string? | yes | api_link | + | data | string? | yes | Data | + | payment_flow | string? | yes | payment_flow | + | payment_flow_data | string? | yes | payment_flow_data | + + +--- + +#### [AggregatorVersionItemSchema](#AggregatorVersionItemSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | is_equal_to | string? | yes | | + | is_greater_than | string? | yes | | + | is_less_than | string? | yes | | + + +--- + +#### [AggregatorVersionRequestSchema](#AggregatorVersionRequestSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | details | [BankDetailsForOTP](#BankDetailsForOTP) | no | | - | order_id | string | no | | + | is_equal_to | string? | yes | | + | is_greater_than | string? | yes | | + | is_less_than | string? | yes | | --- -#### [AddressDetail](#AddressDetail) +#### [AggregatorVersionResponse](#AggregatorVersionResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | address | string | no | address details | - | address_type | string | no | address type e.g. home, office | - | area | string | no | area details | - | area_code | string | no | customer pin/zip code | - | area_code_slug | string | no | area slug code, use pin/zip code if not available | - | city | string | no | city name | - | country | string | no | country name | - | country_iso_code | string | no | country's code name e.g. `IN`, `GB` | - | country_phone_code | string | no | country's phone code | - | email | string? | yes | customer email | - | expire_at | string? | yes | address expiry timestamp | - | g_address_id | string | no | unique address id generated by Fynd platform | - | geo_location | string? | yes | location latitude and logitude | - | google_map_point | string? | yes | google map point of location | - | landmark | string? | yes | landmark | - | name | string | no | customer name | - | phone | string | no | phone number | - | state | string | no | state of the customer | - | tags | [string]? | yes | optional address tag | + | items | [AggregatorVersionItemSchema](#AggregatorVersionItemSchema)? | yes | | + | message | string | no | Message | + | success | boolean | no | Successful or failure | --- @@ -6490,6 +7399,18 @@ Bank details on correct Ifsc Code | success | boolean | no | Successful or failure | +--- + +#### [CartDetailsSerializer](#CartDetailsSerializer) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | articles | [string] | no | list of articles that are added in cart | + | cart_value | number | no | total cart value i.e. amount to be paid | + | items | string | no | Items that are added in cart | + | total_quantity | number? | yes | total number of items in cart | + + --- #### [CODChargesLimitsResponse](#CODChargesLimitsResponse) @@ -6535,7 +7456,6 @@ Bank details on correct Ifsc Code | assign_card_id | string? | yes | | | cart_id | string | no | | | checkout_mode | string | no | | - | pincode | string | no | | --- @@ -6545,10 +7465,11 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | amount | number | no | Total value of order | + | country_phone_code | string? | yes | Phone country code for complete mobile number | | description | string? | yes | Merchant order id | | email | string | no | Email to which the payment link is to be sent | | external_order_id | string | no | Merchant order id | - | meta | [CreatePaymentLinkMeta](#CreatePaymentLinkMeta) | no | Meta | + | meta | [CreatePaymentLinkMeta](#CreatePaymentLinkMeta) | no | | | mobile_number | string | no | Mobile number to which the payment link is to be sent | @@ -6633,7 +7554,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [EdcDevice](#EdcDevice) | no | Details of the EDC Device that is added | + | data | [EdcDevice](#EdcDevice) | no | | | success | boolean | no | Response is successful or not | @@ -6643,7 +7564,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [EdcDevice](#EdcDevice) | no | Details of one EDC Device | + | data | [EdcDevice](#EdcDevice) | no | | | success | boolean | no | Response is successful or not | @@ -6654,7 +7575,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | items | [[EdcDevice](#EdcDevice)] | no | List of all edc mapped to the application options with their Details. | - | page | [Page](#Page) | no | Pagination Response | + | page | [Page](#Page) | no | | | success | boolean | no | Response is successful or not | @@ -6664,7 +7585,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | statistics | [StatisticsData](#StatisticsData) | no | Message | + | statistics | [StatisticsData](#StatisticsData) | no | | | success | boolean | no | Response is successful or not | @@ -6752,6 +7673,16 @@ Bank details on correct Ifsc Code | success | boolean | no | Successful or failure | +--- + +#### [FromConfig](#FromConfig) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | business_unit | string | no | Business unit name | + | device | string | no | Device name | + + --- #### [GetOauthUrlResponse](#GetOauthUrlResponse) @@ -6768,7 +7699,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | method_code | [PaymentCode](#PaymentCode) | no | Payment method code | + | method_code | [PaymentCode](#PaymentCode) | no | | --- @@ -6777,7 +7708,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [GetPaymentCode](#GetPaymentCode) | no | Data about Payment Code. | + | data | [GetPaymentCode](#GetPaymentCode) | no | | | success | boolean | no | Response is successful or not. | @@ -6805,7 +7736,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | success | boolean | no | Response is successful or not | - | user_cod_data | [CODdata](#CODdata) | no | User COD Data | + | user_cod_data | [CODdata](#CODdata) | no | | --- @@ -6837,7 +7768,7 @@ Bank details on correct Ifsc Code | ---------- | ---- | -------- | ----------- | | code | string? | yes | code | | display_name | string? | yes | display_name | - | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | logos | + | logos | [PaymentModeLogo](#PaymentModeLogo)? | yes | | | package_name | string? | yes | package_name | @@ -6858,7 +7789,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | message | string | no | Message | - | status | boolean | no | Link action status | + | status | string | no | Link action status | --- @@ -6871,7 +7802,7 @@ Bank details on correct Ifsc Code | app_id | string | no | Application id | | credit_line_id | string | no | Merchant ID at Ajiodhan's end | | status | string | no | Status | - | user_id | string | no | Deadlock/Grimlock user id | + | user_id | string | no | Deadlock or Grimlock user id | --- @@ -6886,23 +7817,23 @@ Bank details on correct Ifsc Code --- -#### [MerchnatPaymentModeRequest](#MerchnatPaymentModeRequest) +#### [MerchantPaymentModeRequest](#MerchantPaymentModeRequest) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | offline | string? | yes | Details to be updated for online payment configuration. | - | online | string? | yes | Details to be updated for offline payment configuration. | + | business_unit | string | no | Business unit | + | device | string | no | List of devices and its activation status | + | items | [string] | no | List of item details with respect to payment_mode | --- -#### [MerchnatPaymentModeResponse](#MerchnatPaymentModeResponse) +#### [MerchnatPaymentModeRequest](#MerchnatPaymentModeRequest) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [string]? | yes | List of all aggregator and payment mode details. | - | message | string? | yes | Message | - | success | boolean | no | Response is successful or not. | + | offline | string? | yes | Details to be updated for online payment configuration. | + | online | string? | yes | Details to be updated for offline payment configuration. | --- @@ -7011,7 +7942,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | codes | [Code](#Code) | no | List of dict that contains payment method data | + | codes | [Code](#Code) | no | | | name | string | no | name of payment name | | networks | string | no | payment networks | | types | string | no | Type of payment mode | @@ -7038,6 +7969,130 @@ Bank details on correct Ifsc Code | success | boolean | no | Payment confirmation updated or not. | +--- + +#### [PaymentCustomConfigCustomerRequestSchema](#PaymentCustomConfigCustomerRequestSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | groups | [number]? | yes | Customer groups. | + | restriction | string | no | Customer restriction type. | + + +--- + +#### [PaymentCustomConfigCustomerSchema](#PaymentCustomConfigCustomerSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | groups | [number]? | yes | Customer groups. | + | restriction | string | no | Customer restriction type. | + | types | [string]? | yes | Customer types. | + + +--- + +#### [PaymentCustomConfigDetailsRequestSchema](#PaymentCustomConfigDetailsRequestSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | customer | [PaymentCustomConfigCustomerRequestSchema](#PaymentCustomConfigCustomerRequestSchema) | no | | + | min_order_value | number | no | The minimum order value for the store | + | payment_mode | [PaymentCustomConfigModeSchema](#PaymentCustomConfigModeSchema) | no | | + + +--- + +#### [PaymentCustomConfigDetailsSchema](#PaymentCustomConfigDetailsSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | customer | [PaymentCustomConfigCustomerSchema](#PaymentCustomConfigCustomerSchema) | no | | + | min_order_value | number | no | The minimum order value for the store | + | payment_mode | [PaymentCustomConfigModeSchema](#PaymentCustomConfigModeSchema) | no | | + + +--- + +#### [PaymentCustomConfigModeSchema](#PaymentCustomConfigModeSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | available | boolean | no | Indicates whether the payment mode is available. | + | post_order | [string]? | yes | Payment modes available for post-order. | + | pre_order | [string]? | yes | Payment modes available for pre-order. | + + +--- + +#### [PaymentCustomConfigRequestSchema](#PaymentCustomConfigRequestSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | business_unit | string | no | The business unit to which the store belongs. | + | items | [[PaymentCustomConfigDetailsRequestSchema](#PaymentCustomConfigDetailsRequestSchema)] | no | | + + +--- + +#### [PaymentCustomConfigResponseSchema](#PaymentCustomConfigResponseSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[PaymentModeCustomConfigSchema](#PaymentModeCustomConfigSchema)] | no | | + | message | string | no | | + | success | boolean | no | | + + +--- + +#### [PaymentDetailsSerializer](#PaymentDetailsSerializer) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | aggregator_customer_id | string? | yes | unique customer id generated by payment gateway, not required for standard checkout. | + | aggregator_order_id | string? | yes | unique order id or payment request id generated by payment gateway | + | amount | number | no | amount paid. | + | amount_captured | number | no | amount which is captured or credited to merchant account | + | amount_refunded | number? | yes | | + | cancel_url | string? | yes | cancel url sent by Fynd platform at the time of payment creation | + | captured | boolean? | yes | whether the payment is captured (credited to merchant account) by payment gateway. | + | created | string? | yes | timestamp in epoch | + | currency | string | no | currency of the payment. | + | g_user_id | string | no | global user identifier - unique user id generated by Fynd platform | + | gid | string | no | 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. | + | kind | string? | yes | optional kind of purchase/payment - one time payment (sale) or subcription. defaults to sale. | + | locale | string? | yes | user's locale | + | merchant_locale | string? | yes | merchant's locale | + | meta | string? | yes | metadata | + | mode | string | no | test or live, test mode uses test credentials so that actual payment is not created. | + | payment_id | string? | yes | unique transaction id generated by payment gateway | + | payment_methods | [string] | no | method of payment | + | status | string | no | stautus of the payment | + | success_url | string? | yes | success url sent by Fynd platform at the time of payment creation | + + +--- + +#### [PaymentFlow](#PaymentFlow) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | ajiodhan | [AggregatorRoute](#AggregatorRoute)? | yes | | + | bqr_razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | | + | ccavenue | [AggregatorRoute](#AggregatorRoute)? | yes | | + | epaylater | [AggregatorRoute](#AggregatorRoute)? | yes | | + | fynd | [AggregatorRoute](#AggregatorRoute)? | yes | | + | jiopay | [AggregatorRoute](#AggregatorRoute)? | yes | | + | juspay | [AggregatorRoute](#AggregatorRoute)? | yes | | + | mswipe | [AggregatorRoute](#AggregatorRoute)? | yes | | + | payubiz | [AggregatorRoute](#AggregatorRoute)? | yes | | + | razorpay | [AggregatorRoute](#AggregatorRoute)? | yes | | + | rupifi | [AggregatorRoute](#AggregatorRoute)? | yes | | + | simpl | [AggregatorRoute](#AggregatorRoute)? | yes | | + | stripe | [AggregatorRoute](#AggregatorRoute)? | yes | | + + --- #### [PaymentGatewayConfig](#PaymentGatewayConfig) @@ -7045,7 +8100,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | config_type | string | no | Config Type of the aggregator | - | is_active | boolean? | yes | Enable/ Disable Flag | + | is_active | boolean? | yes | Enable or Disable Flag | | key | string | no | Api key of the payment aggregator | | merchant_salt | string | no | Merchant key of the payment aggregator | | secret | string | no | Secret Key of the payment aggregator | @@ -7059,7 +8114,7 @@ Bank details on correct Ifsc Code | ---------- | ---- | -------- | ----------- | | aggregator_name | [PaymentGatewayConfig](#PaymentGatewayConfig)? | yes | | | app_id | string | no | Application Id to which Payment config Mapped | - | is_active | boolean? | yes | Enable/ Disable Flag | + | is_active | boolean? | yes | Enable or Disable Flag | --- @@ -7132,6 +8187,28 @@ Bank details on correct Ifsc Code | vpa | string? | yes | Customer vpa address | +--- + +#### [PaymentMethodsMetaOrder](#PaymentMethodsMetaOrder) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | merchant_code | string | no | Merchant code | + | payment_gateway | string | no | Payment gateway name | + | payment_identifier | string | no | Payment identifier | + + +--- + +#### [PaymentModeCustomConfigSchema](#PaymentModeCustomConfigSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | business_unit | string | no | The business unit to which the store belongs. | + | custom_config | [PaymentCustomConfigDetailsSchema](#PaymentCustomConfigDetailsSchema) | no | | + | display_name | string | no | The display name of the store. | + + --- #### [PaymentModeList](#PaymentModeList) @@ -7165,11 +8242,11 @@ Bank details on correct Ifsc Code | intent_app_error_dict_list | [[IntentAppErrorList](#IntentAppErrorList)]? | yes | intent_app_error_dict_list | | intent_app_error_list | [string]? | yes | intent_app_error_list | | intent_flow | boolean? | yes | intent_flow | - | logo_url | [PaymentModeLogo](#PaymentModeLogo)? | yes | Logo | + | logo_url | [PaymentModeLogo](#PaymentModeLogo)? | yes | | | merchant_code | string? | yes | merchant code | | name | string? | yes | name | | nickname | string? | yes | nickname | - | product_cod_data | [ProductCODData](#ProductCODData)? | yes | product cod configurations. | + | product_cod_data | [ProductCODData](#ProductCODData)? | yes | | | remaining_limit | number? | yes | Remaining limit | | retry_count | number? | yes | retry_count | | timeout | number? | yes | timeout | @@ -7185,6 +8262,18 @@ Bank details on correct Ifsc Code | small | string | no | smalll | +--- + +#### [PaymentModeRouteResponse](#PaymentModeRouteResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | advance_payment | [[AdvancePaymentObject](#AdvancePaymentObject)]? | yes | Advance Payment Array | + | payment_breakup | string? | yes | Payment Breakup for advance payment | + | payment_options | [PaymentOptionAndFlow](#PaymentOptionAndFlow) | no | | + | success | boolean | no | Response is successful or not | + + --- #### [PaymentObjectListSerializer](#PaymentObjectListSerializer) @@ -7211,6 +8300,16 @@ Bank details on correct Ifsc Code | user_object | string | no | | +--- + +#### [PaymentOptionAndFlow](#PaymentOptionAndFlow) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | payment_flows | [PaymentFlow](#PaymentFlow) | no | | + | payment_option | [[RootPaymentMode](#RootPaymentMode)] | no | Payment options | + + --- #### [PaymentOptions](#PaymentOptions) @@ -7226,10 +8325,68 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | payment_options | [PaymentOptions](#PaymentOptions) | no | Payment options | + | payment_breakup | string? | yes | Payment Breakup for advance payment | + | payment_options | [PaymentOptions](#PaymentOptions) | no | | | success | boolean | no | Response is successful or not | +--- + +#### [PaymentOrderData](#PaymentOrderData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | aggregator | string? | yes | Aggregator name | + | amount | number? | yes | Amount | + | callback_url | string? | yes | Callback url for aggregator | + | contact | string? | yes | Mobile number | + | currency | string? | yes | Currency | + | customer_id | string? | yes | Aggregator customer id | + | email | string? | yes | Email | + | merchant_order_id | string? | yes | Merchant order id | + | method | string? | yes | Method | + | order_id | string? | yes | Aggregator order id | + + +--- + +#### [PaymentOrderMethods](#PaymentOrderMethods) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | amount | number | no | Amount to be collected | + | meta | [PaymentMethodsMetaOrder](#PaymentMethodsMetaOrder) | no | | + | mode | string | no | Payment mode | + | name | string | no | Payment mode name | + | payment | string? | yes | Payment type i.e. Required / Blocked | + + +--- + +#### [PaymentOrderRequest](#PaymentOrderRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | order_id | string | no | Order id | + | payment_methods | [[PaymentOrderMethods](#PaymentOrderMethods)]? | yes | | + | shipment_id | string? | yes | shipment_id | + + +--- + +#### [PaymentOrderResponse](#PaymentOrderResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | callback_url | string? | yes | Callback url for aggregator | + | data | [PaymentOrderData](#PaymentOrderData)? | yes | | + | message | string | no | Message | + | order_id | string? | yes | Merchant order id | + | payment_confirm_url | string? | yes | Payment confirm url for aggregator | + | status_code | number | no | HTTP status code | + | success | boolean | no | Successful or failure | + + --- #### [PaymentSessionDetail](#PaymentSessionDetail) @@ -7248,9 +8405,10 @@ Bank details on correct Ifsc Code | currency | string | no | currency of the payment. | | g_user_id | string | no | global user identifier - unique user id generated by Fynd platform | | gid | string | no | 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. | - | kind | string? | yes | optional kind of purchase/payment - one time payment (sale) or subcription. defaults to sale. | + | kind | string? | yes | optional kind of purchase or payment - one time payment (sale) or subcription. defaults to sale. | | locale | string? | yes | user's locale | | merchant_locale | string? | yes | merchant's locale | + | meta | string? | yes | Metadata | | mode | string | no | test or live, test mode uses test credentials so that actual payment is not created. | | payment_id | string | no | unique transaction id generated by payment gateway | | payment_methods | [string] | no | method of payment | @@ -7287,6 +8445,21 @@ Bank details on correct Ifsc Code | total_amount | number | no | amount paid. | +--- + +#### [PaymentSessionSerializer](#PaymentSessionSerializer) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | cart_details | [CartDetailsSerializer](#CartDetailsSerializer)? | yes | | + | currency | string? | yes | The currency of the payment. | + | gid | string | no | 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. | + | payment_details | any | no | object of payment details | + | refund_details | [[RefundDetailsSerializer](#RefundDetailsSerializer)] | no | object of refund details | + | status | string | no | The status of the payment session. | + | total_amount | number | no | total amount to be paid | + + --- #### [PaymentStatusBulkHandlerRequest](#PaymentStatusBulkHandlerRequest) @@ -7359,10 +8532,10 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | customers | [PayoutCustomer](#PayoutCustomer) | no | customers details object | + | customers | [PayoutCustomer](#PayoutCustomer) | no | | | is_active | boolean | no | Enable/DIsable Flag Payout | | is_default | boolean | no | default or not | - | more_attributes | [PayoutMoreAttributes](#PayoutMoreAttributes) | no | bank details object | + | more_attributes | [PayoutMoreAttributes](#PayoutMoreAttributes) | no | | | payouts_aggregators | [[PayoutAggregator](#PayoutAggregator)]? | yes | | | transfer_type | string | no | transafer type | | unique_transfer_no | string | no | display priority of the payment mode | @@ -7418,7 +8591,7 @@ Bank details on correct Ifsc Code | ---------- | ---- | -------- | ----------- | | account_holder | string? | yes | Account Holder Name | | account_no | string? | yes | Account Number | - | account_type | string? | yes | Account Type Saving/Current | + | account_type | string? | yes | Account Type Saving or Current | | bank_name | string? | yes | Name of Bank | | branch_name | string? | yes | Branch Name | | city | string? | yes | City | @@ -7434,8 +8607,8 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | aggregator | string | no | Aggregator Name | - | bank_details | [PayoutBankDetails](#PayoutBankDetails) | no | payout bank details object | - | is_active | boolean | no | Enable/Disable Flag Payout | + | bank_details | [PayoutBankDetails](#PayoutBankDetails) | no | | + | is_active | boolean | no | Enable or Disable Flag Payout | | transfer_type | string | no | transafer type | | unique_external_id | string | no | Unique Id of Payout | | users | string | no | payout users object | @@ -7450,7 +8623,7 @@ Bank details on correct Ifsc Code | aggregator | string | no | Aggregator Name | | bank_details | string | no | payout bank_details object | | created | boolean | no | created flag | - | is_active | boolean | no | Enable/DIsable Flag Payout | + | is_active | boolean | no | Enable or DIsable Flag Payout | | payment_status | string | no | status of payment | | payouts | string | no | payout object | | success | boolean | no | Response is successful or not | @@ -7469,6 +8642,27 @@ Bank details on correct Ifsc Code | success | boolean | no | Response is successful or not | +--- + +#### [PlatformPaymentModeCopyConfigRequest](#PlatformPaymentModeCopyConfigRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | from_config | [FromConfig](#FromConfig) | no | | + | to_config | [ToConfig](#ToConfig) | no | | + + +--- + +#### [PlatformPaymentModeResponse](#PlatformPaymentModeResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [string]? | yes | List of all aggregator and payment mode details. | + | message | string? | yes | Message | + | success | boolean | no | Response is successful or not. | + + --- #### [PollingPaymentLinkResponse](#PollingPaymentLinkResponse) @@ -7493,7 +8687,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cod_charges | [CODChargesLimitsResponse](#CODChargesLimitsResponse)? | yes | cod charges and its allowed limits. | + | cod_charges | [CODChargesLimitsResponse](#CODChargesLimitsResponse)? | yes | | | items | string? | yes | item id with its cod availability. | @@ -7509,6 +8703,20 @@ Bank details on correct Ifsc Code | success | boolean | no | Success or failure flag. | +--- + +#### [RefundDetailsSerializer](#RefundDetailsSerializer) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | amount | number | no | refunded amount | + | created | string | no | timestamp in epoch. | + | currency | string | no | The currency of the payment. | + | refund_utr | string | no | Unique refund utr generated by payment gateway. | + | request_id | string | no | refund request id, unique id generated by Fynd platform | + | status | string | no | The status of the refund. | + + --- #### [RefundPriorityRequestSerializer](#RefundPriorityRequestSerializer) @@ -7559,7 +8767,9 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | currency | string | no | The currency of the payment. | + | error | [ErrorDescription](#ErrorDescription)? | yes | | | gid | string | no | 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. | + | message | string? | yes | The status of the refund. | | meta | string? | yes | meta | | payment_details | [PaymentSessionDetail](#PaymentSessionDetail) | no | details of the payment | | refund_details | [[RefundSessionDetail](#RefundSessionDetail)]? | yes | details of the refund | @@ -7649,7 +8859,7 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [LinkStatus](#LinkStatus) | no | Data about link action status. | + | data | [LinkStatus](#LinkStatus) | no | | | success | boolean | no | Response is successful or not. | @@ -7732,6 +8942,17 @@ Bank details on correct Ifsc Code | success | boolean | no | Response is successful or not | +--- + +#### [SplitObject](#SplitObject) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | amount_remaining | number? | yes | Amount pending to be paid | + | splits_remaining | number? | yes | Number of splits remaining | + | total_number_of_splits | number? | yes | Maximum amount of splits allowed | + + --- #### [StatisticsData](#StatisticsData) @@ -7763,14 +8984,24 @@ Bank details on correct Ifsc Code | success | boolean | no | Response is successful or not | +--- + +#### [ToConfig](#ToConfig) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | business_unit | string | no | Business unit name | + | device | [string] | no | Device name to copy the config to | + + --- #### [UpdatePayoutRequest](#UpdatePayoutRequest) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | is_active | boolean | no | Enable/Disable Flag Payout | - | is_default | boolean | no | Enable/Disable Default Payout | + | is_active | boolean | no | Enable or Disable Flag Payout | + | is_default | boolean | no | Enable or Disable Default Payout | | unique_external_id | string | no | Unique Id of Payout | @@ -7780,8 +9011,8 @@ Bank details on correct Ifsc Code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | is_active | boolean | no | Enable/DIsable Flag Payout | - | is_default | boolean | no | Enable/Disable Default Payout | + | is_active | boolean | no | Enable or DIsable Flag Payout | + | is_default | boolean | no | Enable or Disable Default Payout | | success | boolean | no | Response is successful or not | diff --git a/documentation/platform/README.md b/documentation/platform/README.md index 1d13640ef..bad963a96 100644 --- a/documentation/platform/README.md +++ b/documentation/platform/README.md @@ -17,12 +17,12 @@ * [Finance](FINANCE.md) - Handles all finance related activities * [Inventory](INVENTORY.md) - Catalog - Platform Front API's' API's allows you to access list of products, prices, seller details, similar features, variants and many more useful features. -* [Lead](LEAD.md) - Handles communication between Administrator +* [Lead](LEAD.md) - Handles communication between Administrator-Staff and Staff-Users +* [Serviceability](SERVICEABILITY.md) - Logistics Configuration API's allows you to configure zone, application logistics and many more useful features. * [Order](ORDER.md) - Handles all platform order and shipment api(s) * [Partner](PARTNER.md) - Partner configuration apis * [Payment](PAYMENT.md) - Collect payment through many payment gateway i.e Stripe, Razorpay, Juspay etc.into Fynd or Self account * [Rewards](REWARDS.md) - Earn and redeem reward points -* [Serviceability](SERVICEABILITY.md) - Logistics Configuration API's allows you to configure zone, application logistics and many more useful features. * [Share](SHARE.md) - Short link and QR Code * [Theme](THEME.md) - Responsible for themes * [User](USER.md) - Authentication Service diff --git a/documentation/platform/SERVICEABILITY.md b/documentation/platform/SERVICEABILITY.md index 2c89ac174..702be2b2a 100644 --- a/documentation/platform/SERVICEABILITY.md +++ b/documentation/platform/SERVICEABILITY.md @@ -10,38 +10,52 @@ Logistics Configuration API's allows you to configure zone, application logistic Default -* [addAppDp](#addappdp) +* [bulkServiceability](#bulkserviceability) +* [bulkTat](#bulktat) +* [createCourierPartnerAccount](#createcourierpartneraccount) +* [createCourierPartnerRule](#createcourierpartnerrule) +* [createPackageMaterial](#createpackagematerial) +* [createPackageMaterialRule](#createpackagematerialrule) +* [createStoreRules](#createstorerules) * [createZone](#createzone) -* [deleteAppDp](#deleteappdp) * [getAllStores](#getallstores) -* [getApplicationServiceability](#getapplicationserviceability) -* [getCompanyStoreView](#getcompanystoreview) -* [getDpAccount](#getdpaccount) -* [getDpApplicationRules](#getdpapplicationrules) -* [getDpCompanyRules](#getdpcompanyrules) -* [getDpRuleInsert](#getdpruleinsert) -* [getDpRules](#getdprules) -* [getEntityRegionView](#getentityregionview) -* [getListView](#getlistview) +* [getApplicationConfig](#getapplicationconfig) +* [getApplicationConfiguration](#getapplicationconfiguration) +* [getApplicationServiceabilitySelfShipment](#getapplicationserviceabilityselfshipment) +* [getBulkServiceability](#getbulkserviceability) +* [getBulkTat](#getbulktat) +* [getCompanyConfiguration](#getcompanyconfiguration) +* [getCourierPartnerAccount](#getcourierpartneraccount) +* [getCourierPartnerAccounts](#getcourierpartneraccounts) +* [getCourierPartnerRule](#getcourierpartnerrule) +* [getCourierPartnerRules](#getcourierpartnerrules) * [getOptimalLocations](#getoptimallocations) -* [getSelfShip](#getselfship) -* [getStore](#getstore) -* [getZoneDataView](#getzonedataview) -* [getZoneFromPincodeView](#getzonefrompincodeview) -* [getZoneListView](#getzonelistview) -* [getZonesFromApplicationIdView](#getzonesfromapplicationidview) -* [updateApplicationServiceability](#updateapplicationserviceability) -* [updateDpRule](#updatedprule) +* [getPackageMaterialList](#getpackagemateriallist) +* [getPackageMaterialRule](#getpackagematerialrule) +* [getPackageMaterialRules](#getpackagematerialrules) +* [getPackageMaterials](#getpackagematerials) +* [getServiceability](#getserviceability) +* [getStoreRule](#getstorerule) +* [getStoreRules](#getstorerules) +* [getZoneById](#getzonebyid) +* [getZones](#getzones) +* [insertApplicationConfig](#insertapplicationconfig) +* [patchApplicationServiceabilitySelfShipment](#patchapplicationserviceabilityselfshipment) +* [updateApplicationConfiguration](#updateapplicationconfiguration) +* [updateCompanyConfiguration](#updatecompanyconfiguration) +* [updateCourierPartnerAccount](#updatecourierpartneraccount) +* [updateCourierPartnerRulePriority](#updatecourierpartnerrulepriority) +* [updateCourierRule](#updatecourierrule) +* [updatePackageMaterialRule](#updatepackagematerialrule) +* [updatePackageMaterials](#updatepackagematerials) * [updatePincodeAuditHistory](#updatepincodeaudithistory) * [updatePincodeBulkView](#updatepincodebulkview) * [updatePincodeCoDListing](#updatepincodecodlisting) * [updatePincodeMopView](#updatepincodemopview) -* [updateSelfShip](#updateselfship) -* [updateZoneControllerView](#updatezonecontrollerview) -* [upsertDpAccount](#upsertdpaccount) -* [upsertDpApplicationRules](#upsertdpapplicationrules) -* [upsertDpCompanyRules](#upsertdpcompanyrules) -* [upsertDpRules](#upsertdprules) +* [updateServiceability](#updateserviceability) +* [updateStoreRules](#updatestorerules) +* [updateStoreRulesConfig](#updatestorerulesconfig) +* [updateZoneById](#updatezonebyid) @@ -52,17 +66,21 @@ Default -### addAppDp -Add application dp data +### bulkServiceability +Serviceability Import or Export ```javascript // Promise -const promise = platformClient.application("").serviceability.addAppDp({ body : value }); +const promise = platformClient.serviceability.bulkServiceability({ extensionId : value, + schemeId : value, + body : value }); // Async/Await -const data = await platformClient.application("").serviceability.addAppDp({ body : value }); +const data = await platformClient.serviceability.bulkServiceability({ extensionId : value, + schemeId : value, + body : value }); ``` @@ -70,18 +88,20 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [ApplicationCompanyDpViewRequest](#ApplicationCompanyDpViewRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| body | [BulkRegionJobSerializer](#BulkRegionJobSerializer) | yes | Request body | -This API add application dp data. +Serviceability Import or Export *Returned Response:* -[ApplicationCompanyDpViewResponse](#ApplicationCompanyDpViewResponse) +[BulkRegionResponseItemData](#BulkRegionResponseItemData) Response status_code @@ -107,17 +127,21 @@ Response status_code --- -### createZone -Creation of a new zone +### bulkTat +Region TAT Import or Export ```javascript // Promise -const promise = platformClient.serviceability.createZone({ body : value }); +const promise = platformClient.serviceability.bulkTat({ extensionId : value, + schemeId : value, + body : value }); // Async/Await -const data = await platformClient.serviceability.createZone({ body : value }); +const data = await platformClient.serviceability.bulkTat({ extensionId : value, + schemeId : value, + body : value }); ``` @@ -125,18 +149,20 @@ const data = await platformClient.serviceability.createZone({ body : value }); | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [ZoneRequest](#ZoneRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| body | [BulkRegionJobSerializer](#BulkRegionJobSerializer) | yes | Request body | -This API allows you to create a new zone with the specified information. A zone enables serviceability based on given pincodes or regions. By creating a zone and including specific pincodes or regions, you can ensure that the stores associated with the zone are serviceable for those added pincodes or regions. This functionality is particularly useful when you need to ensure serviceability for multiple pincodes or regions by grouping them into a single zone. +Region TAT Import or Export *Returned Response:* -[ZoneResponse](#ZoneResponse) +[BulkRegionResponseItemData](#BulkRegionResponseItemData) Response status_code @@ -147,11 +173,7 @@ Response status_code   Example: ```json -{ - "success": true, - "status_code": 200, - "zone_id": "64809f27f2b8f575d5cb9c56" -} + ```
@@ -166,17 +188,17 @@ Response status_code --- -### deleteAppDp -Delete application dp data +### createCourierPartnerAccount +Creation of Courier Account ```javascript // Promise -const promise = platformClient.application("").serviceability.deleteAppDp({ courierPartnerId : value }); +const promise = platformClient.serviceability.createCourierPartnerAccount({ body : value }); // Async/Await -const data = await platformClient.application("").serviceability.deleteAppDp({ courierPartnerId : value }); +const data = await platformClient.serviceability.createCourierPartnerAccount({ body : value }); ``` @@ -184,19 +206,18 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| courierPartnerId | number | yes | A `courier_partner_id` is a unique identifier of a particular delivery partner. | - +| --------- | ----- | -------- | ----------- | +| body | [CourierAccount](#CourierAccount) | yes | Request body | -This API remove application dp data. +This API Creates a new Courier Account *Returned Response:* -[ApplicationCompanyDpViewResponse](#ApplicationCompanyDpViewResponse) +[CourierAccount](#CourierAccount) Response status_code @@ -222,32 +243,36 @@ Response status_code --- -### getAllStores -GET stores data +### createCourierPartnerRule +Create Courier Rules. ```javascript // Promise -const promise = platformClient.serviceability.getAllStores(); +const promise = platformClient.application("").serviceability.createCourierPartnerRule({ body : value }); // Async/Await -const data = await platformClient.serviceability.getAllStores(); +const data = await platformClient.application("").serviceability.createCourierPartnerRule({ body : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [CourierPartnerRule](#CourierPartnerRule) | yes | Request body | -This API returns stores data. + +Creates Courier Rules with rule configuration and dp priority *Returned Response:* -[GetStoresViewResponse](#GetStoresViewResponse) +[CourierPartnerRule](#CourierPartnerRule) Response status_code @@ -273,58 +298,99 @@ Response status_code --- -### getApplicationServiceability -Zone configuration of application. +### createPackageMaterial +Upsert of PackageMaterial in database. ```javascript // Promise -const promise = platformClient.application("").serviceability.getApplicationServiceability(); +const promise = platformClient.serviceability.createPackageMaterial({ body : value }); // Async/Await -const data = await platformClient.application("").serviceability.getApplicationServiceability(); +const data = await platformClient.serviceability.createPackageMaterial({ body : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [PackageMaterial](#PackageMaterial) | yes | Request body | + -This API returns serviceability config of the application. +This API returns response of upsert of PackageMaterial in mongo database. *Returned Response:* -[ApplicationServiceabilityConfigResponse](#ApplicationServiceabilityConfigResponse) +[PackageMaterialResponse](#PackageMaterialResponse) -Response Data +Response status_code
-  Example: +  Examples: + + +
+  PackageMaterial ```json { - "error": { - "type": "", - "value": "", - "message": "" - }, - "success": true, - "data": { - "channel_id": "5d656121a81320c2e6ee2a72", - "channel_type": "application", - "serviceability_type": "all" + "value": { + "id": "64b8526e5ca47d41582b9fa1", + "name": "Package1", + "item_id": 1234, + "company_id": 1, + "length": 1, + "height": 1, + "width": 1, + "weight": 1, + "error_rate": 0, + "store_ids": [ + 1, + 9, + 5 + ], + "rules": [ + { + "rule_id": "64b4337a0c607fbfbcd0156b", + "quantity": { + "min": 1, + "max": 2 + }, + "weight": 100 + } + ], + "channels": [ + { + "id": "64b4337a0c607fbfbcd0190b", + "type": "application" + } + ], + "media": [ + "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/sandbx/wrkr/sandeepmaale/products/pictures/bundle/free/original/LOc5XW0cc-Logo.png" + ], + "package_type": "box", + "size": "small", + "status": "active", + "track_inventory": false, + "max_weight": 100, + "package_vol_weight": 100, + "auto_calculate": true } } ```
+
+ @@ -336,19 +402,17 @@ Response Data --- -### getCompanyStoreView -Company Store View of application. +### createPackageMaterialRule +Upsert of Package Material Rule in database. ```javascript // Promise -const promise = platformClient.serviceability.getCompanyStoreView({ pageNumber : value, - pageSize : value }); +const promise = platformClient.serviceability.createPackageMaterialRule({ body : value }); // Async/Await -const data = await platformClient.serviceability.getCompanyStoreView({ pageNumber : value, - pageSize : value }); +const data = await platformClient.serviceability.createPackageMaterialRule({ body : value }); ``` @@ -356,34 +420,64 @@ const data = await platformClient.serviceability.getCompanyStoreView({ pageNumb | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageNumber | number | no | index of the item to start returning with | -| pageSize | number | no | determines the items to be displayed in a page | - +| --------- | ----- | -------- | ----------- | +| body | [PackageRule](#PackageRule) | yes | Request body | -This API returns Company Store View of the application. +This API returns response of upsert of Package Material Rule in mongo database. *Returned Response:* -[CompanyStoreView_Response](#CompanyStoreView_Response) +[PackageRuleResponse](#PackageRuleResponse) -Get Company Store View Data +Response status_code
-  Example: +  Examples: -```json +
+  PackageRule + +```json +{ + "value": { + "id": "64b4337a0c607fbfbcd0156b", + "company_id": 1, + "name": "Rule For Dev Contract", + "category_id": { + "includes": [ + 1, + 2 + ] + }, + "product_tag": { + "includes": [ + "abc", + "xyz" + ] + }, + "product_id": { + "includes": [ + 1, + 2 + ] + }, + "type": "package", + "is_active": true + } +} ```
+
+ @@ -395,25 +489,17 @@ Get Company Store View Data --- -### getDpAccount -Getting DpAccount of a company from database. +### createStoreRules +Create Store Rule ```javascript // Promise -const promise = platformClient.serviceability.getDpAccount({ pageNumber : value, - pageSize : value, - stage : value, - paymentMode : value, - transportType : value }); +const promise = platformClient.application("").serviceability.createStoreRules({ body : value }); // Async/Await -const data = await platformClient.serviceability.getDpAccount({ pageNumber : value, - pageSize : value, - stage : value, - paymentMode : value, - transportType : value }); +const data = await platformClient.application("").serviceability.createStoreRules({ body : value }); ``` @@ -421,23 +507,18 @@ const data = await platformClient.serviceability.getDpAccount({ pageNumber : va | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageNumber | number | no | index of the item to start returning with | -| pageSize | number | no | determines the items to be displayed in a page | -| stage | string | no | stage of the account. enabled/disabled | -| paymentMode | string | no | Filters dp accounts based on payment mode | -| transportType | string | no | Filters dp accounts based on transport_type | - +| --------- | ----- | -------- | ----------- | +| body | [CreateStoreRuleRequestSchema](#CreateStoreRuleRequestSchema) | yes | Request body | -This API returns response DpAccount of a company from mongo database. +Create Store Rule *Returned Response:* -[CompanyDpAccountListResponse](#CompanyDpAccountListResponse) +[StoreRuleResponseSchema](#StoreRuleResponseSchema) Response status_code @@ -463,32 +544,36 @@ Response status_code --- -### getDpApplicationRules -Get All DpApplicationRules rules added at application level from database. +### createZone +Creates a new Zone ```javascript // Promise -const promise = platformClient.application("").serviceability.getDpApplicationRules(); +const promise = platformClient.serviceability.createZone({ body : value }); // Async/Await -const data = await platformClient.application("").serviceability.getDpApplicationRules(); +const data = await platformClient.serviceability.createZone({ body : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [CreateZoneData](#CreateZoneData) | yes | Request body | + -This API returns response of all rules of DpApplicationRules from mongo database. +Creates a new zone with the specified mapping. A zone enables serviceability based on given regions. By creating a zone and including specific regions, you can ensure that the stores associated with the zone are serviceable for those added regions. This functionality is particularly useful when you need to ensure serviceability for multiple regions by grouping them into a single zone. *Returned Response:* -[DPApplicationRuleResponse](#DPApplicationRuleResponse) +[ZoneResponse](#ZoneResponse) Response status_code @@ -499,7 +584,11 @@ Response status_code   Example: ```json - +{ + "success": true, + "status_code": 200, + "zone_id": "64809f27f2b8f575d5cb9c56" +} ```
@@ -514,17 +603,17 @@ Response status_code --- -### getDpCompanyRules -Get All DpCompanyRules applied to company from database. +### getAllStores +GET stores data ```javascript // Promise -const promise = platformClient.serviceability.getDpCompanyRules(); +const promise = platformClient.serviceability.getAllStores(); // Async/Await -const data = await platformClient.serviceability.getDpCompanyRules(); +const data = await platformClient.serviceability.getAllStores(); ``` @@ -532,14 +621,14 @@ const data = await platformClient.serviceability.getDpCompanyRules(); -This API returns response of all DpCompanyRules from mongo database. +This API returns stores data. *Returned Response:* -[DPCompanyRuleResponse](#DPCompanyRuleResponse) +[GetStoresViewResponse](#GetStoresViewResponse) Response status_code @@ -565,42 +654,34 @@ Response status_code --- -### getDpRuleInsert -Fetching of DpRules from database. +### getApplicationConfig +Get Application Configuration ```javascript // Promise -const promise = platformClient.serviceability.getDpRuleInsert({ pageNumber : value, - pageSize : value }); +const promise = platformClient.application("").serviceability.getApplicationConfig(); // Async/Await -const data = await platformClient.serviceability.getDpRuleInsert({ pageNumber : value, - pageSize : value }); +const data = await platformClient.application("").serviceability.getApplicationConfig(); ``` -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageNumber | number | no | index of the item to start returning with | -| pageSize | number | no | determines the items to be displayed in a page | - - -This API returns response of DpRules from mongo database. +Get Application Configuration *Returned Response:* -[DpMultipleRuleSuccessResponse](#DpMultipleRuleSuccessResponse) +[StoreRuleConfigData](#StoreRuleConfigData) -Response status_code +Successful Response @@ -624,37 +705,32 @@ Response status_code --- -### getDpRules -Fetching of DpRules from database. +### getApplicationConfiguration +Get All Courier Rules applied to application ```javascript // Promise -const promise = platformClient.serviceability.getDpRules({ ruleUid : value }); +const promise = platformClient.application("").serviceability.getApplicationConfiguration(); // Async/Await -const data = await platformClient.serviceability.getDpRules({ ruleUid : value }); +const data = await platformClient.application("").serviceability.getApplicationConfiguration(); ``` -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| ruleUid | string | yes | A `rule_uid` is a unique identifier for a particular Dp. | - - -This API returns response of DpRules from mongo database. +This API returns all the Courier Rules applied to an application *Returned Response:* -[DpRuleSuccessResponse](#DpRuleSuccessResponse) +[ApplicationConfig](#ApplicationConfig) Response status_code @@ -680,38 +756,34 @@ Response status_code --- -### getEntityRegionView -Get country and state list +### getApplicationServiceabilitySelfShipment +Self-ship configuration of application. ```javascript // Promise -const promise = platformClient.serviceability.getEntityRegionView({ body : value }); +const promise = platformClient.application("").serviceability.getApplicationServiceabilitySelfShipment(); // Async/Await -const data = await platformClient.serviceability.getEntityRegionView({ body : value }); +const data = await platformClient.application("").serviceability.getApplicationServiceabilitySelfShipment(); ``` -| Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [EntityRegionView_Request](#EntityRegionView_Request) | yes | Request body | - -This API returns response for Entity Region View. +This API returns Self-ship configuration of the application. *Returned Response:* -[EntityRegionView_Response](#EntityRegionView_Response) +[ApplicationSelfShipConfigResponse](#ApplicationSelfShipConfigResponse) -Response status_code +Response Data @@ -720,7 +792,18 @@ Response status_code   Example: ```json - +{ + "data": { + "is_active": true, + "tat": 3 + }, + "success": true, + "error": { + "type": "", + "value": "", + "message": "" + } +} ```
@@ -735,27 +818,37 @@ Response status_code --- -### getListView -Zone List of application. +### getBulkServiceability +Get Region Serviceability Bulk History ```javascript // Promise -const promise = platformClient.serviceability.getListView({ pageNumber : value, +const promise = platformClient.serviceability.getBulkServiceability({ extensionId : value, + schemeId : value, + pageNo : value, pageSize : value, - name : value, - isActive : value, - channelIds : value, - q : value }); + batchId : value, + action : value, + status : value, + country : value, + region : value, + startDate : value, + endDate : value }); // Async/Await -const data = await platformClient.serviceability.getListView({ pageNumber : value, +const data = await platformClient.serviceability.getBulkServiceability({ extensionId : value, + schemeId : value, + pageNo : value, pageSize : value, - name : value, - isActive : value, - channelIds : value, - q : value }); + batchId : value, + action : value, + status : value, + country : value, + region : value, + startDate : value, + endDate : value }); ``` @@ -763,26 +856,31 @@ const data = await platformClient.serviceability.getListView({ pageNumber : val | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageNumber | number | no | index of the item to start returning with | +| --------- | ----- | -------- | ----------- | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| pageNo | number | no | index of the item to start returning with | | pageSize | number | no | determines the items to be displayed in a page | -| name | string | no | Name of particular zone in the seller account | -| isActive | boolean | no | status of zone whether active or inactive | -| channelIds | string | no | zones associated with the given channel ids' | -| q | string | no | search with name as a free text | +| batchId | string | no | Unique identifier of bulk job | +| action | string | no | import or export bulk type | +| status | string | no | Status of the bulk actions | +| country | string | no | Country for which bulk job is initiated | +| region | string | no | Region for which bulk job is initiated | +| startDate | string | no | Fetch job history after a particule date | +| endDate | string | no | Fetch job history before a particule date | -This API returns Zone List View of the application. +Get Region Serviceability Bulk History *Returned Response:* -[ListViewResponse](#ListViewResponse) +[BulkRegionResponse](#BulkRegionResponse) -Zone List of application in descending order of their last modified date. +Response status_code @@ -806,17 +904,37 @@ Zone List of application in descending order of their last modified date. --- -### getOptimalLocations -Get serviceable store of the item +### getBulkTat +Get region tat bulk history ```javascript // Promise -const promise = platformClient.serviceability.getOptimalLocations({ body : value }); +const promise = platformClient.serviceability.getBulkTat({ extensionId : value, + schemeId : value, + pageNo : value, + pageSize : value, + batchId : value, + action : value, + status : value, + country : value, + region : value, + startDate : value, + endDate : value }); // Async/Await -const data = await platformClient.serviceability.getOptimalLocations({ body : value }); +const data = await platformClient.serviceability.getBulkTat({ extensionId : value, + schemeId : value, + pageNo : value, + pageSize : value, + batchId : value, + action : value, + status : value, + country : value, + region : value, + startDate : value, + endDate : value }); ``` @@ -824,18 +942,29 @@ const data = await platformClient.serviceability.getOptimalLocations({ body : v | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [ReAssignStoreRequest](#ReAssignStoreRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| pageNo | number | no | index of the item to start returning with | +| pageSize | number | no | determines the items to be displayed in a page | +| batchId | string | no | Unique identifier of bulk job | +| action | string | no | import or export bulk type | +| status | string | no | Status of the bulk actions | +| country | string | no | Country for which bulk job is initiated | +| region | string | no | Region for which bulk job is initiated | +| startDate | string | no | Fetch job history after a particule date | +| endDate | string | no | Fetch job history before a particule date | -This API returns serviceable store of the item. + +Get region tat bulk history *Returned Response:* -[ReAssignStoreResponse](#ReAssignStoreResponse) +[BulkRegionResponse](#BulkRegionResponse) Response status_code @@ -861,17 +990,17 @@ Response status_code --- -### getSelfShip -Self-ship configuration of application. +### getCompanyConfiguration +Get All Courier Rules applied to company. ```javascript // Promise -const promise = platformClient.application("").serviceability.getSelfShip(); +const promise = platformClient.serviceability.getCompanyConfiguration(); // Async/Await -const data = await platformClient.application("").serviceability.getSelfShip(); +const data = await platformClient.serviceability.getCompanyConfiguration(); ``` @@ -879,16 +1008,16 @@ const data = await platformClient.application("").serviceability -This API returns Self-ship configuration of the application. +This API returns all Courier Rules applied for company. *Returned Response:* -[ApplicationSelfShipConfigResponse](#ApplicationSelfShipConfigResponse) +[CompanyConfig](#CompanyConfig) -Response Data +Response status_code @@ -897,18 +1026,7 @@ Response Data   Example: ```json -{ - "data": { - "is_active": true, - "tat": 3 - }, - "success": true, - "error": { - "type": "", - "value": "", - "message": "" - } -} + ```
@@ -923,17 +1041,17 @@ Response Data --- -### getStore -GET stores data +### getCourierPartnerAccount +Getting Courier Account of a company from database. ```javascript // Promise -const promise = platformClient.serviceability.getStore({ storeUid : value }); +const promise = platformClient.serviceability.getCourierPartnerAccount({ accountId : value }); // Async/Await -const data = await platformClient.serviceability.getStore({ storeUid : value }); +const data = await platformClient.serviceability.getCourierPartnerAccount({ accountId : value }); ``` @@ -942,18 +1060,18 @@ const data = await platformClient.serviceability.getStore({ storeUid : value }) | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| storeUid | number | yes | A `store_uid` contains a specific ID of a store. | +| accountId | string | yes | Unique ID of courier account | -This API returns stores data. +This API returns response DpAccount of a company from mongo database. *Returned Response:* -[GetStoresViewResponse](#GetStoresViewResponse) +[CourierAccountResponse](#CourierAccountResponse) Response status_code @@ -964,216 +1082,7 @@ Response status_code   Example: ```json -{ - "items": [ - { - "uid": 2, - "_cls": "Store", - "address": { - "city": "MUMBAI", - "country": "INDIA", - "address2": "", - "address1": "POLARIS 2ND FLOOR, ANDHERI", - "landmark": "", - "state": "MAHARASHTRA", - "pincode": 400001, - "longitude": 72.8776559, - "latitude": 19.0759837 - }, - "code": "HS-a0c85", - "company_id": 2, - "contact_numbers": [ - { - "country_code": 91, - "number": "9096686804" - } - ], - "created_by": { - "user_id": "605e8e86493f54a9ccaa47be", - "username": "parvezshaikh_gofynd_com_07710" - }, - "created_on": "2021-08-07T06:21:25.293000", - "display_name": "Test", - "documents": [ - { - "type": "gst", - "verified": true, - "value": "27AALCA0442L1ZM", - "legal_name": "SHOPSENSE RETAIL TECHNOLOGIES PRIVATE LIMITED" - } - ], - "gst_credentials": { - "e_waybill": { - "enabled": false - }, - "e_invoice": { - "enabled": false - } - }, - "integration_type": { - "order": "pulse", - "inventory": "pulse" - }, - "logistics": { - "dp": { - "1": { - "fm_priority": 1, - "lm_priority": 1, - "rvp_priority": 1, - "payment_mode": "all", - "operations": [ - "inter_city" - ], - "area_code": null, - "assign_dp_from_sb": true, - "transport_mode": "air", - "external_account_id": null, - "internal_account_id": "1" - }, - "19": { - "fm_priority": 2, - "lm_priority": 2, - "rvp_priority": 2, - "payment_mode": "all", - "operations": "inter_city", - "area_code": null, - "assign_dp_from_sb": true, - "transport_mode": "air", - "external_account_id": null, - "internal_account_id": "19" - } - }, - "override": false - }, - "manager": { - "name": "Parvez Shaikh", - "mobile_no": { - "country_code": 91, - "number": "9096686804" - }, - "email": "parvezshaikh@gofynd.com" - }, - "modified_by": { - "user_id": "38ac93a8a5495305fc794e76", - "username": "919594495254_32111" - }, - "modified_on": "2021-08-17T14:18:10.788000", - "name": "Test", - "notification_emails": [ - "parvezshaikh@gofynd.com" - ], - "product_return_config": { - "on_same_store": true - }, - "stage": "verified", - "store_type": "high_street", - "sub_type": "store", - "timing": [ - { - "open": true, - "opening": { - "hour": 11, - "minute": 0 - }, - "closing": { - "hour": 21, - "minute": 30 - }, - "weekday": "monday" - }, - { - "open": true, - "opening": { - "hour": 11, - "minute": 0 - }, - "closing": { - "hour": 21, - "minute": 30 - }, - "weekday": "tuesday" - }, - { - "open": true, - "opening": { - "hour": 11, - "minute": 0 - }, - "closing": { - "hour": 21, - "minute": 30 - }, - "weekday": "wednesday" - }, - { - "open": true, - "opening": { - "hour": 11, - "minute": 0 - }, - "closing": { - "hour": 21, - "minute": 30 - }, - "weekday": "thursday" - }, - { - "open": true, - "opening": { - "hour": 11, - "minute": 0 - }, - "closing": { - "hour": 21, - "minute": 30 - }, - "weekday": "friday" - }, - { - "open": true, - "opening": { - "hour": 11, - "minute": 0 - }, - "closing": { - "hour": 21, - "minute": 30 - }, - "weekday": "saturday" - }, - { - "open": true, - "opening": { - "hour": 11, - "minute": 0 - }, - "closing": { - "hour": 21, - "minute": 30 - }, - "weekday": "sunday" - } - ], - "verified_by": { - "user_id": "0", - "username": "Silverbolt" - }, - "verified_on": "2022-03-23T13:35:46.869000", - "warnings": { - "store_address": "Address: Address seems to be inappropriate this might affect the delivery." - }, - "_custom_json": {}, - "company": 2 - } - ], - "page": { - "type": "number", - "size": 2, - "current": 1, - "has_next": true, - "item_total": 3276 - } -} + ```
@@ -1188,17 +1097,25 @@ Response status_code --- -### getZoneDataView -Zone Data View of application. +### getCourierPartnerAccounts +Getting Courier Account list of a company. ```javascript // Promise -const promise = platformClient.serviceability.getZoneDataView({ zoneId : value }); +const promise = platformClient.serviceability.getCourierPartnerAccounts({ pageNo : value, + pageSize : value, + stage : value, + paymentMode : value, + transportType : value }); // Async/Await -const data = await platformClient.serviceability.getZoneDataView({ zoneId : value }); +const data = await platformClient.serviceability.getCourierPartnerAccounts({ pageNo : value, + pageSize : value, + stage : value, + paymentMode : value, + transportType : value }); ``` @@ -1206,21 +1123,25 @@ const data = await platformClient.serviceability.getZoneDataView({ zoneId : val | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| zoneId | string | yes | A `zone_id` is a unique identifier for a particular zone. | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | index of the item to start returning with | +| pageSize | number | no | determines the items to be displayed in a page | +| stage | string | no | stage of the account. enabled/disabled | +| paymentMode | string | no | Filters dp accounts based on payment mode | +| transportType | string | no | Filters dp accounts based on transport_type | -This API returns Zone Data View of the application. +This API returns Courier Account of a company. *Returned Response:* -[GetSingleZoneDataViewResponse](#GetSingleZoneDataViewResponse) +[CompanyCourierPartnerAccountListResponse](#CompanyCourierPartnerAccountListResponse) -Get Application Zone Data +Response status_code @@ -1244,17 +1165,17 @@ Get Application Zone Data --- -### getZoneFromPincodeView -GET zone from the Pincode. +### getCourierPartnerRule +Fetch of Courier Rule. ```javascript // Promise -const promise = platformClient.application("").serviceability.getZoneFromPincodeView({ body : value }); +const promise = platformClient.application("").serviceability.getCourierPartnerRule({ ruleId : value }); // Async/Await -const data = await platformClient.application("").serviceability.getZoneFromPincodeView({ body : value }); +const data = await platformClient.application("").serviceability.getCourierPartnerRule({ ruleId : value }); ``` @@ -1262,18 +1183,19 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [GetZoneFromPincodeViewRequest](#GetZoneFromPincodeViewRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| ruleId | string | yes | A `rule_id` is a unique identifier for a rule. | -This API returns zone from the Pincode View. + +This API returns Courier Rule. *Returned Response:* -[GetZoneFromPincodeViewResponse](#GetZoneFromPincodeViewResponse) +[CourierPartnerRule](#CourierPartnerRule) Response status_code @@ -1299,31 +1221,21 @@ Response status_code --- -### getZoneListView -Zone List of application. +### getCourierPartnerRules +Fetch Courier Rules List ```javascript // Promise -const promise = platformClient.serviceability.getZoneListView({ pageNumber : value, - pageNo : value, +const promise = platformClient.application("").serviceability.getCourierPartnerRules({ pageNo : value, pageSize : value, - name : value, - isActive : value, - channelIds : value, - q : value, - zoneId : value }); + status : value }); // Async/Await -const data = await platformClient.serviceability.getZoneListView({ pageNumber : value, - pageNo : value, +const data = await platformClient.application("").serviceability.getCourierPartnerRules({ pageNo : value, pageSize : value, - name : value, - isActive : value, - channelIds : value, - q : value, - zoneId : value }); + status : value }); ``` @@ -1332,27 +1244,22 @@ const data = await platformClient.serviceability.getZoneListView({ pageNumber : | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| pageNumber | number | no | index of the item to start returning with | | pageNo | number | no | index of the item to start returning with | | pageSize | number | no | determines the items to be displayed in a page | -| name | string | no | Name of particular zone in the seller account | -| isActive | boolean | no | status of zone whether active or inactive | -| channelIds | string | no | zones associated with the given channel ids' | -| q | string | no | search with name as a free text | -| zoneId | Array | no | list of zones to query for | +| status | string | no | Filter rules based on rule status | -This API returns Zone List View of the application. +This API returns Courier Rules List *Returned Response:* -[ListViewResponse](#ListViewResponse) +[CourierPartnerRulesListResponse](#CourierPartnerRulesListResponse) -Zone List of application in descending order of their last modified date. +Response status_code @@ -1376,23 +1283,17 @@ Zone List of application in descending order of their last modified date. --- -### getZonesFromApplicationIdView -GET zones from the application_id. +### getOptimalLocations +Get serviceable store of the item ```javascript // Promise -const promise = platformClient.application("").serviceability.getZonesFromApplicationIdView({ pageNo : value, - pageSize : value, - zoneId : value, - q : value }); +const promise = platformClient.serviceability.getOptimalLocations({ body : value }); // Async/Await -const data = await platformClient.application("").serviceability.getZonesFromApplicationIdView({ pageNo : value, - pageSize : value, - zoneId : value, - q : value }); +const data = await platformClient.serviceability.getOptimalLocations({ body : value }); ``` @@ -1400,24 +1301,20 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| pageNo | number | no | index of the item to start returning with | -| pageSize | number | no | determines the items to be displayed in a page | -| zoneId | Array | no | list of zones to query for | -| q | string | no | search with name as a free text | - +| --------- | ----- | -------- | ----------- | +| body | [ReAssignStoreRequest](#ReAssignStoreRequest) | yes | Request body | -This API returns zones from the application_id View. +This API returns serviceable store of the item. *Returned Response:* -[GetZoneFromApplicationIdViewResponse](#GetZoneFromApplicationIdViewResponse) +[ReAssignStoreResponse](#ReAssignStoreResponse) -List of zones for the given application_id +Response status_code @@ -1441,17 +1338,25 @@ List of zones for the given application_id --- -### updateApplicationServiceability -Zone configuration of application. +### getPackageMaterialList +Fetching of PackageMaterials from database. ```javascript // Promise -const promise = platformClient.application("").serviceability.updateApplicationServiceability({ body : value }); +const promise = platformClient.serviceability.getPackageMaterialList({ pageNo : value, + pageSize : value, + q : value, + size : value, + packageType : value }); // Async/Await -const data = await platformClient.application("").serviceability.updateApplicationServiceability({ body : value }); +const data = await platformClient.serviceability.getPackageMaterialList({ pageNo : value, + pageSize : value, + q : value, + size : value, + packageType : value }); ``` @@ -1459,20 +1364,921 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [ServiceabilityPayloadSchema](#ServiceabilityPayloadSchema) | yes | Request body | - +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | index of the item to start returning with | +| pageSize | number | no | determines the items to be displayed in a page | +| q | string | no | perform regex search on items matching name for given value | +| size | string | no | filters items based on given size | +| packageType | string | no | filters items based on given package_type | + + + +This API returns response of PackageMaterials from mongo database. + +*Returned Response:* + + + + +[PackageMaterialList](#PackageMaterialList) + +Response status_code + + + + +
+  Examples: + + +
+  PackageMaterialList + +```json +{ + "value": { + "items": [ + { + "id": "64b8526e5ca47d41582b9fa1", + "name": "Package1", + "item_id": 1234, + "company_id": 1, + "length": 1, + "height": 1, + "width": 1, + "weight": 1, + "error_rate": 0, + "store_ids": [ + 1, + 9, + 5 + ], + "rules": [ + { + "rule_id": "64b4337a0c607fbfbcd0156b", + "quantity": { + "min": 1, + "max": 2 + }, + "weight": 100 + } + ], + "channels": [ + { + "id": "64b4337a0c607fbfbcd0190b", + "type": "application" + } + ], + "media": [ + "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/sandbx/wrkr/sandeepmaale/products/pictures/bundle/free/original/LOc5XW0cc-Logo.png" + ], + "package_type": "box", + "size": "small", + "status": "active", + "track_inventory": true, + "max_weight": 100, + "package_vol_weight": 100, + "auto_calculate": true + } + ], + "page": { + "type": "number", + "size": 1, + "current": 1, + "has_next": false, + "has_previous": false, + "item_total": 1 + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getPackageMaterialRule +Fetching of Package Material from database. + + + +```javascript +// Promise +const promise = platformClient.serviceability.getPackageMaterialRule({ ruleId : value }); + +// Async/Await +const data = await platformClient.serviceability.getPackageMaterialRule({ ruleId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| ruleId | string | yes | A `package_material_rule_id` is a unique identifier for a Package Material Rule | + + + +This API returns response of Package Material from mongo database. + +*Returned Response:* + + + + +[PackageRuleResponse](#PackageRuleResponse) + +Response status_code + + + + +
+  Examples: + + +
+  PackageRule + +```json +{ + "value": { + "id": "64b4337a0c607fbfbcd0156b", + "company_id": 1, + "name": "Rule For Dev Contract", + "category_id": { + "includes": [ + 1, + 2 + ] + }, + "product_tag": { + "includes": [ + "abc", + "xyz" + ] + }, + "product_id": { + "includes": [ + 1, + 2 + ] + }, + "type": "package", + "is_active": true + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getPackageMaterialRules +Fetching of Package Material Rules from database. + + + +```javascript +// Promise +const promise = platformClient.serviceability.getPackageMaterialRules({ pageNo : value, + pageSize : value, + isActive : value }); + +// Async/Await +const data = await platformClient.serviceability.getPackageMaterialRules({ pageNo : value, + pageSize : value, + isActive : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | index of the item to start returning with | +| pageSize | number | no | determines the items to be displayed in a page | +| isActive | string | no | filters items based on given is_active | + + + +This API returns response of Package Materials Rules from mongo database. + +*Returned Response:* + + + + +[PackageMaterialRuleList](#PackageMaterialRuleList) + +Response status_code + + + + +
+  Examples: + + +
+  PackageMaterialRuleList + +```json +{ + "value": { + "items": [ + { + "id": "64b4337a0c607fbfbcd0156b", + "company_id": 1, + "name": "Rule For Dev Contract", + "category_id": { + "includes": [ + 1, + 2 + ] + }, + "product_tag": { + "includes": [ + "abc", + "xyz" + ] + }, + "product_id": { + "includes": [ + 1, + 2 + ] + }, + "type": "package", + "is_active": true + } + ], + "page": { + "type": "number", + "size": 1, + "current": 1, + "has_next": false, + "has_previous": false, + "item_total": 1 + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getPackageMaterials +Fetching of Package Material from database. + + + +```javascript +// Promise +const promise = platformClient.serviceability.getPackageMaterials({ packageMaterialId : value }); + +// Async/Await +const data = await platformClient.serviceability.getPackageMaterials({ packageMaterialId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| packageMaterialId | string | yes | A `package_material_id` is a unique identifier for a Package Material | + + + +This API returns response of Package Material from mongo database. + +*Returned Response:* + + + + +[PackageMaterialResponse](#PackageMaterialResponse) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getServiceability +Get Serviceability of a region + + + +```javascript +// Promise +const promise = platformClient.serviceability.getServiceability({ extensionId : value, + schemeId : value, + regionId : value }); + +// Async/Await +const data = await platformClient.serviceability.getServiceability({ extensionId : value, + schemeId : value, + regionId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| regionId | string | yes | Unique identifier of a region | + + + +Get Serviceability of a region + +*Returned Response:* + + + + +[ServiceabilityModel](#ServiceabilityModel) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getStoreRule +Get Single Store Rule + + + +```javascript +// Promise +const promise = platformClient.application("").serviceability.getStoreRule({ ruleUid : value }); + +// Async/Await +const data = await platformClient.application("").serviceability.getStoreRule({ ruleUid : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| ruleUid | string | yes | A `rule_uid` is a unique identifier for a particular rule object. | + + + +Get Single Store Rule + +*Returned Response:* + + + + +[StoreRuleDataSchema](#StoreRuleDataSchema) + +Successful Response + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getStoreRules +Get Multiple Store Rules + + + +```javascript +// Promise +const promise = platformClient.application("").serviceability.getStoreRules({ pageNo : value, + pageSize : value, + status : value }); + +// Async/Await +const data = await platformClient.application("").serviceability.getStoreRules({ pageNo : value, + pageSize : value, + status : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | | +| pageSize | number | no | | +| status | string | no | | + + + +Get Multiple Store Rules + +*Returned Response:* + + + + +[GetStoreRulesApiResponse](#GetStoreRulesApiResponse) + +Successful Response + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getZoneById +Get details of the Zone + + + +```javascript +// Promise +const promise = platformClient.serviceability.getZoneById({ zoneId : value }); + +// Async/Await +const data = await platformClient.serviceability.getZoneById({ zoneId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| zoneId | string | yes | A `zone_id` is a unique identifier for a particular zone. | + + + +Returns the region, application, store mapping and other details in the Zone. + +*Returned Response:* + + + + +[GetZoneByIdSchema](#GetZoneByIdSchema) + +Get details of the Zone + + + + +
+  Examples: + + +
+  Gujarat Zone + +```json +{ + "value": { + "name": "Test Zone", + "slug": "test-zone", + "is_active": false, + "channels": [ + { + "channel_id": "64aed475db2cfb5b8a9f623d", + "channel_type": "application" + }, + { + "channel_id": "64ba6650932a416fb67557fa", + "channel_type": "application" + } + ], + "product": { + "type": "all", + "tags": [] + }, + "store_ids": [ + 2, + 1462, + 3470, + 3471, + 3475, + 3742, + 3748, + 3751, + 3752, + 3753 + ], + "region_type": "non-pincode", + "mapping": [ + { + "country": "64aec5a93a079bd328537835", + "regions": [ + "64aec5a93a079bd328537838" + ] + } + ], + "zone_id": "64d22858f8aafe61d79f07ea", + "stores_count": 10, + "display_name_mapping": { + "64aec5a93a079bd328537835": "India", + "64aec5a93a079bd328537838": "GUJARAT" + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### getZones +Shows zones defined at the company level + + + +```javascript +// Promise +const promise = platformClient.serviceability.getZones({ pageNo : value, + pageSize : value, + isActive : value, + channelId : value, + q : value, + country : value, + state : value, + city : value, + pincode : value, + sector : value }); + +// Async/Await +const data = await platformClient.serviceability.getZones({ pageNo : value, + pageSize : value, + isActive : value, + channelId : value, + q : value, + country : value, + state : value, + city : value, + pincode : value, + sector : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| pageNo | number | no | index of the item to start returning with | +| pageSize | number | no | determines the items to be displayed in a page | +| isActive | boolean | no | Status of Zone (either active or inactive) | +| channelId | string | no | Zones filtered by an application | +| q | string | no | search with name as a free text | +| country | string | no | ISO2 code of the country | +| state | string | no | State name | +| city | string | no | City name | +| pincode | string | no | Pincode value to search zones | +| sector | string | no | Sector value to search zones | + + + +Return the list of zones that are defined at the company level. + +*Returned Response:* + + + + +[ListViewResponse](#ListViewResponse) + +Zone List of application in descending order of their last modified date. + + + + +
+  Examples: + + +
+  Zone Listing with q=zone + +```json +{ + "value": { + "items": [ + { + "name": "company2 zone", + "slug": "company2-zone", + "company_id": 2, + "is_active": true, + "channels": [ + { + "channel_id": "64c22ef872985245a6334afa", + "channel_type": "application" + } + ], + "zone_id": "64c3a0926ea670363c8e2e3d", + "stores_count": 2, + "regions_count": 4242, + "product": { + "count": 0, + "type": "all" + } + } + ], + "page": { + "type": "number", + "size": 1, + "current": 1, + "has_next": false, + "item_total": 1 + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### insertApplicationConfig +Insert Application Configuration + + + +```javascript +// Promise +const promise = platformClient.application("").serviceability.insertApplicationConfig({ body : value }); + +// Async/Await +const data = await platformClient.application("").serviceability.insertApplicationConfig({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [StoreRuleConfigData](#StoreRuleConfigData) | yes | Request body | + + +Insert Application Configuration + +*Returned Response:* + + + + +[StoreRuleConfigData](#StoreRuleConfigData) + +Response status_code + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### patchApplicationServiceabilitySelfShipment +Self-ship configuration of application. + + + +```javascript +// Promise +const promise = platformClient.application("").serviceability.patchApplicationServiceabilitySelfShipment({ body : value }); + +// Async/Await +const data = await platformClient.application("").serviceability.patchApplicationServiceabilitySelfShipment({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [SelfShipResponse](#SelfShipResponse) | yes | Request body | + + +This API updates Self-ship configuration of the application. + +*Returned Response:* + + + + +[ApplicationSelfShipConfigResponse](#ApplicationSelfShipConfigResponse) + +Response Data + + + + +
+  Example: + +```json +{ + "data": { + "is_active": true, + "tat": 3 + }, + "success": true, + "error": { + "type": "", + "value": "", + "message": "" + } +} +``` +
+ + + + + + + + + +--- + + +### updateApplicationConfiguration +Apply configuration to an application + + + +```javascript +// Promise +const promise = platformClient.application("").serviceability.updateApplicationConfiguration({ body : value }); + +// Async/Await +const data = await platformClient.application("").serviceability.updateApplicationConfiguration({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [ApplicationConfig](#ApplicationConfig) | yes | Request body | + -This API updates serviceability config of the application. +Apply configuration to application to set DP rules and Zone configuration *Returned Response:* -[ApplicationServiceabilityConfigResponse](#ApplicationServiceabilityConfigResponse) +[ApplicationConfig](#ApplicationConfig) -Response Data +Response status_code @@ -1481,19 +2287,62 @@ Response Data   Example: ```json -{ - "error": { - "type": "", - "value": "", - "message": "" - }, - "success": true, - "data": { - "channel_id": "5d656121a81320c2e6ee2a72", - "channel_type": "application", - "serviceability_type": "all" - } -} + +``` +
+ + + + + + + + + +--- + + +### updateCompanyConfiguration +Apply Courier Rule to company. + + + +```javascript +// Promise +const promise = platformClient.serviceability.updateCompanyConfiguration({ body : value }); + +// Async/Await +const data = await platformClient.serviceability.updateCompanyConfiguration({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [CompanyConfig](#CompanyConfig) | yes | Request body | + + +Apply Courier Rule to company with rules priority + +*Returned Response:* + + + + +[CompanyConfig](#CompanyConfig) + +Response status_code + + + + +
+  Example: + +```json + ```
@@ -1508,18 +2357,18 @@ Response Data --- -### updateDpRule -Updating of DpRules from database. +### updateCourierPartnerAccount +Update Courier Account in database. ```javascript // Promise -const promise = platformClient.serviceability.updateDpRule({ ruleUid : value, +const promise = platformClient.serviceability.updateCourierPartnerAccount({ accountId : value, body : value }); // Async/Await -const data = await platformClient.serviceability.updateDpRule({ ruleUid : value, +const data = await platformClient.serviceability.updateCourierPartnerAccount({ accountId : value, body : value }); ``` @@ -1529,18 +2378,18 @@ const data = await platformClient.serviceability.updateDpRule({ ruleUid : value | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| ruleUid | string | yes | A `rule_uid` is a unique identifier for a particular Dp. | -| body | [DpRulesUpdateRequest](#DpRulesUpdateRequest) | yes | Request body | +| accountId | string | yes | Unique ID of courier account | +| body | [CourierAccount](#CourierAccount) | yes | Request body | -This API updates and returns response of DpRules from mongo database. +Updates Courier Account *Returned Response:* -[DpRuleUpdateSuccessResponse](#DpRuleUpdateSuccessResponse) +[CourierAccountResponse](#CourierAccountResponse) Response status_code @@ -1566,17 +2415,17 @@ Response status_code --- -### updatePincodeAuditHistory -Auditlog configuration of application. +### updateCourierPartnerRulePriority +Updates Courier Partner Rules Priority for a sales channel ```javascript // Promise -const promise = platformClient.application("").serviceability.updatePincodeAuditHistory({ body : value }); +const promise = platformClient.application("").serviceability.updateCourierPartnerRulePriority({ body : value }); // Async/Await -const data = await platformClient.application("").serviceability.updatePincodeAuditHistory({ body : value }); +const data = await platformClient.application("").serviceability.updateCourierPartnerRulePriority({ body : value }); ``` @@ -1585,19 +2434,19 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [PincodeMopUpdateAuditHistoryRequest](#PincodeMopUpdateAuditHistoryRequest) | yes | Request body | +| body | [RulePriorityRequest](#RulePriorityRequest) | yes | Request body | -This API returns Audit logs of Pincode. +Updates Courier Partner Rules Priority for a sales channel *Returned Response:* -[PincodeMopUpdateAuditHistoryResponseData](#PincodeMopUpdateAuditHistoryResponseData) +[RulePriorityResponse](#RulePriorityResponse) -Response Data +Response status_code @@ -1621,17 +2470,19 @@ Response Data --- -### updatePincodeBulkView -Bulk Update of pincode in the application. +### updateCourierRule +Updating of Courier Rule. ```javascript // Promise -const promise = platformClient.application("").serviceability.updatePincodeBulkView({ body : value }); +const promise = platformClient.application("").serviceability.updateCourierRule({ ruleId : value, + body : value }); // Async/Await -const data = await platformClient.application("").serviceability.updatePincodeBulkView({ body : value }); +const data = await platformClient.application("").serviceability.updateCourierRule({ ruleId : value, + body : value }); ``` @@ -1639,20 +2490,21 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [PincodeMopBulkData](#PincodeMopBulkData) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| ruleId | string | yes | A `rule_id` is a unique identifier for a particular Dp. | +| body | [CourierPartnerRule](#CourierPartnerRule) | yes | Request body | -This API constructs bulk write operations to update the MOP data for each pincode in the payload. +This API updates and returns Courier Rule. *Returned Response:* -[PincodeBulkViewResponse](#PincodeBulkViewResponse) +[CourierPartnerRule](#CourierPartnerRule) -Response Data +Response status_code @@ -1660,14 +2512,101 @@ Response Data
  Example: +```json + +``` +
+ + + + + + + + + +--- + + +### updatePackageMaterialRule +Fetching of Package Material Rules into database. + + + +```javascript +// Promise +const promise = platformClient.serviceability.updatePackageMaterialRule({ ruleId : value, + body : value }); + +// Async/Await +const data = await platformClient.serviceability.updatePackageMaterialRule({ ruleId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| ruleId | string | yes | A `package_material_rule_id` is a unique identifier for a Package Material Rule | +| body | [PackageRule](#PackageRule) | yes | Request body | + + +This API updates Package Material Rules into mongo database. + +*Returned Response:* + + + + +[PackageRuleResponse](#PackageRuleResponse) + +Response status_code + + + + +
+  Examples: + + +
+  PackageRule + ```json { - "batch_id": "string", - "s3_url": "string" + "value": { + "id": "64b4337a0c607fbfbcd0156b", + "company_id": 1, + "name": "Rule For Dev Contract", + "category_id": { + "includes": [ + 1, + 2 + ] + }, + "product_tag": { + "includes": [ + "abc", + "xyz" + ] + }, + "product_id": { + "includes": [ + 1, + 2 + ] + }, + "type": "package", + "is_active": true + } } ```
+
+ @@ -1679,17 +2618,124 @@ Response Data --- -### updatePincodeCoDListing -Pincode count view of application. +### updatePackageMaterials +Update Package Material to database. ```javascript // Promise -const promise = platformClient.application("").serviceability.updatePincodeCoDListing({ body : value }); +const promise = platformClient.serviceability.updatePackageMaterials({ packageMaterialId : value, + body : value }); // Async/Await -const data = await platformClient.application("").serviceability.updatePincodeCoDListing({ body : value }); +const data = await platformClient.serviceability.updatePackageMaterials({ packageMaterialId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| packageMaterialId | string | yes | A `package_material_id` is a unique identifier for a Package Material | +| body | [PackageMaterial](#PackageMaterial) | yes | Request body | + + +This API updates Package Materials from into mongo database. + +*Returned Response:* + + + + +[PackageMaterialResponse](#PackageMaterialResponse) + +Response status_code + + + + +
+  Examples: + + +
+  PackageMaterial + +```json +{ + "value": { + "id": "64b8526e5ca47d41582b9fa1", + "name": "Package1", + "item_id": 1234, + "company_id": 1, + "length": 1, + "height": 1, + "width": 1, + "weight": 1, + "error_rate": 0, + "store_ids": [ + 1, + 9, + 5 + ], + "rules": [ + { + "rule_id": "64b4337a0c607fbfbcd0156b", + "quantity": { + "min": 1, + "max": 2 + }, + "weight": 100 + } + ], + "channels": [ + { + "id": "64b4337a0c607fbfbcd0190b", + "type": "application" + } + ], + "media": [ + "https://cdn.pixelbin.io/v2/falling-surf-7c8bb8/sandbx/wrkr/sandeepmaale/products/pictures/bundle/free/original/LOc5XW0cc-Logo.png" + ], + "package_type": "box", + "size": "small", + "status": "active", + "track_inventory": false, + "max_weight": 100, + "package_vol_weight": 100, + "auto_calculate": true + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### updatePincodeAuditHistory +Auditlog configuration of application. + + + +```javascript +// Promise +const promise = platformClient.application("").serviceability.updatePincodeAuditHistory({ body : value }); + +// Async/Await +const data = await platformClient.application("").serviceability.updatePincodeAuditHistory({ body : value }); ``` @@ -1698,17 +2744,17 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [PincodeCodStatusListingRequest](#PincodeCodStatusListingRequest) | yes | Request body | +| body | [PincodeMopUpdateAuditHistoryRequest](#PincodeMopUpdateAuditHistoryRequest) | yes | Request body | -This API returns count of active pincode. +This API returns Audit logs of Pincode. *Returned Response:* -[PincodeCodStatusListingResponse](#PincodeCodStatusListingResponse) +[PincodeMopUpdateAuditHistoryResponseData](#PincodeMopUpdateAuditHistoryResponseData) Response Data @@ -1734,17 +2780,17 @@ Response Data --- -### updatePincodeMopView -PincodeView update of MOP. - +### updatePincodeBulkView +Bulk Update of pincode in the application. + ```javascript // Promise -const promise = platformClient.application("").serviceability.updatePincodeMopView({ body : value }); +const promise = platformClient.application("").serviceability.updatePincodeBulkView({ body : value }); // Async/Await -const data = await platformClient.application("").serviceability.updatePincodeMopView({ body : value }); +const data = await platformClient.application("").serviceability.updatePincodeBulkView({ body : value }); ``` @@ -1753,17 +2799,17 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [PincodeMopData](#PincodeMopData) | yes | Request body | +| body | [PincodeMopBulkData](#PincodeMopBulkData) | yes | Request body | -This API updates Pincode method of payment. +This API constructs bulk write operations to update the MOP data for each pincode in the payload. *Returned Response:* -[PincodeMOPresponse](#PincodeMOPresponse) +[PincodeBulkViewResponse](#PincodeBulkViewResponse) Response Data @@ -1774,7 +2820,10 @@ Response Data   Example: ```json - +{ + "batch_id": "string", + "s3_url": "string" +} ```
@@ -1789,17 +2838,17 @@ Response Data --- -### updateSelfShip -Self-ship configuration of application. +### updatePincodeCoDListing +Pincode count view of application. ```javascript // Promise -const promise = platformClient.application("").serviceability.updateSelfShip({ body : value }); +const promise = platformClient.application("").serviceability.updatePincodeCoDListing({ body : value }); // Async/Await -const data = await platformClient.application("").serviceability.updateSelfShip({ body : value }); +const data = await platformClient.application("").serviceability.updatePincodeCoDListing({ body : value }); ``` @@ -1808,17 +2857,17 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [SelfShipResponse](#SelfShipResponse) | yes | Request body | +| body | [PincodeCodStatusListingRequest](#PincodeCodStatusListingRequest) | yes | Request body | -This API updates Self-ship configuration of the application. +This API returns count of active pincode. *Returned Response:* -[ApplicationSelfShipConfigResponse](#ApplicationSelfShipConfigResponse) +[PincodeCodStatusListingResponse](#PincodeCodStatusListingResponse) Response Data @@ -1829,18 +2878,7 @@ Response Data   Example: ```json -{ - "data": { - "is_active": true, - "tat": 3 - }, - "success": true, - "error": { - "type": "", - "value": "", - "message": "" - } -} + ```
@@ -1855,19 +2893,17 @@ Response Data --- -### updateZoneControllerView -Updation of zone collections in database. +### updatePincodeMopView +PincodeView update of MOP. ```javascript // Promise -const promise = platformClient.serviceability.updateZoneControllerView({ zoneId : value, - body : value }); +const promise = platformClient.application("").serviceability.updatePincodeMopView({ body : value }); // Async/Await -const data = await platformClient.serviceability.updateZoneControllerView({ zoneId : value, - body : value }); +const data = await platformClient.application("").serviceability.updatePincodeMopView({ body : value }); ``` @@ -1875,21 +2911,20 @@ const data = await platformClient.serviceability.updateZoneControllerView({ zon | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| zoneId | string | yes | A `zone_id` is a unique identifier for a particular zone. | -| body | [ZoneUpdateRequest](#ZoneUpdateRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| body | [PincodeMopData](#PincodeMopData) | yes | Request body | -This API returns response of updation of zone in mongo database. +This API updates Pincode method of payment. *Returned Response:* -[ZoneSuccessResponse](#ZoneSuccessResponse) +[PincodeMOPresponse](#PincodeMOPresponse) -Response status_code +Response Data @@ -1913,17 +2948,23 @@ Response status_code --- -### upsertDpAccount -Upsertion of DpAccount in database. +### updateServiceability +Serviceability Update for a region ```javascript // Promise -const promise = platformClient.serviceability.upsertDpAccount({ body : value }); +const promise = platformClient.serviceability.updateServiceability({ extensionId : value, + schemeId : value, + regionId : value, + body : value }); // Async/Await -const data = await platformClient.serviceability.upsertDpAccount({ body : value }); +const data = await platformClient.serviceability.updateServiceability({ extensionId : value, + schemeId : value, + regionId : value, + body : value }); ``` @@ -1931,18 +2972,21 @@ const data = await platformClient.serviceability.upsertDpAccount({ body : value | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [CompanyDpAccountRequest](#CompanyDpAccountRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| extensionId | string | yes | Unique Identifier of CP Extension | +| schemeId | string | yes | Unique identifier of a scheme | +| regionId | string | yes | Unique identifier of a region | +| body | [ServiceabilityModel](#ServiceabilityModel) | yes | Request body | -This API returns response of upsertion of DpAccount in mongo database. +Serviceability Update for a region *Returned Response:* -[CompanyDpAccountResponse](#CompanyDpAccountResponse) +[ServiceabilityModel](#ServiceabilityModel) Response status_code @@ -1968,17 +3012,19 @@ Response status_code --- -### upsertDpApplicationRules -Upsert of DpApplicationRules in database. +### updateStoreRules +Update Store Rule ```javascript // Promise -const promise = platformClient.application("").serviceability.upsertDpApplicationRules({ body : value }); +const promise = platformClient.application("").serviceability.updateStoreRules({ ruleUid : value, + body : value }); // Async/Await -const data = await platformClient.application("").serviceability.upsertDpApplicationRules({ body : value }); +const data = await platformClient.application("").serviceability.updateStoreRules({ ruleUid : value, + body : value }); ``` @@ -1986,18 +3032,19 @@ const data = await platformClient.application("").serviceability | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [DPApplicationRuleRequest](#DPApplicationRuleRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| ruleUid | string | yes | A `rule_uid` is a unique identifier for a particular rule object. | +| body | [CreateStoreRuleRequestSchema](#CreateStoreRuleRequestSchema) | yes | Request body | -This API returns response of upsert of DpApplicationRules in mongo database. +Update Store Rule *Returned Response:* -[DPApplicationRuleResponse](#DPApplicationRuleResponse) +[StoreRuleUpdateResponseSchema](#StoreRuleUpdateResponseSchema) Response status_code @@ -2023,17 +3070,17 @@ Response status_code --- -### upsertDpCompanyRules -Upsert of DpCompanyRules in database. +### updateStoreRulesConfig +Update Store Rule Configuration ```javascript // Promise -const promise = platformClient.serviceability.upsertDpCompanyRules({ body : value }); +const promise = platformClient.application("").serviceability.updateStoreRulesConfig({ body : value }); // Async/Await -const data = await platformClient.serviceability.upsertDpCompanyRules({ body : value }); +const data = await platformClient.application("").serviceability.updateStoreRulesConfig({ body : value }); ``` @@ -2042,17 +3089,17 @@ const data = await platformClient.serviceability.upsertDpCompanyRules({ body : | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [DPCompanyRuleRequest](#DPCompanyRuleRequest) | yes | Request body | +| body | [StoreRuleConfigData](#StoreRuleConfigData) | yes | Request body | -This API returns response of upsert of DpCompanyRules in mongo database. +Update Store Rule Configuration *Returned Response:* -[DPCompanyRuleResponse](#DPCompanyRuleResponse) +[StoreRuleConfigData](#StoreRuleConfigData) Response status_code @@ -2078,17 +3125,19 @@ Response status_code --- -### upsertDpRules -Upsert of DpRules in database. +### updateZoneById +Update details of a Zone ```javascript // Promise -const promise = platformClient.serviceability.upsertDpRules({ body : value }); +const promise = platformClient.serviceability.updateZoneById({ zoneId : value, + body : value }); // Async/Await -const data = await platformClient.serviceability.upsertDpRules({ body : value }); +const data = await platformClient.serviceability.updateZoneById({ zoneId : value, + body : value }); ``` @@ -2096,18 +3145,19 @@ const data = await platformClient.serviceability.upsertDpRules({ body : value } | Argument | Type | Required | Description | -| --------- | ----- | -------- | ----------- | -| body | [DpRuleRequest](#DpRuleRequest) | yes | Request body | +| --------- | ----- | -------- | ----------- | +| zoneId | string | yes | A `zone_id` is a unique identifier for a particular zone. | +| body | [UpdateZoneData](#UpdateZoneData) | yes | Request body | -This API returns response of upsert of DpRules in mongo database. +Updates the region, application, store mapping and other details in the Zone. *Returned Response:* -[DpRuleSuccessResponse](#DpRuleSuccessResponse) +[ZoneSuccessResponse](#ZoneSuccessResponse) Response status_code @@ -2155,23 +3205,13 @@ Response status_code --- -#### [ApplicationCompanyDpViewRequest](#ApplicationCompanyDpViewRequest) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | dp_id | string? | yes | | - - ---- - -#### [ApplicationCompanyDpViewResponse](#ApplicationCompanyDpViewResponse) +#### [ApplicationConfig](#ApplicationConfig) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | application_id | string | no | | - | company_id | number | no | | - | courier_partner_id | number? | yes | | - | success | boolean | no | | + | rule_ids | [string]? | yes | | + | sort | [string]? | yes | | + | zones | [ZoneConfig](#ZoneConfig)? | yes | | --- @@ -2218,315 +3258,355 @@ Response status_code --- -#### [CommonError](#CommonError) +#### [ArithmeticOperations](#ArithmeticOperations) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | error | any? | yes | | - | status_code | string? | yes | | - | success | string? | yes | | + | gt | number? | yes | | + | gte | number? | yes | | + | lt | number? | yes | | + | lte | number? | yes | | --- -#### [CompanyDpAccountListResponse](#CompanyDpAccountListResponse) +#### [BulkRegionJobSerializer](#BulkRegionJobSerializer) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[Dp1](#Dp1)] | no | | - | page | [Page](#Page) | no | | - | success | boolean | no | | + | action | string | no | | + | country | string | no | | + | file_path | string? | yes | | + | region | string | no | | --- -#### [CompanyDpAccountRequest](#CompanyDpAccountRequest) +#### [BulkRegionResponse](#BulkRegionResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [[Dp1](#Dp1)] | no | | + | items | [[BulkRegionResponseItemData](#BulkRegionResponseItemData)] | no | | + | page | [Page](#Page) | no | | --- -#### [CompanyDpAccountResponse](#CompanyDpAccountResponse) +#### [BulkRegionResponseItemData](#BulkRegionResponseItemData) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | success | boolean | no | | + | action | string | no | | + | batch_id | string | no | | + | country | string | no | | + | error_file_path | string? | yes | | + | failed | number? | yes | | + | failed_records | [string]? | yes | | + | file_path | string | no | | + | region | string | no | | + | status | string | no | | + | success | number? | yes | | + | total | number? | yes | | --- -#### [CompanyStoreView_PageItems](#CompanyStoreView_PageItems) +#### [Channel](#Channel) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | current | number | no | | - | has_next | boolean | no | | - | item_total | number | no | | - | size | number | no | | - | type | string | no | | + | id | string? | yes | | + | type | string? | yes | | --- -#### [CompanyStoreView_Response](#CompanyStoreView_Response) +#### [CommonError](#CommonError) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [string]? | yes | | - | page | [[CompanyStoreView_PageItems](#CompanyStoreView_PageItems)] | no | | + | error | any? | yes | | + | status_code | string? | yes | | + | success | string? | yes | | --- -#### [ContactNumberResponse](#ContactNumberResponse) +#### [CompanyConfig](#CompanyConfig) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | country_code | number? | yes | | - | number | string? | yes | | + | logistics_as_actual | boolean? | yes | | + | rule_ids | [string] | no | | + | sort | [string] | no | | --- -#### [CreatedByResponse](#CreatedByResponse) +#### [CompanyCourierPartnerAccountListResponse](#CompanyCourierPartnerAccountListResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | user_id | string? | yes | | - | username | string? | yes | | + | items | [[CourierAccountResponse](#CourierAccountResponse)] | no | | + | page | [Page](#Page) | no | | --- -#### [CreateZoneData](#CreateZoneData) +#### [CompanyStoreView_PageItems](#CompanyStoreView_PageItems) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | assignment_preference | string? | yes | | - | channels | [[GetZoneDataViewChannels](#GetZoneDataViewChannels)] | no | | - | company_id | number | no | | - | is_active | boolean | no | | - | mapping | [[ZoneMappingType](#ZoneMappingType)] | no | | - | name | string | no | | - | product | [ZoneProductTypes](#ZoneProductTypes) | no | | - | region_type | string | no | | - | slug | string | no | | - | store_ids | [number] | no | | + | current | number | no | | + | has_next | boolean | no | | + | item_total | number | no | | + | size | number | no | | + | type | string | no | | --- -#### [DocumentsResponse](#DocumentsResponse) +#### [CompanyStoreView_Response](#CompanyStoreView_Response) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | legal_name | string? | yes | | - | type | string? | yes | | - | value | string? | yes | | - | verified | boolean? | yes | | + | items | [string]? | yes | | + | page | [[CompanyStoreView_PageItems](#CompanyStoreView_PageItems)] | no | | --- -#### [Dp](#Dp) +#### [ContactNumberResponse](#ContactNumberResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | area_code | number? | yes | | - | assign_dp_from_sb | boolean? | yes | | - | external_account_id | string? | yes | | - | fm_priority | number? | yes | | - | internal_account_id | string? | yes | | - | lm_priority | number? | yes | | - | operations | [string]? | yes | | - | payment_mode | string? | yes | | - | rvp_priority | number? | yes | | - | transport_mode | string? | yes | | + | country_code | number? | yes | | + | number | string? | yes | | --- -#### [Dp1](#Dp1) +#### [CourierAccount](#CourierAccount) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | account_id | string | no | | - | dp_id | string | no | | + | extension_id | string | no | | + | is_own_account | boolean | no | | | is_self_ship | boolean | no | | - | name | string | no | | - | plan_id | string | no | | - | plan_rules | string | no | | + | scheme_id | string | no | | | stage | string | no | | --- -#### [DpAccountFailureResponse](#DpAccountFailureResponse) +#### [CourierAccountResponse](#CourierAccountResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | error | [[ErrorResponse](#ErrorResponse)] | no | | - | status_code | number | no | | - | success | boolean | no | | + | account_id | string | no | | + | is_own_account | boolean | no | | + | is_self_ship | boolean | no | | + | scheme_id | string | no | | + | scheme_rules | [CourierPartnerSchemeModel](#CourierPartnerSchemeModel) | no | | + | stage | string | no | | --- -#### [DPApplicationRuleRequest](#DPApplicationRuleRequest) +#### [CourierPartnerAccountFailureResponse](#CourierPartnerAccountFailureResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | shipping_rules | [string] | no | | + | error | [[ErrorResponse](#ErrorResponse)] | no | | + | success | boolean | no | | --- -#### [DPApplicationRuleResponse](#DPApplicationRuleResponse) +#### [CourierPartnerList](#CourierPartnerList) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [[DpRuleResponse](#DpRuleResponse)] | no | | - | status_code | boolean | no | | - | success | boolean | no | | + | account_id | string | no | | + | extension_id | string | no | | + | is_self_ship | boolean | no | | + | name | string | no | | --- -#### [DPCompanyRuleRequest](#DPCompanyRuleRequest) +#### [CourierPartnerRule](#CourierPartnerRule) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | rule_ids | [string] | no | | + | conditions | [CourierPartnerRuleConditions](#CourierPartnerRuleConditions) | no | | + | cp_list | [[CourierPartnerList](#CourierPartnerList)]? | yes | | + | is_active | boolean | no | | + | name | string | no | | + | sort | [string] | no | | --- -#### [DPCompanyRuleResponse](#DPCompanyRuleResponse) +#### [CourierPartnerRuleConditions](#CourierPartnerRuleConditions) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [[DpRuleResponse](#DpRuleResponse)] | no | | - | status_code | number | no | | - | success | boolean | no | | + | brand_ids | [IntComparisonOperations](#IntComparisonOperations)? | yes | | + | category_ids | [IntComparisonOperations](#IntComparisonOperations)? | yes | | + | department_ids | [IntComparisonOperations](#IntComparisonOperations)? | yes | | + | forward | [LocationRule](#LocationRule)? | yes | | + | order_place_date | [ArithmeticOperations](#ArithmeticOperations)? | yes | | + | payment_mode | [StringComparisonOperations](#StringComparisonOperations)? | yes | | + | product_ids | [IntComparisonOperations](#IntComparisonOperations)? | yes | | + | product_tags | [StringComparisonOperations](#StringComparisonOperations)? | yes | | + | reverse | [LocationRule](#LocationRule)? | yes | | + | shipment_cost | [ArithmeticOperations](#ArithmeticOperations)? | yes | | + | shipment_volumetric_weight | [ArithmeticOperations](#ArithmeticOperations)? | yes | | + | shipment_weight | [ArithmeticOperations](#ArithmeticOperations)? | yes | | + | store_ids | [IntComparisonOperations](#IntComparisonOperations)? | yes | | + | store_tags | [StringComparisonOperations](#StringComparisonOperations)? | yes | | + | store_type | [StringComparisonOperations](#StringComparisonOperations)? | yes | | + | zone_ids | [StringComparisonOperations](#StringComparisonOperations)? | yes | | --- -#### [DpIds](#DpIds) +#### [CourierPartnerRulesListResponse](#CourierPartnerRulesListResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | enabled | boolean | no | | - | meta | string? | yes | | - | priority | number | no | | + | items | [[CourierPartnerRule](#CourierPartnerRule)] | no | | + | page | [Page](#Page) | no | | --- -#### [DpMultipleRuleSuccessResponse](#DpMultipleRuleSuccessResponse) +#### [CourierPartnerSchemeFeatures](#CourierPartnerSchemeFeatures) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[DpRule](#DpRule)] | no | | - | page | [Page](#Page) | no | | - | success | boolean | no | | + | cold_storage_goods | boolean? | yes | | + | dangerous_goods | boolean? | yes | | + | doorstep_exchange | boolean? | yes | | + | doorstep_qc | boolean? | yes | | + | doorstep_return | boolean? | yes | | + | ewaybill | boolean? | yes | | + | fragile_goods | boolean? | yes | | + | mps | boolean? | yes | | + | multi_pick_multi_drop | boolean? | yes | | + | multi_pick_single_drop | boolean? | yes | | + | ndr | boolean? | yes | | + | ndr_attempts | number? | yes | | + | openbox_delivery | boolean? | yes | | + | product_installation | boolean? | yes | | + | qr | boolean? | yes | | + | restricted_goods | boolean? | yes | | + | single_pick_multi_drop | boolean? | yes | | + | status_updates | string? | yes | | --- -#### [DpRule](#DpRule) +#### [CourierPartnerSchemeModel](#CourierPartnerSchemeModel) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | company_id | number? | yes | | - | conditions | [string] | no | | - | dp_ids | [String: [DpSchemaInRuleListing](#DpSchemaInRuleListing)] | no | | - | is_active | boolean? | yes | | - | name | string | no | | + | delivery_type | string | no | | + | extension_id | string | no | | + | feature | [CourierPartnerSchemeFeatures](#CourierPartnerSchemeFeatures) | no | | + | payment_mode | [string] | no | | + | region | string | no | | + | scheme_id | string | no | | + | stage | string | no | | + | transport_type | string | no | | + | weight | [ArithmeticOperations](#ArithmeticOperations) | no | | --- -#### [DpRuleRequest](#DpRuleRequest) +#### [CreatedByResponse](#CreatedByResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | company_id | number? | yes | | - | conditions | [string] | no | | - | dp_ids | [String: [DpIds](#DpIds)] | no | | - | is_active | boolean? | yes | | - | name | string | no | | + | user_id | string? | yes | | + | username | string? | yes | | --- -#### [DpRuleResponse](#DpRuleResponse) +#### [CreateStoreRuleRequestSchema](#CreateStoreRuleRequestSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | company_id | number | no | | - | conditions | [string] | no | | - | created_by | string? | yes | | - | created_on | string? | yes | | - | dp_ids | string | no | | + | conditions | [StoreRuleConditionSchema](#StoreRuleConditionSchema)? | yes | | | is_active | boolean? | yes | | - | modified_by | string? | yes | | - | modified_on | string? | yes | | - | name | string | no | | - | uid | string | no | | + | name | string? | yes | | + | sort | [string]? | yes | | + | store_priority | [[StorePrioritySchema](#StorePrioritySchema)]? | yes | | + | tag_based_priority | [string]? | yes | | + | type_based_priority | [string]? | yes | | --- -#### [DpRuleSuccessResponse](#DpRuleSuccessResponse) +#### [CreateZoneData](#CreateZoneData) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [DpRule](#DpRule) | no | | - | status_code | number | no | | - | success | boolean | no | | + | assignment_preference | string? | yes | | + | channels | [[GetZoneDataViewChannels](#GetZoneDataViewChannels)] | no | | + | company_id | number | no | | + | is_active | boolean | no | | + | mapping | [[ZoneMappingType](#ZoneMappingType)] | no | | + | name | string | no | | + | region_type | string | no | | + | slug | string | no | | + | store_ids | [number] | no | | --- -#### [DpRulesUpdateRequest](#DpRulesUpdateRequest) +#### [CustomerRadiusSchema](#CustomerRadiusSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | conditions | [string] | no | | - | dp_ids | string | no | | - | is_active | boolean | no | | - | name | string | no | | + | gt | number? | yes | | + | gte | number? | yes | | + | lt | number? | yes | | + | lte | number? | yes | | + | unit | string | no | | --- -#### [DpRuleUpdateSuccessResponse](#DpRuleUpdateSuccessResponse) +#### [DocumentsResponse](#DocumentsResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | data | [DpRuleResponse](#DpRuleResponse) | no | | - | status_code | number | no | | - | success | boolean | no | | + | legal_name | string? | yes | | + | type | string? | yes | | + | value | string? | yes | | + | verified | boolean? | yes | | --- -#### [DpSchemaInRuleListing](#DpSchemaInRuleListing) +#### [Dp](#Dp) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | account_id | string | no | | - | dp_id | string | no | | - | is_self_ship | boolean | no | | - | name | string | no | | - | plan_id | string | no | | - | plan_rules | string | no | | - | priority | number | no | | - | stage | string | no | | + | area_code | number? | yes | | + | assign_dp_from_sb | boolean? | yes | | + | external_account_id | string? | yes | | + | fm_priority | number? | yes | | + | internal_account_id | string? | yes | | + | lm_priority | number? | yes | | + | operations | [string]? | yes | | + | payment_mode | string? | yes | | + | rvp_priority | number? | yes | | + | transport_mode | string? | yes | | --- @@ -2555,7 +3635,6 @@ Response status_code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | display_name | string? | yes | | | name | string | no | | | sub_type | string | no | | | uid | string | no | | @@ -2590,8 +3669,8 @@ Response status_code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | data | [[EntityRegionView_Items](#EntityRegionView_Items)] | no | | | error | [EntityRegionView_Error](#EntityRegionView_Error) | no | | - | items | [[EntityRegionView_Items](#EntityRegionView_Items)]? | yes | | | page | [EntityRegionView_page](#EntityRegionView_page) | no | | | success | boolean | no | | @@ -2634,10 +3713,19 @@ Response status_code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | error | [[ErrorResponse](#ErrorResponse)] | no | | - | status_code | number | no | | | success | boolean | no | | +--- + +#### [getAppRegionZonesResponse](#getAppRegionZonesResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[ListViewItems](#ListViewItems)] | no | | + | page | [[PageSchema](#PageSchema)] | no | | + + --- #### [GetSingleZoneDataViewResponse](#GetSingleZoneDataViewResponse) @@ -2649,12 +3737,42 @@ Response status_code --- -#### [GetStoresViewResponse](#GetStoresViewResponse) +#### [GetStoreRulesApiResponse](#GetStoreRulesApiResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[StoreRuleDataSchema](#StoreRuleDataSchema)]? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [GetStoresViewResponse](#GetStoresViewResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[ItemResponse](#ItemResponse)]? | yes | | + | page | [ServiceabilityPageResponse](#ServiceabilityPageResponse) | no | | + + +--- + +#### [GetZoneByIdSchema](#GetZoneByIdSchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[ItemResponse](#ItemResponse)]? | yes | | - | page | [ServiceabilityPageResponse](#ServiceabilityPageResponse) | no | | + | assignment_preference | string? | yes | | + | channels | [[GetZoneDataViewChannels](#GetZoneDataViewChannels)] | no | | + | company_id | number? | yes | | + | is_active | boolean | no | | + | mapping | [[ZoneMappingType](#ZoneMappingType)] | no | | + | name | string | no | | + | product | [ZoneProductTypes](#ZoneProductTypes) | no | | + | region_type | string | no | | + | slug | string | no | | + | store_ids | [number] | no | | + | stores_count | number | no | | + | zone_id | string | no | | --- @@ -2679,9 +3797,8 @@ Response status_code | is_active | boolean | no | | | mapping | [[ZoneMappingType](#ZoneMappingType)] | no | | | name | string | no | | - | pincodes_count | number | no | | | product | [ZoneProductTypes](#ZoneProductTypes) | no | | - | region_type | string | no | | + | region_type | string? | yes | | | slug | string | no | | | store_ids | [number] | no | | | stores_count | number | no | | @@ -2728,6 +3845,15 @@ Response status_code | e_waybill | [EwayBillResponse](#EwayBillResponse)? | yes | | +--- + +#### [IntComparisonOperations](#IntComparisonOperations) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | includes | [number]? | yes | | + + --- #### [IntegrationTypeResponse](#IntegrationTypeResponse) @@ -2790,12 +3916,12 @@ Response status_code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | channels | [[ListViewChannels](#ListViewChannels)] | no | | + | channels | [ListViewChannels](#ListViewChannels) | no | | | company_id | number | no | | | is_active | boolean | no | | | name | string | no | | - | pincodes_count | number | no | | | product | [ListViewProduct](#ListViewProduct) | no | | + | regions_count | number | no | | | slug | string | no | | | stores_count | number | no | | | zone_id | string | no | | @@ -2818,8 +3944,7 @@ Response status_code | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | items | [[ListViewItems](#ListViewItems)] | no | | - | page | [ZoneDataItem](#ZoneDataItem) | no | | - | summary | [ListViewSummary](#ListViewSummary) | no | | + | page | [[ZoneDataItem](#ZoneDataItem)] | no | | --- @@ -2833,6 +3958,30 @@ Response status_code | total_zones | number | no | | +--- + +#### [LocationRule](#LocationRule) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | includes | [[LocationRuleValues](#LocationRuleValues)]? | yes | | + | type | string? | yes | | + + +--- + +#### [LocationRuleValues](#LocationRuleValues) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | display_name | string? | yes | | + | id | string | no | | + | name | string? | yes | | + | parent_id | string? | yes | | + | parent_ids | [string]? | yes | | + | sub_type | string? | yes | | + + --- #### [LogisticsResponse](#LogisticsResponse) @@ -2884,6 +4033,157 @@ Response status_code | minute | number? | yes | | +--- + +#### [PackageMaterial](#PackageMaterial) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | auto_calculate | boolean? | yes | | + | channels | [[Channel](#Channel)] | no | | + | error_rate | number | no | | + | height | number | no | | + | length | number | no | | + | max_weight | number? | yes | | + | media | [string]? | yes | | + | name | string | no | | + | package_type | string | no | | + | package_vol_weight | number? | yes | | + | rules | [[PackageMaterialRule](#PackageMaterialRule)]? | yes | | + | size | string | no | | + | status | string | no | | + | store_ids | [number] | no | | + | track_inventory | boolean? | yes | | + | weight | number | no | | + | width | number | no | | + + +--- + +#### [PackageMaterialList](#PackageMaterialList) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [PackageMaterialResponse](#PackageMaterialResponse)? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [PackageMaterialResponse](#PackageMaterialResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | auto_calculate | boolean? | yes | | + | channels | [[Channel](#Channel)] | no | | + | error_rate | number | no | | + | height | number | no | | + | id | string? | yes | | + | item_id | number? | yes | | + | length | number | no | | + | max_weight | number? | yes | | + | media | [string]? | yes | | + | name | string | no | | + | package_type | string | no | | + | package_vol_weight | number? | yes | | + | rules | [[PackageMaterialRule](#PackageMaterialRule)]? | yes | | + | size | string | no | | + | status | string | no | | + | store_ids | [number] | no | | + | track_inventory | boolean? | yes | | + | weight | number | no | | + | width | number | no | | + + +--- + +#### [PackageMaterialRule](#PackageMaterialRule) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | quantity | [PackageMaterialRuleQuantity](#PackageMaterialRuleQuantity)? | yes | | + | rule_id | string? | yes | | + | weight | number? | yes | | + + +--- + +#### [PackageMaterialRuleList](#PackageMaterialRuleList) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [PackageRuleResponse](#PackageRuleResponse)? | yes | | + | page | [Page](#Page)? | yes | | + + +--- + +#### [PackageMaterialRuleQuantity](#PackageMaterialRuleQuantity) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | max | number? | yes | | + | min | number? | yes | | + + +--- + +#### [PackageRule](#PackageRule) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category_id | [PackageRuleCategory](#PackageRuleCategory)? | yes | | + | company_id | number | no | | + | is_active | boolean? | yes | | + | name | string | no | | + | product_id | [PackageRuleProduct](#PackageRuleProduct)? | yes | | + | product_tag | [PackageRuleProductTag](#PackageRuleProductTag)? | yes | | + | type | string | no | | + + +--- + +#### [PackageRuleCategory](#PackageRuleCategory) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | includes | [number]? | yes | | + + +--- + +#### [PackageRuleProduct](#PackageRuleProduct) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | includes | [number]? | yes | | + + +--- + +#### [PackageRuleProductTag](#PackageRuleProductTag) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | includes | [string]? | yes | | + + +--- + +#### [PackageRuleResponse](#PackageRuleResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | category_id | [PackageRuleCategory](#PackageRuleCategory)? | yes | | + | company_id | number | no | | + | id | string? | yes | | + | is_active | boolean? | yes | | + | name | string | no | | + | product_id | [PackageRuleProduct](#PackageRuleProduct)? | yes | | + | product_tag | [PackageRuleProductTag](#PackageRuleProductTag)? | yes | | + | type | string | no | | + + --- #### [Page](#Page) @@ -2895,7 +4195,19 @@ Response status_code | has_previous | boolean | no | | | item_total | number | no | | | size | number | no | | - | total | number | no | | + | type | string | no | | + + +--- + +#### [PageSchema](#PageSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | current | number | no | | + | has_next | boolean | no | | + | item_total | number | no | | + | size | number | no | | | type | string | no | | @@ -3091,6 +4403,53 @@ Response status_code | to_pincode | string | no | | +--- + +#### [RulePriorityRequest](#RulePriorityRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | priority | number | no | | + | rule_id | string | no | | + + +--- + +#### [RulePriorityResponse](#RulePriorityResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | success | boolean? | yes | | + + +--- + +#### [SchemeRules](#SchemeRules) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | feature | [SchemeRulesFeatures](#SchemeRulesFeatures)? | yes | | + | payment_mode | [string]? | yes | | + | region | string? | yes | | + | transport_type | [string]? | yes | | + | weight | [ArithmeticOperations](#ArithmeticOperations)? | yes | | + + +--- + +#### [SchemeRulesFeatures](#SchemeRulesFeatures) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | battery_operated | boolean? | yes | | + | e_waybill | boolean? | yes | | + | flammable | boolean? | yes | | + | hazmat | boolean? | yes | | + | multi_part_shipments | boolean? | yes | | + | quality_check | boolean? | yes | | + | quick_response_code | boolean? | yes | | + + --- #### [SelfShipResponse](#SelfShipResponse) @@ -3112,6 +4471,22 @@ Response status_code | value | string | no | | +--- + +#### [ServiceabilityModel](#ServiceabilityModel) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | is_first_mile | boolean | no | | + | is_installation | boolean | no | | + | is_last_mile | boolean | no | | + | is_qc | boolean | no | | + | is_return | boolean | no | | + | lm_cod_limit | number | no | | + | pickup_cutoff | string | no | | + | route_code | string | no | | + + --- #### [ServiceabilityPageResponse](#ServiceabilityPageResponse) @@ -3127,11 +4502,107 @@ Response status_code --- -#### [ServiceabilityPayloadSchema](#ServiceabilityPayloadSchema) +#### [StorePrioritySchema](#StorePrioritySchema) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | serviceability_type | string | no | | + | id | string? | yes | | + | name | string? | yes | | + + +--- + +#### [StoreRuleConditionSchema](#StoreRuleConditionSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | brand_ids | [IntComparisonOperations](#IntComparisonOperations)? | yes | | + | category_ids | [IntComparisonOperations](#IntComparisonOperations)? | yes | | + | customer_radius | [CustomerRadiusSchema](#CustomerRadiusSchema)? | yes | | + | department_ids | [IntComparisonOperations](#IntComparisonOperations)? | yes | | + | order_place_date | [ArithmeticOperations](#ArithmeticOperations)? | yes | | + | product_ids | [IntComparisonOperations](#IntComparisonOperations)? | yes | | + | product_tags | [StringComparisonOperations](#StringComparisonOperations)? | yes | | + | store_tags | [StringComparisonOperations](#StringComparisonOperations)? | yes | | + | store_type | [StringComparisonOperations](#StringComparisonOperations)? | yes | | + | to_location | [LocationRule](#LocationRule)? | yes | | + | zone_ids | [StringComparisonOperations](#StringComparisonOperations)? | yes | | + + +--- + +#### [StoreRuleConfigData](#StoreRuleConfigData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | rule_ids | [string]? | yes | | + | sort | [string]? | yes | | + | store_priority | [[StorePrioritySchema](#StorePrioritySchema)]? | yes | | + | tag_based_priority | [string]? | yes | | + | type_based_priority | [string]? | yes | | + + +--- + +#### [StoreRuleDataSchema](#StoreRuleDataSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | application_id | string? | yes | | + | company_id | number? | yes | | + | conditions | [StoreRuleConditionSchema](#StoreRuleConditionSchema)? | yes | | + | id | string? | yes | | + | is_active | boolean? | yes | | + | name | string? | yes | | + | sort | [string]? | yes | | + | store_priority | [[StorePrioritySchema](#StorePrioritySchema)]? | yes | | + | tag_based_priority | [string]? | yes | | + | type_based_priority | [string]? | yes | | + + +--- + +#### [StoreRuleResponseSchema](#StoreRuleResponseSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | conditions | [StoreRuleConditionSchema](#StoreRuleConditionSchema)? | yes | | + | id | string? | yes | | + | is_active | boolean? | yes | | + | name | string? | yes | | + | sort | [string]? | yes | | + | store_priority | [[StorePrioritySchema](#StorePrioritySchema)]? | yes | | + | tag_based_priority | [string]? | yes | | + | type | string? | yes | | + | type_based_priority | [string]? | yes | | + + +--- + +#### [StoreRuleUpdateResponseSchema](#StoreRuleUpdateResponseSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | application_id | string? | yes | | + | company_id | number? | yes | | + | conditions | [StoreRuleConditionSchema](#StoreRuleConditionSchema)? | yes | | + | id | string? | yes | | + | is_active | boolean? | yes | | + | name | string? | yes | | + | sort | [string]? | yes | | + | store_priority | [[StorePrioritySchema](#StorePrioritySchema)]? | yes | | + | tag_based_priority | [string]? | yes | | + | type | string? | yes | | + | type_based_priority | [string]? | yes | | + + +--- + +#### [StringComparisonOperations](#StringComparisonOperations) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | includes | [string]? | yes | | --- @@ -3146,6 +4617,15 @@ Response status_code | weekday | string? | yes | | +--- + +#### [UpdateZoneConfigRequest](#UpdateZoneConfigRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | serviceability_type | string? | yes | | + + --- #### [UpdateZoneData](#UpdateZoneData) @@ -3190,6 +4670,15 @@ Response status_code | zone_id | string | no | | +--- + +#### [ZoneConfig](#ZoneConfig) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | serviceability_type | string? | yes | | + + --- #### [ZoneDataItem](#ZoneDataItem) @@ -3224,16 +4713,6 @@ Response status_code | type | string | no | | ---- - -#### [ZoneRequest](#ZoneRequest) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | data | [CreateZoneData](#CreateZoneData) | no | | - | identifier | string | no | | - - --- #### [ZoneResponse](#ZoneResponse) diff --git a/documentation/platform/THEME.md b/documentation/platform/THEME.md index ef94c0e4f..1704b5da2 100644 --- a/documentation/platform/THEME.md +++ b/documentation/platform/THEME.md @@ -24,6 +24,7 @@ Default * [getApplicationThemes](#getapplicationthemes) * [getApplicationThemesCount](#getapplicationthemescount) * [getAppliedTheme](#getappliedtheme) +* [getCompanyLevelPrivateThemes](#getcompanylevelprivatethemes) * [getCompanyLevelThemes](#getcompanylevelthemes) * [getFonts](#getfonts) * [getPage](#getpage) @@ -8300,6 +8301,13 @@ Success. Returns the page of the theme. Refer `AvailablePageSchema` for more det "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98115b013f6ac" }, "props": [], @@ -8783,6 +8791,13 @@ Success. Returns a the page of the theme. Refer `AvailablePageSchema` for more d "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98115b013f6ac" }, "props": [], @@ -17239,6 +17254,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981639e13f6b2" }, "_id": "60ab5ca6d572fed64294eb0e", @@ -17254,6 +17276,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981fc5d13f6b9" }, "_id": "60ab5ca6d572fed64294eaf9", @@ -17269,6 +17298,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981cbca13f6b1" }, "_id": "60ab5ca6d572fed64294eb0b", @@ -17284,6 +17320,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e9812fdf13f6ae" }, "_id": "60ab5ca6d572fed64294eb02", @@ -17299,6 +17342,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e9815c9713f6ab" }, "_id": "60ab5ca6d572fed64294eaf6", @@ -17314,6 +17364,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb24" }, "_id": "60ab5ca6d572fed64294eb25", @@ -17329,6 +17386,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb22" }, "_id": "60ab5ca6d572fed64294eb23", @@ -17344,6 +17408,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e9814fed13f6b5" }, "_id": "60ab5ca6d572fed64294eb17", @@ -17359,6 +17430,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981b32713f6b6" }, "_id": "60ab5ca6d572fed64294eb1a", @@ -17374,6 +17452,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb28" }, "_id": "60ab5ca6d572fed64294eb29", @@ -17389,6 +17474,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981dd2d13f6b3" }, "_id": "60ab5ca6d572fed64294eb11", @@ -17404,6 +17496,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb26" }, "_id": "60ab5ca6d572fed64294eb27", @@ -17419,6 +17518,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981161a13f6ad" }, "_id": "60ab5ca6d572fed64294eaff", @@ -17434,6 +17540,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98115b013f6ac" }, "_id": "60ab5ca6d572fed64294eafc", @@ -17449,6 +17562,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981ad0b13f6b0" }, "_id": "60ab5ca6d572fed64294eb08", @@ -17464,6 +17584,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981872c13f6af" }, "_id": "60ab5ca6d572fed64294eb05", @@ -17479,6 +17606,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98177f713f6b4" }, "_id": "60ab5ca6d572fed64294eb14", @@ -17494,6 +17628,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98170b813f6b8" }, "_id": "60ab5ca6d572fed64294eb20", @@ -17509,6 +17650,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981469613f6b7" }, "_id": "60ab5ca6d572fed64294eb1d", @@ -19559,7 +19707,8 @@ The list of themes for the application was fetched successfully. } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64b0eb01c35f990518880a82/theme/assets/7yuL57qP2-archive.zip", + "company_id": 1 } ] } @@ -21532,7 +21681,8 @@ The list of themes for the application was fetched successfully. } } ], - "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64aec4634bc407961ed265c5/theme/assets/Gpbt5naNG-archive.zip" + "src": "https://cdn.fynd.com/v2/falling-surf-7c8bb8/fyndnp/wrkr/addsale/organization/64aec4634bc407961ed265c5/theme/assets/Gpbt5naNG-archive.zip", + "company_id": 1 } ] } @@ -25610,6 +25760,62 @@ Successfully fetch the applied theme +--- + + +### getCompanyLevelPrivateThemes +Get private themes for a company + + + +```javascript +// Promise +const promise = platformClient.theme.getCompanyLevelPrivateThemes({ searchText : value }); + +// Async/Await +const data = await platformClient.theme.getCompanyLevelPrivateThemes({ searchText : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| searchText | string | no | Search Text to match the Theme Names and return the response. | + + + +Retrieve a list of private themes available for a specific company. + +*Returned Response:* + + + + +[Array](#Array) + +A list of Private themes for the company. + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + --- @@ -25620,16 +25826,21 @@ Get themes for a company ```javascript // Promise -const promise = platformClient.theme.getCompanyLevelThemes(); +const promise = platformClient.theme.getCompanyLevelThemes({ searchText : value }); // Async/Await -const data = await platformClient.theme.getCompanyLevelThemes(); +const data = await platformClient.theme.getCompanyLevelThemes({ searchText : value }); ``` +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| searchText | string | no | Search Text to match the Theme Names and return the response. | + + Retrieve a list of themes available for a specific company. @@ -25796,6 +26007,13 @@ Success. Returns an object of the page. Refer `AvailablePageSchema` for more de "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98115b013f6ac" }, "props": [], @@ -30706,6 +30924,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981639e13f6b2" }, "_id": "60ab5ca6d572fed64294eb0e", @@ -30721,6 +30946,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981fc5d13f6b9" }, "_id": "60ab5ca6d572fed64294eaf9", @@ -30736,6 +30968,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981cbca13f6b1" }, "_id": "60ab5ca6d572fed64294eb0b", @@ -30751,6 +30990,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e9812fdf13f6ae" }, "_id": "60ab5ca6d572fed64294eb02", @@ -30766,6 +31012,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e9815c9713f6ab" }, "_id": "60ab5ca6d572fed64294eaf6", @@ -30781,6 +31034,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb24" }, "_id": "60ab5ca6d572fed64294eb25", @@ -30796,6 +31056,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb22" }, "_id": "60ab5ca6d572fed64294eb23", @@ -30811,6 +31078,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e9814fed13f6b5" }, "_id": "60ab5ca6d572fed64294eb17", @@ -30826,6 +31100,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981b32713f6b6" }, "_id": "60ab5ca6d572fed64294eb1a", @@ -30841,6 +31122,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb28" }, "_id": "60ab5ca6d572fed64294eb29", @@ -30856,6 +31144,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981dd2d13f6b3" }, "_id": "60ab5ca6d572fed64294eb11", @@ -30871,6 +31166,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60ab5ca6d572fed64294eb26" }, "_id": "60ab5ca6d572fed64294eb27", @@ -30886,6 +31188,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981161a13f6ad" }, "_id": "60ab5ca6d572fed64294eaff", @@ -30901,6 +31210,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98115b013f6ac" }, "_id": "60ab5ca6d572fed64294eafc", @@ -30916,6 +31232,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981ad0b13f6b0" }, "_id": "60ab5ca6d572fed64294eb08", @@ -30931,6 +31254,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981872c13f6af" }, "_id": "60ab5ca6d572fed64294eb05", @@ -30946,6 +31276,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98177f713f6b4" }, "_id": "60ab5ca6d572fed64294eb14", @@ -30961,6 +31298,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98170b813f6b8" }, "_id": "60ab5ca6d572fed64294eb20", @@ -30976,6 +31320,13 @@ Success. Returns an array all the pages of the theme. Refer `AllAvailablePageSch "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e981469613f6b7" }, "_id": "60ab5ca6d572fed64294eb1d", @@ -31061,6 +31412,13 @@ Success. Returns a the page of the theme. Refer `AvailablePageSchema` for more d "seo": { "title": "", "description": "", + "canonical_url": "", + "breadcrumbs": [], + "sitemap": { + "priority": 0.5, + "frequency": "never" + }, + "meta_tags": [], "_id": "60210832d7e98115b013f6ac" }, "props": [], @@ -43487,6 +43845,29 @@ Successful upgrade ### Schemas +#### [Action](#Action) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | page | [ActionPage](#ActionPage)? | yes | | + | popup | [ActionPage](#ActionPage)? | yes | | + | type | string? | yes | | + + +--- + +#### [ActionPage](#ActionPage) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | params | [String: [string]]? | yes | | + | query | [String: [string]]? | yes | | + | type | string? | yes | | + | url | string? | yes | | + + +--- + #### [AddThemeRequestSchema](#AddThemeRequestSchema) | Properties | Type | Nullable | Description | @@ -43503,6 +43884,16 @@ Successful upgrade | pages | [[AvailablePageSchema](#AvailablePageSchema)]? | yes | | +--- + +#### [AppliedThemes](#AppliedThemes) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | ID of the application theme | + | application_id | string? | yes | ID of the application | + + --- #### [Assets](#Assets) @@ -43514,15 +43905,29 @@ Successful upgrade | umd_js | [UMDJs](#UMDJs)? | yes | | +--- + +#### [AvailablePagePlatformPredicate](#AvailablePagePlatformPredicate) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | android | boolean? | yes | Section visibility on android platform | + | ios | boolean? | yes | Section visibility on ios platform | + | web | boolean? | yes | Section visibility on web platform | + + --- #### [AvailablePagePredicate](#AvailablePagePredicate) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | platform | [AvailablePagePlatformPredicate](#AvailablePagePlatformPredicate)? | yes | | | route | [AvailablePageRoutePredicate](#AvailablePageRoutePredicate)? | yes | | + | schedule | [AvailablePageSchedulePredicate](#AvailablePageSchedulePredicate)? | yes | | | screen | [AvailablePageScreenPredicate](#AvailablePageScreenPredicate)? | yes | | | user | [AvailablePageUserPredicate](#AvailablePageUserPredicate)? | yes | | + | zones | [string]? | yes | An array of zone ids associated with the section | --- @@ -43536,6 +43941,17 @@ Successful upgrade | selected | string? | yes | | +--- + +#### [AvailablePageSchedulePredicate](#AvailablePageSchedulePredicate) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | cron | string? | yes | | + | end | string? | yes | | + | start | string? | yes | | + + --- #### [AvailablePageSchema](#AvailablePageSchema) @@ -43595,7 +44011,11 @@ Successful upgrade | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string? | yes | | + | breadcrumb | [[SEObreadcrumb](#SEObreadcrumb)]? | yes | | + | canonical_url | string? | yes | | | description | string? | yes | | + | meta_tags | [[SEOMetaItem](#SEOMetaItem)]? | yes | | + | sitemap | [SEOSitemap](#SEOSitemap)? | yes | | | title | string? | yes | | @@ -43667,6 +44087,37 @@ Successful upgrade | link | string? | yes | | +--- + +#### [CompanyPrivateTheme](#CompanyPrivateTheme) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | Unique identifier for the theme | + | application_id | string? | yes | Identifier for the application | + | applied | boolean? | yes | Whether the theme is applied or not | + | created_at | string? | yes | Date and time when the theme was created | + | is_private | boolean? | yes | Whether the theme is private or not | + | meta | [CompanyThemeMeta](#CompanyThemeMeta)? | yes | | + | name | string? | yes | Name of the theme | + | theme_type | string? | yes | Type of the theme | + | updated_at | string? | yes | Date and time when the theme was last updated | + | version | string? | yes | Version of the theme | + + +--- + +#### [CompanyThemeMeta](#CompanyThemeMeta) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | description | string? | yes | A description of the theme. | + | images | [ThemeImages](#ThemeImages)? | yes | | + | industry | [string]? | yes | A list of industry categories the theme is suitable for. | + | payment | [ThemePayment](#ThemePayment)? | yes | | + | slug | string? | yes | The slug for the theme. | + + --- #### [CompanyThemeSchema](#CompanyThemeSchema) @@ -43674,10 +44125,11 @@ Successful upgrade | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string? | yes | The unique identifier for the theme. | + | applied_themes | [[AppliedThemes](#AppliedThemes)]? | yes | | | company_id | number? | yes | The ID of the company that the theme belongs to. | | created_at | string? | yes | The timestamp when the theme was created. | | marketplace_theme_id | [MarketplaceThemeId](#MarketplaceThemeId)? | yes | | - | meta | [ThemeMeta](#ThemeMeta)? | yes | | + | meta | [CompanyThemeMeta](#CompanyThemeMeta)? | yes | | | name | string? | yes | The name of the theme. | | updated_at | string? | yes | The timestamp when the theme was last updated. | @@ -43865,22 +44317,10 @@ Successful upgrade | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | _id | string? | yes | The unique identifier for the marketplace theme. | + | created_at | string? | yes | Creation date of the theme | | is_default | boolean? | yes | Whether the theme is the default theme. | - - ---- - -#### [Meta](#Meta) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | description | string? | yes | The description of the theme | - | images | [Images](#Images)? | yes | | - | industry | [string]? | yes | An array of industries associated with the theme | - | name | string? | yes | The name of the theme | - | payment | [ThemePayment](#ThemePayment)? | yes | | - | release | [Release](#Release)? | yes | | - | slug | string? | yes | The slug of the theme | + | release | [ReleaseVersionOnly](#ReleaseVersionOnly)? | yes | | + | updated_at | string? | yes | Update date of the theme | --- @@ -43946,6 +44386,15 @@ Successful upgrade | version | string? | yes | The version of the theme | +--- + +#### [ReleaseVersionOnly](#ReleaseVersionOnly) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | version | string? | yes | The version of the theme | + + --- #### [Route](#Route) @@ -44013,6 +44462,46 @@ Successful upgrade | title | [TextProp](#TextProp)? | yes | | +--- + +#### [SEObreadcrumb](#SEObreadcrumb) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | action | [Action](#Action)? | yes | | + | url | string? | yes | | + + +--- + +#### [SEOMetaItem](#SEOMetaItem) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[SEOMetaItems](#SEOMetaItems)]? | yes | | + | title | string? | yes | | + + +--- + +#### [SEOMetaItems](#SEOMetaItems) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | key | string? | yes | | + | value | string? | yes | | + + +--- + +#### [SEOSitemap](#SEOSitemap) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | frequency | string? | yes | | + | priority | number? | yes | | + + --- #### [TextProp](#TextProp) @@ -44051,11 +44540,13 @@ Successful upgrade | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | description | string? | yes | A description of the theme. | - | images | [ThemeImages](#ThemeImages)? | yes | | - | industry | [string]? | yes | A list of industry categories the theme is suitable for. | + | description | string? | yes | The description of the theme | + | images | [Images](#Images)? | yes | | + | industry | [string]? | yes | An array of industries associated with the theme | + | name | string? | yes | The name of the theme | | payment | [ThemePayment](#ThemePayment)? | yes | | - | slug | string? | yes | The slug for the theme. | + | release | [Release](#Release)? | yes | | + | slug | string? | yes | The slug of the theme | --- @@ -44088,16 +44579,18 @@ Successful upgrade | applied | boolean? | yes | Whether the theme has been applied or not | | assets | [Assets](#Assets)? | yes | | | available_sections | [[SectionItem](#SectionItem)]? | yes | Available sections information | + | company_id | number? | yes | The company id in which sales channel exists | | config | [Config](#Config)? | yes | | | created_at | string? | yes | The creation timestamp of the theme | | font | [Font](#Font)? | yes | | | is_private | boolean? | yes | Whether the theme is private or not | | marketplace_theme_id | string? | yes | The ID of the theme in the marketplace | - | meta | [Meta](#Meta)? | yes | | + | meta | [ThemeMeta](#ThemeMeta)? | yes | | | name | string? | yes | The name of the theme | | styles | string? | yes | The styles associated with the theme | | tags | [string]? | yes | An array of tags associated with the theme | | template_theme_id | string? | yes | The ID of the template theme | + | theme_type | string? | yes | | | updated_at | string? | yes | The last update timestamp of the theme | | version | string? | yes | The version of the theme | @@ -44139,7 +44632,7 @@ Successful upgrade | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | links | [string]? | yes | | + | links | [string]? | yes | An array of pages | --- @@ -44176,3 +44669,68 @@ Successful upgrade +### Enums + + + + + + #### [PageType](#PageType) + Type : string + + | Name | Value | Description | + | ---- | ----- | ----------- | + | aboutUs | about-us | Symbolic link for About Us: /about-us | + | addresses | addresses | Symbolic link for Saved Addresses: /profile/address | + | blog | blog | Symbolic link for Blog: /blog/:slug | + | brands | brands | Symbolic link for Brands: /brands/:department | + | cards | cards | Symbolic link for Saved Cards: /profile/my-cards | + | cart | cart | Symbolic link for Cart: /cart/bag/ | + | categories | categories | Symbolic link for Categories: /categories/:department | + | brand | brand | Symbolic link for Brand: /brand/:slug | + | category | category | Symbolic link for Category: /category/:slug | + | collection | collection | Symbolic link for Collection: /collection/:slug | + | collections | collections | Symbolic link for Collections: /collections/ | + | contactUs | contact-us | Symbolic link for Contact Us: /contact-us/ | + | external | external | Symbolic link for External Link: /external/ | + | faq | faq | Symbolic link for FAQ: /faq | + | freshchat | freshchat | Symbolic link for Chat by Freshchat: /freshchat | + | home | home | Symbolic link for Home: / | + | notificationSettings | notification-settings | Symbolic link for Notification Settings: /notification-settings | + | orders | orders | Symbolic link for Orders: /profile/orders | + | page | page | Symbolic link for Page: /page/:slug | + | policy | policy | Symbolic link for Privacy Policy: /privacy-policy | + | product | product | Symbolic link for Product: /product/:slug | + | productRequest | product-request | Symbolic link for Product Request: /product-request/ | + | products | products | Symbolic link for Products: /products/ | + | profile | profile | Symbolic link for Profile: /profile | + | profileOrderShipment | profile-order-shipment | Symbolic link for profile orders shipment: /profile/orders/shipment/:shipmentid | + | profileBasic | profile-basic | Symbolic link for Basic Profile: /profile/details | + | profileCompany | profile-company | Symbolic link for Profile Company: /profile/company | + | profileEmails | profile-emails | Symbolic link for Profile Emails: /profile/email | + | profilePhones | profile-phones | Symbolic link for Profile Phones: /profile/phone | + | rateUs | rate-us | Symbolic link for Rate Us: /rate-us | + | referEarn | refer-earn | Symbolic link for Refer & Earn: /profile/refer-earn | + | settings | settings | Symbolic link for Settings: /setting/currency | + | sharedCart | shared-cart | Symbolic link for Shared Cart: /shared-cart/:token | + | tnc | tnc | Symbolic link for Terms and Conditions: /terms-and-conditions | + | trackOrder | track-order | Symbolic link for Track Order: /order-tracking/:orderId | + | wishlist | wishlist | Symbolic link for Wishlist: /wishlist/ | + | sections | sections | Symbolic link for Sections: /sections/:group | + | form | form | Symbolic link for Form: /form/:slug | + | cartDelivery | cart-delivery | Symbolic link for Cart Delivery: /cart/delivery | + | cartPayment | cart-payment | Symbolic link for Cart Payment Information: /cart/payment-info | + | cartReview | cart-review | Symbolic link for Cart Order Review: /cart/order-review | + | login | login | Symbolic link for Login: /auth/login | + | register | register | Symbolic link for Register: /auth/register | + | shippingPolicy | shipping-policy | Symbolic link for Shipping policy: /shipping-policy | + | returnPolicy | return-policy | Symbolic link for Return policy: /return-policy | + | orderStatus | order-status | Symbolic link for Order status: /cart/order-status | + +--- + + + + + + diff --git a/documentation/platform/USER.md b/documentation/platform/USER.md index 666072c0e..9f0208dfc 100644 --- a/documentation/platform/USER.md +++ b/documentation/platform/USER.md @@ -13,19 +13,29 @@ Default * [archiveUser](#archiveuser) * [blockOrUnblockUsers](#blockorunblockusers) * [createUser](#createuser) +* [createUserAttributeDefinition](#createuserattributedefinition) * [createUserGroup](#createusergroup) * [createUserSession](#createusersession) * [deleteActiveSessions](#deleteactivesessions) * [deleteSession](#deletesession) +* [deleteUserAttribute](#deleteuserattribute) +* [deleteUserAttributeDefinitionById](#deleteuserattributedefinitionbyid) * [getActiveSessions](#getactivesessions) * [getCustomers](#getcustomers) * [getPlatformConfig](#getplatformconfig) +* [getUserAttribute](#getuserattribute) +* [getUserAttributeById](#getuserattributebyid) +* [getUserAttributeDefinitionById](#getuserattributedefinitionbyid) +* [getUserAttributeDefinitions](#getuserattributedefinitions) +* [getUserAttributesForUser](#getuserattributesforuser) * [getUserGroupById](#getusergroupbyid) * [getUserGroups](#getusergroups) * [searchUsers](#searchusers) * [unDeleteUser](#undeleteuser) * [updatePlatformConfig](#updateplatformconfig) * [updateUser](#updateuser) +* [updateUserAttribute](#updateuserattribute) +* [updateUserAttributeDefinition](#updateuserattributedefinition) * [updateUserGroup](#updateusergroup) * [updateUserGroupPartially](#updateusergrouppartially) @@ -246,6 +256,84 @@ User create +--- + + +### createUserAttributeDefinition +Create a User Attribute Definition + + + +```javascript +// Promise +const promise = platformClient.application("").user.createUserAttributeDefinition({ body : value }); + +// Async/Await +const data = await platformClient.application("").user.createUserAttributeDefinition({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [CreateUserAttributeDefinition](#CreateUserAttributeDefinition) | yes | Request body | + + +Use this API to areate a new User Attribute Definition + +*Returned Response:* + + + + +[UserAttributeDefinitionResponse](#UserAttributeDefinitionResponse) + +Success. returns created User Attribute Definition. `UserAttributeDefinitionResponse` for more details. + + + + +
+  Example: + +```json +{ + "_id": "5e68af49cfa09bf7233022f1", + "name": "example_name", + "slug": "example_key", + "description": "example_description", + "application_id": "application_id_example", + "type": "string", + "multi_value": false, + "customer_editable": true, + "encrypted": false, + "pinned": true, + "pin_order": 2, + "validations": [ + { + "type": "min", + "value": 1 + } + ], + "is_locked": false, + "created_by": "5f6d1d7774e48a04969b2ea7", + "updated_by": "5f6d1d7774e48a04969b2ea7", + "created_at": "2023-10-17T10:00:00Z", + "modified_at": "2023-10-17T10:05:00Z" +} +``` +
+ + + + + + + + + --- @@ -268,7 +356,7 @@ const data = await platformClient.application("").user.createUse | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [CreateUserGroupSchema](#CreateUserGroupSchema) | yes | Request body | +| body | [CreateUserGroup](#CreateUserGroup) | yes | Request body | Use this API to create new user Group @@ -290,16 +378,17 @@ Success. returns created User Group. `UserGroupResponseSchema` for more details. ```json { - "is_active": true, - "_id": "6345677535474fbb6944b7ce", - "name": "Group 1", - "description": "description", - "file_url": "url", + "uid": 469, + "name": "test2", + "description": "test2", + "application_id": "000000000000000000000004", "status": "pending", - "uid": 1, - "application_id": "000000000000000000000001", - "created_at": "2022-10-11T12:54:13.539Z", - "modified_at": "2022-10-11T12:54:13.539Z", + "is_active": true, + "type": "bulk", + "_id": "6540da9759b4f70ad817ace7", + "file_url": "testuerl2", + "created_at": "2023-10-31T10:44:39.809Z", + "modified_at": "2023-10-31T10:44:39.809Z", "__v": 0 } ``` @@ -522,6 +611,121 @@ Success. Refer `SessionDeleteResponseSchema` for more details. +--- + + +### deleteUserAttribute +delete User Attribute + + + +```javascript +// Promise +const promise = platformClient.application("").user.deleteUserAttribute({ attributeDefId : value, + userId : value }); + +// Async/Await +const data = await platformClient.application("").user.deleteUserAttribute({ attributeDefId : value, + userId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| attributeDefId | string | yes | The unique identifier of the attribute definition. | +| userId | string | yes | The unique identifier of the user. | + + + +delete User Attribute + +*Returned Response:* + + + + +[SuccessMessageResponse](#SuccessMessageResponse) + +Successful update + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### deleteUserAttributeDefinitionById +Delete User Attribute Definition + + + +```javascript +// Promise +const promise = platformClient.application("").user.deleteUserAttributeDefinitionById({ attributeDefId : value }); + +// Async/Await +const data = await platformClient.application("").user.deleteUserAttributeDefinitionById({ attributeDefId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| attributeDefId | string | yes | The unique identifier of the attribute definition to delete. | + + + +Delete a user attribute definition by its unique identifier. + +*Returned Response:* + + + + +[SuccessMessageResponse](#SuccessMessageResponse) + +Successful Deletion + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + --- @@ -629,7 +833,7 @@ const data = await platformClient.application("").user.getCustom | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| q | Object | no | The search query. Mobile number or email ID of a customer. | +| q | string | no | The search query. Mobile number or email ID of a customer. | | pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | | pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | @@ -852,6 +1056,325 @@ Success. Returns a JSON object containing the all the platform configurations. R +--- + + +### getUserAttribute +get User Attribute + + + +```javascript +// Promise +const promise = platformClient.application("").user.getUserAttribute({ attributeDefId : value, + userId : value }); + +// Async/Await +const data = await platformClient.application("").user.getUserAttribute({ attributeDefId : value, + userId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| attributeDefId | string | yes | The unique identifier of the attribute definition. | +| userId | string | yes | The unique identifier of the user. | + + + +get User Attribute + +*Returned Response:* + + + + +[UserAttributeResponse](#UserAttributeResponse) + +Successful update + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getUserAttributeById +Get User Attribute + + + +```javascript +// Promise +const promise = platformClient.application("").user.getUserAttributeById({ attributeId : value }); + +// Async/Await +const data = await platformClient.application("").user.getUserAttributeById({ attributeId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| attributeId | string | yes | The unique identifier of the attribute to get. | + + + +Get User Attribute details by id + +*Returned Response:* + + + + +[UserAttributeResponse](#UserAttributeResponse) + +Successful update + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getUserAttributeDefinitionById +Get User Attribute Definition + + + +```javascript +// Promise +const promise = platformClient.application("").user.getUserAttributeDefinitionById({ attributeDefId : value }); + +// Async/Await +const data = await platformClient.application("").user.getUserAttributeDefinitionById({ attributeDefId : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| attributeDefId | string | yes | The unique identifier of the attribute definition to retrieve. | + + + +Get a user attribute definition by its unique identifier. + +*Returned Response:* + + + + +[UserAttributeDefinition](#UserAttributeDefinition) + +Successful Retrieval + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getUserAttributeDefinitions +Get User Attribute Definitions + + + +```javascript +// Promise +const promise = platformClient.application("").user.getUserAttributeDefinitions({ excludingIds : value, + slug : value, + type : value, + customerEditable : value, + encrypted : value, + pinned : value, + pinOrder : value, + isLocked : value, + name : value, + pageSize : value, + pageNo : value }); + +// Async/Await +const data = await platformClient.application("").user.getUserAttributeDefinitions({ excludingIds : value, + slug : value, + type : value, + customerEditable : value, + encrypted : value, + pinned : value, + pinOrder : value, + isLocked : value, + name : value, + pageSize : value, + pageNo : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| excludingIds | string | no | Exclude attribute definitions by Ids | +| slug | string | no | Filter by attribute slug. | +| type | string | no | Filter by attribute type. | +| customerEditable | boolean | no | Filter by customer_editable status. | +| encrypted | boolean | no | Filter by encrypted status. | +| pinned | boolean | no | Filter by pinned status. | +| pinOrder | number | no | Filter by pin order. | +| isLocked | boolean | no | Filter by locked status. | +| name | string | no | Filter by attribute name using a case-insensitive regex. | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | + + + +Retrieve user attribute definitions. + +*Returned Response:* + + + + +[Object](#Object) + +Successful response + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### getUserAttributesForUser +Get User Attributes for user + + + +```javascript +// Promise +const promise = platformClient.application("").user.getUserAttributesForUser({ userId : value, + pageSize : value, + pageNo : value }); + +// Async/Await +const data = await platformClient.application("").user.getUserAttributesForUser({ userId : value, + pageSize : value, + pageNo : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| userId | string | yes | The unique identifier of the user to update. | +| pageSize | number | no | The number of items to retrieve in each page. Default value is 10. | +| pageNo | number | no | The page number to navigate through the given set of results. Default value is 1. | + + + +Get all user attributes for user + +*Returned Response:* + + + + +[Object](#Object) + +Successful update + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + --- @@ -933,6 +1456,7 @@ Get User Groups mathcing criteria const promise = platformClient.application("").user.getUserGroups({ pageNo : value, pageSize : value, name : value, + type : value, status : value, groupUid : value }); @@ -940,6 +1464,7 @@ const promise = platformClient.application("").user.getUserGroup const data = await platformClient.application("").user.getUserGroups({ pageNo : value, pageSize : value, name : value, + type : value, status : value, groupUid : value }); ``` @@ -952,7 +1477,8 @@ const data = await platformClient.application("").user.getUserGr | --------- | ----- | -------- | ----------- | | pageNo | string | no | page number for pagination result | | pageSize | string | no | page size for pagination result | -| name | string | no | to seartch for User Groups which contains given string in their name | +| name | string | no | to search for User Groups which contains given string in their name | +| type | string | no | to search for User Groups with given type | | status | string | no | to get User Groups with given status | | groupUid | number | no | to get User Groups with given uid | @@ -979,29 +1505,31 @@ Success. User Group details. `UserGroupListResponseSchema` for more details. { "items": [ { - "is_active": true, - "_id": "6345677535474fbb6944b7ce", - "name": "Group 1", - "description": "description", - "file_url": "url", + "uid": 469, + "name": "test2", + "description": "test2", + "application_id": "000000000000000000000004", "status": "pending", - "uid": 1, - "application_id": "000000000000000000000001", - "created_at": "2022-10-11T12:54:13.539Z", - "modified_at": "2022-10-11T12:54:13.539Z", + "is_active": true, + "type": "bulk", + "_id": "6540da9759b4f70ad817ace7", + "file_url": "testuerl2", + "created_at": "2023-10-31T10:44:39.809Z", + "modified_at": "2023-10-31T10:44:39.809Z", "__v": 0 }, { - "is_active": true, - "_id": "6345677535474fbb6944b7ced", - "name": "Group 2", - "description": "description", - "file_url": "url2", + "uid": 460, + "name": "test", + "description": "test", + "application_id": "000000000000000000000004", "status": "pending", - "uid": 1, - "application_id": "000000000000000000000001", - "created_at": "2022-10-11T12:54:13.539Z", - "modified_at": "2022-10-11T12:54:13.539Z", + "is_active": true, + "type": "bulk", + "_id": "6540da9759b4f70ad817ace8", + "file_url": "testuerl2", + "created_at": "2023-10-31T10:44:39.809Z", + "modified_at": "2023-10-31T10:44:39.809Z", "__v": 0 } ], @@ -1418,6 +1946,125 @@ User update +--- + + +### updateUserAttribute +Update Or Create User Attribute + + + +```javascript +// Promise +const promise = platformClient.application("").user.updateUserAttribute({ attributeDefId : value, + userId : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").user.updateUserAttribute({ attributeDefId : value, + userId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| attributeDefId | string | yes | The unique identifier of the attribute definition to update. | +| userId | string | yes | The unique identifier of the user to update. | +| body | [CreateUserAttributeRequest](#CreateUserAttributeRequest) | yes | Request body | + + +Update Or Create User Attribute + +*Returned Response:* + + + + +[UserAttributeResponse](#UserAttributeResponse) + +Successful update + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + +### updateUserAttributeDefinition +Update User Attribute Definition + + + +```javascript +// Promise +const promise = platformClient.application("").user.updateUserAttributeDefinition({ attributeDefId : value, + body : value }); + +// Async/Await +const data = await platformClient.application("").user.updateUserAttributeDefinition({ attributeDefId : value, + body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| attributeDefId | string | yes | The unique identifier of the attribute definition to update. | +| body | [CreateUserAttributeDefinition](#CreateUserAttributeDefinition) | yes | Request body | + + +Update an existing user attribute definition. + +*Returned Response:* + + + + +[UserAttributeDefinition](#UserAttributeDefinition) + +Successful update + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + --- @@ -1465,16 +2112,17 @@ Success. returns updated User Group. `UserGroupResponseSchema` for more details. ```json { - "is_active": true, - "_id": "6345677535474fbb6944b7ce", - "name": "Group 1", - "description": "description", - "file_url": "url", + "uid": 469, + "name": "test2", + "description": "test2", + "application_id": "000000000000000000000004", "status": "pending", - "uid": 1, - "application_id": "000000000000000000000001", - "created_at": "2022-10-11T12:54:13.539Z", - "modified_at": "2022-10-11T12:54:13.539Z", + "is_active": true, + "type": "bulk", + "_id": "6540da9759b4f70ad817ace7", + "file_url": "testuerl2", + "created_at": "2023-10-31T10:44:39.809Z", + "modified_at": "2023-10-31T10:44:39.809Z", "__v": 0 } ``` @@ -1622,13 +2270,67 @@ Success. returns updated User Group. `UserGroupResponseSchema` for more details. --- -#### [CreateUserGroupSchema](#CreateUserGroupSchema) +#### [Conditions](#Conditions) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | key | string? | yes | | + | type | string? | yes | | + | user_attribute_definition_id | string? | yes | | + | value | string? | yes | | + + +--- + +#### [ConditionsSchema](#ConditionsSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | type | string? | yes | | + | user_attribute_definition_id | string? | yes | | + | value | string? | yes | | + + +--- + +#### [CreateUserAttributeDefinition](#CreateUserAttributeDefinition) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | customer_editable | boolean? | yes | | + | default_value | string? | yes | | + | description | string? | yes | | + | encrypted | boolean? | yes | | + | multi_value | boolean? | yes | | + | name | string? | yes | | + | pin_order | number? | yes | | + | pinned | boolean? | yes | | + | slug | string? | yes | | + | type | string? | yes | | + | validations | [string]? | yes | | + + +--- + +#### [CreateUserAttributeRequest](#CreateUserAttributeRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | attribute | string? | yes | | + | customer_overriden | boolean? | yes | | + + +--- + +#### [CreateUserGroup](#CreateUserGroup) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | conditions | [[ConditionsSchema](#ConditionsSchema)]? | yes | | | description | string | no | | - | file_url | string | no | | + | file_url | string? | yes | | | name | string | no | | + | type | string? | yes | | --- @@ -1988,6 +2690,15 @@ Success. returns updated User Group. `UserGroupResponseSchema` for more details. | google | [Google](#Google)? | yes | | +--- + +#### [SuccessMessageResponse](#SuccessMessageResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | success | string? | yes | | + + --- #### [UnDeleteUserRequestSchema](#UnDeleteUserRequestSchema) @@ -2014,9 +2725,11 @@ Success. returns updated User Group. `UserGroupResponseSchema` for more details. | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | + | conditions | [[ConditionsSchema](#ConditionsSchema)]? | yes | | | description | string? | yes | | | file_url | string? | yes | | | name | string? | yes | | + | type | string? | yes | | --- @@ -2034,6 +2747,81 @@ Success. returns updated User Group. `UserGroupResponseSchema` for more details. | phone_numbers | [[UserPhoneNumbers](#UserPhoneNumbers)]? | yes | | +--- + +#### [UserAttributeDefinition](#UserAttributeDefinition) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | __v | number? | yes | The version number of the attribute. | + | _id | string? | yes | The unique identifier for the attribute definition. | + | application_id | string? | yes | The application ID. | + | created_at | string? | yes | The creation date of the attribute. | + | customer_editable | boolean? | yes | Whether the attribute is customer-editable. | + | description | string? | yes | The description of the attribute. | + | encrypted | boolean? | yes | Whether the attribute is encrypted. | + | is_locked | boolean? | yes | Whether the attribute is locked. | + | modified_at | string? | yes | The modification date of the attribute. | + | multi_value | boolean? | yes | Whether the attribute supports multiple values. | + | name | string? | yes | The attribute name. | + | pin_order | number? | yes | The order in which the attribute is pinned. | + | pinned | boolean? | yes | Whether the attribute is pinned. | + | slug | string? | yes | The attribute key. | + | type | string? | yes | The attribute type. | + | validations | [string]? | yes | | + + +--- + +#### [UserAttributeDefinitionResponse](#UserAttributeDefinitionResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | The unique identifier for the attribute definition. | + | application_id | string? | yes | The application ID. | + | created_at | string? | yes | The creation date of the attribute definition. | + | created_by | string? | yes | The user who created the attribute. | + | customer_editable | boolean? | yes | Whether the attribute is customer-editable. | + | description | string? | yes | The description of the attribute. | + | encrypted | boolean? | yes | Whether the attribute is encrypted. | + | is_locked | boolean? | yes | Whether the attribute is locked. | + | modified_at | string? | yes | The last modification date of the attribute definition. | + | multi_value | boolean? | yes | Whether the attribute supports multiple values. | + | name | string? | yes | The attribute name. | + | pin_order | number? | yes | The order in which the attribute is pinned. | + | pinned | boolean? | yes | Whether the attribute is pinned. | + | slug | string? | yes | The attribute key. | + | type | string? | yes | The attribute type. | + | updated_by | string? | yes | The user who last updated the attribute. | + | validations | [[UserAttributeDefinitionValidation](#UserAttributeDefinitionValidation)]? | yes | | + + +--- + +#### [UserAttributeDefinitionValidation](#UserAttributeDefinitionValidation) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | type | string? | yes | The type of validation. | + | value | any? | yes | The validation value. | + + +--- + +#### [UserAttributeResponse](#UserAttributeResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | The unique identifier for the attribute definition. | + | application_id | string? | yes | The application ID. | + | attribute | string? | yes | | + | customer_overriden | boolean? | yes | Whether the attribute is customer-editable. | + | name | string? | yes | The name of user attribute definition. | + | type | string? | yes | The attribute type. | + | updated_by | string? | yes | | + | user_id | string? | yes | The unique identifier for the user. | + + --- #### [UserEmails](#UserEmails) @@ -2065,12 +2853,16 @@ Success. returns updated User Group. `UserGroupResponseSchema` for more details. | __v | number? | yes | | | _id | string? | yes | | | application_id | string? | yes | | + | conditions | [[Conditions](#Conditions)]? | yes | | | created_at | string? | yes | | | description | string? | yes | | + | error | [UserResponseErrorSchema](#UserResponseErrorSchema)? | yes | | | file_url | string? | yes | | + | is_active | boolean? | yes | | | modified_at | string? | yes | | | name | string? | yes | | | status | string? | yes | | + | type | string? | yes | | | uid | number? | yes | | @@ -2099,6 +2891,16 @@ Success. returns updated User Group. `UserGroupResponseSchema` for more details. | verified | boolean? | yes | | +--- + +#### [UserResponseErrorSchema](#UserResponseErrorSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | count | number? | yes | | + | file_url | string? | yes | | + + --- #### [UserSchema](#UserSchema) diff --git a/documentation/platform/WEBHOOK.md b/documentation/platform/WEBHOOK.md index a4fd0f065..8e250ea28 100644 --- a/documentation/platform/WEBHOOK.md +++ b/documentation/platform/WEBHOOK.md @@ -37,7 +37,7 @@ Default ### cancelJobByName -Cancel a report export +Cancel a report export. @@ -55,12 +55,13 @@ const data = await platformClient.webhook.cancelJobByName({ filename : value }) | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| filename | string | yes | Filename of the specific report export to cancel. | +| filename | string | yes | | Cancel the export of a specific report for a company. + *Returned Response:* @@ -74,15 +75,23 @@ Report export canceled successfully.
-  Example: +  Examples: + + +
+  success ```json { - "code": 200 + "value": { + "code": 200 + } } ```
+
+ @@ -95,7 +104,7 @@ Report export canceled successfully. ### downloadDeliveryReport -Download processed events report for a company +Download processed events report for a company. @@ -118,12 +127,13 @@ const data = await platformClient.webhook.downloadDeliveryReport({ body : value Download reports for a specific company based on the provided filters. + *Returned Response:* -[Object](#Object) +[DownloadReportResponse](#DownloadReportResponse) Successfully downloaded the report. @@ -131,13 +141,23 @@ Successfully downloaded the report.
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "file_name": "exportJMehD_1689675047609" + } +} ```
+
+ @@ -150,7 +170,7 @@ Successfully downloaded the report. ### fetchAllEventConfigurations - +Get All Webhook Events. @@ -167,16 +187,17 @@ const data = await platformClient.webhook.fetchAllEventConfigurations(); -Get All Webhook Events +To fetch all webhook events. + *Returned Response:* -[EventConfigResponse](#EventConfigResponse) +[Object](#Object) -Success +Successfully received ping for the provided webhook url. @@ -186,7 +207,7 @@ Success
-  default +  success ```json { @@ -200,7 +221,7 @@ Success "version": "1", "display_name": "article", "description": "This event gets triggered when an article is created", - "event_schema": {}, + "event_schema": null, "created_on": "2021-12-20T17:38:22.922Z", "updated_on": "2023-07-26T12:30:30.930Z" } @@ -224,7 +245,7 @@ Success ### getDeliveryReports -Get processed events report for a company +Get processed events report for a company. @@ -247,6 +268,7 @@ const data = await platformClient.webhook.getDeliveryReports({ body : value }); Retrieve a list of processed events for a specific company based on the provided filters. + *Returned Response:* @@ -260,13 +282,38 @@ Successfully retrieved the processed events report.
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": { + "rows": [ + { + "event_name": "article.create.v1.application", + "response_code": 404, + "response_message": "Not Found", + "data": "{}", + "attempt": 3, + "last_attempted_on": 1696835661617, + "status": "FAILED", + "name": "sub23", + "webhook_url": "https://webhook.site/512b843c-4a3b-4263-9acf-6fc9ad50c042", + "response_time": "20000,", + "message_id": "tYYGTlhqxW7byvmDEIqTXOMmGoF8O5zAZ87IT3TV8DA=", + "event_trace_id": "[\"wildrider.c6a8c2b0-659f-11ee-b7f8-ba52e867b4c8\"]" + } + ] + } +} ```
+
+ @@ -297,7 +344,7 @@ const data = await platformClient.webhook.getEventCounts({ body : value }); | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [EventProcessRequest](#EventProcessRequest) | yes | Request body | +| body | [RetryEventRequest](#RetryEventRequest) | yes | Request body | Retrieves the count of failed events for a specific company within the specified date range. The user can filter the count based on specific event types if provided. @@ -308,9 +355,9 @@ Retrieves the count of failed events for a specific company within the specified -[FailedEventsCountSuccessResponse](#FailedEventsCountSuccessResponse) +[RetryCountResponse](#RetryCountResponse) -Successful response with the count of failed events. +Initiates a manual retry for event processing for a specific company. This endpoint allows the user to specify the date range (start_date and end_date) within which the events should be retried. @@ -320,7 +367,7 @@ Successful response with the count of failed events.
-  default +  success ```json { @@ -328,7 +375,7 @@ Successful response with the count of failed events. "items": [ { "status": "FAILED", - "count": 2297 + "count": 10 } ] } @@ -350,7 +397,7 @@ Successful response with the count of failed events. ### getHistoricalReports -Get report download history +Get report download history. @@ -373,6 +420,7 @@ const data = await platformClient.webhook.getHistoricalReports({ body : value } Retrieve history reports for a specific company based on the provided filters. + *Returned Response:* @@ -380,19 +428,57 @@ Retrieve history reports for a specific company based on the provided filters. [HistoryResponse](#HistoryResponse) -Successfully retrieved the history reports. +It will give list of all the reports that was downloaded.
-  Example: +  Examples: -```json +
+  success + +```json +{ + "value": [ + { + "id": 25, + "association": { + "company_id": 24 + }, + "filters": { + "status": "FAILED", + "end_date": "2023-07-18T09:38:07.000Z", + "start_date": "2023-07-17T09:38:07.000Z", + "subscribers": [ + 40 + ] + }, + "filename": "exportJMehD_1689675047609", + "status": "COMPLETED", + "upload_service_response": { + "cdn": { + "urls": [ + { + "url": "https://storage.googleapis.com/fynd-data-platform-fynd-x0/fp-analytics-query-result/exportJMehD_1689675047609/000000000000.csv.gz?GoogleAccessId=dms-to-bq%40fynd-1088.iam.gserviceaccount.com&Expires=1692267060&Signature=aPhTRMOJswVhx5jTYF7JV42aPQKJ4Mkzv9vJr8zqrbpso00GytuhmBnpP1Gxt%2BoTnIINyWUWAuchlm6paS9yKFrjCXemsqSM0hqTA8T0MUjng3swZAtZuWK4dVK2jMyOv88l1Xn8tkrwOFo7ohG3scFwgjplrU%2FkMUNZqxw4fdgdUUXZ%2BJrnGC5jlGkz5PTooRtForUXtTkA8Kf9mJvX3F6f6p5I2VvhzmXHGMabavEjgZ56JUe2%2B0o5POs4jN0s%2F6fZGOz4hhLa9hMIyQpjoodbcGO%2BRCKukxRbY1s00%2F1WNGLLYYuU4bvqtME60rCnj0FHEmbte4Tr73SmOU4xwg%3D%3D", + "name": "000000000000.csv.gz" + } + ] + } + }, + "created_on": "2023-07-18T10:10:49.189Z", + "updated_on": "2023-07-18T10:10:50.798Z", + "message": "Completed in less than 1 min" + } + ] +} ```
+
+ @@ -442,7 +528,7 @@ Successful response with the retry status.
-  default +  success ```json { @@ -470,7 +556,7 @@ Successful response with the retry status. ### getReportFilters -Get filters for a company +Get filters for a company. @@ -493,12 +579,13 @@ const data = await platformClient.webhook.getReportFilters({ body : value }); Retrieve filters for a specific company based on the provided subscriber IDs. + *Returned Response:* -[ReportFilterResponse](#ReportFilterResponse) +[Array](#Array) Successfully retrieved the filters. @@ -510,7 +597,7 @@ Successfully retrieved the filters.
-  default +  success ```json { @@ -526,41 +613,6 @@ Successfully retrieved the filters. "event_category": "company", "version": "1" } - }, - { - "text": "article.delete-v1 (company)", - "value": { - "event_name": "article", - "event_type": "delete", - "event_category": "company", - "version": "1" - } - }, - { - "text": "article.update-v1 (company)", - "value": { - "event_name": "article", - "event_type": "update", - "event_category": "company", - "version": "1" - } - } - ] - }, - { - "filter_name": "Subscriber Name", - "values": [ - { - "text": "3AugWebhook", - "value": 93 - }, - { - "text": "Alda.Kuhn", - "value": 51 - }, - { - "text": "Alfred.Crona69", - "value": 59 } ] } @@ -624,16 +676,16 @@ Success
-  default +  success ```json { "value": { - "id": 35, - "name": "Deepa webhook", + "id": 1, + "name": "praveen's webhook", "webhook_url": "https://webhook.site/67493d35-6468-4c0a-8226-9a50954eb4c3", "association": { - "company_id": 2, + "company_id": 1, "application_id": [], "criteria": "EMPTY" }, @@ -644,7 +696,7 @@ Success "type": null, "created_on": "2023-06-07T06:57:24.567Z", "updated_on": "2023-06-07T06:57:24.567Z", - "modified_by": null, + "modified_by": "praveen", "event_configs": [ { "id": 10, @@ -654,321 +706,11 @@ Success "version": "1", "display_name": "article", "description": "This event gets triggered when article is created", - "event_schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "payload" - ], - "properties": { - "payload": { - "type": "object", - "required": [ - "articles" - ], - "properties": { - "articles": { - "type": "array", - "items": { - "type": "object", - "required": [ - "uid", - "item_id", - "fynd_item_code", - "store", - "brand", - "company", - "size", - "identifier", - "seller_identifier", - "price", - "total_quantity", - "dimension", - "weight", - "manufacturer", - "country_of_origin" - ], - "properties": { - "id": { - "type": "string" - }, - "uid": { - "type": "string" - }, - "size": { - "type": "string" - }, - "brand": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer" - } - } - }, - "price": { - "type": "object", - "required": [ - "transfer", - "effective", - "marked", - "currency" - ], - "properties": { - "marked": { - "type": "number" - }, - "currency": { - "type": "string" - }, - "transfer": { - "type": "number" - }, - "effective": { - "type": "number" - } - } - }, - "stage": { - "type": "string" - }, - "store": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer" - } - } - }, - "is_set": { - "type": "boolean" - }, - "weight": { - "type": "object", - "required": [ - "unit", - "shipping" - ], - "properties": { - "unit": { - "type": "string" - }, - "shipping": { - "type": "integer" - }, - "is_default": { - "type": "string" - } - } - }, - "company": { - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "type": "integer" - } - } - }, - "item_id": { - "type": "integer" - }, - "date_meta": { - "type": "object", - "required": [ - "created_on", - "modified_on" - ], - "properties": { - "created_on": { - "type": "string" - }, - "modified_on": { - "type": "string" - }, - "added_on_store": { - "type": "string" - }, - "inventory_updated_on": { - "type": "string" - } - } - }, - "dimension": { - "type": "object", - "required": [ - "unit", - "height", - "width", - "length" - ], - "properties": { - "unit": { - "type": "string" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - }, - "length": { - "type": "integer" - } - } - }, - "is_active": { - "type": "boolean" - }, - "identifier": { - "type": "object" - }, - "quantities": { - "type": "object", - "required": [ - "sellable" - ], - "properties": { - "damaged": { - "type": [ - "object", - "null" - ], - "required": [ - "count", - "updated_at" - ], - "properties": { - "count": { - "type": "integer" - }, - "updated_at": { - "type": "string" - } - } - }, - "sellable": { - "type": "object", - "required": [ - "count", - "updated_at" - ], - "properties": { - "count": { - "type": "integer" - }, - "updated_at": { - "type": "string" - } - } - }, - "not_available": { - "type": [ - "object", - "null" - ], - "required": [ - "count", - "updated_at" - ], - "properties": { - "count": { - "type": "integer" - }, - "updated_at": { - "type": "string" - } - } - } - } - }, - "_custom_json": { - "type": "object" - }, - "manufacturer": { - "type": "object", - "required": [ - "name", - "address" - ], - "properties": { - "name": { - "type": "string" - }, - "address": { - "type": "string" - } - } - }, - "return_config": { - "type": "object", - "required": [ - "returnable" - ], - "properties": { - "time": { - "type": "integer" - }, - "unit": { - "enum": [ - "days", - "hours" - ], - "type": "string" - }, - "returnable": { - "type": "boolean" - } - } - }, - "fynd_item_code": { - "type": "string" - }, - "tax_identifier": { - "type": "object" - }, - "total_quantity": { - "type": "integer" - }, - "expiration_date": { - "type": "string" - }, - "track_inventory": { - "type": "boolean" - }, - "country_of_origin": { - "type": "string" - }, - "fynd_article_code": { - "type": "string" - }, - "seller_identifier": { - "type": "string" - } - } - } - } - } - } - } - } - } - }, + "type": null, + "event_schema": {}, "created_on": "2021-07-05T11:16:18.175Z", "updated_on": "2023-01-02T05:04:24.492Z", + "modified_by": "praveen", "subscriber_event_mapping": { "id": 77, "event_id": 10, @@ -996,7 +738,7 @@ Success ### getSubscribersByCompany -Get Subscribers By Company ID +Get Subscribers By CompanyId. @@ -1024,16 +766,17 @@ const data = await platformClient.webhook.getSubscribersByCompany({ pageNo : va -Get Subscribers By CompanyId +Get Subscribers By Company ID. + *Returned Response:* -[SubscriberResponse](#SubscriberResponse) +[SubscriberConfigList](#SubscriberConfigList) -Success +Subscribers By Company ID. @@ -1043,7 +786,7 @@ Success
-  default +  success ```json { @@ -1149,7 +892,7 @@ const data = await platformClient.webhook.getSubscribersByExtensionId({ extensi | --------- | ----- | -------- | ----------- | | pageNo | number | no | Page Number | | pageSize | number | no | Page Size | -| extensionId | string | yes | extension id | +| extensionId | string | yes | extension_id | @@ -1172,7 +915,7 @@ Success
-  default +  success ```json { @@ -1208,7 +951,7 @@ Success "version": "1", "display_name": "shipment", "description": "This event gets triggered when shipment is update", - "event_schema": null, + "event_schema": {}, "created_on": "2021-07-02T13:25:34.804Z", "updated_on": "2021-07-02T13:25:34.804Z", "subscriber_event_mapping": { @@ -1273,7 +1016,7 @@ Cancels the active manual retry for a specific company's failed events. If a man -[EventSuccessResponse](#EventSuccessResponse) +[string](#string) Manual retry cancelled successfully. @@ -1281,13 +1024,21 @@ Manual retry cancelled successfully.
-  Example: +  Examples: + + +
+  success ```json -"Events cancelled successfully" +{ + "value": "Events cancelled successfully" +} ```
+
+ @@ -1318,7 +1069,7 @@ const data = await platformClient.webhook.manualRetryOfFailedEvent({ body : val | Argument | Type | Required | Description | | --------- | ----- | -------- | ----------- | -| body | [EventProcessRequest](#EventProcessRequest) | yes | Request body | +| body | [RetryEventRequest](#RetryEventRequest) | yes | Request body | Initiates a manual retry for event processing for a specific company. This endpoint allows the user to specify the date range (start_date and end_date) within which the events should be retried. @@ -1329,21 +1080,31 @@ Initiates a manual retry for event processing for a specific company. This endpo -[EventProcessedSuccessResponse](#EventProcessedSuccessResponse) +[RetrySuccessResponse](#RetrySuccessResponse) + +Initiates a manual retry for event processing for a specific company. This endpoint allows the user to specify the date range (start_date and end_date) within which the events should be retried. + -Manual Retry Processed Started Successfully +
+  Examples:
-  Example: +  success ```json -"Manual Retry Processed Started Successfully" +{ + "value": { + "message": "Manual Retry Processed Started Successfully" + } +} ```
+
+ @@ -1356,7 +1117,7 @@ Manual Retry Processed Started Successfully ### pingWebhook -Ping and validate webhook url +Ping and validate webhook url. @@ -1377,7 +1138,8 @@ const data = await platformClient.webhook.pingWebhook({ body : value }); | body | [PingWebhook](#PingWebhook) | yes | Request body | -Ping and validate webhook url +Ping and validate webhook url. + *Returned Response:* @@ -1386,7 +1148,7 @@ Ping and validate webhook url [PingWebhookResponse](#PingWebhookResponse) -Successfully retrieved the processed events report. +Successfully received ping for the provided webhook url. @@ -1396,13 +1158,13 @@ Successfully retrieved the processed events report.
-  default +  success ```json { "value": { - "status": "SUCCESS", - "message": "", + "status": "FAILED", + "message": "Request failed with status code 429", "code": 200 } } @@ -1423,7 +1185,7 @@ Successfully retrieved the processed events report. ### registerSubscriberToEvent -Register Subscriber +Register Subscriber. @@ -1444,14 +1206,15 @@ const data = await platformClient.webhook.registerSubscriberToEvent({ body : va | body | [SubscriberConfig](#SubscriberConfig) | yes | Request body | -Register Subscriber +Register Subscriber. + *Returned Response:* -[SubscriberConfig](#SubscriberConfig) +[SubscriberConfigResponse](#SubscriberConfigResponse) Success @@ -1463,16 +1226,16 @@ Success
-  default +  success ```json { "value": { - "id": 35, "name": "xyz webhook", "webhook_url": "https://xyz.requestcatcher.com/test", "association": { - "company_id": 2, + "company_id": 1, + "extension_id": "64affd97cbddb85348ca8f93", "application_id": [ "63a0490757475baff6154585", "63a42b512df5d4731c5eb601" @@ -1534,7 +1297,7 @@ Update Subscriber -[SubscriberConfig](#SubscriberConfig) +[SubscriberConfigResponse](#SubscriberConfigResponse) Success @@ -1546,7 +1309,7 @@ Success
-  default +  success ```json { @@ -1605,39 +1368,50 @@ Success --- -#### [AssociationDetails](#AssociationDetails) +#### [AuthMeta](#AuthMeta) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | company_id | number? | yes | | + | secret | string? | yes | | + | type | string? | yes | | --- -#### [AuthMeta](#AuthMeta) +#### [CancelResponse](#CancelResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | secret | string? | yes | | - | type | string? | yes | | + | message | string? | yes | The HTTP status code of the response (e.g., 200). | --- -#### [CancelResponse](#CancelResponse) +#### [CdnObject](#CdnObject) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | code | number? | yes | The HTTP status code of the response (e.g., 200). | + | urls | [[Url](#Url)]? | yes | | --- -#### [CdnObject](#CdnObject) +#### [DownloadReportResponse](#DownloadReportResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | urls | [[Url](#Url)]? | yes | | + | file_name | string? | yes | | + + +--- + +#### [Err](#Err) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | location | string? | yes | | + | msg | string? | yes | | + | param | string? | yes | | --- @@ -1683,27 +1457,35 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | event_configs | [[EventConfig](#EventConfig)]? | yes | | - - ---- - -#### [EventCountItem](#EventCountItem) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | count | number? | yes | The count of events with the specified status | - | status | string? | yes | The status of the event (e.g., "FAILED"). | + | created_on | string? | yes | | + | description | string? | yes | | + | display_name | string? | yes | | + | event_category | string? | yes | | + | event_name | string? | yes | | + | event_schema | string? | yes | | + | event_type | string? | yes | | + | id | number? | yes | | + | updated_on | string? | yes | | + | version | string? | yes | | --- -#### [EventProcessedSuccessResponse](#EventProcessedSuccessResponse) +#### [EventConfigs](#EventConfigs) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | string? | yes | | - | success | boolean? | yes | | + | created_on | string? | yes | | + | description | string? | yes | | + | display_name | string? | yes | | + | event_category | string? | yes | | + | event_name | string? | yes | | + | event_schema | string? | yes | | + | event_type | string? | yes | | + | id | number? | yes | | + | subscriber_event_mapping | [SubscriberEventMapping](#SubscriberEventMapping)? | yes | | + | updated_on | string? | yes | | + | version | string? | yes | | --- @@ -1715,7 +1497,9 @@ Success | attempt | number? | yes | The attempt number of the event. | | data | string? | yes | The data associated with the event. | | event_name | string? | yes | The name of the processed event. | + | event_trace_id | string? | yes | | | last_attempted_on | number? | yes | The timestamp of the last attempted event. | + | message_id | string? | yes | | | name | string? | yes | The name of the event. | | response_code | number? | yes | The response code of the event. | | response_message | string? | yes | The response message of the event. | @@ -1744,46 +1528,18 @@ Success | event | [[Event](#Event)]? | yes | | | search_text | string? | yes | | | start_date | string? | yes | | + | status | string? | yes | | | subscriber_ids | [number]? | yes | | --- -#### [EventSuccessResponse](#EventSuccessResponse) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | message | string? | yes | | - | success | boolean? | yes | | - - ---- - -#### [FailedEventsCountSuccessResponse](#FailedEventsCountSuccessResponse) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | items | [[EventCountItem](#EventCountItem)]? | yes | | - - ---- - -#### [FilterResponseObject](#FilterResponseObject) - - | Properties | Type | Nullable | Description | - | ---------- | ---- | -------- | ----------- | - | filter_name | string? | yes | The name of the filter. | - | values | [[FilterValues](#FilterValues)]? | yes | | - - ---- - -#### [FilterValues](#FilterValues) +#### [HistoryAssociation](#HistoryAssociation) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | text | string? | yes | The display text for the filter value. | - | value | string? | yes | The value associated with the filter value. | + | company_id | number? | yes | | + | subscriber_ids | [number]? | yes | | --- @@ -1793,6 +1549,8 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | | end_date | string? | yes | The end date and time of the history report. | + | events | [string]? | yes | | + | search_text | string? | yes | | | start_date | string? | yes | The start date and time of the history report. | | status | string? | yes | The status of the history report (e.g., "FAILED"). | | subscribers | [number]? | yes | An array of subscriber IDs associated with the history report. | @@ -1800,52 +1558,50 @@ Success --- -#### [HistoryPayload](#HistoryPayload) +#### [HistoryItems](#HistoryItems) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | page_no | number? | yes | The page number of the history report. | - | page_size | number? | yes | The number of records per page. | - | type | string? | yes | The type of history report (e.g., "platform"). | + | association | [HistoryAssociation](#HistoryAssociation)? | yes | | + | created_on | string? | yes | The date and time when the history report was created. | + | filename | string? | yes | The filename of the history report. | + | filters | [HistoryFilters](#HistoryFilters)? | yes | | + | id | number? | yes | The ID of the history report. | + | message | string? | yes | A message related to the history report. | + | status | string? | yes | The status of the history report (e.g., "COMPLETED"). | + | updated_on | string? | yes | The date and time when the history report was last updated. | + | upload_service_response | [UploadServiceObject](#UploadServiceObject)? | yes | | --- -#### [HistoryResponse](#HistoryResponse) +#### [HistoryPayload](#HistoryPayload) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[HistoryResponseObject](#HistoryResponseObject)]? | yes | | + | page_no | number? | yes | The page number of the history report. | + | page_size | number? | yes | The number of records per page. | + | type | string? | yes | The type of history report (e.g., "platform"). | --- -#### [HistoryResponseObject](#HistoryResponseObject) +#### [HistoryResponse](#HistoryResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | association | [AssociationDetails](#AssociationDetails)? | yes | | - | created_on | string? | yes | The date and time when the history report was created. | - | filename | string? | yes | The filename of the history report. | - | filters | [HistoryFilters](#HistoryFilters)? | yes | | - | id | number? | yes | The ID of the history report. | - | message | string? | yes | A message related to the history report. | - | status | string? | yes | The status of the history report (e.g., "COMPLETED"). | - | updated_on | string? | yes | The date and time when the history report was last updated. | - | upload_service_response | [UploadServiceObject](#UploadServiceObject)? | yes | | + | items | [[HistoryItems](#HistoryItems)]? | yes | | + | page | [Page](#Page)? | yes | | --- -#### [ManualRetryFailedResponse](#ManualRetryFailedResponse) +#### [Item](#Item) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | message | string? | yes | | - | meta | string? | yes | | - | request_id | string? | yes | | - | stack_trace | string? | yes | | - | success | boolean? | yes | | + | count | number? | yes | | + | status | string? | yes | | --- @@ -1859,6 +1615,7 @@ Success | has_previous | boolean? | yes | Indicates if there is a previous page. | | item_total | number? | yes | The total number of items. | | size | number? | yes | The number of items per page. | + | total_page | number? | yes | | | type | string? | yes | Type of the response (e.g., "number"). | @@ -1890,7 +1647,8 @@ Success | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | items | [[FilterResponseObject](#FilterResponseObject)]? | yes | | + | filter_name | string? | yes | The name of the filter. | + | values | [string]? | yes | | --- @@ -1902,6 +1660,38 @@ Success | subscriber_ids | [number]? | yes | An array of subscriber IDs for filtering filters (optional). | +--- + +#### [RetryCountResponse](#RetryCountResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[Item](#Item)]? | yes | | + + +--- + +#### [RetryEventRequest](#RetryEventRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | end_date | string? | yes | | + | event | [[Event](#Event)]? | yes | | + | search_text | string? | yes | | + | start_date | string? | yes | | + | status | string? | yes | | + | subscriber_ids | [number]? | yes | | + + +--- + +#### [RetryFailureResponse](#RetryFailureResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | err | [[Err](#Err)]? | yes | | + + --- #### [RetryStatusResponse](#RetryStatusResponse) @@ -1914,6 +1704,16 @@ Success | total_event | number? | yes | The total number of events that require retry. | +--- + +#### [RetrySuccessResponse](#RetrySuccessResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + | success | boolean? | yes | | + + --- #### [SubscriberConfig](#SubscriberConfig) @@ -1927,7 +1727,7 @@ Success | event_id | [number]? | yes | | | id | number? | yes | | | name | string? | yes | | - | status | [SubscriberStatus](#SubscriberStatus)? | yes | | + | status | string? | yes | | | webhook_url | string? | yes | | @@ -1943,7 +1743,7 @@ Success --- -#### [SubscriberResponse](#SubscriberResponse) +#### [SubscriberConfigResponse](#SubscriberConfigResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | @@ -1952,57 +1752,81 @@ Success | created_on | string? | yes | | | custom_headers | string? | yes | | | email_id | string? | yes | | - | event_configs | [[EventConfig](#EventConfig)]? | yes | | + | event_id | [number]? | yes | | | id | number? | yes | | + | modified_by | string? | yes | | | name | string? | yes | | - | status | [SubscriberStatus](#SubscriberStatus)? | yes | | + | status | string? | yes | | + | type | string? | yes | | | updated_on | string? | yes | | | webhook_url | string? | yes | | --- -#### [UploadServiceObject](#UploadServiceObject) +#### [SubscriberEventMapping](#SubscriberEventMapping) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | cdn | [CdnObject](#CdnObject)? | yes | | + | created_on | string? | yes | | + | event_id | number? | yes | | + | id | number? | yes | | + | subscriber_id | number? | yes | | --- -#### [Url](#Url) +#### [SubscriberFailureResponse](#SubscriberFailureResponse) | Properties | Type | Nullable | Description | | ---------- | ---- | -------- | ----------- | - | name | string? | yes | The name of the uploaded report file. | - | url | string? | yes | The URL of the uploaded report file. | + | code | string? | yes | | + | message | string? | yes | | + | stack | string? | yes | | --- +#### [SubscriberResponse](#SubscriberResponse) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | association | [Association](#Association)? | yes | | + | auth_meta | [AuthMeta](#AuthMeta)? | yes | | + | created_on | string? | yes | | + | custom_headers | string? | yes | | + | email_id | string? | yes | | + | event_configs | [[EventConfigs](#EventConfigs)]? | yes | | + | id | number? | yes | | + | modified_by | string? | yes | | + | name | string? | yes | | + | status | string? | yes | | + | type | string? | yes | | + | updated_on | string? | yes | | + | webhook_url | string? | yes | | + +--- -### Enums - - +#### [UploadServiceObject](#UploadServiceObject) + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | cdn | [CdnObject](#CdnObject)? | yes | | + +--- - #### [SubscriberStatus](#SubscriberStatus) - Type : string +#### [Url](#Url) - | Name | Value | Description | - | ---- | ----- | ----------- | - | active | active | Status is active | - | inactive | inactive | Status is inactive | - | blocked | blocked | Subscriber is blocked by system due to multiple failed delivery attempts. | + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | name | string? | yes | The name of the uploaded report file. | + | url | string? | yes | The URL of the uploaded report file. | + --- - - diff --git a/documentation/public/BILLING.md b/documentation/public/BILLING.md new file mode 100644 index 000000000..3b498d044 --- /dev/null +++ b/documentation/public/BILLING.md @@ -0,0 +1,146 @@ + + + + + +##### [Back to Public docs](./README.md) + +## Billing Methods +Handle public plans + + +Default +* [getStandardPlans](#getstandardplans) + + + + +## Methods with example and description + + + + + +### getStandardPlans +Get Standard/Public Plans + + + +```javascript +// Promise +const promise = publicClient.billing.getStandardPlans({ platformType : value }); + +// Async/Await +const data = await publicClient.billing.getStandardPlans({ platformType : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| platformType | string | yes | The type of platform for which plans are requested. | + + + +Get Standard/Public Plans. + + +*Returned Response:* + + + + +[DetailList](#DetailList) + +Success + + + + +
+  Example: + +```json + +``` +
+ + + + + + + + + +--- + + + + +### Schemas + + +#### [DetailList](#DetailList) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | component_groups | [string]? | yes | | + | plans | [[Plan](#Plan)]? | yes | | + | trial_plan | [Plan](#Plan)? | yes | | + + +--- + +#### [InternalServerError](#InternalServerError) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | code | string? | yes | Error code | + | message | string? | yes | Internal server Server error | + + +--- + +#### [Plan](#Plan) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | _id | string? | yes | | + | addons | [string]? | yes | | + | amount | number? | yes | | + | country | string? | yes | | + | created_at | string? | yes | | + | currency | string? | yes | | + | description | string? | yes | | + | is_active | boolean? | yes | | + | is_trial_plan | boolean? | yes | | + | is_visible | boolean? | yes | | + | modified_at | string? | yes | | + | name | string? | yes | | + | plan_group | string? | yes | | + | product_suite_id | string? | yes | | + | recurring | [PlanRecurring](#PlanRecurring)? | yes | | + | tag_lines | [string]? | yes | | + | tags | [string]? | yes | | + | trial_period | number? | yes | | + | type | string? | yes | | + + +--- + +#### [PlanRecurring](#PlanRecurring) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | interval | string? | yes | | + | interval_count | number? | yes | | + + +--- + + + + diff --git a/documentation/public/CONTENT.md b/documentation/public/CONTENT.md new file mode 100644 index 000000000..8381f8786 --- /dev/null +++ b/documentation/public/CONTENT.md @@ -0,0 +1,141 @@ + + + + + +##### [Back to Public docs](./README.md) + +## Content Methods +Content System + + +Default +* [getCredentialsByEntity](#getcredentialsbyentity) + + + + +## Methods with example and description + + + + + +### getCredentialsByEntity +Get credentials to power chat support systems + + + +```javascript +// Promise +const promise = publicClient.content.getCredentialsByEntity({ entity : value }); + +// Async/Await +const data = await publicClient.content.getCredentialsByEntity({ entity : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| entity | string | no | Server Type | + + + +Get credentials for support system + +*Returned Response:* + + + + +[CredentialsSchema](#CredentialsSchema) + +Success. Refer `CredentialsSchema` for more details. + + + + +
+  Examples: + + +
+  default + +```json +{ + "value": { + "entity_type": "partner", + "type": "freshchat", + "is_enable": true, + "configuration": { + "token": "a3e4gf20b-d11g-4512-n3zq-03b9aa7e1yxz", + "siteId": "a3e8f20b-d97f-452f-bd72-03b9aa7e1bf0", + "host": "https://wchat.freshchat.com" + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + + + +### Schemas + + +#### [ContentAPIError](#ContentAPIError) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | code | string? | yes | | + | exception | string? | yes | | + | info | string? | yes | | + | message | string? | yes | | + | meta | string? | yes | | + | request_id | string? | yes | | + | stack_trace | string? | yes | | + | status | number? | yes | | + + +--- + +#### [CredentialSchema](#CredentialSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | configuration | string? | yes | | + | entity_type | string? | yes | | + | is_enable | boolean? | yes | | + | type | string? | yes | | + + +--- + +#### [CredentialsSchema](#CredentialsSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | items | [[CredentialSchema](#CredentialSchema)]? | yes | | + + +--- + + + + diff --git a/documentation/public/README.md b/documentation/public/README.md index 517ce41e3..dc8c18a73 100644 --- a/documentation/public/README.md +++ b/documentation/public/README.md @@ -3,7 +3,9 @@ # FDK Public Front API Documentaion +* [Billing](BILLING.md) - Handle public plans * [Configuration](CONFIGURATION.md) - Application configuration apis +* [Content](CONTENT.md) - Content System * [Inventory](INVENTORY.md) - Inventory Swoop API's * [Partner](PARTNER.md) - Partner configuration apis * [Webhook](WEBHOOK.md) - Webhook dispatcher with retry and one event to many subscriber vice versa \ No newline at end of file diff --git a/documentation/public/WEBHOOK.md b/documentation/public/WEBHOOK.md index b354d67d9..6263fe7fe 100644 --- a/documentation/public/WEBHOOK.md +++ b/documentation/public/WEBHOOK.md @@ -11,7 +11,10 @@ Webhook dispatcher with retry and one event to many subscriber vice versa Default * [fetchAllWebhookEvents](#fetchallwebhookevents) +* [notifyDepricatedEvent](#notifydepricatedevent) * [queryWebhookEventDetails](#querywebhookeventdetails) +* [testHandlerTransformation](#testhandlertransformation) +* [validateSchema](#validateschema) @@ -55,13 +58,110 @@ Success
-  Example: +  Examples: + + +
+  success ```json +{ + "value": { + "event_configs": [ + { + "id": 1, + "event_name": "article", + "event_type": "create", + "event_category": "application", + "version": "1", + "display_name": "article", + "description": "This event gets triggered when an article is created", + "event_schema": null, + "created_on": "2021-12-20T17:38:22.922Z", + "updated_on": "2023-07-26T12:30:30.930Z" + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### notifyDepricatedEvent +Notifies all the events that are going to depricate + + + +```javascript +// Promise +const promise = publicClient.webhook.notifyDepricatedEvent(); + +// Async/Await +const data = await publicClient.webhook.notifyDepricatedEvent(); +``` + + + + + +Notifies all the events that are subscribed and are going to deprecate or new version is available for those events + +*Returned Response:* + + + + +[EventNotifier](#EventNotifier) + +Success + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "event_configs": [ + { + "id": 1, + "event_name": "article", + "event_type": "create", + "event_category": "application", + "version": "1", + "display_name": "article", + "description": "This event gets triggered when an article is created", + "event_schema": null, + "created_on": "2021-12-20T17:38:22.922Z", + "updated_on": "2023-07-26T12:30:30.930Z" + } + ] + } +} ```
+
+ @@ -110,13 +210,201 @@ Success
-  Example: +  Examples: + + +
+  success ```json +{ + "value": { + "event_configs": [ + { + "id": 1, + "event_name": "article", + "event_type": "create", + "event_category": "application", + "version": "1", + "display_name": "article", + "description": "This event gets triggered when an article is created", + "event_schema": null, + "created_on": "2021-12-20T17:38:22.922Z", + "updated_on": "2023-07-26T12:30:30.930Z" + } + ] + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### testHandlerTransformation +Test transformation of handler + + + +```javascript +// Promise +const promise = publicClient.webhook.testHandlerTransformation({ body : value }); + +// Async/Await +const data = await publicClient.webhook.testHandlerTransformation({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [TransformEventRequest](#TransformEventRequest) | yes | Request body | + + +Test transformation of handler + +*Returned Response:* + + + + +[TransformEventResponse](#TransformEventResponse) + +Success + + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "event_trace_id": [ + "WheelJack.7cfeea2e-720e-11ee-8f26-ca3fc26a3fda" + ], + "data": { + "event": { + "trace_id": [ + "WheelJack.7cfeea2e-720e-11ee-8f26-ca3fc26a3fda" + ], + "name": "location", + "type": "create", + "version": "1", + "created_timestamp": 1698111704725 + }, + "company_id": 6086, + "contains": [ + "location" + ], + "payload": { + "location": { + "_id": "653720d892a8429b6fb9563e", + "created_on": "2023-10-24T01:41:44.450008", + "modified_on": "2023-10-24T01:41:44.450015" + } + } + }, + "event_name": "location", + "version": "1", + "status": false, + "event_type": "create", + "service_meta": { + "name": "WheelJack" + }, + "association": { + "company_id": 6086 + } + } +} +``` +
+ +
+ + + + + + + + + +--- + + +### validateSchema +Validate Schema for an event + + + +```javascript +// Promise +const promise = publicClient.webhook.validateSchema({ body : value }); + +// Async/Await +const data = await publicClient.webhook.validateSchema({ body : value }); +``` + + + + + +| Argument | Type | Required | Description | +| --------- | ----- | -------- | ----------- | +| body | [ValidateSchemaRequest](#ValidateSchemaRequest) | yes | Request body | + + +Validate Schema for an event + +*Returned Response:* + + + + +[ValidateSchemaResponse](#ValidateSchemaResponse) + +Success + + + +
+  Examples: + + +
+  success + +```json +{ + "value": { + "status": true, + "message": "Valid schema for this event" + } +} ```
+
+ @@ -142,8 +430,10 @@ Success | display_name | string? | yes | | | event_category | string? | yes | | | event_name | string? | yes | | + | event_schema | string? | yes | | | event_type | string? | yes | | | id | number? | yes | | + | updated_on | string? | yes | | | version | string? | yes | | @@ -170,6 +460,122 @@ Success --- +#### [EventNotifier](#EventNotifier) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | emails | [string]? | yes | | + | message | string? | yes | | + + +--- + +#### [EventSchema](#EventSchema) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | meta | string? | yes | | + | payload | string? | yes | | + + +--- + +#### [InternalTransformEvent](#InternalTransformEvent) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | created_timestamp | number? | yes | | + | name | string? | yes | | + | trace_id | [string]? | yes | | + | type | string? | yes | | + | version | string? | yes | | + + +--- + +#### [TransformEventAssociation](#TransformEventAssociation) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | company_id | number? | yes | | + + +--- + +#### [TransformEventData](#TransformEventData) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | company_id | number? | yes | | + | contains | [string]? | yes | | + | event | [InternalTransformEvent](#InternalTransformEvent)? | yes | | + | payload | string? | yes | | + + +--- + +#### [TransformEventRequest](#TransformEventRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | event | [EventSchema](#EventSchema)? | yes | | + | event_category | string? | yes | | + | event_name | string? | yes | | + | event_type | string? | yes | | + | event_version | string? | yes | | + + +--- + +#### [TransformEventResponse](#TransformEventResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | association | [TransformEventAssociation](#TransformEventAssociation)? | yes | | + | data | [TransformEventData](#TransformEventData)? | yes | | + | event_name | string? | yes | | + | event_trace_id | [string]? | yes | | + | event_type | string? | yes | | + | service_meta | [TransformEventServiceMeta](#TransformEventServiceMeta)? | yes | | + | status | boolean? | yes | | + | version | string? | yes | | + + +--- + +#### [TransformEventServiceMeta](#TransformEventServiceMeta) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | name | string? | yes | | + + +--- + +#### [ValidateSchemaRequest](#ValidateSchemaRequest) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | event | [EventSchema](#EventSchema)? | yes | | + | event_category | string? | yes | | + | event_name | string? | yes | | + | event_schema | string? | yes | | + | event_type | string? | yes | | + | event_version | string? | yes | | + + +--- + +#### [ValidateSchemaResponse](#ValidateSchemaResponse) + + | Properties | Type | Nullable | Description | + | ---------- | ---- | -------- | ----------- | + | message | string? | yes | | + | status | boolean? | yes | | + + +--- + diff --git a/package-lock.json b/package-lock.json index f2766ff3b..6df5587bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gofynd/fdk-client-javascript", - "version": "1.3.11-beta.7", + "version": "1.3.11-beta.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gofynd/fdk-client-javascript", - "version": "1.3.11-beta.7", + "version": "1.3.11-beta.8", "license": "ISC", "dependencies": { "@gofynd/fp-signature": "^1.0.1", diff --git a/package.json b/package.json index 95d3b0bee..daeb41c5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gofynd/fdk-client-javascript", - "version": "1.3.11-beta.7", + "version": "1.3.11-beta.8", "description": "", "main": "index.js", "scripts": { diff --git a/sdk/application/Cart/CartApplicationClient.d.ts b/sdk/application/Cart/CartApplicationClient.d.ts index 81fce39e5..0e430d7ca 100644 --- a/sdk/application/Cart/CartApplicationClient.d.ts +++ b/sdk/application/Cart/CartApplicationClient.d.ts @@ -185,7 +185,7 @@ declare class Cart { * @summary: Fetch Coupon * @description: Use this API to get a list of available coupons along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCoupons/). */ - getCoupons({ id, buyNow, requestHeaders }?: CartApplicationValidator.GetCouponsParam, { responseHeaders }?: object): Promise; + getCoupons({ id, buyNow, slug, storeId, requestHeaders }?: CartApplicationValidator.GetCouponsParam, { responseHeaders }?: object): Promise; /** * @param {CartApplicationValidator.GetItemCountParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/application/Cart/CartApplicationClient.js b/sdk/application/Cart/CartApplicationClient.js index bd0c3bddc..934bd6270 100644 --- a/sdk/application/Cart/CartApplicationClient.js +++ b/sdk/application/Cart/CartApplicationClient.js @@ -1214,11 +1214,11 @@ class Cart { * @description: Use this API to get a list of available coupons along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/cart/getCoupons/). */ async getCoupons( - { id, buyNow, requestHeaders } = { requestHeaders: {} }, + { id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = CartApplicationValidator.getCoupons().validate( - { id, buyNow }, + { id, buyNow, slug, storeId }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -1227,7 +1227,7 @@ class Cart { // Showing warrnings if extra unknown parameters are found const { error: warrning } = CartApplicationValidator.getCoupons().validate( - { id, buyNow }, + { id, buyNow, slug, storeId }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -1240,6 +1240,8 @@ class Cart { const query_params = {}; query_params["id"] = id; query_params["buy_now"] = buyNow; + query_params["slug"] = slug; + query_params["store_id"] = storeId; const xHeaders = {}; diff --git a/sdk/application/Cart/CartApplicationModel.d.ts b/sdk/application/Cart/CartApplicationModel.d.ts index d8cb04acf..f0511d313 100644 --- a/sdk/application/Cart/CartApplicationModel.d.ts +++ b/sdk/application/Cart/CartApplicationModel.d.ts @@ -32,6 +32,7 @@ export = CartApplicationModel; * @property {string[]} [product_group_tags] * @property {number} [quantity] * @property {number} [seller_id] + * @property {string} [seller_identifier] - Add items using seller identifier for store os * @property {number} [store_id] */ /** @@ -59,7 +60,9 @@ export = CartApplicationModel; * @property {Object} [meta] * @property {string} [name] * @property {string} [phone] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] - State code for international address * @property {string[]} [tags] * @property {string} [user_id] */ @@ -303,6 +306,7 @@ export = CartApplicationModel; * @property {ProductArticle} [article] * @property {ProductAvailability} [availability] * @property {Object} [bulk_offer] + * @property {Charges[]} [charges] * @property {CouponDetails} [coupon] * @property {string} [coupon_message] * @property {Object} [custom_order] @@ -349,6 +353,22 @@ export = CartApplicationModel; * @property {string} [name] * @property {number} [uid] - Product Category Id */ +/** + * @typedef Charges + * @property {boolean} [allow_refund] - This boolean value defines that refund + * is allowed or not for the charge + * @property {ChargesAmount} [amount] + * @property {string} [code] - This is the code of the charge applied + * @property {Object} [meta] - This object contains the meta data realted to + * charges price adjustment + * @property {string} [name] - This is the name of the charge applied + * @property {string} [type] - This is the type of the charge applied + */ +/** + * @typedef ChargesAmount + * @property {string} [currency] - This is destination currency of value + * @property {number} [value] - This is the value of amount added + */ /** * @typedef ChargesThreshold * @property {number} [charges] @@ -388,16 +408,20 @@ export = CartApplicationModel; */ /** * @typedef Coupon + * @property {number} [coupon_amount] - The amount based on cart value + * @property {string} [coupon_applicable_message] * @property {string} [coupon_code] * @property {string} [coupon_type] * @property {number} [coupon_value] * @property {string} [description] + * @property {string} [end_date] * @property {string} [expires_on] * @property {boolean} [is_applicable] * @property {boolean} [is_applied] * @property {number} [max_discount_value] * @property {string} [message] * @property {number} [minimum_cart_value] + * @property {string} [start_date] * @property {string} [sub_title] * @property {string} [title] */ @@ -664,6 +688,7 @@ export = CartApplicationModel; * @property {string} [seller_identifier] * @property {string} [size] * @property {StoreInfo} [store] + * @property {string[]} [tags] - A list of article tags * @property {string} [type] * @property {string} [uid] */ @@ -721,6 +746,11 @@ export = CartApplicationModel; * @property {string} [max] * @property {string} [min] */ +/** + * @typedef PromiseISOFormat + * @property {string} [max] - Max promise in ISO format. + * @property {string} [min] - Min Promise in ISO format. + */ /** * @typedef PromiseTimestamp * @property {number} [max] @@ -759,6 +789,7 @@ export = CartApplicationModel; * @property {number} [mrp_total] * @property {number} [subtotal] * @property {number} [total] + * @property {number} [total_charge] * @property {number} [vog] * @property {number} [you_saved] */ @@ -816,6 +847,7 @@ export = CartApplicationModel; /** * @typedef ShipmentPromise * @property {PromiseFormatted} [formatted] + * @property {PromiseISOFormat} [iso] * @property {PromiseTimestamp} [timestamp] */ /** @@ -893,7 +925,7 @@ export = CartApplicationModel; declare class CartApplicationModel { } declare namespace CartApplicationModel { - export { ActionQuery, AddCartDetailResponse, AddCartRequest, AddProductCart, Address, AppliedFreeArticles, AppliedPromotion, ApplyCouponRequest, ArticleGiftDetail, ArticlePriceInfo, BaseInfo, BasePrice, BulkPriceOffer, BulkPriceResponse, BuyRules, CartBreakup, CartCheckoutCustomMeta, CartCheckoutDetailRequest, CartCheckoutDetailV2Request, CartCheckoutResponse, CartCommonConfig, CartCurrency, CartDetailCoupon, CartDetailResponse, CartItemCountResponse, CartMetaMissingResponse, CartMetaRequest, CartMetaResponse, CartProduct, CartProductIdentifer, CartProductInfo, CartShipmentsResponse, CategoryInfo, ChargesThreshold, CheckCart, Coupon, CouponBreakup, CouponDetails, CouponValidity, CurrencyInfo, CustomerDetails, DeleteAddressResponse, DeleteCartDetailResponse, DeliveryChargesConfig, DiscountRulesApp, DisplayBreakup, FreeGiftItem, FreeGiftItems, GeoLocation, GetAddressesResponse, GetCouponResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, GiftDetail, LadderOfferItem, LadderPrice, LadderPriceOffer, LadderPriceOffers, LoyaltyPoints, OfferItem, OfferPrice, OfferSeller, OperationErrorResponse, Ownership, PageCoupon, PaymentCouponValidate, PaymentMeta, PaymentMethod, PaymentSelectionLock, ProductAction, ProductArticle, ProductAvailability, ProductAvailabilitySize, ProductImage, ProductPrice, ProductPriceInfo, ProductPricePerUnit, ProductPricePerUnitInfo, PromiseFormatted, PromiseTimestamp, PromoMeta, PromotionOffer, PromotionOffersResponse, RawBreakup, RewardPointRequest, SaveAddressResponse, SelectCartAddressRequest, SharedCart, SharedCartDetails, SharedCartResponse, ShipmentPromise, ShipmentResponse, StaffCheckout, StoreInfo, Tags, UpdateAddressResponse, UpdateCartDetailResponse, UpdateCartPaymentRequest, UpdateCartRequest, UpdateProductCart }; + export { ActionQuery, AddCartDetailResponse, AddCartRequest, AddProductCart, Address, AppliedFreeArticles, AppliedPromotion, ApplyCouponRequest, ArticleGiftDetail, ArticlePriceInfo, BaseInfo, BasePrice, BulkPriceOffer, BulkPriceResponse, BuyRules, CartBreakup, CartCheckoutCustomMeta, CartCheckoutDetailRequest, CartCheckoutDetailV2Request, CartCheckoutResponse, CartCommonConfig, CartCurrency, CartDetailCoupon, CartDetailResponse, CartItemCountResponse, CartMetaMissingResponse, CartMetaRequest, CartMetaResponse, CartProduct, CartProductIdentifer, CartProductInfo, CartShipmentsResponse, CategoryInfo, Charges, ChargesAmount, ChargesThreshold, CheckCart, Coupon, CouponBreakup, CouponDetails, CouponValidity, CurrencyInfo, CustomerDetails, DeleteAddressResponse, DeleteCartDetailResponse, DeliveryChargesConfig, DiscountRulesApp, DisplayBreakup, FreeGiftItem, FreeGiftItems, GeoLocation, GetAddressesResponse, GetCouponResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, GiftDetail, LadderOfferItem, LadderPrice, LadderPriceOffer, LadderPriceOffers, LoyaltyPoints, OfferItem, OfferPrice, OfferSeller, OperationErrorResponse, Ownership, PageCoupon, PaymentCouponValidate, PaymentMeta, PaymentMethod, PaymentSelectionLock, ProductAction, ProductArticle, ProductAvailability, ProductAvailabilitySize, ProductImage, ProductPrice, ProductPriceInfo, ProductPricePerUnit, ProductPricePerUnitInfo, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, PromoMeta, PromotionOffer, PromotionOffersResponse, RawBreakup, RewardPointRequest, SaveAddressResponse, SelectCartAddressRequest, SharedCart, SharedCartDetails, SharedCartResponse, ShipmentPromise, ShipmentResponse, StaffCheckout, StoreInfo, Tags, UpdateAddressResponse, UpdateCartDetailResponse, UpdateCartPaymentRequest, UpdateCartRequest, UpdateProductCart }; } /** @returns {ActionQuery} */ declare function ActionQuery(): ActionQuery; @@ -941,6 +973,10 @@ type AddProductCart = { product_group_tags?: string[]; quantity?: number; seller_id?: number; + /** + * - Add items using seller identifier for store os + */ + seller_identifier?: string; store_id?: number; }; /** @returns {Address} */ @@ -969,7 +1005,12 @@ type Address = { meta?: any; name?: string; phone?: string; + sector?: string; state?: string; + /** + * - State code for international address + */ + state_code?: string; tags?: string[]; user_id?: string; }; @@ -1320,6 +1361,7 @@ type CartProductInfo = { article?: ProductArticle; availability?: ProductAvailability; bulk_offer?: any; + charges?: Charges[]; coupon?: CouponDetails; coupon_message?: string; custom_order?: any; @@ -1371,6 +1413,45 @@ type CategoryInfo = { */ uid?: number; }; +/** @returns {Charges} */ +declare function Charges(): Charges; +type Charges = { + /** + * - This boolean value defines that refund + * is allowed or not for the charge + */ + allow_refund?: boolean; + amount?: ChargesAmount; + /** + * - This is the code of the charge applied + */ + code?: string; + /** + * - This object contains the meta data realted to + * charges price adjustment + */ + meta?: any; + /** + * - This is the name of the charge applied + */ + name?: string; + /** + * - This is the type of the charge applied + */ + type?: string; +}; +/** @returns {ChargesAmount} */ +declare function ChargesAmount(): ChargesAmount; +type ChargesAmount = { + /** + * - This is destination currency of value + */ + currency?: string; + /** + * - This is the value of amount added + */ + value?: number; +}; /** @returns {ChargesThreshold} */ declare function ChargesThreshold(): ChargesThreshold; type ChargesThreshold = { @@ -1413,16 +1494,23 @@ type CheckCart = { /** @returns {Coupon} */ declare function Coupon(): Coupon; type Coupon = { + /** + * - The amount based on cart value + */ + coupon_amount?: number; + coupon_applicable_message?: string; coupon_code?: string; coupon_type?: string; coupon_value?: number; description?: string; + end_date?: string; expires_on?: string; is_applicable?: boolean; is_applied?: boolean; max_discount_value?: number; message?: string; minimum_cart_value?: number; + start_date?: string; sub_title?: string; title?: string; }; @@ -1883,6 +1971,10 @@ type ProductArticle = { seller_identifier?: string; size?: string; store?: StoreInfo; + /** + * - A list of article tags + */ + tags?: string[]; type?: string; uid?: string; }; @@ -1948,6 +2040,18 @@ type PromiseFormatted = { max?: string; min?: string; }; +/** @returns {PromiseISOFormat} */ +declare function PromiseISOFormat(): PromiseISOFormat; +type PromiseISOFormat = { + /** + * - Max promise in ISO format. + */ + max?: string; + /** + * - Min Promise in ISO format. + */ + min?: string; +}; /** @returns {PromiseTimestamp} */ declare function PromiseTimestamp(): PromiseTimestamp; type PromiseTimestamp = { @@ -2015,6 +2119,7 @@ type RawBreakup = { mrp_total?: number; subtotal?: number; total?: number; + total_charge?: number; vog?: number; you_saved?: number; }; @@ -2091,6 +2196,7 @@ type SharedCartResponse = { declare function ShipmentPromise(): ShipmentPromise; type ShipmentPromise = { formatted?: PromiseFormatted; + iso?: PromiseISOFormat; timestamp?: PromiseTimestamp; }; /** @returns {ShipmentResponse} */ diff --git a/sdk/application/Cart/CartApplicationModel.js b/sdk/application/Cart/CartApplicationModel.js index c19c86b4f..64c6b86e3 100644 --- a/sdk/application/Cart/CartApplicationModel.js +++ b/sdk/application/Cart/CartApplicationModel.js @@ -36,6 +36,7 @@ const Joi = require("joi"); * @property {string[]} [product_group_tags] * @property {number} [quantity] * @property {number} [seller_id] + * @property {string} [seller_identifier] - Add items using seller identifier for store os * @property {number} [store_id] */ @@ -64,7 +65,9 @@ const Joi = require("joi"); * @property {Object} [meta] * @property {string} [name] * @property {string} [phone] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] - State code for international address * @property {string[]} [tags] * @property {string} [user_id] */ @@ -334,6 +337,7 @@ const Joi = require("joi"); * @property {ProductArticle} [article] * @property {ProductAvailability} [availability] * @property {Object} [bulk_offer] + * @property {Charges[]} [charges] * @property {CouponDetails} [coupon] * @property {string} [coupon_message] * @property {Object} [custom_order] @@ -383,6 +387,24 @@ const Joi = require("joi"); * @property {number} [uid] - Product Category Id */ +/** + * @typedef Charges + * @property {boolean} [allow_refund] - This boolean value defines that refund + * is allowed or not for the charge + * @property {ChargesAmount} [amount] + * @property {string} [code] - This is the code of the charge applied + * @property {Object} [meta] - This object contains the meta data realted to + * charges price adjustment + * @property {string} [name] - This is the name of the charge applied + * @property {string} [type] - This is the type of the charge applied + */ + +/** + * @typedef ChargesAmount + * @property {string} [currency] - This is destination currency of value + * @property {number} [value] - This is the value of amount added + */ + /** * @typedef ChargesThreshold * @property {number} [charges] @@ -424,16 +446,20 @@ const Joi = require("joi"); /** * @typedef Coupon + * @property {number} [coupon_amount] - The amount based on cart value + * @property {string} [coupon_applicable_message] * @property {string} [coupon_code] * @property {string} [coupon_type] * @property {number} [coupon_value] * @property {string} [description] + * @property {string} [end_date] * @property {string} [expires_on] * @property {boolean} [is_applicable] * @property {boolean} [is_applied] * @property {number} [max_discount_value] * @property {string} [message] * @property {number} [minimum_cart_value] + * @property {string} [start_date] * @property {string} [sub_title] * @property {string} [title] */ @@ -735,6 +761,7 @@ const Joi = require("joi"); * @property {string} [seller_identifier] * @property {string} [size] * @property {StoreInfo} [store] + * @property {string[]} [tags] - A list of article tags * @property {string} [type] * @property {string} [uid] */ @@ -801,6 +828,12 @@ const Joi = require("joi"); * @property {string} [min] */ +/** + * @typedef PromiseISOFormat + * @property {string} [max] - Max promise in ISO format. + * @property {string} [min] - Min Promise in ISO format. + */ + /** * @typedef PromiseTimestamp * @property {number} [max] @@ -843,6 +876,7 @@ const Joi = require("joi"); * @property {number} [mrp_total] * @property {number} [subtotal] * @property {number} [total] + * @property {number} [total_charge] * @property {number} [vog] * @property {number} [you_saved] */ @@ -907,6 +941,7 @@ const Joi = require("joi"); /** * @typedef ShipmentPromise * @property {PromiseFormatted} [formatted] + * @property {PromiseISOFormat} [iso] * @property {PromiseTimestamp} [timestamp] */ @@ -1035,6 +1070,7 @@ class CartApplicationModel { product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)), quantity: Joi.number(), seller_id: Joi.number(), + seller_identifier: Joi.string().allow(""), store_id: Joi.number(), }); } @@ -1065,7 +1101,9 @@ class CartApplicationModel { meta: Joi.any(), name: Joi.string().allow(""), phone: Joi.string().allow(""), + sector: Joi.string().allow(""), state: Joi.string().allow(""), + state_code: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), user_id: Joi.string().allow(""), }); @@ -1392,6 +1430,7 @@ class CartApplicationModel { article: CartApplicationModel.ProductArticle(), availability: CartApplicationModel.ProductAvailability(), bulk_offer: Joi.any(), + charges: Joi.array().items(CartApplicationModel.Charges()), coupon: CartApplicationModel.CouponDetails(), coupon_message: Joi.string().allow(""), custom_order: Joi.any(), @@ -1448,6 +1487,26 @@ class CartApplicationModel { }); } + /** @returns {Charges} */ + static Charges() { + return Joi.object({ + allow_refund: Joi.boolean(), + amount: CartApplicationModel.ChargesAmount(), + code: Joi.string().allow(""), + meta: Joi.any(), + name: Joi.string().allow(""), + type: Joi.string().allow(""), + }); + } + + /** @returns {ChargesAmount} */ + static ChargesAmount() { + return Joi.object({ + currency: Joi.string().allow(""), + value: Joi.number(), + }); + } + /** @returns {ChargesThreshold} */ static ChargesThreshold() { return Joi.object({ @@ -1494,16 +1553,20 @@ class CartApplicationModel { /** @returns {Coupon} */ static Coupon() { return Joi.object({ + coupon_amount: Joi.number(), + coupon_applicable_message: Joi.string().allow(""), coupon_code: Joi.string().allow(""), coupon_type: Joi.string().allow("").allow(null), coupon_value: Joi.number(), description: Joi.string().allow("").allow(null), + end_date: Joi.string().allow("").allow(null), expires_on: Joi.string().allow(""), is_applicable: Joi.boolean(), is_applied: Joi.boolean(), max_discount_value: Joi.number(), message: Joi.string().allow(""), minimum_cart_value: Joi.number(), + start_date: Joi.string().allow("").allow(null), sub_title: Joi.string().allow(""), title: Joi.string().allow(""), }); @@ -1869,6 +1932,7 @@ class CartApplicationModel { seller_identifier: Joi.string().allow(""), size: Joi.string().allow(""), store: CartApplicationModel.StoreInfo(), + tags: Joi.array().items(Joi.string().allow("")), type: Joi.string().allow(""), uid: Joi.string().allow(""), }); @@ -1954,6 +2018,14 @@ class CartApplicationModel { }); } + /** @returns {PromiseISOFormat} */ + static PromiseISOFormat() { + return Joi.object({ + max: Joi.string().allow(""), + min: Joi.string().allow(""), + }); + } + /** @returns {PromiseTimestamp} */ static PromiseTimestamp() { return Joi.object({ @@ -2007,6 +2079,7 @@ class CartApplicationModel { mrp_total: Joi.number(), subtotal: Joi.number(), total: Joi.number(), + total_charge: Joi.number(), vog: Joi.number(), you_saved: Joi.number(), }); @@ -2085,6 +2158,7 @@ class CartApplicationModel { static ShipmentPromise() { return Joi.object({ formatted: CartApplicationModel.PromiseFormatted(), + iso: CartApplicationModel.PromiseISOFormat(), timestamp: CartApplicationModel.PromiseTimestamp(), }); } diff --git a/sdk/application/Cart/CartApplicationValidator.d.ts b/sdk/application/Cart/CartApplicationValidator.d.ts index 99cbd869f..94369c58b 100644 --- a/sdk/application/Cart/CartApplicationValidator.d.ts +++ b/sdk/application/Cart/CartApplicationValidator.d.ts @@ -97,6 +97,8 @@ export = CartApplicationValidator; * @typedef GetCouponsParam * @property {string} [id] * @property {boolean} [buyNow] + * @property {string} [slug] + * @property {string} [storeId] */ /** * @typedef GetItemCountParam @@ -366,6 +368,8 @@ type GetCartSharedItemsParam = { type GetCouponsParam = { id?: string; buyNow?: boolean; + slug?: string; + storeId?: string; }; type GetItemCountParam = { /** diff --git a/sdk/application/Cart/CartApplicationValidator.js b/sdk/application/Cart/CartApplicationValidator.js index 05713bf50..ea50f56b1 100644 --- a/sdk/application/Cart/CartApplicationValidator.js +++ b/sdk/application/Cart/CartApplicationValidator.js @@ -114,6 +114,8 @@ const CartApplicationModel = require("./CartApplicationModel"); * @typedef GetCouponsParam * @property {string} [id] * @property {boolean} [buyNow] + * @property {string} [slug] + * @property {string} [storeId] */ /** @@ -369,6 +371,8 @@ class CartApplicationValidator { return Joi.object({ id: Joi.string().allow(""), buyNow: Joi.boolean(), + slug: Joi.string().allow(""), + storeId: Joi.string().allow(""), }); } diff --git a/sdk/application/Catalog/CatalogApplicationClient.d.ts b/sdk/application/Catalog/CatalogApplicationClient.d.ts index 7e83b0cd5..7b645eafb 100644 --- a/sdk/application/Catalog/CatalogApplicationClient.d.ts +++ b/sdk/application/Catalog/CatalogApplicationClient.d.ts @@ -362,7 +362,7 @@ declare class Catalog { * @summary: Get the price of a product size at a PIN Code * @description: Prices may vary for different sizes of a product. Use this API to retrieve the price of a product size at all the selling locations near to a PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductPriceBySlug/). */ - getProductPriceBySlug({ slug, size, storeId, pincode, moq, requestHeaders }?: CatalogApplicationValidator.GetProductPriceBySlugParam, { responseHeaders }?: object): Promise; + getProductPriceBySlug({ slug, size, storeId, moq, requestHeaders }?: CatalogApplicationValidator.GetProductPriceBySlugParam, { responseHeaders }?: object): Promise; /** * @param {CatalogApplicationValidator.GetProductSellersBySlugParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -374,7 +374,7 @@ declare class Catalog { * @summary: Get the sellers of a product size at a PIN Code * @description: A product of a particular size may be sold by multiple sellers. Use this API to fetch the sellers having the stock of a particular size at a given PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSellersBySlug/). */ - getProductSellersBySlug({ slug, size, pincode, strategy, pageNo, pageSize, requestHeaders }?: CatalogApplicationValidator.GetProductSellersBySlugParam, { responseHeaders }?: object): Promise; + getProductSellersBySlug({ slug, size, strategy, pageNo, pageSize, requestHeaders }?: CatalogApplicationValidator.GetProductSellersBySlugParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.slug - A short, human-readable, URL-friendly @@ -383,8 +383,6 @@ declare class Catalog { * @param {string} arg.size - A string indicating the size of the product, * e.g. S, M, XL. You can get slug value from the endpoint * /service/application/catalog/v1.0/products/sizes - * @param {string} [arg.pincode] - The 6-digit PIN Code of the area near - * which the selling locations should be searched, e.g. 400059 * @param {string} [arg.strategy] - Sort stores on the basis of strategy. * eg, fast-delivery, low-price, optimal. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. @@ -392,10 +390,9 @@ declare class Catalog { * @summary: Get the sellers of a product size at a PIN Code * @description: A product of a particular size may be sold by multiple sellers. Use this API to fetch the sellers having the stock of a particular size at a given PIN Code. */ - getProductSellersBySlugPaginator({ slug, size, pincode, strategy, pageSize, }?: { + getProductSellersBySlugPaginator({ slug, size, strategy, pageSize }?: { slug: string; size: string; - pincode?: string; strategy?: string; pageSize?: number; }): Paginator; diff --git a/sdk/application/Catalog/CatalogApplicationClient.js b/sdk/application/Catalog/CatalogApplicationClient.js index c4527653e..d825d4556 100644 --- a/sdk/application/Catalog/CatalogApplicationClient.js +++ b/sdk/application/Catalog/CatalogApplicationClient.js @@ -1894,15 +1894,13 @@ class Catalog { * @description: Prices may vary for different sizes of a product. Use this API to retrieve the price of a product size at all the selling locations near to a PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductPriceBySlug/). */ async getProductPriceBySlug( - { slug, size, storeId, pincode, moq, requestHeaders } = { - requestHeaders: {}, - }, + { slug, size, storeId, moq, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, } = CatalogApplicationValidator.getProductPriceBySlug().validate( - { slug, size, storeId, pincode, moq }, + { slug, size, storeId, moq }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -1913,7 +1911,7 @@ class Catalog { const { error: warrning, } = CatalogApplicationValidator.getProductPriceBySlug().validate( - { slug, size, storeId, pincode, moq }, + { slug, size, storeId, moq }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -1925,7 +1923,6 @@ class Catalog { const query_params = {}; query_params["store_id"] = storeId; - query_params["pincode"] = pincode; query_params["moq"] = moq; const xHeaders = {}; @@ -1981,7 +1978,7 @@ class Catalog { * @description: A product of a particular size may be sold by multiple sellers. Use this API to fetch the sellers having the stock of a particular size at a given PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/catalog/getProductSellersBySlug/). */ async getProductSellersBySlug( - { slug, size, pincode, strategy, pageNo, pageSize, requestHeaders } = { + { slug, size, strategy, pageNo, pageSize, requestHeaders } = { requestHeaders: {}, }, { responseHeaders } = { responseHeaders: false } @@ -1989,7 +1986,7 @@ class Catalog { const { error, } = CatalogApplicationValidator.getProductSellersBySlug().validate( - { slug, size, pincode, strategy, pageNo, pageSize }, + { slug, size, strategy, pageNo, pageSize }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -2000,7 +1997,7 @@ class Catalog { const { error: warrning, } = CatalogApplicationValidator.getProductSellersBySlug().validate( - { slug, size, pincode, strategy, pageNo, pageSize }, + { slug, size, strategy, pageNo, pageSize }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -2011,7 +2008,6 @@ class Catalog { } const query_params = {}; - query_params["pincode"] = pincode; query_params["strategy"] = strategy; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; @@ -2065,8 +2061,6 @@ class Catalog { * @param {string} arg.size - A string indicating the size of the product, * e.g. S, M, XL. You can get slug value from the endpoint * /service/application/catalog/v1.0/products/sizes - * @param {string} [arg.pincode] - The 6-digit PIN Code of the area near - * which the selling locations should be searched, e.g. 400059 * @param {string} [arg.strategy] - Sort stores on the basis of strategy. * eg, fast-delivery, low-price, optimal. * @param {number} [arg.pageSize] - The number of items to retrieve in each page. @@ -2074,13 +2068,7 @@ class Catalog { * @summary: Get the sellers of a product size at a PIN Code * @description: A product of a particular size may be sold by multiple sellers. Use this API to fetch the sellers having the stock of a particular size at a given PIN Code. */ - getProductSellersBySlugPaginator({ - slug, - size, - pincode, - strategy, - pageSize, - } = {}) { + getProductSellersBySlugPaginator({ slug, size, strategy, pageSize } = {}) { const paginator = new Paginator(); const callback = async () => { const pageId = paginator.nextId; @@ -2089,7 +2077,6 @@ class Catalog { const data = await this.getProductSellersBySlug({ slug: slug, size: size, - pincode: pincode, strategy: strategy, pageNo: pageNo, pageSize: pageSize, diff --git a/sdk/application/Catalog/CatalogApplicationModel.d.ts b/sdk/application/Catalog/CatalogApplicationModel.d.ts index 7e6ee813a..19fee13f5 100644 --- a/sdk/application/Catalog/CatalogApplicationModel.d.ts +++ b/sdk/application/Catalog/CatalogApplicationModel.d.ts @@ -285,7 +285,7 @@ export = CatalogApplicationModel; * @property {CollectionQuery[]} [query] * @property {string} [slug] * @property {string} [sort_on] - * @property {string[]} [tag] + * @property {string[]} [tags] * @property {string} [type] * @property {string} [uid] * @property {string[]} [visible_facets_keys] @@ -1352,7 +1352,7 @@ type GetCollectionDetailNest = { query?: CollectionQuery[]; slug?: string; sort_on?: string; - tag?: string[]; + tags?: string[]; type?: string; uid?: string; visible_facets_keys?: string[]; diff --git a/sdk/application/Catalog/CatalogApplicationModel.js b/sdk/application/Catalog/CatalogApplicationModel.js index aeb43eb80..6d3104f69 100644 --- a/sdk/application/Catalog/CatalogApplicationModel.js +++ b/sdk/application/Catalog/CatalogApplicationModel.js @@ -325,7 +325,7 @@ const Joi = require("joi"); * @property {CollectionQuery[]} [query] * @property {string} [slug] * @property {string} [sort_on] - * @property {string[]} [tag] + * @property {string[]} [tags] * @property {string} [type] * @property {string} [uid] * @property {string[]} [visible_facets_keys] @@ -1505,7 +1505,7 @@ class CatalogApplicationModel { query: Joi.array().items(CatalogApplicationModel.CollectionQuery()), slug: Joi.string().allow(""), sort_on: Joi.string().allow(""), - tag: Joi.array().items(Joi.string().allow("")), + tags: Joi.array().items(Joi.string().allow("")), type: Joi.string().allow(""), uid: Joi.string().allow(""), visible_facets_keys: Joi.array().items(Joi.string().allow("")), diff --git a/sdk/application/Catalog/CatalogApplicationValidator.d.ts b/sdk/application/Catalog/CatalogApplicationValidator.d.ts index 37b917cce..abe134e38 100644 --- a/sdk/application/Catalog/CatalogApplicationValidator.d.ts +++ b/sdk/application/Catalog/CatalogApplicationValidator.d.ts @@ -148,8 +148,6 @@ export = CatalogApplicationValidator; * /service/application/catalog/v1.0/products/sizes * @property {number} [storeId] - The ID of the store that is selling the * product, e.g. 1,2,3. - * @property {string} [pincode] - The PIN Code of the area near which the - * selling locations should be searched, e.g. 400059. * @property {number} [moq] - An Integer indication the Minimum Order Quantity * of a product, e.g. 100. */ @@ -161,8 +159,6 @@ export = CatalogApplicationValidator; * @property {string} size - A string indicating the size of the product, e.g. * S, M, XL. You can get slug value from the endpoint * /service/application/catalog/v1.0/products/sizes - * @property {string} [pincode] - The 6-digit PIN Code of the area near which - * the selling locations should be searched, e.g. 400059 * @property {string} [strategy] - Sort stores on the basis of strategy. eg, * fast-delivery, low-price, optimal. * @property {number} [pageNo] - The page number to navigate through the given @@ -589,11 +585,6 @@ type GetProductPriceBySlugParam = { * product, e.g. 1,2,3. */ storeId?: number; - /** - * - The PIN Code of the area near which the - * selling locations should be searched, e.g. 400059. - */ - pincode?: string; /** * - An Integer indication the Minimum Order Quantity * of a product, e.g. 100. @@ -613,11 +604,6 @@ type GetProductSellersBySlugParam = { * /service/application/catalog/v1.0/products/sizes */ size: string; - /** - * - The 6-digit PIN Code of the area near which - * the selling locations should be searched, e.g. 400059 - */ - pincode?: string; /** * - Sort stores on the basis of strategy. eg, * fast-delivery, low-price, optimal. diff --git a/sdk/application/Catalog/CatalogApplicationValidator.js b/sdk/application/Catalog/CatalogApplicationValidator.js index ad096a4bc..1c5e35463 100644 --- a/sdk/application/Catalog/CatalogApplicationValidator.js +++ b/sdk/application/Catalog/CatalogApplicationValidator.js @@ -170,8 +170,6 @@ const CatalogApplicationModel = require("./CatalogApplicationModel"); * /service/application/catalog/v1.0/products/sizes * @property {number} [storeId] - The ID of the store that is selling the * product, e.g. 1,2,3. - * @property {string} [pincode] - The PIN Code of the area near which the - * selling locations should be searched, e.g. 400059. * @property {number} [moq] - An Integer indication the Minimum Order Quantity * of a product, e.g. 100. */ @@ -184,8 +182,6 @@ const CatalogApplicationModel = require("./CatalogApplicationModel"); * @property {string} size - A string indicating the size of the product, e.g. * S, M, XL. You can get slug value from the endpoint * /service/application/catalog/v1.0/products/sizes - * @property {string} [pincode] - The 6-digit PIN Code of the area near which - * the selling locations should be searched, e.g. 400059 * @property {string} [strategy] - Sort stores on the basis of strategy. eg, * fast-delivery, low-price, optimal. * @property {number} [pageNo] - The page number to navigate through the given @@ -451,7 +447,6 @@ class CatalogApplicationValidator { slug: Joi.string().allow("").required(), size: Joi.string().allow("").required(), storeId: Joi.number(), - pincode: Joi.string().allow(""), moq: Joi.number(), }).required(); } @@ -461,7 +456,6 @@ class CatalogApplicationValidator { return Joi.object({ slug: Joi.string().allow("").required(), size: Joi.string().allow("").required(), - pincode: Joi.string().allow(""), strategy: Joi.string().allow(""), pageNo: Joi.number(), pageSize: Joi.number(), diff --git a/sdk/application/Configuration/ConfigurationApplicationModel.d.ts b/sdk/application/Configuration/ConfigurationApplicationModel.d.ts index e365c6dce..7e773c829 100644 --- a/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +++ b/sdk/application/Configuration/ConfigurationApplicationModel.d.ts @@ -7,9 +7,12 @@ export = ConfigurationApplicationModel; */ /** * @typedef AppCurrencyResponse + * @property {string} [_id] * @property {string} [application] - Alphanumeric ID allotted to an application * (sales channel website) created within a business account + * @property {string} [created_at] * @property {DefaultCurrency} [default_currency] + * @property {string} [modified_at] * @property {Currency[]} [supported_currency] */ /** @@ -24,13 +27,13 @@ export = ConfigurationApplicationModel; * the features were configured * @property {HomePageFeature} [home_page] * @property {LandingPageFeature} [landing_page] + * @property {string} [modified_at] - ISO 8601 timestamp of last known + * modifications to the sales channel feature configuration * @property {OrderFeature} [order] * @property {PcrFeature} [pcr] * @property {ProductDetailFeature} [product_detail] * @property {QrFeature} [qr] * @property {RegistrationPageFeature} [registration_page] - * @property {string} [updated_at] - ISO 8601 timestamp of last known - * modifications to the sales channel feature configuration */ /** * @typedef AppFeatureResponse @@ -63,20 +66,22 @@ export = ConfigurationApplicationModel; * @property {SecureUrl} [logo] * @property {ApplicationMeta[]} [meta] * @property {SecureUrl} [mobile_logo] + * @property {string} [mode] + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel updation * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID) * of owner who owns the application * @property {ApplicationRedirections[]} [redirections] + * @property {string} [slug] + * @property {string} [status] * @property {string} [token] - Random generated fix length string for sales * channel. It is required and auto-generated. - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel updation + * @property {TokenSchema[]} [tokens] * @property {ApplicationWebsite} [website] */ /** * @typedef ApplicationAboutResponse * @property {ApplicationInfo} [application_info] - * @property {CompanyInfo} [company_info] - * @property {OwnerInfo} [owner_info] */ /** * @typedef ApplicationAuth @@ -91,6 +96,7 @@ export = ConfigurationApplicationModel; * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * for the sales channel details * @property {SecureUrl} [banner] + * @property {number} [company_id] * @property {string} [description] - It gives a detailed information about the * sales channel. It is required. * @property {Domain} [domain] @@ -99,27 +105,36 @@ export = ConfigurationApplicationModel; * @property {SecureUrl} [logo] * @property {SecureUrl} [mobile_logo] * @property {string} name - Name of the sales channel. It is required. + * @property {string} [slug] */ /** * @typedef ApplicationInfo * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of application information * @property {SecureUrl} [banner] + * @property {CompanyInfo} [company_info] * @property {ApplicationCors} [cors] * @property {string} [created_at] - ISO 8601 timestamp of sales channel * information creation * @property {string} [description] - It contains details information about the * sales channel * @property {Domain} [domain] + * @property {Domain[]} [domains] + * @property {SecureUrl} [favicon] * @property {boolean} [is_active] - Indicates whether sales channel is active * or not active * @property {SecureUrl} [logo] - * @property {ApplicationMeta} [meta] + * @property {ApplicationMeta[]} [meta] + * @property {SecureUrl} [mobile_logo] + * @property {string} [mode] * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion + * @property {OwnerInfo} [owner_info] * @property {string} [secret] - Random generated fix length string for sales * channel. It is required and auto-generated. + * @property {string} [slug] * @property {string} [token] - Random generated fix length string for sales * channel. It is required and auto-generated. + * @property {TokenSchema[]} [tokens] * @property {ApplicationWebsite} [website] */ /** @@ -130,16 +145,16 @@ export = ConfigurationApplicationModel; * @property {InformationAddress} [address] * @property {string} [application] - Alphanumeric ID allotted to a sales * channel application created within a business account - * @property {BusinessHighlights} [business_highlights] + * @property {BusinessHighlights[]} [business_highlights] * @property {string} [copyright_text] - Copyright statement usually seen at the * site's footer * @property {string} [created_at] - ISO 8601 timestamp of creation of the * application information - * @property {Links} [links] + * @property {Links[]} [links] + * @property {string} [modified_at] - ISO 8601 timestamp of updation of the + * application information * @property {SocialLinks} [social_links] * @property {InformationSupport} [support] - * @property {string} [updated_at] - ISO 8601 timestamp of updation of the - * application information */ /** * @typedef ApplicationMeta @@ -195,8 +210,8 @@ export = ConfigurationApplicationModel; * @property {string} [application] - Alphanumeric ID allotted to the current * application created within the current business account * @property {string} [created_at] - ISO 8601 timestamp of token creation + * @property {string} [modified_at] - ISO 8601 timestamp of token updation * @property {Tokens} [tokens] - * @property {string} [updated_at] - ISO 8601 timestamp of token updation */ /** * @typedef BlogLink @@ -232,6 +247,8 @@ export = ConfigurationApplicationModel; * @property {CurrencyFeature} [currency] * @property {DeploymentStoreSelectionFeature} [deployment_store_selection] * @property {FeedbackFeature} [feedback] + * @property {InternationalShipping} [international_shipping] + * @property {ListingPageFeature} [listing_page] * @property {ListingPriceFeature} [listing_price] * @property {RevenueEngineFeature} [revenue_engine] * @property {RewardPointsConfig} [reward_points] @@ -294,6 +311,8 @@ export = ConfigurationApplicationModel; * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the current sales channel supported currency * @property {string} [code] - 3-character currency code, e.g. INR, USD, EUR. + * @property {string} [country_code] + * @property {string} [country_name] * @property {string} [created_at] - ISO 8601 timestamp of sales channel support * currency creation * @property {number} [decimal_digits] - Acceptable decimal limits for a given @@ -301,10 +320,10 @@ export = ConfigurationApplicationModel; * value of a currency. * @property {boolean} [is_active] - Shows currency is enabled or not in current * sales channel + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel + * support currency updation * @property {string} [name] - Name of the currency, e.g Indian Rupee * @property {string} [symbol] - Unique symbol for identifying the currency, e.g. ₹ - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel support - * currency updation */ /** * @typedef CurrencyFeature @@ -421,10 +440,15 @@ export = ConfigurationApplicationModel; * @property {string[]} [address_line] - Contact address of the sales channel * @property {string} [city] - Name of the city, e.g. Mumbai * @property {string} [country] - Name of the country, e.g. India - * @property {string} [loc] - Co-ordinates of the location - * @property {InformationPhone} [phone] + * @property {InformationLoc} [loc] + * @property {InformationPhone[]} [phone] * @property {number} [pincode] - 6-digit PIN Code of the city, e.g. 400001 */ +/** + * @typedef InformationLoc + * @property {number[]} [coordinates] - 10-digit mobile number + * @property {string} [type] - Country code for contact number, e.g. +91 (for India) + */ /** * @typedef InformationPhone * @property {string} [code] - Country code for contact number, e.g. +91 (for India) @@ -432,16 +456,35 @@ export = ConfigurationApplicationModel; */ /** * @typedef InformationSupport - * @property {string[]} [email] - * @property {string[]} [phone] + * @property {InformationSupportEmail[]} [email] + * @property {InformationSupportPhone[]} [phone] * @property {string} [timing] - Working hours of support team, e.g. 9 AM to 9 PM */ +/** + * @typedef InformationSupportEmail + * @property {string} [key] + * @property {string} [value] - Value of email. + */ +/** + * @typedef InformationSupportPhone + * @property {string} [code] - Country code for contact number, e.g. +91 (for India) + * @property {string} [key] + * @property {string} [number] - 10-digit mobile number + */ /** * @typedef InstagramLink * @property {string} [icon] - Hosted URL of social icon image shown on the website * @property {string} [link] - Web URL of brand's Instagram page * @property {string} [title] - Name of the social media platform, e.g. Instagram */ +/** + * @typedef InternationalShipping + * @property {boolean} [enabled] - International shipping is enabled or not. + */ +/** + * @typedef InvalidPayloadRequest + * @property {string} [message] - Error message when request body payload is improper + */ /** * @typedef Ios * @property {string} [api_key] - Firebase secret credential API key for IOS @@ -480,6 +523,10 @@ export = ConfigurationApplicationModel; * @property {string} [link] - Web URL for redirecting to a related page * @property {string} [title] - Name of the related page or link */ +/** + * @typedef ListingPageFeature + * @property {string} [sort_on] + */ /** * @typedef ListingPriceFeature * @property {string} [sort] - Sorting of listing price with min or max value. @@ -686,6 +733,12 @@ export = ConfigurationApplicationModel; * @property {Safetynet} [safetynet] * @property {Segment} [segment] */ +/** + * @typedef TokenSchema + * @property {string} [created_at] - ISO 8601 timestamp of when token created + * @property {Object} [created_by] + * @property {string} [token] + */ /** * @typedef TwitterLink * @property {string} [icon] - Hosted URL of social icon image shown on the website @@ -730,7 +783,7 @@ export = ConfigurationApplicationModel; declare class ConfigurationApplicationModel { } declare namespace ConfigurationApplicationModel { - export { Android, AppCurrencyResponse, AppFeature, AppFeatureResponse, Application, ApplicationAboutResponse, ApplicationAuth, ApplicationCors, ApplicationDetail, ApplicationInfo, ApplicationInformation, ApplicationMeta, ApplicationRedirections, ApplicationWebsite, AppStaff, AppStaffListResponse, AppStaffResponse, AppTokenResponse, BlogLink, BusinessHighlights, CartFeature, CommonFeature, CommunicationOptinDialogFeature, CompanyAboutAddress, CompanyInfo, CompareProductsFeature, Credentials, Credit, CurrenciesResponse, Currency, CurrencyFeature, Debit, DefaultCurrency, DeploymentStoreSelectionFeature, Domain, FacebookLink, FeedbackFeature, Firebase, Freshchat, FreshchatCredentials, FyndRewards, FyndRewardsCredentials, GoogleMap, GoogleMapCredentials, GooglePlusLink, Gtm, GtmCredentials, HomePageFeature, InformationAddress, InformationPhone, InformationSupport, InstagramLink, Ios, LandingPageFeature, LanguageResponse, LaunchPage, LinkedInLink, Links, ListingPriceFeature, Moengage, MoengageCredentials, NotFound, OptedStoreAddress, OrderFeature, OrderingStore, OrderingStores, OrderingStoreSelect, OrderingStoreSelectRequest, OwnerInfo, Page, PcrFeature, PinterestLink, ProductDetailFeature, QrFeature, RegistrationPageFeature, RevenueEngineFeature, RewardPointsConfig, Safetynet, SafetynetCredentials, SecureUrl, Segment, SegmentCredentials, SocialLinks, StoreLatLong, SuccessMessageResponse, SupportedLanguage, Tokens, TwitterLink, UnhandledError, UserEmail, UserPhoneNumber, VimeoLink, YoutubeLink }; + export { Android, AppCurrencyResponse, AppFeature, AppFeatureResponse, Application, ApplicationAboutResponse, ApplicationAuth, ApplicationCors, ApplicationDetail, ApplicationInfo, ApplicationInformation, ApplicationMeta, ApplicationRedirections, ApplicationWebsite, AppStaff, AppStaffListResponse, AppStaffResponse, AppTokenResponse, BlogLink, BusinessHighlights, CartFeature, CommonFeature, CommunicationOptinDialogFeature, CompanyAboutAddress, CompanyInfo, CompareProductsFeature, Credentials, Credit, CurrenciesResponse, Currency, CurrencyFeature, Debit, DefaultCurrency, DeploymentStoreSelectionFeature, Domain, FacebookLink, FeedbackFeature, Firebase, Freshchat, FreshchatCredentials, FyndRewards, FyndRewardsCredentials, GoogleMap, GoogleMapCredentials, GooglePlusLink, Gtm, GtmCredentials, HomePageFeature, InformationAddress, InformationLoc, InformationPhone, InformationSupport, InformationSupportEmail, InformationSupportPhone, InstagramLink, InternationalShipping, InvalidPayloadRequest, Ios, LandingPageFeature, LanguageResponse, LaunchPage, LinkedInLink, Links, ListingPageFeature, ListingPriceFeature, Moengage, MoengageCredentials, NotFound, OptedStoreAddress, OrderFeature, OrderingStore, OrderingStores, OrderingStoreSelect, OrderingStoreSelectRequest, OwnerInfo, Page, PcrFeature, PinterestLink, ProductDetailFeature, QrFeature, RegistrationPageFeature, RevenueEngineFeature, RewardPointsConfig, Safetynet, SafetynetCredentials, SecureUrl, Segment, SegmentCredentials, SocialLinks, StoreLatLong, SuccessMessageResponse, SupportedLanguage, Tokens, TokenSchema, TwitterLink, UnhandledError, UserEmail, UserPhoneNumber, VimeoLink, YoutubeLink }; } /** @returns {Android} */ declare function Android(): Android; @@ -748,12 +801,15 @@ type Android = { /** @returns {AppCurrencyResponse} */ declare function AppCurrencyResponse(): AppCurrencyResponse; type AppCurrencyResponse = { + _id?: string; /** * - Alphanumeric ID allotted to an application * (sales channel website) created within a business account */ application?: string; + created_at?: string; default_currency?: DefaultCurrency; + modified_at?: string; supported_currency?: Currency[]; }; /** @returns {AppFeature} */ @@ -781,16 +837,16 @@ type AppFeature = { created_at?: string; home_page?: HomePageFeature; landing_page?: LandingPageFeature; + /** + * - ISO 8601 timestamp of last known + * modifications to the sales channel feature configuration + */ + modified_at?: string; order?: OrderFeature; pcr?: PcrFeature; product_detail?: ProductDetailFeature; qr?: QrFeature; registration_page?: RegistrationPageFeature; - /** - * - ISO 8601 timestamp of last known - * modifications to the sales channel feature configuration - */ - updated_at?: string; }; /** @returns {AppFeatureResponse} */ declare function AppFeatureResponse(): AppFeatureResponse; @@ -855,6 +911,11 @@ type Application = { logo?: SecureUrl; meta?: ApplicationMeta[]; mobile_logo?: SecureUrl; + mode?: string; + /** + * - ISO 8601 timestamp of sales channel updation + */ + modified_at?: string; /** * - Name of the sales channel, e.g. Zenz Fashion */ @@ -865,23 +926,20 @@ type Application = { */ owner?: string; redirections?: ApplicationRedirections[]; + slug?: string; + status?: string; /** * - Random generated fix length string for sales * channel. It is required and auto-generated. */ token?: string; - /** - * - ISO 8601 timestamp of sales channel updation - */ - updated_at?: string; + tokens?: TokenSchema[]; website?: ApplicationWebsite; }; /** @returns {ApplicationAboutResponse} */ declare function ApplicationAboutResponse(): ApplicationAboutResponse; type ApplicationAboutResponse = { application_info?: ApplicationInfo; - company_info?: CompanyInfo; - owner_info?: OwnerInfo; }; /** @returns {ApplicationAuth} */ declare function ApplicationAuth(): ApplicationAuth; @@ -905,6 +963,7 @@ type ApplicationDetail = { */ _id?: string; banner?: SecureUrl; + company_id?: number; /** * - It gives a detailed information about the * sales channel. It is required. @@ -919,6 +978,7 @@ type ApplicationDetail = { * - Name of the sales channel. It is required. */ name: string; + slug?: string; }; /** @returns {ApplicationInfo} */ declare function ApplicationInfo(): ApplicationInfo; @@ -929,6 +989,7 @@ type ApplicationInfo = { */ _id?: string; banner?: SecureUrl; + company_info?: CompanyInfo; cors?: ApplicationCors; /** * - ISO 8601 timestamp of sales channel @@ -941,27 +1002,34 @@ type ApplicationInfo = { */ description?: string; domain?: Domain; + domains?: Domain[]; + favicon?: SecureUrl; /** * - Indicates whether sales channel is active * or not active */ is_active?: boolean; logo?: SecureUrl; - meta?: ApplicationMeta; + meta?: ApplicationMeta[]; + mobile_logo?: SecureUrl; + mode?: string; /** * - Name of the sales channel, e.g. Zenz Fashion */ name?: string; + owner_info?: OwnerInfo; /** * - Random generated fix length string for sales * channel. It is required and auto-generated. */ secret?: string; + slug?: string; /** * - Random generated fix length string for sales * channel. It is required and auto-generated. */ token?: string; + tokens?: TokenSchema[]; website?: ApplicationWebsite; }; /** @returns {ApplicationInformation} */ @@ -982,7 +1050,7 @@ type ApplicationInformation = { * channel application created within a business account */ application?: string; - business_highlights?: BusinessHighlights; + business_highlights?: BusinessHighlights[]; /** * - Copyright statement usually seen at the * site's footer @@ -993,14 +1061,14 @@ type ApplicationInformation = { * application information */ created_at?: string; - links?: Links; - social_links?: SocialLinks; - support?: InformationSupport; + links?: Links[]; /** * - ISO 8601 timestamp of updation of the * application information */ - updated_at?: string; + modified_at?: string; + social_links?: SocialLinks; + support?: InformationSupport; }; /** @returns {ApplicationMeta} */ declare function ApplicationMeta(): ApplicationMeta; @@ -1123,11 +1191,11 @@ type AppTokenResponse = { * - ISO 8601 timestamp of token creation */ created_at?: string; - tokens?: Tokens; /** * - ISO 8601 timestamp of token updation */ - updated_at?: string; + modified_at?: string; + tokens?: Tokens; }; /** @returns {BlogLink} */ declare function BlogLink(): BlogLink; @@ -1203,6 +1271,8 @@ type CommonFeature = { currency?: CurrencyFeature; deployment_store_selection?: DeploymentStoreSelectionFeature; feedback?: FeedbackFeature; + international_shipping?: InternationalShipping; + listing_page?: ListingPageFeature; listing_price?: ListingPriceFeature; revenue_engine?: RevenueEngineFeature; reward_points?: RewardPointsConfig; @@ -1336,6 +1406,8 @@ type Currency = { * - 3-character currency code, e.g. INR, USD, EUR. */ code?: string; + country_code?: string; + country_name?: string; /** * - ISO 8601 timestamp of sales channel support * currency creation @@ -1352,6 +1424,11 @@ type Currency = { * sales channel */ is_active?: boolean; + /** + * - ISO 8601 timestamp of sales channel + * support currency updation + */ + modified_at?: string; /** * - Name of the currency, e.g Indian Rupee */ @@ -1360,11 +1437,6 @@ type Currency = { * - Unique symbol for identifying the currency, e.g. ₹ */ symbol?: string; - /** - * - ISO 8601 timestamp of sales channel support - * currency updation - */ - updated_at?: string; }; /** @returns {CurrencyFeature} */ declare function CurrencyFeature(): CurrencyFeature; @@ -1605,16 +1677,25 @@ type InformationAddress = { * - Name of the country, e.g. India */ country?: string; - /** - * - Co-ordinates of the location - */ - loc?: string; - phone?: InformationPhone; + loc?: InformationLoc; + phone?: InformationPhone[]; /** * - 6-digit PIN Code of the city, e.g. 400001 */ pincode?: number; }; +/** @returns {InformationLoc} */ +declare function InformationLoc(): InformationLoc; +type InformationLoc = { + /** + * - 10-digit mobile number + */ + coordinates?: number[]; + /** + * - Country code for contact number, e.g. +91 (for India) + */ + type?: string; +}; /** @returns {InformationPhone} */ declare function InformationPhone(): InformationPhone; type InformationPhone = { @@ -1630,13 +1711,35 @@ type InformationPhone = { /** @returns {InformationSupport} */ declare function InformationSupport(): InformationSupport; type InformationSupport = { - email?: string[]; - phone?: string[]; + email?: InformationSupportEmail[]; + phone?: InformationSupportPhone[]; /** * - Working hours of support team, e.g. 9 AM to 9 PM */ timing?: string; }; +/** @returns {InformationSupportEmail} */ +declare function InformationSupportEmail(): InformationSupportEmail; +type InformationSupportEmail = { + key?: string; + /** + * - Value of email. + */ + value?: string; +}; +/** @returns {InformationSupportPhone} */ +declare function InformationSupportPhone(): InformationSupportPhone; +type InformationSupportPhone = { + /** + * - Country code for contact number, e.g. +91 (for India) + */ + code?: string; + key?: string; + /** + * - 10-digit mobile number + */ + number?: string; +}; /** @returns {InstagramLink} */ declare function InstagramLink(): InstagramLink; type InstagramLink = { @@ -1653,6 +1756,22 @@ type InstagramLink = { */ title?: string; }; +/** @returns {InternationalShipping} */ +declare function InternationalShipping(): InternationalShipping; +type InternationalShipping = { + /** + * - International shipping is enabled or not. + */ + enabled?: boolean; +}; +/** @returns {InvalidPayloadRequest} */ +declare function InvalidPayloadRequest(): InvalidPayloadRequest; +type InvalidPayloadRequest = { + /** + * - Error message when request body payload is improper + */ + message?: string; +}; /** @returns {Ios} */ declare function Ios(): Ios; type Ios = { @@ -1739,6 +1858,11 @@ type Links = { */ title?: string; }; +/** @returns {ListingPageFeature} */ +declare function ListingPageFeature(): ListingPageFeature; +type ListingPageFeature = { + sort_on?: string; +}; /** @returns {ListingPriceFeature} */ declare function ListingPriceFeature(): ListingPriceFeature; type ListingPriceFeature = { @@ -2133,6 +2257,16 @@ type Tokens = { safetynet?: Safetynet; segment?: Segment; }; +/** @returns {TokenSchema} */ +declare function TokenSchema(): TokenSchema; +type TokenSchema = { + /** + * - ISO 8601 timestamp of when token created + */ + created_at?: string; + created_by?: any; + token?: string; +}; /** @returns {TwitterLink} */ declare function TwitterLink(): TwitterLink; type TwitterLink = { diff --git a/sdk/application/Configuration/ConfigurationApplicationModel.js b/sdk/application/Configuration/ConfigurationApplicationModel.js index fca8e0718..2fdfe3b22 100644 --- a/sdk/application/Configuration/ConfigurationApplicationModel.js +++ b/sdk/application/Configuration/ConfigurationApplicationModel.js @@ -9,9 +9,12 @@ const Joi = require("joi"); /** * @typedef AppCurrencyResponse + * @property {string} [_id] * @property {string} [application] - Alphanumeric ID allotted to an application * (sales channel website) created within a business account + * @property {string} [created_at] * @property {DefaultCurrency} [default_currency] + * @property {string} [modified_at] * @property {Currency[]} [supported_currency] */ @@ -27,13 +30,13 @@ const Joi = require("joi"); * the features were configured * @property {HomePageFeature} [home_page] * @property {LandingPageFeature} [landing_page] + * @property {string} [modified_at] - ISO 8601 timestamp of last known + * modifications to the sales channel feature configuration * @property {OrderFeature} [order] * @property {PcrFeature} [pcr] * @property {ProductDetailFeature} [product_detail] * @property {QrFeature} [qr] * @property {RegistrationPageFeature} [registration_page] - * @property {string} [updated_at] - ISO 8601 timestamp of last known - * modifications to the sales channel feature configuration */ /** @@ -68,21 +71,23 @@ const Joi = require("joi"); * @property {SecureUrl} [logo] * @property {ApplicationMeta[]} [meta] * @property {SecureUrl} [mobile_logo] + * @property {string} [mode] + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel updation * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID) * of owner who owns the application * @property {ApplicationRedirections[]} [redirections] + * @property {string} [slug] + * @property {string} [status] * @property {string} [token] - Random generated fix length string for sales * channel. It is required and auto-generated. - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel updation + * @property {TokenSchema[]} [tokens] * @property {ApplicationWebsite} [website] */ /** * @typedef ApplicationAboutResponse * @property {ApplicationInfo} [application_info] - * @property {CompanyInfo} [company_info] - * @property {OwnerInfo} [owner_info] */ /** @@ -100,6 +105,7 @@ const Joi = require("joi"); * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * for the sales channel details * @property {SecureUrl} [banner] + * @property {number} [company_id] * @property {string} [description] - It gives a detailed information about the * sales channel. It is required. * @property {Domain} [domain] @@ -108,6 +114,7 @@ const Joi = require("joi"); * @property {SecureUrl} [logo] * @property {SecureUrl} [mobile_logo] * @property {string} name - Name of the sales channel. It is required. + * @property {string} [slug] */ /** @@ -115,21 +122,29 @@ const Joi = require("joi"); * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of application information * @property {SecureUrl} [banner] + * @property {CompanyInfo} [company_info] * @property {ApplicationCors} [cors] * @property {string} [created_at] - ISO 8601 timestamp of sales channel * information creation * @property {string} [description] - It contains details information about the * sales channel * @property {Domain} [domain] + * @property {Domain[]} [domains] + * @property {SecureUrl} [favicon] * @property {boolean} [is_active] - Indicates whether sales channel is active * or not active * @property {SecureUrl} [logo] - * @property {ApplicationMeta} [meta] + * @property {ApplicationMeta[]} [meta] + * @property {SecureUrl} [mobile_logo] + * @property {string} [mode] * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion + * @property {OwnerInfo} [owner_info] * @property {string} [secret] - Random generated fix length string for sales * channel. It is required and auto-generated. + * @property {string} [slug] * @property {string} [token] - Random generated fix length string for sales * channel. It is required and auto-generated. + * @property {TokenSchema[]} [tokens] * @property {ApplicationWebsite} [website] */ @@ -141,16 +156,16 @@ const Joi = require("joi"); * @property {InformationAddress} [address] * @property {string} [application] - Alphanumeric ID allotted to a sales * channel application created within a business account - * @property {BusinessHighlights} [business_highlights] + * @property {BusinessHighlights[]} [business_highlights] * @property {string} [copyright_text] - Copyright statement usually seen at the * site's footer * @property {string} [created_at] - ISO 8601 timestamp of creation of the * application information - * @property {Links} [links] + * @property {Links[]} [links] + * @property {string} [modified_at] - ISO 8601 timestamp of updation of the + * application information * @property {SocialLinks} [social_links] * @property {InformationSupport} [support] - * @property {string} [updated_at] - ISO 8601 timestamp of updation of the - * application information */ /** @@ -213,8 +228,8 @@ const Joi = require("joi"); * @property {string} [application] - Alphanumeric ID allotted to the current * application created within the current business account * @property {string} [created_at] - ISO 8601 timestamp of token creation + * @property {string} [modified_at] - ISO 8601 timestamp of token updation * @property {Tokens} [tokens] - * @property {string} [updated_at] - ISO 8601 timestamp of token updation */ /** @@ -254,6 +269,8 @@ const Joi = require("joi"); * @property {CurrencyFeature} [currency] * @property {DeploymentStoreSelectionFeature} [deployment_store_selection] * @property {FeedbackFeature} [feedback] + * @property {InternationalShipping} [international_shipping] + * @property {ListingPageFeature} [listing_page] * @property {ListingPriceFeature} [listing_price] * @property {RevenueEngineFeature} [revenue_engine] * @property {RewardPointsConfig} [reward_points] @@ -324,6 +341,8 @@ const Joi = require("joi"); * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the current sales channel supported currency * @property {string} [code] - 3-character currency code, e.g. INR, USD, EUR. + * @property {string} [country_code] + * @property {string} [country_name] * @property {string} [created_at] - ISO 8601 timestamp of sales channel support * currency creation * @property {number} [decimal_digits] - Acceptable decimal limits for a given @@ -331,10 +350,10 @@ const Joi = require("joi"); * value of a currency. * @property {boolean} [is_active] - Shows currency is enabled or not in current * sales channel + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel + * support currency updation * @property {string} [name] - Name of the currency, e.g Indian Rupee * @property {string} [symbol] - Unique symbol for identifying the currency, e.g. ₹ - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel support - * currency updation */ /** @@ -470,11 +489,17 @@ const Joi = require("joi"); * @property {string[]} [address_line] - Contact address of the sales channel * @property {string} [city] - Name of the city, e.g. Mumbai * @property {string} [country] - Name of the country, e.g. India - * @property {string} [loc] - Co-ordinates of the location - * @property {InformationPhone} [phone] + * @property {InformationLoc} [loc] + * @property {InformationPhone[]} [phone] * @property {number} [pincode] - 6-digit PIN Code of the city, e.g. 400001 */ +/** + * @typedef InformationLoc + * @property {number[]} [coordinates] - 10-digit mobile number + * @property {string} [type] - Country code for contact number, e.g. +91 (for India) + */ + /** * @typedef InformationPhone * @property {string} [code] - Country code for contact number, e.g. +91 (for India) @@ -483,11 +508,24 @@ const Joi = require("joi"); /** * @typedef InformationSupport - * @property {string[]} [email] - * @property {string[]} [phone] + * @property {InformationSupportEmail[]} [email] + * @property {InformationSupportPhone[]} [phone] * @property {string} [timing] - Working hours of support team, e.g. 9 AM to 9 PM */ +/** + * @typedef InformationSupportEmail + * @property {string} [key] + * @property {string} [value] - Value of email. + */ + +/** + * @typedef InformationSupportPhone + * @property {string} [code] - Country code for contact number, e.g. +91 (for India) + * @property {string} [key] + * @property {string} [number] - 10-digit mobile number + */ + /** * @typedef InstagramLink * @property {string} [icon] - Hosted URL of social icon image shown on the website @@ -495,6 +533,16 @@ const Joi = require("joi"); * @property {string} [title] - Name of the social media platform, e.g. Instagram */ +/** + * @typedef InternationalShipping + * @property {boolean} [enabled] - International shipping is enabled or not. + */ + +/** + * @typedef InvalidPayloadRequest + * @property {string} [message] - Error message when request body payload is improper + */ + /** * @typedef Ios * @property {string} [api_key] - Firebase secret credential API key for IOS @@ -539,6 +587,11 @@ const Joi = require("joi"); * @property {string} [title] - Name of the related page or link */ +/** + * @typedef ListingPageFeature + * @property {string} [sort_on] + */ + /** * @typedef ListingPriceFeature * @property {string} [sort] - Sorting of listing price with min or max value. @@ -774,6 +827,13 @@ const Joi = require("joi"); * @property {Segment} [segment] */ +/** + * @typedef TokenSchema + * @property {string} [created_at] - ISO 8601 timestamp of when token created + * @property {Object} [created_by] + * @property {string} [token] + */ + /** * @typedef TwitterLink * @property {string} [icon] - Hosted URL of social icon image shown on the website @@ -833,8 +893,11 @@ class ConfigurationApplicationModel { /** @returns {AppCurrencyResponse} */ static AppCurrencyResponse() { return Joi.object({ + _id: Joi.string().allow(""), application: Joi.string().allow(""), + created_at: Joi.string().allow(""), default_currency: ConfigurationApplicationModel.DefaultCurrency(), + modified_at: Joi.string().allow(""), supported_currency: Joi.array().items( ConfigurationApplicationModel.Currency() ), @@ -852,12 +915,12 @@ class ConfigurationApplicationModel { created_at: Joi.string().allow(""), home_page: ConfigurationApplicationModel.HomePageFeature(), landing_page: ConfigurationApplicationModel.LandingPageFeature(), + modified_at: Joi.string().allow(""), order: ConfigurationApplicationModel.OrderFeature(), pcr: ConfigurationApplicationModel.PcrFeature(), product_detail: ConfigurationApplicationModel.ProductDetailFeature(), qr: ConfigurationApplicationModel.QrFeature(), registration_page: ConfigurationApplicationModel.RegistrationPageFeature(), - updated_at: Joi.string().allow(""), }); } @@ -890,13 +953,17 @@ class ConfigurationApplicationModel { logo: ConfigurationApplicationModel.SecureUrl(), meta: Joi.array().items(ConfigurationApplicationModel.ApplicationMeta()), mobile_logo: ConfigurationApplicationModel.SecureUrl(), + mode: Joi.string().allow(""), + modified_at: Joi.string().allow(""), name: Joi.string().allow(""), owner: Joi.string().allow(""), redirections: Joi.array().items( ConfigurationApplicationModel.ApplicationRedirections() ), + slug: Joi.string().allow(""), + status: Joi.string().allow(""), token: Joi.string().allow(""), - updated_at: Joi.string().allow(""), + tokens: Joi.array().items(ConfigurationApplicationModel.TokenSchema()), website: ConfigurationApplicationModel.ApplicationWebsite(), }); } @@ -905,8 +972,6 @@ class ConfigurationApplicationModel { static ApplicationAboutResponse() { return Joi.object({ application_info: ConfigurationApplicationModel.ApplicationInfo(), - company_info: ConfigurationApplicationModel.CompanyInfo(), - owner_info: ConfigurationApplicationModel.OwnerInfo(), }); } @@ -929,6 +994,7 @@ class ConfigurationApplicationModel { return Joi.object({ _id: Joi.string().allow(""), banner: ConfigurationApplicationModel.SecureUrl(), + company_id: Joi.number(), description: Joi.string().allow(""), domain: ConfigurationApplicationModel.Domain(), domains: Joi.array().items(ConfigurationApplicationModel.Domain()), @@ -936,6 +1002,7 @@ class ConfigurationApplicationModel { logo: ConfigurationApplicationModel.SecureUrl(), mobile_logo: ConfigurationApplicationModel.SecureUrl(), name: Joi.string().allow("").required(), + slug: Joi.string().allow(""), }); } @@ -944,16 +1011,24 @@ class ConfigurationApplicationModel { return Joi.object({ _id: Joi.string().allow(""), banner: ConfigurationApplicationModel.SecureUrl(), + company_info: ConfigurationApplicationModel.CompanyInfo(), cors: ConfigurationApplicationModel.ApplicationCors(), created_at: Joi.string().allow(""), description: Joi.string().allow(""), domain: ConfigurationApplicationModel.Domain(), + domains: Joi.array().items(ConfigurationApplicationModel.Domain()), + favicon: ConfigurationApplicationModel.SecureUrl(), is_active: Joi.boolean(), logo: ConfigurationApplicationModel.SecureUrl(), - meta: ConfigurationApplicationModel.ApplicationMeta(), + meta: Joi.array().items(ConfigurationApplicationModel.ApplicationMeta()), + mobile_logo: ConfigurationApplicationModel.SecureUrl(), + mode: Joi.string().allow(""), name: Joi.string().allow(""), + owner_info: ConfigurationApplicationModel.OwnerInfo(), secret: Joi.string().allow(""), + slug: Joi.string().allow(""), token: Joi.string().allow(""), + tokens: Joi.array().items(ConfigurationApplicationModel.TokenSchema()), website: ConfigurationApplicationModel.ApplicationWebsite(), }); } @@ -965,13 +1040,15 @@ class ConfigurationApplicationModel { _id: Joi.string().allow(""), address: ConfigurationApplicationModel.InformationAddress(), application: Joi.string().allow(""), - business_highlights: ConfigurationApplicationModel.BusinessHighlights(), + business_highlights: Joi.array().items( + ConfigurationApplicationModel.BusinessHighlights() + ), copyright_text: Joi.string().allow(""), created_at: Joi.string().allow(""), - links: ConfigurationApplicationModel.Links(), + links: Joi.array().items(ConfigurationApplicationModel.Links()), + modified_at: Joi.string().allow(""), social_links: ConfigurationApplicationModel.SocialLinks(), support: ConfigurationApplicationModel.InformationSupport(), - updated_at: Joi.string().allow(""), }); } @@ -1038,8 +1115,8 @@ class ConfigurationApplicationModel { _id: Joi.string().allow(""), application: Joi.string().allow(""), created_at: Joi.string().allow(""), + modified_at: Joi.string().allow(""), tokens: ConfigurationApplicationModel.Tokens(), - updated_at: Joi.string().allow(""), }); } @@ -1081,6 +1158,8 @@ class ConfigurationApplicationModel { currency: ConfigurationApplicationModel.CurrencyFeature(), deployment_store_selection: ConfigurationApplicationModel.DeploymentStoreSelectionFeature(), feedback: ConfigurationApplicationModel.FeedbackFeature(), + international_shipping: ConfigurationApplicationModel.InternationalShipping(), + listing_page: ConfigurationApplicationModel.ListingPageFeature(), listing_price: ConfigurationApplicationModel.ListingPriceFeature(), revenue_engine: ConfigurationApplicationModel.RevenueEngineFeature(), reward_points: ConfigurationApplicationModel.RewardPointsConfig(), @@ -1160,12 +1239,14 @@ class ConfigurationApplicationModel { return Joi.object({ _id: Joi.string().allow(""), code: Joi.string().allow(""), + country_code: Joi.string().allow(""), + country_name: Joi.string().allow(""), created_at: Joi.string().allow(""), decimal_digits: Joi.number(), is_active: Joi.boolean(), + modified_at: Joi.string().allow(""), name: Joi.string().allow(""), symbol: Joi.string().allow(""), - updated_at: Joi.string().allow(""), }); } @@ -1321,12 +1402,22 @@ class ConfigurationApplicationModel { address_line: Joi.array().items(Joi.string().allow("")), city: Joi.string().allow(""), country: Joi.string().allow(""), - loc: Joi.string().allow(""), - phone: ConfigurationApplicationModel.InformationPhone(), + loc: ConfigurationApplicationModel.InformationLoc(), + phone: Joi.array().items( + ConfigurationApplicationModel.InformationPhone() + ), pincode: Joi.number(), }); } + /** @returns {InformationLoc} */ + static InformationLoc() { + return Joi.object({ + coordinates: Joi.array().items(Joi.number()), + type: Joi.string().allow(""), + }); + } + /** @returns {InformationPhone} */ static InformationPhone() { return Joi.object({ @@ -1338,12 +1429,33 @@ class ConfigurationApplicationModel { /** @returns {InformationSupport} */ static InformationSupport() { return Joi.object({ - email: Joi.array().items(Joi.string().allow("")), - phone: Joi.array().items(Joi.string().allow("")), + email: Joi.array().items( + ConfigurationApplicationModel.InformationSupportEmail() + ), + phone: Joi.array().items( + ConfigurationApplicationModel.InformationSupportPhone() + ), timing: Joi.string().allow(""), }); } + /** @returns {InformationSupportEmail} */ + static InformationSupportEmail() { + return Joi.object({ + key: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {InformationSupportPhone} */ + static InformationSupportPhone() { + return Joi.object({ + code: Joi.string().allow(""), + key: Joi.string().allow(""), + number: Joi.string().allow(""), + }); + } + /** @returns {InstagramLink} */ static InstagramLink() { return Joi.object({ @@ -1353,6 +1465,20 @@ class ConfigurationApplicationModel { }); } + /** @returns {InternationalShipping} */ + static InternationalShipping() { + return Joi.object({ + enabled: Joi.boolean(), + }); + } + + /** @returns {InvalidPayloadRequest} */ + static InvalidPayloadRequest() { + return Joi.object({ + message: Joi.string().allow(""), + }); + } + /** @returns {Ios} */ static Ios() { return Joi.object({ @@ -1407,6 +1533,13 @@ class ConfigurationApplicationModel { }); } + /** @returns {ListingPageFeature} */ + static ListingPageFeature() { + return Joi.object({ + sort_on: Joi.string().allow(""), + }); + } + /** @returns {ListingPriceFeature} */ static ListingPriceFeature() { return Joi.object({ @@ -1674,6 +1807,15 @@ class ConfigurationApplicationModel { }); } + /** @returns {TokenSchema} */ + static TokenSchema() { + return Joi.object({ + created_at: Joi.string().allow(""), + created_by: Joi.object().pattern(/\S/, Joi.any()), + token: Joi.string().allow(""), + }); + } + /** @returns {TwitterLink} */ static TwitterLink() { return Joi.object({ diff --git a/sdk/application/Content/ContentApplicationClient.d.ts b/sdk/application/Content/ContentApplicationClient.d.ts index 80b8601cc..8b2845338 100644 --- a/sdk/application/Content/ContentApplicationClient.d.ts +++ b/sdk/application/Content/ContentApplicationClient.d.ts @@ -6,6 +6,8 @@ declare class Content { getAnnouncements: string; getBlog: string; getBlogs: string; + getCustomFields: string; + getCustomObject: string; getDataLoaders: string; getFaqBySlug: string; getFaqCategories: string; @@ -18,6 +20,7 @@ declare class Content { getPage: string; getPages: string; getSEOConfiguration: string; + getSEOMarkupSchemas: string; getSlideshow: string; getSlideshows: string; getSupportInformation: string; @@ -67,6 +70,29 @@ declare class Content { getBlogsPaginator({ pageSize }?: { pageSize?: number; }): Paginator; + /** + * @param {ContentApplicationValidator.GetCustomFieldsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getCustomFields + * @summary: Get list of custom fields of given resource and resource_id. + * @description: Use this API to retrieve the custom fields for given resource and resource_id in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomFields/). + */ + getCustomFields({ resource, resourceId, requestHeaders }?: ContentApplicationValidator.GetCustomFieldsParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentApplicationValidator.GetCustomObjectParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getCustomObject + * @summary: Get custom object details + * @description: Use this API to retrieve the custom object details, their fields details with definitions and references. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomObject/). + */ + getCustomObject({ metaobjectId, requestHeaders }?: ContentApplicationValidator.GetCustomObjectParam, { responseHeaders }?: object): Promise; /** * @param {ContentApplicationValidator.GetDataLoadersParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -210,6 +236,16 @@ declare class Content { * @description: Use this API to get the SEO details of an application, which includes a robot.txt, meta-tags and sitemap. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSEOConfiguration/). */ getSEOConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {ContentApplicationValidator.GetSEOMarkupSchemasParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getSEOMarkupSchemas + * @summary: Get SEO Markup schemas of an application + * @description: Use this API to get all SEO Markup schema Templates setup for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSEOMarkupSchemas/). + */ + getSEOMarkupSchemas({ pageType, active, requestHeaders }?: ContentApplicationValidator.GetSEOMarkupSchemasParam, { responseHeaders }?: object): Promise; /** * @param {ContentApplicationValidator.GetSlideshowParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/application/Content/ContentApplicationClient.js b/sdk/application/Content/ContentApplicationClient.js index fd16c0158..5b54dfc9b 100644 --- a/sdk/application/Content/ContentApplicationClient.js +++ b/sdk/application/Content/ContentApplicationClient.js @@ -17,6 +17,10 @@ class Content { 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", @@ -31,6 +35,7 @@ class Content { 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", @@ -314,6 +319,165 @@ class Content { return paginator; } + /** + * @param {ContentApplicationValidator.GetCustomFieldsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getCustomFields + * @summary: Get list of custom fields of given resource and resource_id. + * @description: Use this API to retrieve the custom fields for given resource and resource_id in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomFields/). + */ + async getCustomFields( + { resource, resourceId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentApplicationValidator.getCustomFields().validate( + { resource, resourceId }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentApplicationValidator.getCustomFields().validate( + { resource, resourceId }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Content > getCustomFields \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getCustomFields"], + params: { resource, resourceId }, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentApplicationModel.CustomFieldsResponseByResourceIdSchema().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 application > Content > getCustomFields \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentApplicationValidator.GetCustomObjectParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getCustomObject + * @summary: Get custom object details + * @description: Use this API to retrieve the custom object details, their fields details with definitions and references. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomObject/). + */ + async getCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentApplicationValidator.getCustomObject().validate( + { metaobjectId }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentApplicationValidator.getCustomObject().validate( + { metaobjectId }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Content > getCustomObject \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getCustomObject"], + params: { metaobjectId }, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentApplicationModel.CustomObjectByIdSchema().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 application > Content > getCustomObject \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {ContentApplicationValidator.GetDataLoadersParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -1314,6 +1478,88 @@ class Content { return response; } + /** + * @param {ContentApplicationValidator.GetSEOMarkupSchemasParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getSEOMarkupSchemas + * @summary: Get SEO Markup schemas of an application + * @description: Use this API to get all SEO Markup schema Templates setup for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSEOMarkupSchemas/). + */ + async getSEOMarkupSchemas( + { pageType, active, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentApplicationValidator.getSEOMarkupSchemas().validate( + { pageType, active }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentApplicationValidator.getSEOMarkupSchemas().validate( + { pageType, active }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Content > getSEOMarkupSchemas \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_type"] = pageType; + query_params["active"] = active; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getSEOMarkupSchemas"], + params: {}, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentApplicationModel.SeoSchemaComponent().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 application > Content > getSEOMarkupSchemas \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {ContentApplicationValidator.GetSlideshowParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/application/Content/ContentApplicationModel.d.ts b/sdk/application/Content/ContentApplicationModel.d.ts index 577d73f36..00b22d853 100644 --- a/sdk/application/Content/ContentApplicationModel.d.ts +++ b/sdk/application/Content/ContentApplicationModel.d.ts @@ -135,12 +135,68 @@ export = ContentApplicationModel; * @property {string} [end] * @property {string} [start] */ +/** + * @typedef CustomFieldSchema + * @property {string} [_id] + * @property {string} [application_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [definition_id] + * @property {boolean} [has_invalid_values] + * @property {Object[]} [invalid_value_errors] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [namespace] + * @property {string} [resource] + * @property {string} [resource_id] + * @property {string} [type] + * @property {string} [updated_at] + * @property {CustomFieldValue[]} [value] + */ +/** + * @typedef CustomFieldsResponseByResourceIdSchema + * @property {CustomFieldSchema[]} [items] + */ +/** + * @typedef CustomFieldValue + * @property {Object} [value] + */ /** * @typedef CustomMetaTag * @property {string} [_id] * @property {string} [content] * @property {string} [name] */ +/** + * @typedef CustomObjectByIdSchema + * @property {string} [_id] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {string} [display_name] + * @property {CustomObjectFieldSchema[]} [fields] + * @property {Object[]} [references] + * @property {string} [status] + */ +/** + * @typedef CustomObjectFieldSchema + * @property {string} [_id] + * @property {string} [definition_id] + * @property {string} [key] + * @property {string} [type] + * @property {CustomObjectFieldValue[]} [value] + */ +/** + * @typedef CustomObjectFieldValue + * @property {Object} [value] + */ +/** + * @typedef CustomObjectListItemDefinationSchema + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] + */ /** * @typedef DataLoaderSchema * @property {DataLoaderSourceSchema} [__source] @@ -355,10 +411,19 @@ export = ContentApplicationModel; */ /** * @typedef SEO + * @property {SEObreadcrumb[]} [breadcrumb] + * @property {string} [canonical_url] * @property {string} [description] * @property {SEOImage} [image] + * @property {SEOMetaItem[]} [meta_tags] + * @property {SEOSitemap} [sitemap] * @property {string} [title] */ +/** + * @typedef SEObreadcrumb + * @property {Action} [action] + * @property {string} [url] + */ /** * @typedef SeoComponent * @property {SeoSchema} [seo] @@ -367,9 +432,20 @@ export = ContentApplicationModel; * @typedef SEOImage * @property {string} [url] */ +/** + * @typedef SEOMetaItem + * @property {SEOMetaItems[]} [items] + * @property {string} [title] + */ +/** + * @typedef SEOMetaItems + * @property {string} [key] + * @property {string} [value] + */ /** * @typedef SeoSchema * @property {string} [_id] + * @property {string} [additonal_sitemap] * @property {string} [app] * @property {boolean} [cannonical_enabled] * @property {string} [created_at] @@ -379,6 +455,27 @@ export = ContentApplicationModel; * @property {boolean} [sitemap_enabled] * @property {string} [updated_at] */ +/** + * @typedef SeoSchemaComponent + * @property {SEOSchemaMarkupTemplate[]} [items] + */ +/** + * @typedef SEOSchemaMarkupTemplate + * @property {boolean} [active] + * @property {string} [application] + * @property {string} [created_at] + * @property {string} [description] + * @property {string} [id] + * @property {string} [page_type] + * @property {string} [schema] + * @property {string} [title] + * @property {string} [updated_at] + */ +/** + * @typedef SEOSitemap + * @property {string} [frequency] + * @property {number} [priority] + */ /** * @typedef SlideshowGetResponse * @property {SlideshowSchema[]} [items] @@ -491,7 +588,7 @@ export = ContentApplicationModel; declare class ContentApplicationModel { } declare namespace ContentApplicationModel { - export { Action, ActionPage, AnnouncementSchema, AnnouncementsResponseSchema, ApplicationLegal, ApplicationLegalFAQ, Asset, Author, BlogGetResponse, BlogSchema, CategorySchema, ChildrenSchema, CommonError, ConfigurationSchema, ContactSchema, ContentAPIError, CreatedBySchema, CronSchedule, CustomMetaTag, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, DateMeta, Detail, EmailProperties, EmailSchema, FAQCategorySchema, FaqResponseSchema, FaqSchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, GetFaqSchema, LandingPageSchema, Language, LocaleLanguage, NavigationGetResponse, NavigationReference, NavigationSchema, NextSchedule, Orientation, Page, PageGetResponse, PageSchema, PhoneProperties, PhoneSchema, ResourceContent, ScheduleSchema, ScheduleStartSchema, SEO, SeoComponent, SEOImage, SeoSchema, SlideshowGetResponse, SlideshowMedia, SlideshowSchema, Support, TagSchema, TagSourceSchema, TagsSchema, PageType }; + export { Action, ActionPage, AnnouncementSchema, AnnouncementsResponseSchema, ApplicationLegal, ApplicationLegalFAQ, Asset, Author, BlogGetResponse, BlogSchema, CategorySchema, ChildrenSchema, CommonError, ConfigurationSchema, ContactSchema, ContentAPIError, CreatedBySchema, CronSchedule, CustomFieldSchema, CustomFieldsResponseByResourceIdSchema, CustomFieldValue, CustomMetaTag, CustomObjectByIdSchema, CustomObjectFieldSchema, CustomObjectFieldValue, CustomObjectListItemDefinationSchema, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, DateMeta, Detail, EmailProperties, EmailSchema, FAQCategorySchema, FaqResponseSchema, FaqSchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, GetFaqSchema, LandingPageSchema, Language, LocaleLanguage, NavigationGetResponse, NavigationReference, NavigationSchema, NextSchedule, Orientation, Page, PageGetResponse, PageSchema, PhoneProperties, PhoneSchema, ResourceContent, ScheduleSchema, ScheduleStartSchema, SEO, SEObreadcrumb, SeoComponent, SEOImage, SEOMetaItem, SEOMetaItems, SeoSchema, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSitemap, SlideshowGetResponse, SlideshowMedia, SlideshowSchema, Support, TagSchema, TagSourceSchema, TagsSchema, PageType }; } /** @returns {Action} */ declare function Action(): Action; @@ -653,6 +750,38 @@ type CronSchedule = { end?: string; start?: string; }; +/** @returns {CustomFieldSchema} */ +declare function CustomFieldSchema(): CustomFieldSchema; +type CustomFieldSchema = { + _id?: string; + application_id?: string; + company_id?: string; + created_at?: string; + created_by?: string; + creator?: string; + definition_id?: string; + has_invalid_values?: boolean; + invalid_value_errors?: any[]; + is_deleted?: boolean; + key?: string; + multi_value?: boolean; + namespace?: string; + resource?: string; + resource_id?: string; + type?: string; + updated_at?: string; + value?: CustomFieldValue[]; +}; +/** @returns {CustomFieldsResponseByResourceIdSchema} */ +declare function CustomFieldsResponseByResourceIdSchema(): CustomFieldsResponseByResourceIdSchema; +type CustomFieldsResponseByResourceIdSchema = { + items?: CustomFieldSchema[]; +}; +/** @returns {CustomFieldValue} */ +declare function CustomFieldValue(): CustomFieldValue; +type CustomFieldValue = { + value?: any; +}; /** @returns {CustomMetaTag} */ declare function CustomMetaTag(): CustomMetaTag; type CustomMetaTag = { @@ -660,6 +789,37 @@ type CustomMetaTag = { content?: string; name?: string; }; +/** @returns {CustomObjectByIdSchema} */ +declare function CustomObjectByIdSchema(): CustomObjectByIdSchema; +type CustomObjectByIdSchema = { + _id?: string; + definition?: CustomObjectListItemDefinationSchema; + display_name?: string; + fields?: CustomObjectFieldSchema[]; + references?: any[]; + status?: string; +}; +/** @returns {CustomObjectFieldSchema} */ +declare function CustomObjectFieldSchema(): CustomObjectFieldSchema; +type CustomObjectFieldSchema = { + _id?: string; + definition_id?: string; + key?: string; + type?: string; + value?: CustomObjectFieldValue[]; +}; +/** @returns {CustomObjectFieldValue} */ +declare function CustomObjectFieldValue(): CustomObjectFieldValue; +type CustomObjectFieldValue = { + value?: any; +}; +/** @returns {CustomObjectListItemDefinationSchema} */ +declare function CustomObjectListItemDefinationSchema(): CustomObjectListItemDefinationSchema; +type CustomObjectListItemDefinationSchema = { + _id?: string; + name?: string; + type?: string; +}; /** @returns {DataLoaderSchema} */ declare function DataLoaderSchema(): DataLoaderSchema; type DataLoaderSchema = { @@ -907,10 +1067,20 @@ type ScheduleStartSchema = { /** @returns {SEO} */ declare function SEO(): SEO; type SEO = { + breadcrumb?: SEObreadcrumb[]; + canonical_url?: string; description?: string; image?: SEOImage; + meta_tags?: SEOMetaItem[]; + sitemap?: SEOSitemap; title?: string; }; +/** @returns {SEObreadcrumb} */ +declare function SEObreadcrumb(): SEObreadcrumb; +type SEObreadcrumb = { + action?: Action; + url?: string; +}; /** @returns {SeoComponent} */ declare function SeoComponent(): SeoComponent; type SeoComponent = { @@ -921,10 +1091,23 @@ declare function SEOImage(): SEOImage; type SEOImage = { url?: string; }; +/** @returns {SEOMetaItem} */ +declare function SEOMetaItem(): SEOMetaItem; +type SEOMetaItem = { + items?: SEOMetaItems[]; + title?: string; +}; +/** @returns {SEOMetaItems} */ +declare function SEOMetaItems(): SEOMetaItems; +type SEOMetaItems = { + key?: string; + value?: string; +}; /** @returns {SeoSchema} */ declare function SeoSchema(): SeoSchema; type SeoSchema = { _id?: string; + additonal_sitemap?: string; app?: string; cannonical_enabled?: boolean; created_at?: string; @@ -934,6 +1117,30 @@ type SeoSchema = { sitemap_enabled?: boolean; updated_at?: string; }; +/** @returns {SeoSchemaComponent} */ +declare function SeoSchemaComponent(): SeoSchemaComponent; +type SeoSchemaComponent = { + items?: SEOSchemaMarkupTemplate[]; +}; +/** @returns {SEOSchemaMarkupTemplate} */ +declare function SEOSchemaMarkupTemplate(): SEOSchemaMarkupTemplate; +type SEOSchemaMarkupTemplate = { + active?: boolean; + application?: string; + created_at?: string; + description?: string; + id?: string; + page_type?: string; + schema?: string; + title?: string; + updated_at?: string; +}; +/** @returns {SEOSitemap} */ +declare function SEOSitemap(): SEOSitemap; +type SEOSitemap = { + frequency?: string; + priority?: number; +}; /** @returns {SlideshowGetResponse} */ declare function SlideshowGetResponse(): SlideshowGetResponse; type SlideshowGetResponse = { diff --git a/sdk/application/Content/ContentApplicationModel.js b/sdk/application/Content/ContentApplicationModel.js index 4821b9a5a..ab2cc2245 100644 --- a/sdk/application/Content/ContentApplicationModel.js +++ b/sdk/application/Content/ContentApplicationModel.js @@ -154,6 +154,38 @@ const Joi = require("joi"); * @property {string} [start] */ +/** + * @typedef CustomFieldSchema + * @property {string} [_id] + * @property {string} [application_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [definition_id] + * @property {boolean} [has_invalid_values] + * @property {Object[]} [invalid_value_errors] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [namespace] + * @property {string} [resource] + * @property {string} [resource_id] + * @property {string} [type] + * @property {string} [updated_at] + * @property {CustomFieldValue[]} [value] + */ + +/** + * @typedef CustomFieldsResponseByResourceIdSchema + * @property {CustomFieldSchema[]} [items] + */ + +/** + * @typedef CustomFieldValue + * @property {Object} [value] + */ + /** * @typedef CustomMetaTag * @property {string} [_id] @@ -161,6 +193,37 @@ const Joi = require("joi"); * @property {string} [name] */ +/** + * @typedef CustomObjectByIdSchema + * @property {string} [_id] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {string} [display_name] + * @property {CustomObjectFieldSchema[]} [fields] + * @property {Object[]} [references] + * @property {string} [status] + */ + +/** + * @typedef CustomObjectFieldSchema + * @property {string} [_id] + * @property {string} [definition_id] + * @property {string} [key] + * @property {string} [type] + * @property {CustomObjectFieldValue[]} [value] + */ + +/** + * @typedef CustomObjectFieldValue + * @property {Object} [value] + */ + +/** + * @typedef CustomObjectListItemDefinationSchema + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] + */ + /** * @typedef DataLoaderSchema * @property {DataLoaderSourceSchema} [__source] @@ -404,11 +467,21 @@ const Joi = require("joi"); /** * @typedef SEO + * @property {SEObreadcrumb[]} [breadcrumb] + * @property {string} [canonical_url] * @property {string} [description] * @property {SEOImage} [image] + * @property {SEOMetaItem[]} [meta_tags] + * @property {SEOSitemap} [sitemap] * @property {string} [title] */ +/** + * @typedef SEObreadcrumb + * @property {Action} [action] + * @property {string} [url] + */ + /** * @typedef SeoComponent * @property {SeoSchema} [seo] @@ -419,9 +492,22 @@ const Joi = require("joi"); * @property {string} [url] */ +/** + * @typedef SEOMetaItem + * @property {SEOMetaItems[]} [items] + * @property {string} [title] + */ + +/** + * @typedef SEOMetaItems + * @property {string} [key] + * @property {string} [value] + */ + /** * @typedef SeoSchema * @property {string} [_id] + * @property {string} [additonal_sitemap] * @property {string} [app] * @property {boolean} [cannonical_enabled] * @property {string} [created_at] @@ -432,6 +518,30 @@ const Joi = require("joi"); * @property {string} [updated_at] */ +/** + * @typedef SeoSchemaComponent + * @property {SEOSchemaMarkupTemplate[]} [items] + */ + +/** + * @typedef SEOSchemaMarkupTemplate + * @property {boolean} [active] + * @property {string} [application] + * @property {string} [created_at] + * @property {string} [description] + * @property {string} [id] + * @property {string} [page_type] + * @property {string} [schema] + * @property {string} [title] + * @property {string} [updated_at] + */ + +/** + * @typedef SEOSitemap + * @property {string} [frequency] + * @property {number} [priority] + */ + /** * @typedef SlideshowGetResponse * @property {SlideshowSchema[]} [items] @@ -747,6 +857,44 @@ class ContentApplicationModel { }); } + /** @returns {CustomFieldSchema} */ + static CustomFieldSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + application_id: Joi.string().allow(""), + company_id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + created_by: Joi.string().allow(""), + creator: Joi.string().allow(""), + definition_id: Joi.string().allow(""), + has_invalid_values: Joi.boolean(), + invalid_value_errors: Joi.array().items(Joi.any()), + is_deleted: Joi.boolean(), + key: Joi.string().allow(""), + multi_value: Joi.boolean(), + namespace: Joi.string().allow(""), + resource: Joi.string().allow(""), + resource_id: Joi.string().allow(""), + type: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + value: Joi.array().items(ContentApplicationModel.CustomFieldValue()), + }); + } + + /** @returns {CustomFieldsResponseByResourceIdSchema} */ + static CustomFieldsResponseByResourceIdSchema() { + return Joi.object({ + items: Joi.array().items(ContentApplicationModel.CustomFieldSchema()), + }); + } + + /** @returns {CustomFieldValue} */ + static CustomFieldValue() { + return Joi.object({ + value: Joi.any(), + }); + } + /** @returns {CustomMetaTag} */ static CustomMetaTag() { return Joi.object({ @@ -756,6 +904,49 @@ class ContentApplicationModel { }); } + /** @returns {CustomObjectByIdSchema} */ + static CustomObjectByIdSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + definition: ContentApplicationModel.CustomObjectListItemDefinationSchema(), + display_name: Joi.string().allow(""), + fields: Joi.array().items( + ContentApplicationModel.CustomObjectFieldSchema() + ), + references: Joi.array().items(Joi.any()), + status: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectFieldSchema} */ + static CustomObjectFieldSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + definition_id: Joi.string().allow(""), + key: Joi.string().allow(""), + type: Joi.string().allow(""), + value: Joi.array().items( + ContentApplicationModel.CustomObjectFieldValue() + ), + }); + } + + /** @returns {CustomObjectFieldValue} */ + static CustomObjectFieldValue() { + return Joi.object({ + value: Joi.any(), + }); + } + + /** @returns {CustomObjectListItemDefinationSchema} */ + static CustomObjectListItemDefinationSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + name: Joi.string().allow(""), + type: Joi.string().allow(""), + }); + } + /** @returns {DataLoaderSchema} */ static DataLoaderSchema() { return Joi.object({ @@ -1059,12 +1250,24 @@ class ContentApplicationModel { /** @returns {SEO} */ static SEO() { return Joi.object({ + breadcrumb: Joi.array().items(ContentApplicationModel.SEObreadcrumb()), + canonical_url: Joi.string().allow(""), description: Joi.string().allow(""), image: ContentApplicationModel.SEOImage(), + meta_tags: Joi.array().items(ContentApplicationModel.SEOMetaItem()), + sitemap: ContentApplicationModel.SEOSitemap(), title: Joi.string().allow(""), }); } + /** @returns {SEObreadcrumb} */ + static SEObreadcrumb() { + return Joi.object({ + action: ContentApplicationModel.Action(), + url: Joi.string().allow(""), + }); + } + /** @returns {SeoComponent} */ static SeoComponent() { return Joi.object({ @@ -1079,10 +1282,27 @@ class ContentApplicationModel { }); } + /** @returns {SEOMetaItem} */ + static SEOMetaItem() { + return Joi.object({ + items: Joi.array().items(ContentApplicationModel.SEOMetaItems()), + title: Joi.string().allow(""), + }); + } + + /** @returns {SEOMetaItems} */ + static SEOMetaItems() { + return Joi.object({ + key: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + /** @returns {SeoSchema} */ static SeoSchema() { return Joi.object({ _id: Joi.string().allow(""), + additonal_sitemap: Joi.string().allow(""), app: Joi.string().allow(""), cannonical_enabled: Joi.boolean(), created_at: Joi.string().allow(""), @@ -1096,6 +1316,38 @@ class ContentApplicationModel { }); } + /** @returns {SeoSchemaComponent} */ + static SeoSchemaComponent() { + return Joi.object({ + items: Joi.array().items( + ContentApplicationModel.SEOSchemaMarkupTemplate() + ), + }); + } + + /** @returns {SEOSchemaMarkupTemplate} */ + static SEOSchemaMarkupTemplate() { + return Joi.object({ + active: Joi.boolean(), + application: Joi.string().allow(""), + created_at: Joi.string().allow(""), + description: Joi.string().allow(""), + id: Joi.string().allow(""), + page_type: Joi.string().allow(""), + schema: Joi.string().allow(""), + title: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + }); + } + + /** @returns {SEOSitemap} */ + static SEOSitemap() { + return Joi.object({ + frequency: Joi.string().allow(""), + priority: Joi.number(), + }); + } + /** @returns {SlideshowGetResponse} */ static SlideshowGetResponse() { return Joi.object({ diff --git a/sdk/application/Content/ContentApplicationValidator.d.ts b/sdk/application/Content/ContentApplicationValidator.d.ts index 6c3821732..d39200482 100644 --- a/sdk/application/Content/ContentApplicationValidator.d.ts +++ b/sdk/application/Content/ContentApplicationValidator.d.ts @@ -13,6 +13,15 @@ export = ContentApplicationValidator; * set of results. Default value is 1. * @property {number} [pageSize] - The number of items to retrieve in each page. */ +/** + * @typedef GetCustomFieldsParam + * @property {string} resource + * @property {string} resourceId + */ +/** + * @typedef GetCustomObjectParam + * @property {string} metaobjectId + */ /** @typedef GetDataLoadersParam */ /** * @typedef GetFaqBySlugParam @@ -56,6 +65,12 @@ export = ContentApplicationValidator; * @property {number} [pageSize] - The number of items to retrieve in each page. */ /** @typedef GetSEOConfigurationParam */ +/** + * @typedef GetSEOMarkupSchemasParam + * @property {string} [pageType] - The type of page against which schema + * template was created + * @property {boolean} [active] - Boolean value for fetching seo schema. + */ /** * @typedef GetSlideshowParam * @property {string} slug - A short, human-readable, URL-friendly identifier of @@ -77,6 +92,10 @@ declare class ContentApplicationValidator { static getBlog(): GetBlogParam; /** @returns {GetBlogsParam} */ static getBlogs(): GetBlogsParam; + /** @returns {GetCustomFieldsParam} */ + static getCustomFields(): GetCustomFieldsParam; + /** @returns {GetCustomObjectParam} */ + static getCustomObject(): GetCustomObjectParam; /** @returns {GetDataLoadersParam} */ static getDataLoaders(): any; /** @returns {GetFaqBySlugParam} */ @@ -101,6 +120,8 @@ declare class ContentApplicationValidator { static getPages(): GetPagesParam; /** @returns {GetSEOConfigurationParam} */ static getSEOConfiguration(): any; + /** @returns {GetSEOMarkupSchemasParam} */ + static getSEOMarkupSchemas(): GetSEOMarkupSchemasParam; /** @returns {GetSlideshowParam} */ static getSlideshow(): GetSlideshowParam; /** @returns {GetSlideshowsParam} */ @@ -111,7 +132,7 @@ declare class ContentApplicationValidator { static getTags(): any; } declare namespace ContentApplicationValidator { - export { GetAnnouncementsParam, GetBlogParam, GetBlogsParam, GetDataLoadersParam, GetFaqBySlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugParam, GetFaqsParam, GetFaqsByCategorySlugParam, GetLandingPageParam, GetLegalInformationParam, GetNavigationsParam, GetPageParam, GetPagesParam, GetSEOConfigurationParam, GetSlideshowParam, GetSlideshowsParam, GetSupportInformationParam, GetTagsParam }; + export { GetAnnouncementsParam, GetBlogParam, GetBlogsParam, GetCustomFieldsParam, GetCustomObjectParam, GetDataLoadersParam, GetFaqBySlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugParam, GetFaqsParam, GetFaqsByCategorySlugParam, GetLandingPageParam, GetLegalInformationParam, GetNavigationsParam, GetPageParam, GetPagesParam, GetSEOConfigurationParam, GetSEOMarkupSchemasParam, GetSlideshowParam, GetSlideshowsParam, GetSupportInformationParam, GetTagsParam }; } type GetBlogParam = { /** @@ -136,6 +157,13 @@ type GetBlogsParam = { */ pageSize?: number; }; +type GetCustomFieldsParam = { + resource: string; + resourceId: string; +}; +type GetCustomObjectParam = { + metaobjectId: string; +}; type GetFaqBySlugParam = { /** * - A short, human-readable, URL-friendly identifier of @@ -194,6 +222,17 @@ type GetPagesParam = { */ pageSize?: number; }; +type GetSEOMarkupSchemasParam = { + /** + * - The type of page against which schema + * template was created + */ + pageType?: string; + /** + * - Boolean value for fetching seo schema. + */ + active?: boolean; +}; type GetSlideshowParam = { /** * - A short, human-readable, URL-friendly identifier of diff --git a/sdk/application/Content/ContentApplicationValidator.js b/sdk/application/Content/ContentApplicationValidator.js index 7f7a588b7..a8a545550 100644 --- a/sdk/application/Content/ContentApplicationValidator.js +++ b/sdk/application/Content/ContentApplicationValidator.js @@ -19,6 +19,17 @@ const ContentApplicationModel = require("./ContentApplicationModel"); * @property {number} [pageSize] - The number of items to retrieve in each page. */ +/** + * @typedef GetCustomFieldsParam + * @property {string} resource + * @property {string} resourceId + */ + +/** + * @typedef GetCustomObjectParam + * @property {string} metaobjectId + */ + /** @typedef GetDataLoadersParam */ /** @@ -74,6 +85,13 @@ const ContentApplicationModel = require("./ContentApplicationModel"); /** @typedef GetSEOConfigurationParam */ +/** + * @typedef GetSEOMarkupSchemasParam + * @property {string} [pageType] - The type of page against which schema + * template was created + * @property {boolean} [active] - Boolean value for fetching seo schema. + */ + /** * @typedef GetSlideshowParam * @property {string} slug - A short, human-readable, URL-friendly identifier of @@ -114,6 +132,21 @@ class ContentApplicationValidator { }); } + /** @returns {GetCustomFieldsParam} */ + static getCustomFields() { + return Joi.object({ + resource: Joi.string().allow("").required(), + resourceId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetCustomObjectParam} */ + static getCustomObject() { + return Joi.object({ + metaobjectId: Joi.string().allow("").required(), + }).required(); + } + /** @returns {GetDataLoadersParam} */ static getDataLoaders() { return Joi.object({}); @@ -189,6 +222,14 @@ class ContentApplicationValidator { return Joi.object({}); } + /** @returns {GetSEOMarkupSchemasParam} */ + static getSEOMarkupSchemas() { + return Joi.object({ + pageType: Joi.string().allow(""), + active: Joi.boolean(), + }); + } + /** @returns {GetSlideshowParam} */ static getSlideshow() { return Joi.object({ diff --git a/sdk/application/Logistic/LogisticApplicationClient.d.ts b/sdk/application/Logistic/LogisticApplicationClient.d.ts index 6000256d5..95d5ef9d3 100644 --- a/sdk/application/Logistic/LogisticApplicationClient.d.ts +++ b/sdk/application/Logistic/LogisticApplicationClient.d.ts @@ -4,10 +4,16 @@ declare class Logistic { _conf: any; _relativeUrls: { getAllCountries: string; + getCountries: string; + getCountry: string; + getLocalities: string; + getLocality: string; + getLocations: string; getOptimalLocations: string; getPincodeCity: string; getPincodeZones: string; getTatProduct: string; + validateAddress: string; }; _urls: {}; updateUrls(urls: any): void; @@ -21,6 +27,56 @@ declare class Logistic { * @description: Get all countries - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getAllCountries/). */ getAllCountries({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {LogisticApplicationValidator.GetCountriesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCountries + * @summary: Get all countries and associated data. + * @description: Retrieve of all countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/). + */ + getCountries({ onboarding, pageNo, pageSize, q, requestHeaders }?: LogisticApplicationValidator.GetCountriesParam, { responseHeaders }?: object): Promise; + /** + * @param {LogisticApplicationValidator.GetCountryParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCountry + * @summary: Get single country and associated data. + * @description: Retrieve data for a single country and address format. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/). + */ + getCountry({ countryIsoCode, requestHeaders }?: LogisticApplicationValidator.GetCountryParam, { responseHeaders }?: object): Promise; + /** + * @param {LogisticApplicationValidator.GetLocalitiesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getLocalities + * @summary: Get Localities. + * @description: Get Localities data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/). + */ + getLocalities({ localityType, country, state, city, pageNo, pageSize, q, requestHeaders, }?: LogisticApplicationValidator.GetLocalitiesParam, { responseHeaders }?: object): Promise; + /** + * @param {LogisticApplicationValidator.GetLocalityParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getLocality + * @summary: Get Locality API + * @description: Get Locality data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocality/). + */ + getLocality({ localityType, localityValue, country, state, city, requestHeaders }?: LogisticApplicationValidator.GetLocalityParam, { responseHeaders }?: object): Promise; + /** + * @param {LogisticApplicationValidator.GetLocationsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getLocations + * @summary: GET locations from the Pincode. + * @description: This API returns store from the Pincode View. - 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, }?: LogisticApplicationValidator.GetLocationsParam, { responseHeaders }?: object): Promise; /** * @param {LogisticApplicationValidator.GetOptimalLocationsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -64,6 +120,17 @@ declare class Logistic { * @description: Get TAT data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getTatProduct/). */ getTatProduct({ body, requestHeaders }?: LogisticApplicationValidator.GetTatProductParam, { responseHeaders }?: object): Promise; + /** + * @param {LogisticApplicationValidator.ValidateAddressParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name validateAddress + * @summary: Validate given address wrt template + * @description: Validate given address wrt template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/). + */ + validateAddress({ countryIsoCode, templateName, body, requestHeaders }?: LogisticApplicationValidator.ValidateAddressParam, { responseHeaders }?: object): Promise; } import LogisticApplicationModel = require("./LogisticApplicationModel"); import LogisticApplicationValidator = require("./LogisticApplicationValidator"); diff --git a/sdk/application/Logistic/LogisticApplicationClient.js b/sdk/application/Logistic/LogisticApplicationClient.js index 275eac48d..3c9297fbf 100644 --- a/sdk/application/Logistic/LogisticApplicationClient.js +++ b/sdk/application/Logistic/LogisticApplicationClient.js @@ -15,11 +15,21 @@ class Logistic { this._conf = _conf; this._relativeUrls = { getAllCountries: "/service/application/logistics/v1.0/country-list", + getCountries: "/service/application/logistics/v1.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( (urls, [method, relativeUrl]) => { @@ -115,6 +125,462 @@ class Logistic { return response; } + /** + * @param {LogisticApplicationValidator.GetCountriesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCountries + * @summary: Get all countries and associated data. + * @description: Retrieve of all countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountries/). + */ + async getCountries( + { onboarding, pageNo, pageSize, q, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticApplicationValidator.getCountries().validate( + { onboarding, pageNo, pageSize, q }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticApplicationValidator.getCountries().validate( + { onboarding, pageNo, pageSize, q }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Logistic > getCountries \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["onboarding"] = onboarding; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["q"] = q; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getCountries"], + params: {}, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticApplicationModel.GetCountries().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 application > Logistic > getCountries \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticApplicationValidator.GetCountryParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCountry + * @summary: Get single country and associated data. + * @description: Retrieve data for a single country and address format. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getCountry/). + */ + async getCountry( + { countryIsoCode, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticApplicationValidator.getCountry().validate( + { countryIsoCode }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticApplicationValidator.getCountry().validate( + { countryIsoCode }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Logistic > getCountry \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getCountry"], + params: { countryIsoCode }, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticApplicationModel.GetCountry().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 application > Logistic > getCountry \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticApplicationValidator.GetLocalitiesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getLocalities + * @summary: Get Localities. + * @description: Get Localities data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocalities/). + */ + async getLocalities( + { + localityType, + country, + state, + city, + pageNo, + pageSize, + q, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticApplicationValidator.getLocalities().validate( + { localityType, country, state, city, pageNo, pageSize, q }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticApplicationValidator.getLocalities().validate( + { localityType, country, state, city, pageNo, pageSize, q }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Logistic > getLocalities \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["country"] = country; + query_params["state"] = state; + query_params["city"] = city; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["q"] = q; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getLocalities"], + params: { localityType }, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticApplicationModel.GetLocalities().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 application > Logistic > getLocalities \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticApplicationValidator.GetLocalityParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getLocality + * @summary: Get Locality API + * @description: Get Locality data - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocality/). + */ + async getLocality( + { localityType, localityValue, country, state, city, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticApplicationValidator.getLocality().validate( + { localityType, localityValue, country, state, city }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticApplicationValidator.getLocality().validate( + { localityType, localityValue, country, state, city }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Logistic > getLocality \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["country"] = country; + query_params["state"] = state; + query_params["city"] = city; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getLocality"], + params: { localityType, localityValue }, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticApplicationModel.GetLocality().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 application > Logistic > getLocality \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticApplicationValidator.GetLocationsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getLocations + * @summary: GET locations from the Pincode. + * @description: This API returns store from the Pincode View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/getLocations/). + */ + async getLocations( + { + xApplicationId, + xApplicationData, + country, + state, + city, + pincode, + sector, + pageNo, + pageSize, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticApplicationValidator.getLocations().validate( + { + xApplicationId, + xApplicationData, + country, + state, + city, + pincode, + sector, + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticApplicationValidator.getLocations().validate( + { + xApplicationId, + xApplicationData, + country, + state, + city, + pincode, + sector, + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Logistic > getLocations \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["x-application-id"] = xApplicationId; + query_params["x-application-data"] = xApplicationData; + query_params["country"] = country; + query_params["state"] = state; + query_params["city"] = city; + query_params["pincode"] = pincode; + query_params["sector"] = sector; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getLocations"], + params: {}, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticApplicationModel.GetStoreResponse().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 application > Logistic > getLocations \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {LogisticApplicationValidator.GetOptimalLocationsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -431,6 +897,87 @@ class Logistic { return response; } + + /** + * @param {LogisticApplicationValidator.ValidateAddressParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name validateAddress + * @summary: Validate given address wrt template + * @description: Validate given address wrt template - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/logistic/validateAddress/). + */ + async validateAddress( + { countryIsoCode, templateName, body, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticApplicationValidator.validateAddress().validate( + { countryIsoCode, templateName, body }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticApplicationValidator.validateAddress().validate( + { countryIsoCode, templateName, body }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Logistic > validateAddress \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "post", + constructUrl({ + url: this._urls["validateAddress"], + params: { countryIsoCode, templateName }, + }), + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticApplicationModel.ValidateAddressRequest().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 application > Logistic > validateAddress \n ${res_error}`, + }); + } + } + + return response; + } } module.exports = Logistic; diff --git a/sdk/application/Logistic/LogisticApplicationModel.d.ts b/sdk/application/Logistic/LogisticApplicationModel.d.ts index 3bc065c2b..8a0c8288c 100644 --- a/sdk/application/Logistic/LogisticApplicationModel.d.ts +++ b/sdk/application/Logistic/LogisticApplicationModel.d.ts @@ -11,6 +11,11 @@ export = LogisticApplicationModel; * @property {string} [type] * @property {string} [uid] */ +/** + * @typedef CountryHierarchy + * @property {string} [name] + * @property {string} [slug] + */ /** * @typedef CountryListResponse * @property {CountryEntityResponse[]} [results] @@ -20,6 +25,27 @@ export = LogisticApplicationModel; * @property {string} [country_code] * @property {string} [isd_code] */ +/** + * @typedef CountryObject + * @property {CurrencyObject} [currency] + * @property {string} [display_name] + * @property {CountryHierarchy[]} [hierarchy] + * @property {string} [id] + * @property {string} [iso2] + * @property {string} [iso3] + * @property {string} [latitude] + * @property {string} [longitude] + * @property {string} [name] + * @property {string} [phone_code] + * @property {string[]} [timezones] + * @property {string} [type] + */ +/** + * @typedef CurrencyObject + * @property {string} [code] + * @property {string} [name] + * @property {string} [symbol] + */ /** * @typedef DP * @property {string} [area_code] @@ -33,6 +59,110 @@ export = LogisticApplicationModel; * @property {number} rvp_priority * @property {string} [transport_mode] */ +/** + * @typedef ErrorResponse + * @property {string} [error] + */ +/** + * @typedef FieldValidation + * @property {FieldValidationRegex} [regex] + * @property {string} [type] + */ +/** + * @typedef FieldValidationRegex + * @property {LengthValidation} [length] + * @property {string} [value] + */ +/** + * @typedef GetCountries + * @property {CountryObject[]} [items] + * @property {Page} [page] + */ +/** + * @typedef GetCountry + * @property {CurrencyObject} [currency] + * @property {string} [display_name] + * @property {GetCountryFields} [fields] + * @property {CountryHierarchy[]} [hierarchy] + * @property {string} [id] + * @property {string} [iso2] + * @property {string} [iso3] + * @property {string} [latitude] + * @property {string} [longitude] + * @property {string} [name] + * @property {string} [phone_code] + * @property {string[]} [timezones] + * @property {string} [type] + */ +/** + * @typedef GetCountryFields + * @property {GetCountryFieldsAddress[]} address + * @property {GetCountryFieldsAddressTemplate} address_template + * @property {string[]} serviceability_fields + */ +/** + * @typedef GetCountryFieldsAddress + * @property {string} display_name + * @property {boolean} [edit] + * @property {string} [error_text] + * @property {string} input + * @property {boolean} required + * @property {string} slug + * @property {FieldValidation} [validation] + * @property {GetCountryFieldsAddressValues} [values] + */ +/** + * @typedef GetCountryFieldsAddressTemplate + * @property {string} checkout_form + * @property {string} default_display + * @property {string} store_os_form + */ +/** + * @typedef GetCountryFieldsAddressValues + * @property {GetOneOrAll} [get_all] + * @property {GetOneOrAll} [get_one] + */ +/** + * @typedef GetLocalities + * @property {Localities[]} [items] + * @property {Page} [page] + */ +/** + * @typedef GetLocality + * @property {string} [display_name] + * @property {string} [id] + * @property {LocalityParent[]} [localities] + * @property {string} [name] + * @property {string[]} [parent_ids] + * @property {string} [type] + */ +/** + * @typedef GetOneOrAll + * @property {string} [operation_id] + * @property {GetOneOrAllParams} [params] + */ +/** + * @typedef GetOneOrAllParams + * @property {GetOneOrAllPath} [path] + * @property {GetOneOrAllQuery} [query] + */ +/** + * @typedef GetOneOrAllPath + * @property {string} [locality_type] + * @property {string} [locality_value] + */ +/** + * @typedef GetOneOrAllQuery + * @property {string} [city] + * @property {string} [country] + * @property {string} [sector] + * @property {string} [state] + */ +/** + * @typedef GetStoreResponse + * @property {StoreItemResponse[]} [items] + * @property {Page} [page] + */ /** * @typedef GetZoneFromPincodeViewRequest * @property {string} country @@ -43,10 +173,41 @@ export = LogisticApplicationModel; * @property {string} serviceability_type * @property {string[]} zones */ +/** + * @typedef LengthValidation + * @property {number} [max] + * @property {number} [min] + */ +/** + * @typedef Localities + * @property {string} [display_name] + * @property {string} [id] + * @property {string} [name] + * @property {string[]} [parent_ids] + * @property {string} [type] + */ +/** + * @typedef LocalityParent + * @property {string} [display_name] + * @property {string} [id] + * @property {string} [name] + * @property {string[]} [parent_ids] + * @property {string} [type] + */ /** * @typedef LogisticsResponse * @property {Object} [dp] */ +/** + * @typedef Page + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type + */ /** * @typedef PincodeApiResponse * @property {PincodeDataResponse[]} [data] @@ -104,6 +265,17 @@ export = LogisticApplicationModel; * @property {boolean} success * @property {string} to_pincode */ +/** + * @typedef StoreItemResponse + * @property {number} [company_id] + * @property {string} [fulfillment_type] + * @property {number} [id] + * @property {number} [latitude] + * @property {number} [longitude] + * @property {number} [processing_time] + * @property {string} [store_type] + * @property {string[]} [tags] + */ /** * @typedef TATArticlesRequest * @property {TATCategoryRequest} [category] @@ -183,10 +355,35 @@ export = LogisticApplicationModel; * @property {string} [to_city] * @property {string} [to_pincode] */ +/** + * @typedef ValidateAddressRequest + * @property {string} [address] - A string representing the complete address, + * combining address line 1, address line 2, area, landmark, sector, city, + * state, and pincode. This provides a comprehensive view of the address details. + * @property {string} [address1] - A string representing the first line of the + * address, typically containing street or building information. + * @property {string} [address2] - A string representing the second line of the + * address, which can be used for additional address details if needed. + * @property {string} [area] - A string specifying the locality or area + * associated with the address. + * @property {string} [city] - A string denoting the city or municipality of the address. + * @property {string} [email] - A string containing the recipient's email address. + * @property {string} [landmark] - A string representing a prominent nearby + * landmark that aids in locating the address. + * @property {string} [name] - A string representing the recipient's name or the + * organization name associated with the address. + * @property {string} [phone] - An integer representing the recipient's contact + * phone number. + * @property {string} [pincode] - A string indicating the postal code or PIN + * code of the address area. + * @property {string} [sector] - A string specifying the sector or district of + * the address if applicable. + * @property {string} [state] - A string indicating the state or province of the address. + */ declare class LogisticApplicationModel { } declare namespace LogisticApplicationModel { - export { CountryEntityResponse, CountryListResponse, CountryMetaResponse, DP, GetZoneFromPincodeViewRequest, GetZoneFromPincodeViewResponse, LogisticsResponse, PincodeApiResponse, PincodeDataResponse, PincodeErrorSchemaResponse, PincodeLatLongData, PincodeMetaResponse, PincodeParentsResponse, ReAssignStoreRequest, ReAssignStoreResponse, TATArticlesRequest, TATArticlesResponse, TATCategoryRequest, TATErrorSchemaResponse, TATFormattedResponse, TATLocationDetailsRequest, TATLocationDetailsResponse, TATPromiseResponse, TATTimestampResponse, TATViewRequest, TATViewResponse }; + export { CountryEntityResponse, CountryHierarchy, CountryListResponse, CountryMetaResponse, CountryObject, CurrencyObject, DP, ErrorResponse, FieldValidation, FieldValidationRegex, GetCountries, GetCountry, GetCountryFields, GetCountryFieldsAddress, GetCountryFieldsAddressTemplate, GetCountryFieldsAddressValues, GetLocalities, GetLocality, GetOneOrAll, GetOneOrAllParams, GetOneOrAllPath, GetOneOrAllQuery, GetStoreResponse, GetZoneFromPincodeViewRequest, GetZoneFromPincodeViewResponse, LengthValidation, Localities, LocalityParent, LogisticsResponse, Page, PincodeApiResponse, PincodeDataResponse, PincodeErrorSchemaResponse, PincodeLatLongData, PincodeMetaResponse, PincodeParentsResponse, ReAssignStoreRequest, ReAssignStoreResponse, StoreItemResponse, TATArticlesRequest, TATArticlesResponse, TATCategoryRequest, TATErrorSchemaResponse, TATFormattedResponse, TATLocationDetailsRequest, TATLocationDetailsResponse, TATPromiseResponse, TATTimestampResponse, TATViewRequest, TATViewResponse, ValidateAddressRequest }; } /** @returns {CountryEntityResponse} */ declare function CountryEntityResponse(): CountryEntityResponse; @@ -201,6 +398,12 @@ type CountryEntityResponse = { type?: string; uid?: string; }; +/** @returns {CountryHierarchy} */ +declare function CountryHierarchy(): CountryHierarchy; +type CountryHierarchy = { + name?: string; + slug?: string; +}; /** @returns {CountryListResponse} */ declare function CountryListResponse(): CountryListResponse; type CountryListResponse = { @@ -212,6 +415,29 @@ type CountryMetaResponse = { country_code?: string; isd_code?: string; }; +/** @returns {CountryObject} */ +declare function CountryObject(): CountryObject; +type CountryObject = { + currency?: CurrencyObject; + display_name?: string; + hierarchy?: CountryHierarchy[]; + id?: string; + iso2?: string; + iso3?: string; + latitude?: string; + longitude?: string; + name?: string; + phone_code?: string; + timezones?: string[]; + type?: string; +}; +/** @returns {CurrencyObject} */ +declare function CurrencyObject(): CurrencyObject; +type CurrencyObject = { + code?: string; + name?: string; + symbol?: string; +}; /** @returns {DP} */ declare function DP(): DP; type DP = { @@ -226,6 +452,126 @@ type DP = { rvp_priority: number; transport_mode?: string; }; +/** @returns {ErrorResponse} */ +declare function ErrorResponse(): ErrorResponse; +type ErrorResponse = { + error?: string; +}; +/** @returns {FieldValidation} */ +declare function FieldValidation(): FieldValidation; +type FieldValidation = { + regex?: FieldValidationRegex; + type?: string; +}; +/** @returns {FieldValidationRegex} */ +declare function FieldValidationRegex(): FieldValidationRegex; +type FieldValidationRegex = { + length?: LengthValidation; + value?: string; +}; +/** @returns {GetCountries} */ +declare function GetCountries(): GetCountries; +type GetCountries = { + items?: CountryObject[]; + page?: Page; +}; +/** @returns {GetCountry} */ +declare function GetCountry(): GetCountry; +type GetCountry = { + currency?: CurrencyObject; + display_name?: string; + fields?: GetCountryFields; + hierarchy?: CountryHierarchy[]; + id?: string; + iso2?: string; + iso3?: string; + latitude?: string; + longitude?: string; + name?: string; + phone_code?: string; + timezones?: string[]; + type?: string; +}; +/** @returns {GetCountryFields} */ +declare function GetCountryFields(): GetCountryFields; +type GetCountryFields = { + address: GetCountryFieldsAddress[]; + address_template: GetCountryFieldsAddressTemplate; + serviceability_fields: string[]; +}; +/** @returns {GetCountryFieldsAddress} */ +declare function GetCountryFieldsAddress(): GetCountryFieldsAddress; +type GetCountryFieldsAddress = { + display_name: string; + edit?: boolean; + error_text?: string; + input: string; + required: boolean; + slug: string; + validation?: FieldValidation; + values?: GetCountryFieldsAddressValues; +}; +/** @returns {GetCountryFieldsAddressTemplate} */ +declare function GetCountryFieldsAddressTemplate(): GetCountryFieldsAddressTemplate; +type GetCountryFieldsAddressTemplate = { + checkout_form: string; + default_display: string; + store_os_form: string; +}; +/** @returns {GetCountryFieldsAddressValues} */ +declare function GetCountryFieldsAddressValues(): GetCountryFieldsAddressValues; +type GetCountryFieldsAddressValues = { + get_all?: GetOneOrAll; + get_one?: GetOneOrAll; +}; +/** @returns {GetLocalities} */ +declare function GetLocalities(): GetLocalities; +type GetLocalities = { + items?: Localities[]; + page?: Page; +}; +/** @returns {GetLocality} */ +declare function GetLocality(): GetLocality; +type GetLocality = { + display_name?: string; + id?: string; + localities?: LocalityParent[]; + name?: string; + parent_ids?: string[]; + type?: string; +}; +/** @returns {GetOneOrAll} */ +declare function GetOneOrAll(): GetOneOrAll; +type GetOneOrAll = { + operation_id?: string; + params?: GetOneOrAllParams; +}; +/** @returns {GetOneOrAllParams} */ +declare function GetOneOrAllParams(): GetOneOrAllParams; +type GetOneOrAllParams = { + path?: GetOneOrAllPath; + query?: GetOneOrAllQuery; +}; +/** @returns {GetOneOrAllPath} */ +declare function GetOneOrAllPath(): GetOneOrAllPath; +type GetOneOrAllPath = { + locality_type?: string; + locality_value?: string; +}; +/** @returns {GetOneOrAllQuery} */ +declare function GetOneOrAllQuery(): GetOneOrAllQuery; +type GetOneOrAllQuery = { + city?: string; + country?: string; + sector?: string; + state?: string; +}; +/** @returns {GetStoreResponse} */ +declare function GetStoreResponse(): GetStoreResponse; +type GetStoreResponse = { + items?: StoreItemResponse[]; + page?: Page; +}; /** @returns {GetZoneFromPincodeViewRequest} */ declare function GetZoneFromPincodeViewRequest(): GetZoneFromPincodeViewRequest; type GetZoneFromPincodeViewRequest = { @@ -238,11 +584,46 @@ type GetZoneFromPincodeViewResponse = { serviceability_type: string; zones: string[]; }; +/** @returns {LengthValidation} */ +declare function LengthValidation(): LengthValidation; +type LengthValidation = { + max?: number; + min?: number; +}; +/** @returns {Localities} */ +declare function Localities(): Localities; +type Localities = { + display_name?: string; + id?: string; + name?: string; + parent_ids?: string[]; + type?: string; +}; +/** @returns {LocalityParent} */ +declare function LocalityParent(): LocalityParent; +type LocalityParent = { + display_name?: string; + id?: string; + name?: string; + parent_ids?: string[]; + type?: string; +}; /** @returns {LogisticsResponse} */ declare function LogisticsResponse(): LogisticsResponse; type LogisticsResponse = { dp?: any; }; +/** @returns {Page} */ +declare function Page(): Page; +type Page = { + current?: number; + has_next?: boolean; + has_previous?: boolean; + item_total?: number; + next_id?: string; + size?: number; + type: string; +}; /** @returns {PincodeApiResponse} */ declare function PincodeApiResponse(): PincodeApiResponse; type PincodeApiResponse = { @@ -308,6 +689,18 @@ type ReAssignStoreResponse = { success: boolean; to_pincode: string; }; +/** @returns {StoreItemResponse} */ +declare function StoreItemResponse(): StoreItemResponse; +type StoreItemResponse = { + company_id?: number; + fulfillment_type?: string; + id?: number; + latitude?: number; + longitude?: number; + processing_time?: number; + store_type?: string; + tags?: string[]; +}; /** @returns {TATArticlesRequest} */ declare function TATArticlesRequest(): TATArticlesRequest; type TATArticlesRequest = { @@ -398,3 +791,65 @@ type TATViewResponse = { to_city?: string; to_pincode?: string; }; +/** @returns {ValidateAddressRequest} */ +declare function ValidateAddressRequest(): ValidateAddressRequest; +type ValidateAddressRequest = { + /** + * - A string representing the complete address, + * combining address line 1, address line 2, area, landmark, sector, city, + * state, and pincode. This provides a comprehensive view of the address details. + */ + address?: string; + /** + * - A string representing the first line of the + * address, typically containing street or building information. + */ + address1?: string; + /** + * - A string representing the second line of the + * address, which can be used for additional address details if needed. + */ + address2?: string; + /** + * - A string specifying the locality or area + * associated with the address. + */ + area?: string; + /** + * - A string denoting the city or municipality of the address. + */ + city?: string; + /** + * - A string containing the recipient's email address. + */ + email?: string; + /** + * - A string representing a prominent nearby + * landmark that aids in locating the address. + */ + landmark?: string; + /** + * - A string representing the recipient's name or the + * organization name associated with the address. + */ + name?: string; + /** + * - An integer representing the recipient's contact + * phone number. + */ + phone?: string; + /** + * - A string indicating the postal code or PIN + * code of the address area. + */ + pincode?: string; + /** + * - A string specifying the sector or district of + * the address if applicable. + */ + sector?: string; + /** + * - A string indicating the state or province of the address. + */ + state?: string; +}; diff --git a/sdk/application/Logistic/LogisticApplicationModel.js b/sdk/application/Logistic/LogisticApplicationModel.js index 89ada7b73..6624edda4 100644 --- a/sdk/application/Logistic/LogisticApplicationModel.js +++ b/sdk/application/Logistic/LogisticApplicationModel.js @@ -13,6 +13,12 @@ const Joi = require("joi"); * @property {string} [uid] */ +/** + * @typedef CountryHierarchy + * @property {string} [name] + * @property {string} [slug] + */ + /** * @typedef CountryListResponse * @property {CountryEntityResponse[]} [results] @@ -24,6 +30,29 @@ const Joi = require("joi"); * @property {string} [isd_code] */ +/** + * @typedef CountryObject + * @property {CurrencyObject} [currency] + * @property {string} [display_name] + * @property {CountryHierarchy[]} [hierarchy] + * @property {string} [id] + * @property {string} [iso2] + * @property {string} [iso3] + * @property {string} [latitude] + * @property {string} [longitude] + * @property {string} [name] + * @property {string} [phone_code] + * @property {string[]} [timezones] + * @property {string} [type] + */ + +/** + * @typedef CurrencyObject + * @property {string} [code] + * @property {string} [name] + * @property {string} [symbol] + */ + /** * @typedef DP * @property {string} [area_code] @@ -38,6 +67,126 @@ const Joi = require("joi"); * @property {string} [transport_mode] */ +/** + * @typedef ErrorResponse + * @property {string} [error] + */ + +/** + * @typedef FieldValidation + * @property {FieldValidationRegex} [regex] + * @property {string} [type] + */ + +/** + * @typedef FieldValidationRegex + * @property {LengthValidation} [length] + * @property {string} [value] + */ + +/** + * @typedef GetCountries + * @property {CountryObject[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef GetCountry + * @property {CurrencyObject} [currency] + * @property {string} [display_name] + * @property {GetCountryFields} [fields] + * @property {CountryHierarchy[]} [hierarchy] + * @property {string} [id] + * @property {string} [iso2] + * @property {string} [iso3] + * @property {string} [latitude] + * @property {string} [longitude] + * @property {string} [name] + * @property {string} [phone_code] + * @property {string[]} [timezones] + * @property {string} [type] + */ + +/** + * @typedef GetCountryFields + * @property {GetCountryFieldsAddress[]} address + * @property {GetCountryFieldsAddressTemplate} address_template + * @property {string[]} serviceability_fields + */ + +/** + * @typedef GetCountryFieldsAddress + * @property {string} display_name + * @property {boolean} [edit] + * @property {string} [error_text] + * @property {string} input + * @property {boolean} required + * @property {string} slug + * @property {FieldValidation} [validation] + * @property {GetCountryFieldsAddressValues} [values] + */ + +/** + * @typedef GetCountryFieldsAddressTemplate + * @property {string} checkout_form + * @property {string} default_display + * @property {string} store_os_form + */ + +/** + * @typedef GetCountryFieldsAddressValues + * @property {GetOneOrAll} [get_all] + * @property {GetOneOrAll} [get_one] + */ + +/** + * @typedef GetLocalities + * @property {Localities[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef GetLocality + * @property {string} [display_name] + * @property {string} [id] + * @property {LocalityParent[]} [localities] + * @property {string} [name] + * @property {string[]} [parent_ids] + * @property {string} [type] + */ + +/** + * @typedef GetOneOrAll + * @property {string} [operation_id] + * @property {GetOneOrAllParams} [params] + */ + +/** + * @typedef GetOneOrAllParams + * @property {GetOneOrAllPath} [path] + * @property {GetOneOrAllQuery} [query] + */ + +/** + * @typedef GetOneOrAllPath + * @property {string} [locality_type] + * @property {string} [locality_value] + */ + +/** + * @typedef GetOneOrAllQuery + * @property {string} [city] + * @property {string} [country] + * @property {string} [sector] + * @property {string} [state] + */ + +/** + * @typedef GetStoreResponse + * @property {StoreItemResponse[]} [items] + * @property {Page} [page] + */ + /** * @typedef GetZoneFromPincodeViewRequest * @property {string} country @@ -50,11 +199,46 @@ const Joi = require("joi"); * @property {string[]} zones */ +/** + * @typedef LengthValidation + * @property {number} [max] + * @property {number} [min] + */ + +/** + * @typedef Localities + * @property {string} [display_name] + * @property {string} [id] + * @property {string} [name] + * @property {string[]} [parent_ids] + * @property {string} [type] + */ + +/** + * @typedef LocalityParent + * @property {string} [display_name] + * @property {string} [id] + * @property {string} [name] + * @property {string[]} [parent_ids] + * @property {string} [type] + */ + /** * @typedef LogisticsResponse * @property {Object} [dp] */ +/** + * @typedef Page + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type + */ + /** * @typedef PincodeApiResponse * @property {PincodeDataResponse[]} [data] @@ -120,6 +304,18 @@ const Joi = require("joi"); * @property {string} to_pincode */ +/** + * @typedef StoreItemResponse + * @property {number} [company_id] + * @property {string} [fulfillment_type] + * @property {number} [id] + * @property {number} [latitude] + * @property {number} [longitude] + * @property {number} [processing_time] + * @property {string} [store_type] + * @property {string[]} [tags] + */ + /** * @typedef TATArticlesRequest * @property {TATCategoryRequest} [category] @@ -210,6 +406,32 @@ const Joi = require("joi"); * @property {string} [to_pincode] */ +/** + * @typedef ValidateAddressRequest + * @property {string} [address] - A string representing the complete address, + * combining address line 1, address line 2, area, landmark, sector, city, + * state, and pincode. This provides a comprehensive view of the address details. + * @property {string} [address1] - A string representing the first line of the + * address, typically containing street or building information. + * @property {string} [address2] - A string representing the second line of the + * address, which can be used for additional address details if needed. + * @property {string} [area] - A string specifying the locality or area + * associated with the address. + * @property {string} [city] - A string denoting the city or municipality of the address. + * @property {string} [email] - A string containing the recipient's email address. + * @property {string} [landmark] - A string representing a prominent nearby + * landmark that aids in locating the address. + * @property {string} [name] - A string representing the recipient's name or the + * organization name associated with the address. + * @property {string} [phone] - An integer representing the recipient's contact + * phone number. + * @property {string} [pincode] - A string indicating the postal code or PIN + * code of the address area. + * @property {string} [sector] - A string specifying the sector or district of + * the address if applicable. + * @property {string} [state] - A string indicating the state or province of the address. + */ + class LogisticApplicationModel { /** @returns {CountryEntityResponse} */ static CountryEntityResponse() { @@ -226,6 +448,14 @@ class LogisticApplicationModel { }); } + /** @returns {CountryHierarchy} */ + static CountryHierarchy() { + return Joi.object({ + name: Joi.string().allow(""), + slug: Joi.string().allow(""), + }); + } + /** @returns {CountryListResponse} */ static CountryListResponse() { return Joi.object({ @@ -243,6 +473,33 @@ class LogisticApplicationModel { }); } + /** @returns {CountryObject} */ + static CountryObject() { + return Joi.object({ + currency: LogisticApplicationModel.CurrencyObject(), + display_name: Joi.string().allow(""), + hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()), + id: Joi.string().allow(""), + iso2: Joi.string().allow(""), + iso3: Joi.string().allow(""), + latitude: Joi.string().allow(""), + longitude: Joi.string().allow(""), + name: Joi.string().allow(""), + phone_code: Joi.string().allow(""), + timezones: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + }); + } + + /** @returns {CurrencyObject} */ + static CurrencyObject() { + return Joi.object({ + code: Joi.string().allow(""), + name: Joi.string().allow(""), + symbol: Joi.string().allow(""), + }); + } + /** @returns {DP} */ static DP() { return Joi.object({ @@ -259,6 +516,162 @@ class LogisticApplicationModel { }); } + /** @returns {ErrorResponse} */ + static ErrorResponse() { + return Joi.object({ + error: Joi.string().allow(""), + }); + } + + /** @returns {FieldValidation} */ + static FieldValidation() { + return Joi.object({ + regex: LogisticApplicationModel.FieldValidationRegex(), + type: Joi.string().allow(""), + }); + } + + /** @returns {FieldValidationRegex} */ + static FieldValidationRegex() { + return Joi.object({ + length: LogisticApplicationModel.LengthValidation(), + value: Joi.string().allow(""), + }); + } + + /** @returns {GetCountries} */ + static GetCountries() { + return Joi.object({ + items: Joi.array().items(LogisticApplicationModel.CountryObject()), + page: LogisticApplicationModel.Page(), + }); + } + + /** @returns {GetCountry} */ + static GetCountry() { + return Joi.object({ + currency: LogisticApplicationModel.CurrencyObject(), + display_name: Joi.string().allow(""), + fields: LogisticApplicationModel.GetCountryFields(), + hierarchy: Joi.array().items(LogisticApplicationModel.CountryHierarchy()), + id: Joi.string().allow(""), + iso2: Joi.string().allow(""), + iso3: Joi.string().allow(""), + latitude: Joi.string().allow(""), + longitude: Joi.string().allow(""), + name: Joi.string().allow(""), + phone_code: Joi.string().allow(""), + timezones: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + }); + } + + /** @returns {GetCountryFields} */ + static GetCountryFields() { + return Joi.object({ + address: Joi.array() + .items(LogisticApplicationModel.GetCountryFieldsAddress()) + .required(), + address_template: LogisticApplicationModel.GetCountryFieldsAddressTemplate().required(), + serviceability_fields: Joi.array() + .items(Joi.string().allow("")) + .required(), + }); + } + + /** @returns {GetCountryFieldsAddress} */ + static GetCountryFieldsAddress() { + return Joi.object({ + display_name: Joi.string().allow("").required(), + edit: Joi.boolean(), + error_text: Joi.string().allow("").allow(null), + input: Joi.string().allow("").required(), + required: Joi.boolean().required(), + slug: Joi.string().allow("").required(), + validation: LogisticApplicationModel.FieldValidation(), + values: LogisticApplicationModel.GetCountryFieldsAddressValues(), + }); + } + + /** @returns {GetCountryFieldsAddressTemplate} */ + static GetCountryFieldsAddressTemplate() { + return Joi.object({ + checkout_form: Joi.string().allow("").required(), + default_display: Joi.string().allow("").required(), + store_os_form: Joi.string().allow("").required(), + }); + } + + /** @returns {GetCountryFieldsAddressValues} */ + static GetCountryFieldsAddressValues() { + return Joi.object({ + get_all: LogisticApplicationModel.GetOneOrAll(), + get_one: LogisticApplicationModel.GetOneOrAll(), + }); + } + + /** @returns {GetLocalities} */ + static GetLocalities() { + return Joi.object({ + items: Joi.array().items(LogisticApplicationModel.Localities()), + page: LogisticApplicationModel.Page(), + }); + } + + /** @returns {GetLocality} */ + static GetLocality() { + return Joi.object({ + display_name: Joi.string().allow(""), + id: Joi.string().allow(""), + localities: Joi.array().items(LogisticApplicationModel.LocalityParent()), + name: Joi.string().allow(""), + parent_ids: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + }); + } + + /** @returns {GetOneOrAll} */ + static GetOneOrAll() { + return Joi.object({ + operation_id: Joi.string().allow(""), + params: LogisticApplicationModel.GetOneOrAllParams(), + }); + } + + /** @returns {GetOneOrAllParams} */ + static GetOneOrAllParams() { + return Joi.object({ + path: LogisticApplicationModel.GetOneOrAllPath(), + query: LogisticApplicationModel.GetOneOrAllQuery(), + }); + } + + /** @returns {GetOneOrAllPath} */ + static GetOneOrAllPath() { + return Joi.object({ + locality_type: Joi.string().allow(""), + locality_value: Joi.string().allow(""), + }); + } + + /** @returns {GetOneOrAllQuery} */ + static GetOneOrAllQuery() { + return Joi.object({ + city: Joi.string().allow("").allow(null), + country: Joi.string().allow("").allow(null), + sector: Joi.string().allow("").allow(null), + state: Joi.string().allow("").allow(null), + }); + } + + /** @returns {GetStoreResponse} */ + static GetStoreResponse() { + return Joi.object({ + items: Joi.array().items(LogisticApplicationModel.StoreItemResponse()), + page: LogisticApplicationModel.Page(), + }); + } + /** @returns {GetZoneFromPincodeViewRequest} */ static GetZoneFromPincodeViewRequest() { return Joi.object({ @@ -275,6 +688,36 @@ class LogisticApplicationModel { }); } + /** @returns {LengthValidation} */ + static LengthValidation() { + return Joi.object({ + max: Joi.number().allow(null), + min: Joi.number().allow(null), + }); + } + + /** @returns {Localities} */ + static Localities() { + return Joi.object({ + display_name: Joi.string().allow(""), + id: Joi.string().allow(""), + name: Joi.string().allow(""), + parent_ids: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + }); + } + + /** @returns {LocalityParent} */ + static LocalityParent() { + return Joi.object({ + display_name: Joi.string().allow(""), + id: Joi.string().allow(""), + name: Joi.string().allow(""), + parent_ids: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + }); + } + /** @returns {LogisticsResponse} */ static LogisticsResponse() { return Joi.object({ @@ -282,6 +725,19 @@ class LogisticApplicationModel { }); } + /** @returns {Page} */ + static Page() { + return Joi.object({ + current: Joi.number(), + has_next: Joi.boolean(), + has_previous: Joi.boolean(), + item_total: Joi.number(), + next_id: Joi.string().allow(""), + size: Joi.number(), + type: Joi.string().allow("").required(), + }); + } + /** @returns {PincodeApiResponse} */ static PincodeApiResponse() { return Joi.object({ @@ -365,6 +821,20 @@ class LogisticApplicationModel { }); } + /** @returns {StoreItemResponse} */ + static StoreItemResponse() { + return Joi.object({ + company_id: Joi.number(), + fulfillment_type: Joi.string().allow(""), + id: Joi.number(), + latitude: Joi.number(), + longitude: Joi.number(), + processing_time: Joi.number(), + store_type: Joi.string().allow(""), + tags: Joi.array().items(Joi.string().allow("")), + }); + } + /** @returns {TATArticlesRequest} */ static TATArticlesRequest() { return Joi.object({ @@ -484,5 +954,23 @@ class LogisticApplicationModel { to_pincode: Joi.string().allow(""), }); } + + /** @returns {ValidateAddressRequest} */ + static ValidateAddressRequest() { + return Joi.object({ + address: Joi.string().allow(""), + address1: Joi.string().allow(""), + address2: Joi.string().allow(""), + area: Joi.string().allow(""), + city: Joi.string().allow(""), + email: Joi.string().allow(""), + landmark: Joi.string().allow(""), + name: Joi.string().allow(""), + phone: Joi.string().allow(""), + pincode: Joi.string().allow(""), + sector: Joi.string().allow(""), + state: Joi.string().allow(""), + }); + } } module.exports = LogisticApplicationModel; diff --git a/sdk/application/Logistic/LogisticApplicationValidator.d.ts b/sdk/application/Logistic/LogisticApplicationValidator.d.ts index 8ab5c4370..8afdaeb13 100644 --- a/sdk/application/Logistic/LogisticApplicationValidator.d.ts +++ b/sdk/application/Logistic/LogisticApplicationValidator.d.ts @@ -1,5 +1,59 @@ export = LogisticApplicationValidator; /** @typedef GetAllCountriesParam */ +/** + * @typedef GetCountriesParam + * @property {boolean} [onboarding] - Only fetch countries which allowed for + * onboard on Platform. + * @property {number} [pageNo] - Page number. + * @property {number} [pageSize] - Page size. + * @property {string} [q] - Search. + */ +/** + * @typedef GetCountryParam + * @property {string} countryIsoCode - The `country_iso_code` is ISO-2 (alpha-2) + * code for the country. + */ +/** + * @typedef GetLocalitiesParam + * @property {string} localityType - A `locality_type` contains unique + * geographical division. + * @property {string} [country] - A `country` contains a specific value of the + * country iso2 code. + * @property {string} [state] - A `state` contains a specific value of the + * state, province. + * @property {string} [city] - A `city` contains a specific value of the city. + * @property {number} [pageNo] - Page number. + * @property {number} [pageSize] - Page size. + * @property {string} [q] - Search. + */ +/** + * @typedef GetLocalityParam + * @property {string} localityType - A `locality_type` contains value + * geographical division. + * @property {string} localityValue - A `locality_value` contains a specific + * name of the locality. + * @property {string} [country] - A `country` contains a specific value of the + * country iso2 code. + * @property {string} [state] - A `state` contains a specific value of the + * state, province. + * @property {string} [city] - A `city` contains a specific value of the city. + */ +/** + * @typedef GetLocationsParam + * @property {string} xApplicationId - A `x-application-id` is a unique + * identifier for a particular sale channel. + * @property {string} xApplicationData - A `x-application-data` is a unique + * identifier for a particular sale channel. + * @property {string} [country] - A `country` contains a specific value of the + * country `iso2` code. + * @property {string} [state] - A `state` contains a specific value of the + * state, province. + * @property {string} [city] - A `city` contains a specific value of the city. + * @property {number} [pincode] - A `pincode` contains a specific value of the city. + * @property {string} [sector] - A `sector` contains a specific value of the city. + * @property {number} [pageNo] - Page number. + * @property {number} [pageSize] - Page size. + */ /** * @typedef GetOptimalLocationsParam * @property {LogisticApplicationModel.ReAssignStoreRequest} body @@ -16,9 +70,25 @@ export = LogisticApplicationValidator; * @typedef GetTatProductParam * @property {LogisticApplicationModel.TATViewRequest} body */ +/** + * @typedef ValidateAddressParam + * @property {string} countryIsoCode - The ISO code of the country. + * @property {string} templateName - The type of address form. + * @property {LogisticApplicationModel.ValidateAddressRequest} body + */ declare class LogisticApplicationValidator { /** @returns {GetAllCountriesParam} */ static getAllCountries(): any; + /** @returns {GetCountriesParam} */ + static getCountries(): GetCountriesParam; + /** @returns {GetCountryParam} */ + static getCountry(): GetCountryParam; + /** @returns {GetLocalitiesParam} */ + static getLocalities(): GetLocalitiesParam; + /** @returns {GetLocalityParam} */ + static getLocality(): GetLocalityParam; + /** @returns {GetLocationsParam} */ + static getLocations(): GetLocationsParam; /** @returns {GetOptimalLocationsParam} */ static getOptimalLocations(): GetOptimalLocationsParam; /** @returns {GetPincodeCityParam} */ @@ -27,10 +97,139 @@ declare class LogisticApplicationValidator { static getPincodeZones(): GetPincodeZonesParam; /** @returns {GetTatProductParam} */ static getTatProduct(): GetTatProductParam; + /** @returns {ValidateAddressParam} */ + static validateAddress(): ValidateAddressParam; } declare namespace LogisticApplicationValidator { - export { GetAllCountriesParam, GetOptimalLocationsParam, GetPincodeCityParam, GetPincodeZonesParam, GetTatProductParam }; + export { GetAllCountriesParam, GetCountriesParam, GetCountryParam, GetLocalitiesParam, GetLocalityParam, GetLocationsParam, GetOptimalLocationsParam, GetPincodeCityParam, GetPincodeZonesParam, GetTatProductParam, ValidateAddressParam }; } +type GetCountriesParam = { + /** + * - Only fetch countries which allowed for + * onboard on Platform. + */ + onboarding?: boolean; + /** + * - Page number. + */ + pageNo?: number; + /** + * - Page size. + */ + pageSize?: number; + /** + * - Search. + */ + q?: string; +}; +type GetCountryParam = { + /** + * - The `country_iso_code` is ISO-2 (alpha-2) + * code for the country. + */ + countryIsoCode: string; +}; +type GetLocalitiesParam = { + /** + * - A `locality_type` contains unique + * geographical division. + */ + localityType: string; + /** + * - A `country` contains a specific value of the + * country iso2 code. + */ + country?: string; + /** + * - A `state` contains a specific value of the + * state, province. + */ + state?: string; + /** + * - A `city` contains a specific value of the city. + */ + city?: string; + /** + * - Page number. + */ + pageNo?: number; + /** + * - Page size. + */ + pageSize?: number; + /** + * - Search. + */ + q?: string; +}; +type GetLocalityParam = { + /** + * - A `locality_type` contains value + * geographical division. + */ + localityType: string; + /** + * - A `locality_value` contains a specific + * name of the locality. + */ + localityValue: string; + /** + * - A `country` contains a specific value of the + * country iso2 code. + */ + country?: string; + /** + * - A `state` contains a specific value of the + * state, province. + */ + state?: string; + /** + * - A `city` contains a specific value of the city. + */ + city?: string; +}; +type GetLocationsParam = { + /** + * - A `x-application-id` is a unique + * identifier for a particular sale channel. + */ + xApplicationId: string; + /** + * - A `x-application-data` is a unique + * identifier for a particular sale channel. + */ + xApplicationData: string; + /** + * - A `country` contains a specific value of the + * country `iso2` code. + */ + country?: string; + /** + * - A `state` contains a specific value of the + * state, province. + */ + state?: string; + /** + * - A `city` contains a specific value of the city. + */ + city?: string; + /** + * - A `pincode` contains a specific value of the city. + */ + pincode?: number; + /** + * - A `sector` contains a specific value of the city. + */ + sector?: string; + /** + * - Page number. + */ + pageNo?: number; + /** + * - Page size. + */ + pageSize?: number; +}; type GetOptimalLocationsParam = { body: LogisticApplicationModel.ReAssignStoreRequest; }; @@ -46,5 +245,16 @@ type GetPincodeZonesParam = { type GetTatProductParam = { body: LogisticApplicationModel.TATViewRequest; }; +type ValidateAddressParam = { + /** + * - The ISO code of the country. + */ + countryIsoCode: string; + /** + * - The type of address form. + */ + templateName: string; + body: LogisticApplicationModel.ValidateAddressRequest; +}; type GetAllCountriesParam = any; import LogisticApplicationModel = require("./LogisticApplicationModel"); diff --git a/sdk/application/Logistic/LogisticApplicationValidator.js b/sdk/application/Logistic/LogisticApplicationValidator.js index 323c8207d..d43c9bdda 100644 --- a/sdk/application/Logistic/LogisticApplicationValidator.js +++ b/sdk/application/Logistic/LogisticApplicationValidator.js @@ -4,6 +4,65 @@ const LogisticApplicationModel = require("./LogisticApplicationModel"); /** @typedef GetAllCountriesParam */ +/** + * @typedef GetCountriesParam + * @property {boolean} [onboarding] - Only fetch countries which allowed for + * onboard on Platform. + * @property {number} [pageNo] - Page number. + * @property {number} [pageSize] - Page size. + * @property {string} [q] - Search. + */ + +/** + * @typedef GetCountryParam + * @property {string} countryIsoCode - The `country_iso_code` is ISO-2 (alpha-2) + * code for the country. + */ + +/** + * @typedef GetLocalitiesParam + * @property {string} localityType - A `locality_type` contains unique + * geographical division. + * @property {string} [country] - A `country` contains a specific value of the + * country iso2 code. + * @property {string} [state] - A `state` contains a specific value of the + * state, province. + * @property {string} [city] - A `city` contains a specific value of the city. + * @property {number} [pageNo] - Page number. + * @property {number} [pageSize] - Page size. + * @property {string} [q] - Search. + */ + +/** + * @typedef GetLocalityParam + * @property {string} localityType - A `locality_type` contains value + * geographical division. + * @property {string} localityValue - A `locality_value` contains a specific + * name of the locality. + * @property {string} [country] - A `country` contains a specific value of the + * country iso2 code. + * @property {string} [state] - A `state` contains a specific value of the + * state, province. + * @property {string} [city] - A `city` contains a specific value of the city. + */ + +/** + * @typedef GetLocationsParam + * @property {string} xApplicationId - A `x-application-id` is a unique + * identifier for a particular sale channel. + * @property {string} xApplicationData - A `x-application-data` is a unique + * identifier for a particular sale channel. + * @property {string} [country] - A `country` contains a specific value of the + * country `iso2` code. + * @property {string} [state] - A `state` contains a specific value of the + * state, province. + * @property {string} [city] - A `city` contains a specific value of the city. + * @property {number} [pincode] - A `pincode` contains a specific value of the city. + * @property {string} [sector] - A `sector` contains a specific value of the city. + * @property {number} [pageNo] - Page number. + * @property {number} [pageSize] - Page size. + */ + /** * @typedef GetOptimalLocationsParam * @property {LogisticApplicationModel.ReAssignStoreRequest} body @@ -24,12 +83,75 @@ const LogisticApplicationModel = require("./LogisticApplicationModel"); * @property {LogisticApplicationModel.TATViewRequest} body */ +/** + * @typedef ValidateAddressParam + * @property {string} countryIsoCode - The ISO code of the country. + * @property {string} templateName - The type of address form. + * @property {LogisticApplicationModel.ValidateAddressRequest} body + */ + class LogisticApplicationValidator { /** @returns {GetAllCountriesParam} */ static getAllCountries() { return Joi.object({}); } + /** @returns {GetCountriesParam} */ + static getCountries() { + return Joi.object({ + onboarding: Joi.boolean(), + pageNo: Joi.number(), + pageSize: Joi.number(), + q: Joi.string().allow(""), + }); + } + + /** @returns {GetCountryParam} */ + static getCountry() { + return Joi.object({ + countryIsoCode: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetLocalitiesParam} */ + static getLocalities() { + return Joi.object({ + localityType: Joi.string().allow("").required(), + country: Joi.string().allow(""), + state: Joi.string().allow(""), + city: Joi.string().allow(""), + pageNo: Joi.number(), + pageSize: Joi.number(), + q: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetLocalityParam} */ + static getLocality() { + return Joi.object({ + localityType: Joi.string().allow("").required(), + localityValue: Joi.string().allow("").required(), + country: Joi.string().allow(""), + state: Joi.string().allow(""), + city: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetLocationsParam} */ + static getLocations() { + return Joi.object({ + xApplicationId: Joi.string().allow("").required(), + xApplicationData: Joi.string().allow("").required(), + country: Joi.string().allow(""), + state: Joi.string().allow(""), + city: Joi.string().allow(""), + pincode: Joi.number(), + sector: Joi.string().allow(""), + pageNo: Joi.number(), + pageSize: Joi.number(), + }).required(); + } + /** @returns {GetOptimalLocationsParam} */ static getOptimalLocations() { return Joi.object({ @@ -57,6 +179,15 @@ class LogisticApplicationValidator { body: LogisticApplicationModel.TATViewRequest().required(), }).required(); } + + /** @returns {ValidateAddressParam} */ + static validateAddress() { + return Joi.object({ + countryIsoCode: Joi.string().allow("").required(), + templateName: Joi.string().allow("").required(), + body: LogisticApplicationModel.ValidateAddressRequest().required(), + }).required(); + } } module.exports = LogisticApplicationValidator; diff --git a/sdk/application/Order/OrderApplicationClient.d.ts b/sdk/application/Order/OrderApplicationClient.d.ts index e54ff305b..1e1ea487e 100644 --- a/sdk/application/Order/OrderApplicationClient.d.ts +++ b/sdk/application/Order/OrderApplicationClient.d.ts @@ -51,7 +51,7 @@ declare class Order { * @summary: Get details of an order * @description: Use this API to retrieve order 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/getOrderById/). */ - getOrderById({ orderId, requestHeaders }?: OrderApplicationValidator.GetOrderByIdParam, { responseHeaders }?: object): Promise; + getOrderById({ orderId, allowInactive, requestHeaders }?: OrderApplicationValidator.GetOrderByIdParam, { responseHeaders }?: object): Promise; /** * @param {OrderApplicationValidator.GetOrdersParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -61,7 +61,7 @@ declare class Order { * @summary: Get all orders * @description: Use this API to retrieve all the orders. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getOrders/). */ - getOrders({ status, pageNo, pageSize, fromDate, toDate, customMeta, requestHeaders, }?: OrderApplicationValidator.GetOrdersParam, { responseHeaders }?: object): Promise; + getOrders({ status, pageNo, pageSize, fromDate, toDate, startDate, endDate, customMeta, requestHeaders, }?: OrderApplicationValidator.GetOrdersParam, { responseHeaders }?: object): Promise; /** * @param {OrderApplicationValidator.GetPosOrderByIdParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -91,7 +91,7 @@ declare class Order { * @summary: Get details of a shipment * @description: Use this API to retrieve shipment details such as price breakup, tracking details, store information, etc. using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentById/). */ - getShipmentById({ shipmentId, requestHeaders }?: OrderApplicationValidator.GetShipmentByIdParam, { responseHeaders }?: object): Promise; + getShipmentById({ shipmentId, allowInactive, requestHeaders }?: OrderApplicationValidator.GetShipmentByIdParam, { responseHeaders }?: object): Promise; /** * @param {OrderApplicationValidator.GetShipmentReasonsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/application/Order/OrderApplicationClient.js b/sdk/application/Order/OrderApplicationClient.js index e00a4ce25..d8daf9c3a 100644 --- a/sdk/application/Order/OrderApplicationClient.js +++ b/sdk/application/Order/OrderApplicationClient.js @@ -227,11 +227,11 @@ class Order { * @description: Use this API to retrieve order 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/getOrderById/). */ async getOrderById( - { orderId, requestHeaders } = { requestHeaders: {} }, + { orderId, allowInactive, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = OrderApplicationValidator.getOrderById().validate( - { orderId }, + { orderId, allowInactive }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -242,7 +242,7 @@ class Order { const { error: warrning, } = OrderApplicationValidator.getOrderById().validate( - { orderId }, + { orderId, allowInactive }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -253,6 +253,7 @@ class Order { } const query_params = {}; + query_params["allow_inactive"] = allowInactive; const xHeaders = {}; @@ -311,13 +312,24 @@ class Order { pageSize, fromDate, toDate, + startDate, + endDate, customMeta, requestHeaders, } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = OrderApplicationValidator.getOrders().validate( - { status, pageNo, pageSize, fromDate, toDate, customMeta }, + { + status, + pageNo, + pageSize, + fromDate, + toDate, + startDate, + endDate, + customMeta, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -326,7 +338,16 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning } = OrderApplicationValidator.getOrders().validate( - { status, pageNo, pageSize, fromDate, toDate, customMeta }, + { + status, + pageNo, + pageSize, + fromDate, + toDate, + startDate, + endDate, + customMeta, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -342,6 +363,8 @@ class Order { query_params["page_size"] = pageSize; query_params["from_date"] = fromDate; query_params["to_date"] = toDate; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; query_params["custom_meta"] = customMeta; const xHeaders = {}; @@ -553,11 +576,11 @@ class Order { * @description: Use this API to retrieve shipment details such as price breakup, tracking details, store information, etc. using Shipment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/order/getShipmentById/). */ async getShipmentById( - { shipmentId, requestHeaders } = { requestHeaders: {} }, + { shipmentId, allowInactive, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = OrderApplicationValidator.getShipmentById().validate( - { shipmentId }, + { shipmentId, allowInactive }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -568,7 +591,7 @@ class Order { const { error: warrning, } = OrderApplicationValidator.getShipmentById().validate( - { shipmentId }, + { shipmentId, allowInactive }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -579,6 +602,7 @@ class Order { } const query_params = {}; + query_params["allow_inactive"] = allowInactive; const xHeaders = {}; diff --git a/sdk/application/Order/OrderApplicationModel.d.ts b/sdk/application/Order/OrderApplicationModel.d.ts index a92aa7def..fc6f59021 100644 --- a/sdk/application/Order/OrderApplicationModel.d.ts +++ b/sdk/application/Order/OrderApplicationModel.d.ts @@ -252,6 +252,7 @@ export = OrderApplicationModel; * @property {BagsForReorder[]} [bags_for_reorder] * @property {BreakupValues[]} [breakup_values] * @property {string} [order_created_time] + * @property {string} [order_created_ts] * @property {string} [order_id] * @property {Shipments[]} [shipments] * @property {number} [total_shipments_in_order] @@ -411,6 +412,7 @@ export = OrderApplicationModel; * @property {Object} [return_meta] * @property {string} [returnable_date] * @property {string} [shipment_created_at] + * @property {string} [shipment_created_ts] * @property {string} [shipment_id] * @property {ShipmentStatus} [shipment_status] * @property {boolean} [show_download_invoice] @@ -483,6 +485,7 @@ export = OrderApplicationModel; */ /** * @typedef TrackingDetails + * @property {string} [created_ts] * @property {boolean} [is_current] * @property {boolean} [is_passed] * @property {string} [status] @@ -804,6 +807,7 @@ type OrderSchema = { bags_for_reorder?: BagsForReorder[]; breakup_values?: BreakupValues[]; order_created_time?: string; + order_created_ts?: string; order_id?: string; shipments?: Shipments[]; total_shipments_in_order?: number; @@ -983,6 +987,7 @@ type Shipments = { return_meta?: any; returnable_date?: string; shipment_created_at?: string; + shipment_created_ts?: string; shipment_id?: string; shipment_status?: ShipmentStatus; show_download_invoice?: boolean; @@ -1065,6 +1070,7 @@ type Track = { /** @returns {TrackingDetails} */ declare function TrackingDetails(): TrackingDetails; type TrackingDetails = { + created_ts?: string; is_current?: boolean; is_passed?: boolean; status?: string; diff --git a/sdk/application/Order/OrderApplicationModel.js b/sdk/application/Order/OrderApplicationModel.js index 56b0c1c02..fbbfabaac 100644 --- a/sdk/application/Order/OrderApplicationModel.js +++ b/sdk/application/Order/OrderApplicationModel.js @@ -282,6 +282,7 @@ const Joi = require("joi"); * @property {BagsForReorder[]} [bags_for_reorder] * @property {BreakupValues[]} [breakup_values] * @property {string} [order_created_time] + * @property {string} [order_created_ts] * @property {string} [order_id] * @property {Shipments[]} [shipments] * @property {number} [total_shipments_in_order] @@ -461,6 +462,7 @@ const Joi = require("joi"); * @property {Object} [return_meta] * @property {string} [returnable_date] * @property {string} [shipment_created_at] + * @property {string} [shipment_created_ts] * @property {string} [shipment_id] * @property {ShipmentStatus} [shipment_status] * @property {boolean} [show_download_invoice] @@ -543,6 +545,7 @@ const Joi = require("joi"); /** * @typedef TrackingDetails + * @property {string} [created_ts] * @property {boolean} [is_current] * @property {boolean} [is_passed] * @property {string} [status] @@ -929,6 +932,7 @@ class OrderApplicationModel { ), breakup_values: Joi.array().items(OrderApplicationModel.BreakupValues()), order_created_time: Joi.string().allow(""), + order_created_ts: Joi.string().allow(""), order_id: Joi.string().allow(""), shipments: Joi.array().items(OrderApplicationModel.Shipments()), total_shipments_in_order: Joi.number(), @@ -1152,6 +1156,7 @@ class OrderApplicationModel { return_meta: Joi.any(), returnable_date: Joi.string().allow("").allow(null), shipment_created_at: Joi.string().allow(""), + shipment_created_ts: Joi.string().allow(""), shipment_id: Joi.string().allow(""), shipment_status: OrderApplicationModel.ShipmentStatus(), show_download_invoice: Joi.boolean(), @@ -1256,6 +1261,7 @@ class OrderApplicationModel { /** @returns {TrackingDetails} */ static TrackingDetails() { return Joi.object({ + created_ts: Joi.string().allow(""), is_current: Joi.boolean(), is_passed: Joi.boolean(), status: Joi.string().allow(""), diff --git a/sdk/application/Order/OrderApplicationValidator.d.ts b/sdk/application/Order/OrderApplicationValidator.d.ts index 802a3fb6d..a0df355ec 100644 --- a/sdk/application/Order/OrderApplicationValidator.d.ts +++ b/sdk/application/Order/OrderApplicationValidator.d.ts @@ -15,6 +15,7 @@ export = OrderApplicationValidator; * @typedef GetOrderByIdParam * @property {string} orderId - A unique number used for identifying and * tracking your orders. + * @property {boolean} [allowInactive] - Flag to allow inactive shipments */ /** * @typedef GetOrdersParam @@ -26,6 +27,8 @@ export = OrderApplicationValidator; * Default value is 10. * @property {string} [fromDate] - The date from which the orders should be retrieved. * @property {string} [toDate] - The date till which the orders should be retrieved. + * @property {string} [startDate] - UTC Start Date in ISO format + * @property {string} [endDate] - UTC Start Date in ISO format * @property {string} [customMeta] - A filter and retrieve data using special * fields included for special use-cases */ @@ -46,6 +49,7 @@ export = OrderApplicationValidator; * @property {string} shipmentId - ID of the shipment. An order may contain * multiple items and may get divided into one or more shipment, each having * its own ID. + * @property {boolean} [allowInactive] - Flag to allow inactive shipments */ /** * @typedef GetShipmentReasonsParam @@ -137,6 +141,10 @@ type GetOrderByIdParam = { * tracking your orders. */ orderId: string; + /** + * - Flag to allow inactive shipments + */ + allowInactive?: boolean; }; type GetOrdersParam = { /** @@ -162,6 +170,14 @@ type GetOrdersParam = { * - The date till which the orders should be retrieved. */ toDate?: string; + /** + * - UTC Start Date in ISO format + */ + startDate?: string; + /** + * - UTC Start Date in ISO format + */ + endDate?: string; /** * - A filter and retrieve data using special * fields included for special use-cases @@ -194,6 +210,10 @@ type GetShipmentByIdParam = { * its own ID. */ shipmentId: string; + /** + * - Flag to allow inactive shipments + */ + allowInactive?: boolean; }; type GetShipmentReasonsParam = { /** diff --git a/sdk/application/Order/OrderApplicationValidator.js b/sdk/application/Order/OrderApplicationValidator.js index a67d098d1..56348ff2f 100644 --- a/sdk/application/Order/OrderApplicationValidator.js +++ b/sdk/application/Order/OrderApplicationValidator.js @@ -20,6 +20,7 @@ const OrderApplicationModel = require("./OrderApplicationModel"); * @typedef GetOrderByIdParam * @property {string} orderId - A unique number used for identifying and * tracking your orders. + * @property {boolean} [allowInactive] - Flag to allow inactive shipments */ /** @@ -32,6 +33,8 @@ const OrderApplicationModel = require("./OrderApplicationModel"); * Default value is 10. * @property {string} [fromDate] - The date from which the orders should be retrieved. * @property {string} [toDate] - The date till which the orders should be retrieved. + * @property {string} [startDate] - UTC Start Date in ISO format + * @property {string} [endDate] - UTC Start Date in ISO format * @property {string} [customMeta] - A filter and retrieve data using special * fields included for special use-cases */ @@ -55,6 +58,7 @@ const OrderApplicationModel = require("./OrderApplicationModel"); * @property {string} shipmentId - ID of the shipment. An order may contain * multiple items and may get divided into one or more shipment, each having * its own ID. + * @property {boolean} [allowInactive] - Flag to allow inactive shipments */ /** @@ -118,6 +122,7 @@ class OrderApplicationValidator { static getOrderById() { return Joi.object({ orderId: Joi.string().allow("").required(), + allowInactive: Joi.boolean(), }).required(); } @@ -129,6 +134,8 @@ class OrderApplicationValidator { pageSize: Joi.number(), fromDate: Joi.string().allow(""), toDate: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), customMeta: Joi.string().allow(""), }); } @@ -152,6 +159,7 @@ class OrderApplicationValidator { static getShipmentById() { return Joi.object({ shipmentId: Joi.string().allow("").required(), + allowInactive: Joi.boolean(), }).required(); } diff --git a/sdk/application/Payment/PaymentApplicationClient.d.ts b/sdk/application/Payment/PaymentApplicationClient.d.ts index 5b53c15dc..30bc255f8 100644 --- a/sdk/application/Payment/PaymentApplicationClient.d.ts +++ b/sdk/application/Payment/PaymentApplicationClient.d.ts @@ -13,9 +13,11 @@ declare class Payment { checkCredit: string; createOrderHandlerPaymentLink: string; createPaymentLink: string; + createPaymentOrder: string; customerCreditSummary: string; customerOnboard: string; deleteUserCard: string; + delinkWallet: string; enableOrDisableRefundTransferMode: string; getActiveCardAggregator: string; getActiveRefundTransferModes: string; @@ -31,6 +33,7 @@ declare class Payment { getUserBeneficiariesDetail: string; initialisePayment: string; initialisePaymentPaymentLink: string; + linkWallet: string; outstandingOrderDetails: string; paidOrderDetails: string; pollingPaymentLink: string; @@ -45,6 +48,7 @@ declare class Payment { verifyIfscCode: string; verifyOtpAndAddBeneficiaryForBank: string; verifyOtpAndAddBeneficiaryForWallet: string; + walletLinkInitate: string; }; _urls: {}; updateUrls(urls: any): void; @@ -165,6 +169,16 @@ declare class Payment { * @description: Use this API to create a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/). */ createPaymentLink({ body, requestHeaders }?: PaymentApplicationValidator.CreatePaymentLinkParam, { responseHeaders }?: object): Promise; + /** + * @param {PaymentApplicationValidator.CreatePaymentOrderParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createPaymentOrder + * @summary: Create Order + * @description: Use this API to create a order and payment on aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentOrder/). + */ + createPaymentOrder({ body, requestHeaders }?: PaymentApplicationValidator.CreatePaymentOrderParam, { responseHeaders }?: object): Promise; /** * @param {PaymentApplicationValidator.CustomerCreditSummaryParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -198,6 +212,16 @@ declare class Payment { * @description: Use this API to delete a card added by a user on the payment gateway and clear the cache. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteUserCard/). */ deleteUserCard({ body, requestHeaders }?: PaymentApplicationValidator.DeleteUserCardParam, { responseHeaders }?: object): Promise; + /** + * @param {PaymentApplicationValidator.DelinkWalletParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name delinkWallet + * @summary: Delink the wallet + * @description: It Removes already linked wallet - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/delinkWallet/). + */ + delinkWallet({ body, requestHeaders }?: PaymentApplicationValidator.DelinkWalletParam, { responseHeaders }?: object): Promise; /** * @param {PaymentApplicationValidator.EnableOrDisableRefundTransferModeParam} arg * - Arg object. @@ -305,7 +329,7 @@ declare class Payment { * @summary: Get applicable payment options * @description: Use this API to get all valid payment options for doing a payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutes/). */ - getPaymentModeRoutes({ amount, cartId, pincode, checkoutMode, refresh, cardReference, userDetails, requestHeaders, }?: PaymentApplicationValidator.GetPaymentModeRoutesParam, { responseHeaders }?: object): Promise; + getPaymentModeRoutes({ amount, cartId, checkoutMode, refresh, orderId, cardReference, userDetails, displaySplit, advancePayment, shipmentId, requestHeaders, }?: PaymentApplicationValidator.GetPaymentModeRoutesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentApplicationValidator.GetPaymentModeRoutesPaymentLinkParam} arg * - Arg object. @@ -329,7 +353,7 @@ declare class Payment { * @summary: Get applicable payment options for Point-of-Sale (POS) * @description: Use this API to get all valid payment options for doing a payment in POS. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPosPaymentModeRoutes/). */ - getPosPaymentModeRoutes({ amount, cartId, pincode, checkoutMode, orderType, refresh, cardReference, userDetails, requestHeaders, }?: PaymentApplicationValidator.GetPosPaymentModeRoutesParam, { responseHeaders }?: object): Promise; + getPosPaymentModeRoutes({ amount, pincode, orderType, cartId, checkoutMode, refresh, cardReference, userDetails, requestHeaders, }?: PaymentApplicationValidator.GetPosPaymentModeRoutesParam, { responseHeaders }?: object): Promise; /** * @param {PaymentApplicationValidator.GetRupifiBannerDetailsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -379,6 +403,16 @@ declare class Payment { * @description: Use this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePaymentPaymentLink/). */ initialisePaymentPaymentLink({ body, requestHeaders }?: PaymentApplicationValidator.InitialisePaymentPaymentLinkParam, { responseHeaders }?: object): Promise; + /** + * @param {PaymentApplicationValidator.LinkWalletParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name linkWallet + * @summary: OTP verification for linking of wallet + * @description: It Verifies the linking of wallet using OTP - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/linkWallet/). + */ + linkWallet({ body, requestHeaders }?: PaymentApplicationValidator.LinkWalletParam, { responseHeaders }?: object): Promise; /** * @param {PaymentApplicationValidator.OutstandingOrderDetailsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -540,6 +574,16 @@ declare class Payment { * @description: Use this API to send an OTP while adding a wallet beneficiary by mobile no. verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForWallet/). */ verifyOtpAndAddBeneficiaryForWallet({ body, requestHeaders }?: PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForWalletParam, { responseHeaders }?: object): Promise; + /** + * @param {PaymentApplicationValidator.WalletLinkInitateParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name walletLinkInitate + * @summary: Initiate linking of wallet + * @description: It will initiate linking of wallet for the aggregator. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/walletLinkInitate/). + */ + walletLinkInitate({ body, requestHeaders }?: PaymentApplicationValidator.WalletLinkInitateParam, { responseHeaders }?: object): Promise; } import PaymentApplicationValidator = require("./PaymentApplicationValidator"); import PaymentApplicationModel = require("./PaymentApplicationModel"); diff --git a/sdk/application/Payment/PaymentApplicationClient.js b/sdk/application/Payment/PaymentApplicationClient.js index 88c6914e1..c1e6fe537 100644 --- a/sdk/application/Payment/PaymentApplicationClient.js +++ b/sdk/application/Payment/PaymentApplicationClient.js @@ -30,10 +30,13 @@ class Payment { "/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: @@ -59,6 +62,8 @@ class Payment { 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: @@ -84,6 +89,8 @@ class Payment { "/service/application/payment/v1.0/refund/verification/bank", verifyOtpAndAddBeneficiaryForWallet: "/service/application/payment/v1.0/refund/verification/wallet", + walletLinkInitate: + "/service/application/payment/v1.0/payment/options/wallet/link", }; this._urls = Object.entries(this._relativeUrls).reduce( (urls, [method, relativeUrl]) => { @@ -912,6 +919,84 @@ class Payment { return response; } + /** + * @param {PaymentApplicationValidator.CreatePaymentOrderParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createPaymentOrder + * @summary: Create Order + * @description: Use this API to create a order and payment on aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentOrder/). + */ + async createPaymentOrder( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = PaymentApplicationValidator.createPaymentOrder().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, + } = PaymentApplicationValidator.createPaymentOrder().validate( + { body }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Payment > createPaymentOrder \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "post", + constructUrl({ + url: this._urls["createPaymentOrder"], + params: {}, + }), + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentApplicationModel.PaymentOrderResponse().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 application > Payment > createPaymentOrder \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {PaymentApplicationValidator.CustomerCreditSummaryParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -1152,6 +1237,84 @@ class Payment { return response; } + /** + * @param {PaymentApplicationValidator.DelinkWalletParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name delinkWallet + * @summary: Delink the wallet + * @description: It Removes already linked wallet - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/delinkWallet/). + */ + async delinkWallet( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = PaymentApplicationValidator.delinkWallet().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, + } = PaymentApplicationValidator.delinkWallet().validate( + { body }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Payment > delinkWallet \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "post", + constructUrl({ + url: this._urls["delinkWallet"], + params: {}, + }), + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentApplicationModel.WalletResponseSchema().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 application > Payment > delinkWallet \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {PaymentApplicationValidator.EnableOrDisableRefundTransferModeParam} arg * - Arg object. @@ -1825,11 +1988,14 @@ class Payment { { amount, cartId, - pincode, checkoutMode, refresh, + orderId, cardReference, userDetails, + displaySplit, + advancePayment, + shipmentId, requestHeaders, } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } @@ -1840,11 +2006,14 @@ class Payment { { amount, cartId, - pincode, checkoutMode, refresh, + orderId, cardReference, userDetails, + displaySplit, + advancePayment, + shipmentId, }, { abortEarly: false, allowUnknown: true } ); @@ -1859,11 +2028,14 @@ class Payment { { amount, cartId, - pincode, checkoutMode, refresh, + orderId, cardReference, userDetails, + displaySplit, + advancePayment, + shipmentId, }, { abortEarly: false, allowUnknown: false } ); @@ -1877,11 +2049,14 @@ class Payment { const query_params = {}; query_params["amount"] = amount; query_params["cart_id"] = cartId; - query_params["pincode"] = pincode; query_params["checkout_mode"] = checkoutMode; query_params["refresh"] = refresh; + query_params["order_id"] = orderId; query_params["card_reference"] = cardReference; query_params["user_details"] = userDetails; + query_params["display_split"] = displaySplit; + query_params["advance_payment"] = advancePayment; + query_params["shipment_id"] = shipmentId; const xHeaders = {}; @@ -2021,10 +2196,10 @@ class Payment { async getPosPaymentModeRoutes( { amount, - cartId, pincode, - checkoutMode, orderType, + cartId, + checkoutMode, refresh, cardReference, userDetails, @@ -2037,10 +2212,10 @@ class Payment { } = PaymentApplicationValidator.getPosPaymentModeRoutes().validate( { amount, - cartId, pincode, - checkoutMode, orderType, + cartId, + checkoutMode, refresh, cardReference, userDetails, @@ -2057,10 +2232,10 @@ class Payment { } = PaymentApplicationValidator.getPosPaymentModeRoutes().validate( { amount, - cartId, pincode, - checkoutMode, orderType, + cartId, + checkoutMode, refresh, cardReference, userDetails, @@ -2453,6 +2628,84 @@ class Payment { return response; } + /** + * @param {PaymentApplicationValidator.LinkWalletParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name linkWallet + * @summary: OTP verification for linking of wallet + * @description: It Verifies the linking of wallet using OTP - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/linkWallet/). + */ + async linkWallet( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = PaymentApplicationValidator.linkWallet().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, + } = PaymentApplicationValidator.linkWallet().validate( + { body }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Payment > linkWallet \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "post", + constructUrl({ + url: this._urls["linkWallet"], + params: {}, + }), + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentApplicationModel.WalletResponseSchema().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 application > Payment > linkWallet \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {PaymentApplicationValidator.OutstandingOrderDetailsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -3587,6 +3840,84 @@ class Payment { return response; } + + /** + * @param {PaymentApplicationValidator.WalletLinkInitateParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name walletLinkInitate + * @summary: Initiate linking of wallet + * @description: It will initiate linking of wallet for the aggregator. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/walletLinkInitate/). + */ + async walletLinkInitate( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = PaymentApplicationValidator.walletLinkInitate().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, + } = PaymentApplicationValidator.walletLinkInitate().validate( + { body }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > Payment > walletLinkInitate \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "post", + constructUrl({ + url: this._urls["walletLinkInitate"], + params: {}, + }), + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentApplicationModel.WalletResponseSchema().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 application > Payment > walletLinkInitate \n ${res_error}`, + }); + } + } + + return response; + } } module.exports = Payment; diff --git a/sdk/application/Payment/PaymentApplicationModel.d.ts b/sdk/application/Payment/PaymentApplicationModel.d.ts index 03b442b24..86b6827bf 100644 --- a/sdk/application/Payment/PaymentApplicationModel.d.ts +++ b/sdk/application/Payment/PaymentApplicationModel.d.ts @@ -1,7 +1,7 @@ export = PaymentApplicationModel; /** * @typedef ActiveCardPaymentGatewayResponse - * @property {CardPaymentGateway} cards - Card's payment gateway with customer id. + * @property {CardPaymentGateway} cards * @property {string} message - Human readable message. * @property {boolean} success - Response is successful or not. */ @@ -14,7 +14,7 @@ export = PaymentApplicationModel; * @typedef AddBeneficiaryDetailsRequest * @property {boolean} delights - True if beneficiary to be added by delights or * False if by User - * @property {BeneficiaryModeDetails} details - Beneficiary bank details + * @property {BeneficiaryModeDetails} details * @property {string} order_id - Merchant Order Id * @property {string} [otp] * @property {string} [request_id] @@ -32,6 +32,31 @@ export = PaymentApplicationModel; * @property {string} message - Aggregator Response of beneficicary * @property {boolean} [success] - Response is successful or not */ +/** + * @typedef AdvanceObject + * @property {string[]} [all_prepayment_type] - All available types of prepayment + * @property {boolean} [allow_custom_advance_amount] - Is custom advance amount allowed? + * @property {number} [amount] - Amount for Payment Breakdown + * @property {string} [cancellation_type] - Type of cancellation + * @property {string} [description] - The description for Advance Payment (user + * configured) + * @property {string} [display_name] - The display name for Advance payment + * @property {boolean} [is_active] - Is Advance Payment active + * @property {string} [prepayment_type] - Type of prepayment value + * @property {number} [prepayment_value] - Value for prepayment in advance payment + * @property {number} [refund_time_limit] - Time limit for processing refund + * @property {string} [time_unit] - Time unit for refunds + */ +/** + * @typedef AdvancePaymentObject + * @property {AdvanceObject} [advance] + * @property {string} [display_name] - Display name for Advance Payment Mode + * @property {number} [display_priority] - Display Priority for Payment Option + * @property {PaymentModeList[]} [list] - Payment mode + * @property {string} [name] - Name of Advance Payment Mode + * @property {number} [payment_mode_id] - Payment Mode ID for Advance Payment Option + * @property {SplitObject} [split] + */ /** * @typedef AggregatorConfigDetail * @property {string} [api] - Payment gateway api endpoint @@ -108,7 +133,7 @@ export = PaymentApplicationModel; */ /** * @typedef BusinessDetails - * @property {KYCAddress} [address] - Address details + * @property {KYCAddress} [address] * @property {string} [business_ownership_type] - Business Ownershipp type(e.g Rented) * @property {string} [business_type] - Business Type * @property {string} [entity_type] - Busineess Entity Type @@ -172,7 +197,7 @@ export = PaymentApplicationModel; */ /** * @typedef CardDetailsResponse - * @property {CardDetails} data - Saved Card Details + * @property {CardDetails} data * @property {boolean} success - Response is successful or not. */ /** @@ -201,7 +226,7 @@ export = PaymentApplicationModel; */ /** * @typedef CheckCreditResponse - * @property {CreditDetail} data - Credit summary of user. + * @property {CreditDetail} data * @property {boolean} success - Operation is successful or not. */ /** @@ -219,7 +244,7 @@ export = PaymentApplicationModel; */ /** * @typedef CreateOrderUserPaymentMethods - * @property {PaymentMethodsMeta} meta - Meta + * @property {PaymentMethodsMeta} meta * @property {string} mode - Payment mode * @property {string} name - Payment mode name */ @@ -229,7 +254,7 @@ export = PaymentApplicationModel; * @property {string} failure_callback_url - Failure page url * @property {Object} [meta] - Meta * @property {string} payment_link_id - Unique id of payment link - * @property {CreateOrderUserPaymentMethods} payment_methods - Payment method details + * @property {CreateOrderUserPaymentMethods} payment_methods * @property {string} success_callback_url - Success page url */ /** @@ -248,7 +273,6 @@ export = PaymentApplicationModel; * @property {string} [assign_card_id] * @property {string} cart_id * @property {string} checkout_mode - * @property {string} pincode */ /** * @typedef CreatePaymentLinkRequest @@ -256,7 +280,7 @@ export = PaymentApplicationModel; * @property {string} [description] - Merchant order id * @property {string} email - Email to which the payment link is to be sent * @property {string} external_order_id - Merchant order id - * @property {CreatePaymentLinkMeta} meta - Meta + * @property {CreatePaymentLinkMeta} meta * @property {string} mobile_number - Mobile number to which the payment link is * to be sent */ @@ -277,32 +301,40 @@ export = PaymentApplicationModel; */ /** * @typedef CreditSummary - * @property {BalanceDetails} [amount_available] - Credit summary of user. - * @property {BalanceDetails} [balance] - Credit summary of user. + * @property {string} [activation_url] - Url for activation + * @property {BalanceDetails} [amount_available] + * @property {BalanceDetails} [balance] * @property {string} [buyer_status] - Status from Credit aggregator's end * @property {string} [credit_line_id] - ID at Credit aggregator's end + * @property {BalanceDetails} [due_amount] + * @property {string} [due_date] - Due date for repayment + * @property {boolean} [is_eligible_for_txn] - Eligiblity flag to complete transaction + * @property {BalanceDetails} [limit] * @property {string} [merchant_customer_ref_id] - Unique aggregator customer id + * @property {string} [repayment_url] - Url for repayment + * @property {string} [soa_url] - Statement of accounts. Show payment history. * @property {string} [status] - Customer Credit status * @property {string} [status_message] - Message to customer + * @property {BalanceDetails} [total_due_amount] */ /** * @typedef CustomerCreditSummaryResponse - * @property {CreditSummary} [data] - Credit summary of user. + * @property {CreditSummary} [data] * @property {boolean} success - Payment confirmation updated or not. */ /** * @typedef CustomerOnboardingRequest * @property {string} aggregator - Aggregator Name - * @property {BusinessDetails} [business_info] - Business summary. - * @property {DeviceDetails} [device] - Device Details. - * @property {MarketplaceInfo} [marketplace_info] - Market Place info. + * @property {BusinessDetails} [business_info] + * @property {DeviceDetails} [device] + * @property {MarketplaceInfo} [marketplace_info] * @property {string} [mcc] - Mcc - * @property {UserPersonalInfoInDetails} personal_info - Credit summary of user. + * @property {UserPersonalInfoInDetails} [personal_info] * @property {string} source - CallbackURL */ /** * @typedef CustomerOnboardingResponse - * @property {OnboardSummary} data - Redirect URL. + * @property {OnboardSummary} data * @property {boolean} success - Status updated or not. */ /** @@ -332,7 +364,7 @@ export = PaymentApplicationModel; */ /** * @typedef EpaylaterBannerResponse - * @property {EpaylaterBannerData} data - Epaylater KYC banner details. + * @property {EpaylaterBannerData} data * @property {boolean} success - Successful or not. */ /** @@ -359,7 +391,7 @@ export = PaymentApplicationModel; */ /** * @typedef ErrorResponse - * @property {Object} [error] + * @property {ErrorDescription} [error] * @property {string} message - Message * @property {number} status_code - HTTP status code * @property {boolean} success - Successful or failure @@ -391,7 +423,7 @@ export = PaymentApplicationModel; * @typedef IntentApp * @property {string} [code] - Code * @property {string} [display_name] - Display_name - * @property {Object} [logos] - Logos + * @property {PaymentModeLogo} [logos] * @property {string} [package_name] - Package_name */ /** @@ -434,9 +466,13 @@ export = PaymentApplicationModel; */ /** * @typedef OnboardSummary - * @property {string} redirect_url - URL to which the user may redirect. - * @property {Object} session - User Session - * @property {boolean} status - Operation Status + * @property {string} [activation_url] - Url for activation + * @property {boolean} [is_eligible_for_txn] - Whether is eligible for transaction + * @property {string} [merchant_customer_ref_id] - Rupifi customer ID + * @property {string} [redirect_url] - URL to which the user may redirect. + * @property {Object} [session] - User Session + * @property {boolean} status - Transaction status + * @property {string} [status_remark] - Decription of status */ /** * @typedef OrderBeneficiaryDetails @@ -481,20 +517,20 @@ export = PaymentApplicationModel; */ /** * @typedef PaymentFlow - * @property {Object} [ajiodhan] - Ajiodhan - * @property {Object} [bqr_razorpay] - BQR_Razorpay - * @property {Object} [ccavenue] - Ccavenue - * @property {Object} [epaylater] - Epaylater - * @property {Object} [fynd] - Fynd - * @property {Object} [jiopay] - Jiopay - * @property {Object} [juspay] - Juspay - * @property {Object} [mswipe] - Mswipe - * @property {Object} [payubiz] - Payubiz - * @property {Object} [razorpay] - Razorpay - * @property {Object} [rupifi] - Rupifi - * @property {Object} [simpl] - Simpl - * @property {Object} [stripe] - Stripe - * @property {Object} [upi_razorpay] - UPI_Razorpay + * @property {AggregatorRoute} [ajiodhan] + * @property {AggregatorRoute} [bqr_razorpay] + * @property {AggregatorRoute} [ccavenue] + * @property {AggregatorRoute} [epaylater] + * @property {AggregatorRoute} [fynd] + * @property {AggregatorRoute} [jiopay] + * @property {AggregatorRoute} [juspay] + * @property {AggregatorRoute} [mswipe] + * @property {AggregatorRoute} [payubiz] + * @property {AggregatorRoute} [razorpay] + * @property {AggregatorRoute} [rupifi] + * @property {AggregatorRoute} [simpl] + * @property {AggregatorRoute} [stripe] + * @property {AggregatorRoute} [upi_razorpay] */ /** * @typedef PaymentInitializationRequest @@ -538,6 +574,12 @@ export = PaymentApplicationModel; * @property {string} payment_gateway - Payment gateway name * @property {string} payment_identifier - Payment identifier */ +/** + * @typedef PaymentMethodsMetaOrder + * @property {string} merchant_code - Merchant code + * @property {string} payment_gateway - Payment gateway name + * @property {string} payment_identifier - Payment identifier + */ /** * @typedef PaymentModeList * @property {string} aggregator_name - Aggregator_name @@ -568,8 +610,9 @@ export = PaymentApplicationModel; * Intent_app_error_dict_list * @property {string[]} [intent_app_error_list] - Intent_app_error_list * @property {boolean} [intent_flow] - Intent_flow - * @property {Object} [logo_url] - Logo + * @property {PaymentModeLogo} [logo_url] * @property {string} [merchant_code] - Merchant code + * @property {Object} [meta] - Payment methods meta * @property {string} [name] - Name * @property {string} [nickname] - Nickname * @property {number} [remaining_limit] - Remaining limit @@ -583,13 +626,52 @@ export = PaymentApplicationModel; */ /** * @typedef PaymentModeRouteResponse - * @property {PaymentOptionAndFlow} payment_options - Payment_options + * @property {AdvancePaymentObject[]} [advance_payment] - Advance Payment Array + * @property {Object} [payment_breakup] - Payment Breakup for advance payment + * @property {PaymentOptionAndFlow} payment_options * @property {boolean} success - Response is successful or not */ /** * @typedef PaymentOptionAndFlow - * @property {PaymentFlow} payment_flows - Payment_flows - * @property {RootPaymentMode[]} payment_option - Payment options + * @property {PaymentFlow} payment_flows + * @property {RootPaymentMode} payment_option + */ +/** + * @typedef PaymentOrderData + * @property {string} [aggregator] - Aggregator name + * @property {number} [amount] - Amount + * @property {string} [callback_url] - Callback url for aggregator + * @property {string} [contact] - Mobile number + * @property {string} [currency] - Currency + * @property {string} [customer_id] - Aggregator customer id + * @property {string} [email] - Email + * @property {string} [merchant_order_id] - Merchant order id + * @property {string} [method] - Method + * @property {string} [order_id] - Aggregator order id + */ +/** + * @typedef PaymentOrderMethods + * @property {number} amount - Amount to be collected + * @property {PaymentMethodsMetaOrder} meta + * @property {string} mode - Payment mode + * @property {string} name - Payment mode name + * @property {string} [payment] - Payment type i.e. Required / Blocked + */ +/** + * @typedef PaymentOrderRequest + * @property {string} order_id - Order id + * @property {PaymentOrderMethods[]} [payment_methods] + * @property {string} [shipment_id] - Shipment_id + */ +/** + * @typedef PaymentOrderResponse + * @property {string} [callback_url] - Callback url for aggregator + * @property {PaymentOrderData} [data] + * @property {string} message - Message + * @property {string} [order_id] - Merchant order id + * @property {string} [payment_confirm_url] - Payment confirm url for aggregator + * @property {number} status_code - HTTP status code + * @property {boolean} success - Successful or failure */ /** * @typedef PaymentStatusUpdateRequest @@ -630,7 +712,7 @@ export = PaymentApplicationModel; */ /** * @typedef RedirectToAggregatorResponse - * @property {RedirectURL} data - Redirect URL. + * @property {RedirectURL} data * @property {boolean} success - Status updated or not. */ /** @@ -662,7 +744,7 @@ export = PaymentApplicationModel; */ /** * @typedef ResendOrCancelPaymentResponse - * @property {LinkStatus} data - Data about link action status. + * @property {LinkStatus} data * @property {boolean} success - Response is successful or not. */ /** @@ -692,7 +774,7 @@ export = PaymentApplicationModel; */ /** * @typedef RupifiBannerResponse - * @property {RupifiBannerData} data - Rupifi KYC banner details. + * @property {RupifiBannerData} data * @property {boolean} success - Successful or not. */ /** @@ -705,6 +787,12 @@ export = PaymentApplicationModel; * @property {boolean} is_beneficiary_set - Boolean Flag whether Beneficiary set or not * @property {boolean} [success] - Response is successful or not */ +/** + * @typedef SplitObject + * @property {number} [amount_remaining] - Amount pending to be paid + * @property {number} [splits_remaining] - Number of splits remaining + * @property {number} [total_number_of_splits] - Maximum amount of splits allowed + */ /** * @typedef TransferItemsDetails * @property {string} [display_name] - Beneficiary Display Name @@ -733,7 +821,7 @@ export = PaymentApplicationModel; */ /** * @typedef UserPersonalInfoInDetails - * @property {KYCAddress} address_as_per_id - Address details + * @property {KYCAddress} address_as_per_id * @property {string} dob - DOB * @property {string} [driving_license] - Driver License * @property {string} [email] - Email @@ -780,9 +868,20 @@ export = PaymentApplicationModel; */ /** * @typedef ValidateVPAResponse - * @property {ValidateUPI} data - Data about UPI ID validate. + * @property {ValidateUPI} data * @property {boolean} success - Response is successful or not. */ +/** + * @typedef WalletDelinkRequestSchema + * @property {string} aggregator - Aggregator Name + * @property {string} wallet_code - Wallet Code + */ +/** + * @typedef WalletLinkRequestSchema + * @property {string} aggregator - Aggregator Name + * @property {string} mobile - Mobile Number for Wallet + * @property {string} wallet_code - Wallet Code + */ /** * @typedef WalletOtpRequest * @property {string} country_code - Country Code of the Mobile Number @@ -795,6 +894,17 @@ export = PaymentApplicationModel; * @property {string} request_id - Request id * @property {boolean} [success] - Response is successful or not */ +/** + * @typedef WalletResponseSchema + * @property {Object} data - Response received from aggregator + * @property {boolean} success - Success/Failure of the API call + */ +/** + * @typedef WalletVerifyRequestSchema + * @property {string} aggregator - Aggregator Name + * @property {string} link_token - Token for wallet linking + * @property {number} otp - OTP received for wallet linking + */ /** * @typedef WrongOtpError * @property {string} description - Wrong OTP Code @@ -804,14 +914,11 @@ export = PaymentApplicationModel; declare class PaymentApplicationModel { } declare namespace PaymentApplicationModel { - export { ActiveCardPaymentGatewayResponse, AddBeneficiaryDetailsOTPRequest, AddBeneficiaryDetailsRequest, AddBeneficiaryViaOtpVerificationRequest, AddBeneficiaryViaOtpVerificationResponse, AggregatorConfigDetail, AggregatorRoute, AggregatorsConfigDetailResponse, AttachCardRequest, AttachCardsResponse, BalanceDetails, BankDetailsForOTP, BeneficiaryModeDetails, BusinessDetails, CancelOrResendPaymentLinkRequest, CancelPaymentLinkResponse, Card, CardDetails, CardDetailsResponse, CardPaymentGateway, ChargeCustomerRequest, ChargeCustomerResponse, CheckCreditResponse, CreateOrderUserData, CreateOrderUserPaymentMethods, CreateOrderUserRequest, CreateOrderUserResponse, CreatePaymentLinkMeta, CreatePaymentLinkRequest, CreatePaymentLinkResponse, CreditDetail, CreditSummary, CustomerCreditSummaryResponse, CustomerOnboardingRequest, CustomerOnboardingResponse, DeleteCardsResponse, DeletehCardRequest, DeviceDetails, EpaylaterBannerData, EpaylaterBannerResponse, ErrorCodeAndDescription, ErrorCodeDescription, ErrorDescription, ErrorResponse, GetPaymentLinkResponse, HttpErrorCodeAndResponse, IfscCodeResponse, IntentApp, IntentAppErrorList, KYCAddress, LinkStatus, ListCardsResponse, MarketplaceInfo, NotFoundResourceError, OnboardSummary, OrderBeneficiaryDetails, OrderBeneficiaryResponse, OutstandingOrderDetailsResponse, PaidOrderDetailsResponse, PaymentFlow, PaymentInitializationRequest, PaymentInitializationResponse, PaymentMethodsMeta, PaymentModeList, PaymentModeLogo, PaymentModeRouteResponse, PaymentOptionAndFlow, PaymentStatusUpdateRequest, PaymentStatusUpdateResponse, PollingPaymentLinkResponse, RedirectToAggregatorResponse, RedirectURL, RefundAccountResponse, renderHTMLRequest, renderHTMLResponse, ResendOrCancelPaymentRequest, ResendOrCancelPaymentResponse, ResendPaymentLinkResponse, RootPaymentMode, RupifiBannerData, RupifiBannerResponse, SetDefaultBeneficiaryRequest, SetDefaultBeneficiaryResponse, TransferItemsDetails, TransferModeDetails, TransferModeResponse, UpdateRefundTransferModeRequest, UpdateRefundTransferModeResponse, UserPersonalInfoInDetails, ValidateCustomerRequest, ValidateCustomerResponse, ValidateUPI, ValidateVPARequest, ValidateVPAResponse, WalletOtpRequest, WalletOtpResponse, WrongOtpError }; + export { ActiveCardPaymentGatewayResponse, AddBeneficiaryDetailsOTPRequest, AddBeneficiaryDetailsRequest, AddBeneficiaryViaOtpVerificationRequest, AddBeneficiaryViaOtpVerificationResponse, AdvanceObject, AdvancePaymentObject, AggregatorConfigDetail, AggregatorRoute, AggregatorsConfigDetailResponse, AttachCardRequest, AttachCardsResponse, BalanceDetails, BankDetailsForOTP, BeneficiaryModeDetails, BusinessDetails, CancelOrResendPaymentLinkRequest, CancelPaymentLinkResponse, Card, CardDetails, CardDetailsResponse, CardPaymentGateway, ChargeCustomerRequest, ChargeCustomerResponse, CheckCreditResponse, CreateOrderUserData, CreateOrderUserPaymentMethods, CreateOrderUserRequest, CreateOrderUserResponse, CreatePaymentLinkMeta, CreatePaymentLinkRequest, CreatePaymentLinkResponse, CreditDetail, CreditSummary, CustomerCreditSummaryResponse, CustomerOnboardingRequest, CustomerOnboardingResponse, DeleteCardsResponse, DeletehCardRequest, DeviceDetails, EpaylaterBannerData, EpaylaterBannerResponse, ErrorCodeAndDescription, ErrorCodeDescription, ErrorDescription, ErrorResponse, GetPaymentLinkResponse, HttpErrorCodeAndResponse, IfscCodeResponse, IntentApp, IntentAppErrorList, KYCAddress, LinkStatus, ListCardsResponse, MarketplaceInfo, NotFoundResourceError, OnboardSummary, OrderBeneficiaryDetails, OrderBeneficiaryResponse, OutstandingOrderDetailsResponse, PaidOrderDetailsResponse, PaymentFlow, PaymentInitializationRequest, PaymentInitializationResponse, PaymentMethodsMeta, PaymentMethodsMetaOrder, PaymentModeList, PaymentModeLogo, PaymentModeRouteResponse, PaymentOptionAndFlow, PaymentOrderData, PaymentOrderMethods, PaymentOrderRequest, PaymentOrderResponse, PaymentStatusUpdateRequest, PaymentStatusUpdateResponse, PollingPaymentLinkResponse, RedirectToAggregatorResponse, RedirectURL, RefundAccountResponse, renderHTMLRequest, renderHTMLResponse, ResendOrCancelPaymentRequest, ResendOrCancelPaymentResponse, ResendPaymentLinkResponse, RootPaymentMode, RupifiBannerData, RupifiBannerResponse, SetDefaultBeneficiaryRequest, SetDefaultBeneficiaryResponse, SplitObject, TransferItemsDetails, TransferModeDetails, TransferModeResponse, UpdateRefundTransferModeRequest, UpdateRefundTransferModeResponse, UserPersonalInfoInDetails, ValidateCustomerRequest, ValidateCustomerResponse, ValidateUPI, ValidateVPARequest, ValidateVPAResponse, WalletDelinkRequestSchema, WalletLinkRequestSchema, WalletOtpRequest, WalletOtpResponse, WalletResponseSchema, WalletVerifyRequestSchema, WrongOtpError }; } /** @returns {ActiveCardPaymentGatewayResponse} */ declare function ActiveCardPaymentGatewayResponse(): ActiveCardPaymentGatewayResponse; type ActiveCardPaymentGatewayResponse = { - /** - * - Card's payment gateway with customer id. - */ cards: CardPaymentGateway; /** * - Human readable message. @@ -836,9 +943,6 @@ type AddBeneficiaryDetailsRequest = { * False if by User */ delights: boolean; - /** - * - Beneficiary bank details - */ details: BeneficiaryModeDetails; /** * - Merchant Order Id @@ -883,6 +987,81 @@ type AddBeneficiaryViaOtpVerificationResponse = { */ success?: boolean; }; +/** @returns {AdvanceObject} */ +declare function AdvanceObject(): AdvanceObject; +type AdvanceObject = { + /** + * - All available types of prepayment + */ + all_prepayment_type?: string[]; + /** + * - Is custom advance amount allowed? + */ + allow_custom_advance_amount?: boolean; + /** + * - Amount for Payment Breakdown + */ + amount?: number; + /** + * - Type of cancellation + */ + cancellation_type?: string; + /** + * - The description for Advance Payment (user + * configured) + */ + description?: string; + /** + * - The display name for Advance payment + */ + display_name?: string; + /** + * - Is Advance Payment active + */ + is_active?: boolean; + /** + * - Type of prepayment value + */ + prepayment_type?: string; + /** + * - Value for prepayment in advance payment + */ + prepayment_value?: number; + /** + * - Time limit for processing refund + */ + refund_time_limit?: number; + /** + * - Time unit for refunds + */ + time_unit?: string; +}; +/** @returns {AdvancePaymentObject} */ +declare function AdvancePaymentObject(): AdvancePaymentObject; +type AdvancePaymentObject = { + advance?: AdvanceObject; + /** + * - Display name for Advance Payment Mode + */ + display_name?: string; + /** + * - Display Priority for Payment Option + */ + display_priority?: number; + /** + * - Payment mode + */ + list?: PaymentModeList[]; + /** + * - Name of Advance Payment Mode + */ + name?: string; + /** + * - Payment Mode ID for Advance Payment Option + */ + payment_mode_id?: number; + split?: SplitObject; +}; /** @returns {AggregatorConfigDetail} */ declare function AggregatorConfigDetail(): AggregatorConfigDetail; type AggregatorConfigDetail = { @@ -1064,9 +1243,6 @@ type BeneficiaryModeDetails = { /** @returns {BusinessDetails} */ declare function BusinessDetails(): BusinessDetails; type BusinessDetails = { - /** - * - Address details - */ address?: KYCAddress; /** * - Business Ownershipp type(e.g Rented) @@ -1277,9 +1453,6 @@ type CardDetails = { /** @returns {CardDetailsResponse} */ declare function CardDetailsResponse(): CardDetailsResponse; type CardDetailsResponse = { - /** - * - Saved Card Details - */ data: CardDetails; /** * - Response is successful or not. @@ -1361,9 +1534,6 @@ type ChargeCustomerResponse = { /** @returns {CheckCreditResponse} */ declare function CheckCreditResponse(): CheckCreditResponse; type CheckCreditResponse = { - /** - * - Credit summary of user. - */ data: CreditDetail; /** * - Operation is successful or not. @@ -1417,9 +1587,6 @@ type CreateOrderUserData = { /** @returns {CreateOrderUserPaymentMethods} */ declare function CreateOrderUserPaymentMethods(): CreateOrderUserPaymentMethods; type CreateOrderUserPaymentMethods = { - /** - * - Meta - */ meta: PaymentMethodsMeta; /** * - Payment mode @@ -1449,9 +1616,6 @@ type CreateOrderUserRequest = { * - Unique id of payment link */ payment_link_id: string; - /** - * - Payment method details - */ payment_methods: CreateOrderUserPaymentMethods; /** * - Success page url @@ -1494,7 +1658,6 @@ type CreatePaymentLinkMeta = { assign_card_id?: string; cart_id: string; checkout_mode: string; - pincode: string; }; /** @returns {CreatePaymentLinkRequest} */ declare function CreatePaymentLinkRequest(): CreatePaymentLinkRequest; @@ -1515,9 +1678,6 @@ type CreatePaymentLinkRequest = { * - Merchant order id */ external_order_id: string; - /** - * - Meta - */ meta: CreatePaymentLinkMeta; /** * - Mobile number to which the payment link is @@ -1573,12 +1733,10 @@ type CreditDetail = { declare function CreditSummary(): CreditSummary; type CreditSummary = { /** - * - Credit summary of user. + * - Url for activation */ + activation_url?: string; amount_available?: BalanceDetails; - /** - * - Credit summary of user. - */ balance?: BalanceDetails; /** * - Status from Credit aggregator's end @@ -1588,10 +1746,28 @@ type CreditSummary = { * - ID at Credit aggregator's end */ credit_line_id?: string; + due_amount?: BalanceDetails; + /** + * - Due date for repayment + */ + due_date?: string; + /** + * - Eligiblity flag to complete transaction + */ + is_eligible_for_txn?: boolean; + limit?: BalanceDetails; /** * - Unique aggregator customer id */ merchant_customer_ref_id?: string; + /** + * - Url for repayment + */ + repayment_url?: string; + /** + * - Statement of accounts. Show payment history. + */ + soa_url?: string; /** * - Customer Credit status */ @@ -1600,13 +1776,11 @@ type CreditSummary = { * - Message to customer */ status_message?: string; + total_due_amount?: BalanceDetails; }; /** @returns {CustomerCreditSummaryResponse} */ declare function CustomerCreditSummaryResponse(): CustomerCreditSummaryResponse; type CustomerCreditSummaryResponse = { - /** - * - Credit summary of user. - */ data?: CreditSummary; /** * - Payment confirmation updated or not. @@ -1620,26 +1794,14 @@ type CustomerOnboardingRequest = { * - Aggregator Name */ aggregator: string; - /** - * - Business summary. - */ business_info?: BusinessDetails; - /** - * - Device Details. - */ device?: DeviceDetails; - /** - * - Market Place info. - */ marketplace_info?: MarketplaceInfo; /** * - Mcc */ mcc?: string; - /** - * - Credit summary of user. - */ - personal_info: UserPersonalInfoInDetails; + personal_info?: UserPersonalInfoInDetails; /** * - CallbackURL */ @@ -1648,9 +1810,6 @@ type CustomerOnboardingRequest = { /** @returns {CustomerOnboardingResponse} */ declare function CustomerOnboardingResponse(): CustomerOnboardingResponse; type CustomerOnboardingResponse = { - /** - * - Redirect URL. - */ data: OnboardSummary; /** * - Status updated or not. @@ -1728,9 +1887,6 @@ type EpaylaterBannerData = { /** @returns {EpaylaterBannerResponse} */ declare function EpaylaterBannerResponse(): EpaylaterBannerResponse; type EpaylaterBannerResponse = { - /** - * - Epaylater KYC banner details. - */ data: EpaylaterBannerData; /** * - Successful or not. @@ -1804,7 +1960,7 @@ type ErrorDescription = { /** @returns {ErrorResponse} */ declare function ErrorResponse(): ErrorResponse; type ErrorResponse = { - error?: any; + error?: ErrorDescription; /** * - Message */ @@ -1894,10 +2050,7 @@ type IntentApp = { * - Display_name */ display_name?: string; - /** - * - Logos - */ - logos?: any; + logos?: PaymentModeLogo; /** * - Package_name */ @@ -2010,18 +2163,34 @@ type NotFoundResourceError = { /** @returns {OnboardSummary} */ declare function OnboardSummary(): OnboardSummary; type OnboardSummary = { + /** + * - Url for activation + */ + activation_url?: string; + /** + * - Whether is eligible for transaction + */ + is_eligible_for_txn?: boolean; + /** + * - Rupifi customer ID + */ + merchant_customer_ref_id?: string; /** * - URL to which the user may redirect. */ - redirect_url: string; + redirect_url?: string; /** * - User Session */ - session: any; + session?: any; /** - * - Operation Status + * - Transaction status */ status: boolean; + /** + * - Decription of status + */ + status_remark?: string; }; /** @returns {OrderBeneficiaryDetails} */ declare function OrderBeneficiaryDetails(): OrderBeneficiaryDetails; @@ -2158,62 +2327,20 @@ type PaidOrderDetailsResponse = { /** @returns {PaymentFlow} */ declare function PaymentFlow(): PaymentFlow; type PaymentFlow = { - /** - * - Ajiodhan - */ - ajiodhan?: any; - /** - * - BQR_Razorpay - */ - bqr_razorpay?: any; - /** - * - Ccavenue - */ - ccavenue?: any; - /** - * - Epaylater - */ - epaylater?: any; - /** - * - Fynd - */ - fynd?: any; - /** - * - Jiopay - */ - jiopay?: any; - /** - * - Juspay - */ - juspay?: any; - /** - * - Mswipe - */ - mswipe?: any; - /** - * - Payubiz - */ - payubiz?: any; - /** - * - Razorpay - */ - razorpay?: any; - /** - * - Rupifi - */ - rupifi?: any; - /** - * - Simpl - */ - simpl?: any; - /** - * - Stripe - */ - stripe?: any; - /** - * - UPI_Razorpay - */ - upi_razorpay?: any; + ajiodhan?: AggregatorRoute; + bqr_razorpay?: AggregatorRoute; + ccavenue?: AggregatorRoute; + epaylater?: AggregatorRoute; + fynd?: AggregatorRoute; + jiopay?: AggregatorRoute; + juspay?: AggregatorRoute; + mswipe?: AggregatorRoute; + payubiz?: AggregatorRoute; + razorpay?: AggregatorRoute; + rupifi?: AggregatorRoute; + simpl?: AggregatorRoute; + stripe?: AggregatorRoute; + upi_razorpay?: AggregatorRoute; }; /** @returns {PaymentInitializationRequest} */ declare function PaymentInitializationRequest(): PaymentInitializationRequest; @@ -2359,6 +2486,22 @@ type PaymentMethodsMeta = { */ payment_identifier: string; }; +/** @returns {PaymentMethodsMetaOrder} */ +declare function PaymentMethodsMetaOrder(): PaymentMethodsMetaOrder; +type PaymentMethodsMetaOrder = { + /** + * - Merchant code + */ + merchant_code: string; + /** + * - Payment gateway name + */ + payment_gateway: string; + /** + * - Payment identifier + */ + payment_identifier: string; +}; /** @returns {PaymentModeList} */ declare function PaymentModeList(): PaymentModeList; type PaymentModeList = { @@ -2468,14 +2611,15 @@ type PaymentModeList = { * - Intent_flow */ intent_flow?: boolean; - /** - * - Logo - */ - logo_url?: any; + logo_url?: PaymentModeLogo; /** * - Merchant code */ merchant_code?: string; + /** + * - Payment methods meta + */ + meta?: any; /** * - Name */ @@ -2513,8 +2657,13 @@ type PaymentModeLogo = { declare function PaymentModeRouteResponse(): PaymentModeRouteResponse; type PaymentModeRouteResponse = { /** - * - Payment_options + * - Advance Payment Array */ + advance_payment?: AdvancePaymentObject[]; + /** + * - Payment Breakup for advance payment + */ + payment_breakup?: any; payment_options: PaymentOptionAndFlow; /** * - Response is successful or not @@ -2524,14 +2673,115 @@ type PaymentModeRouteResponse = { /** @returns {PaymentOptionAndFlow} */ declare function PaymentOptionAndFlow(): PaymentOptionAndFlow; type PaymentOptionAndFlow = { + payment_flows: PaymentFlow; + payment_option: RootPaymentMode; +}; +/** @returns {PaymentOrderData} */ +declare function PaymentOrderData(): PaymentOrderData; +type PaymentOrderData = { + /** + * - Aggregator name + */ + aggregator?: string; /** - * - Payment_flows + * - Amount */ - payment_flows: PaymentFlow; + amount?: number; + /** + * - Callback url for aggregator + */ + callback_url?: string; /** - * - Payment options + * - Mobile number + */ + contact?: string; + /** + * - Currency + */ + currency?: string; + /** + * - Aggregator customer id + */ + customer_id?: string; + /** + * - Email + */ + email?: string; + /** + * - Merchant order id + */ + merchant_order_id?: string; + /** + * - Method */ - payment_option: RootPaymentMode[]; + method?: string; + /** + * - Aggregator order id + */ + order_id?: string; +}; +/** @returns {PaymentOrderMethods} */ +declare function PaymentOrderMethods(): PaymentOrderMethods; +type PaymentOrderMethods = { + /** + * - Amount to be collected + */ + amount: number; + meta: PaymentMethodsMetaOrder; + /** + * - Payment mode + */ + mode: string; + /** + * - Payment mode name + */ + name: string; + /** + * - Payment type i.e. Required / Blocked + */ + payment?: string; +}; +/** @returns {PaymentOrderRequest} */ +declare function PaymentOrderRequest(): PaymentOrderRequest; +type PaymentOrderRequest = { + /** + * - Order id + */ + order_id: string; + payment_methods?: PaymentOrderMethods[]; + /** + * - Shipment_id + */ + shipment_id?: string; +}; +/** @returns {PaymentOrderResponse} */ +declare function PaymentOrderResponse(): PaymentOrderResponse; +type PaymentOrderResponse = { + /** + * - Callback url for aggregator + */ + callback_url?: string; + data?: PaymentOrderData; + /** + * - Message + */ + message: string; + /** + * - Merchant order id + */ + order_id?: string; + /** + * - Payment confirm url for aggregator + */ + payment_confirm_url?: string; + /** + * - HTTP status code + */ + status_code: number; + /** + * - Successful or failure + */ + success: boolean; }; /** @returns {PaymentStatusUpdateRequest} */ declare function PaymentStatusUpdateRequest(): PaymentStatusUpdateRequest; @@ -2660,9 +2910,6 @@ type PollingPaymentLinkResponse = { /** @returns {RedirectToAggregatorResponse} */ declare function RedirectToAggregatorResponse(): RedirectToAggregatorResponse; type RedirectToAggregatorResponse = { - /** - * - Redirect URL. - */ data: RedirectURL; /** * - Status updated or not. @@ -2737,9 +2984,6 @@ type ResendOrCancelPaymentRequest = { /** @returns {ResendOrCancelPaymentResponse} */ declare function ResendOrCancelPaymentResponse(): ResendOrCancelPaymentResponse; type ResendOrCancelPaymentResponse = { - /** - * - Data about link action status. - */ data: LinkStatus; /** * - Response is successful or not. @@ -2822,9 +3066,6 @@ type RupifiBannerData = { /** @returns {RupifiBannerResponse} */ declare function RupifiBannerResponse(): RupifiBannerResponse; type RupifiBannerResponse = { - /** - * - Rupifi KYC banner details. - */ data: RupifiBannerData; /** * - Successful or not. @@ -2855,6 +3096,22 @@ type SetDefaultBeneficiaryResponse = { */ success?: boolean; }; +/** @returns {SplitObject} */ +declare function SplitObject(): SplitObject; +type SplitObject = { + /** + * - Amount pending to be paid + */ + amount_remaining?: number; + /** + * - Number of splits remaining + */ + splits_remaining?: number; + /** + * - Maximum amount of splits allowed + */ + total_number_of_splits?: number; +}; /** @returns {TransferItemsDetails} */ declare function TransferItemsDetails(): TransferItemsDetails; type TransferItemsDetails = { @@ -2922,9 +3179,6 @@ type UpdateRefundTransferModeResponse = { /** @returns {UserPersonalInfoInDetails} */ declare function UserPersonalInfoInDetails(): UserPersonalInfoInDetails; type UserPersonalInfoInDetails = { - /** - * - Address details - */ address_as_per_id: KYCAddress; /** * - DOB @@ -3070,15 +3324,40 @@ type ValidateVPARequest = { /** @returns {ValidateVPAResponse} */ declare function ValidateVPAResponse(): ValidateVPAResponse; type ValidateVPAResponse = { - /** - * - Data about UPI ID validate. - */ data: ValidateUPI; /** * - Response is successful or not. */ success: boolean; }; +/** @returns {WalletDelinkRequestSchema} */ +declare function WalletDelinkRequestSchema(): WalletDelinkRequestSchema; +type WalletDelinkRequestSchema = { + /** + * - Aggregator Name + */ + aggregator: string; + /** + * - Wallet Code + */ + wallet_code: string; +}; +/** @returns {WalletLinkRequestSchema} */ +declare function WalletLinkRequestSchema(): WalletLinkRequestSchema; +type WalletLinkRequestSchema = { + /** + * - Aggregator Name + */ + aggregator: string; + /** + * - Mobile Number for Wallet + */ + mobile: string; + /** + * - Wallet Code + */ + wallet_code: string; +}; /** @returns {WalletOtpRequest} */ declare function WalletOtpRequest(): WalletOtpRequest; type WalletOtpRequest = { @@ -3108,6 +3387,34 @@ type WalletOtpResponse = { */ success?: boolean; }; +/** @returns {WalletResponseSchema} */ +declare function WalletResponseSchema(): WalletResponseSchema; +type WalletResponseSchema = { + /** + * - Response received from aggregator + */ + data: any; + /** + * - Success/Failure of the API call + */ + success: boolean; +}; +/** @returns {WalletVerifyRequestSchema} */ +declare function WalletVerifyRequestSchema(): WalletVerifyRequestSchema; +type WalletVerifyRequestSchema = { + /** + * - Aggregator Name + */ + aggregator: string; + /** + * - Token for wallet linking + */ + link_token: string; + /** + * - OTP received for wallet linking + */ + otp: number; +}; /** @returns {WrongOtpError} */ declare function WrongOtpError(): WrongOtpError; type WrongOtpError = { diff --git a/sdk/application/Payment/PaymentApplicationModel.js b/sdk/application/Payment/PaymentApplicationModel.js index f4692c79d..49bb6a301 100644 --- a/sdk/application/Payment/PaymentApplicationModel.js +++ b/sdk/application/Payment/PaymentApplicationModel.js @@ -2,7 +2,7 @@ const Joi = require("joi"); /** * @typedef ActiveCardPaymentGatewayResponse - * @property {CardPaymentGateway} cards - Card's payment gateway with customer id. + * @property {CardPaymentGateway} cards * @property {string} message - Human readable message. * @property {boolean} success - Response is successful or not. */ @@ -17,7 +17,7 @@ const Joi = require("joi"); * @typedef AddBeneficiaryDetailsRequest * @property {boolean} delights - True if beneficiary to be added by delights or * False if by User - * @property {BeneficiaryModeDetails} details - Beneficiary bank details + * @property {BeneficiaryModeDetails} details * @property {string} order_id - Merchant Order Id * @property {string} [otp] * @property {string} [request_id] @@ -38,6 +38,33 @@ const Joi = require("joi"); * @property {boolean} [success] - Response is successful or not */ +/** + * @typedef AdvanceObject + * @property {string[]} [all_prepayment_type] - All available types of prepayment + * @property {boolean} [allow_custom_advance_amount] - Is custom advance amount allowed? + * @property {number} [amount] - Amount for Payment Breakdown + * @property {string} [cancellation_type] - Type of cancellation + * @property {string} [description] - The description for Advance Payment (user + * configured) + * @property {string} [display_name] - The display name for Advance payment + * @property {boolean} [is_active] - Is Advance Payment active + * @property {string} [prepayment_type] - Type of prepayment value + * @property {number} [prepayment_value] - Value for prepayment in advance payment + * @property {number} [refund_time_limit] - Time limit for processing refund + * @property {string} [time_unit] - Time unit for refunds + */ + +/** + * @typedef AdvancePaymentObject + * @property {AdvanceObject} [advance] + * @property {string} [display_name] - Display name for Advance Payment Mode + * @property {number} [display_priority] - Display Priority for Payment Option + * @property {PaymentModeList[]} [list] - Payment mode + * @property {string} [name] - Name of Advance Payment Mode + * @property {number} [payment_mode_id] - Payment Mode ID for Advance Payment Option + * @property {SplitObject} [split] + */ + /** * @typedef AggregatorConfigDetail * @property {string} [api] - Payment gateway api endpoint @@ -122,7 +149,7 @@ const Joi = require("joi"); /** * @typedef BusinessDetails - * @property {KYCAddress} [address] - Address details + * @property {KYCAddress} [address] * @property {string} [business_ownership_type] - Business Ownershipp type(e.g Rented) * @property {string} [business_type] - Business Type * @property {string} [entity_type] - Busineess Entity Type @@ -191,7 +218,7 @@ const Joi = require("joi"); /** * @typedef CardDetailsResponse - * @property {CardDetails} data - Saved Card Details + * @property {CardDetails} data * @property {boolean} success - Response is successful or not. */ @@ -224,7 +251,7 @@ const Joi = require("joi"); /** * @typedef CheckCreditResponse - * @property {CreditDetail} data - Credit summary of user. + * @property {CreditDetail} data * @property {boolean} success - Operation is successful or not. */ @@ -244,7 +271,7 @@ const Joi = require("joi"); /** * @typedef CreateOrderUserPaymentMethods - * @property {PaymentMethodsMeta} meta - Meta + * @property {PaymentMethodsMeta} meta * @property {string} mode - Payment mode * @property {string} name - Payment mode name */ @@ -255,7 +282,7 @@ const Joi = require("joi"); * @property {string} failure_callback_url - Failure page url * @property {Object} [meta] - Meta * @property {string} payment_link_id - Unique id of payment link - * @property {CreateOrderUserPaymentMethods} payment_methods - Payment method details + * @property {CreateOrderUserPaymentMethods} payment_methods * @property {string} success_callback_url - Success page url */ @@ -276,7 +303,6 @@ const Joi = require("joi"); * @property {string} [assign_card_id] * @property {string} cart_id * @property {string} checkout_mode - * @property {string} pincode */ /** @@ -285,7 +311,7 @@ const Joi = require("joi"); * @property {string} [description] - Merchant order id * @property {string} email - Email to which the payment link is to be sent * @property {string} external_order_id - Merchant order id - * @property {CreatePaymentLinkMeta} meta - Meta + * @property {CreatePaymentLinkMeta} meta * @property {string} mobile_number - Mobile number to which the payment link is * to be sent */ @@ -309,35 +335,43 @@ const Joi = require("joi"); /** * @typedef CreditSummary - * @property {BalanceDetails} [amount_available] - Credit summary of user. - * @property {BalanceDetails} [balance] - Credit summary of user. + * @property {string} [activation_url] - Url for activation + * @property {BalanceDetails} [amount_available] + * @property {BalanceDetails} [balance] * @property {string} [buyer_status] - Status from Credit aggregator's end * @property {string} [credit_line_id] - ID at Credit aggregator's end + * @property {BalanceDetails} [due_amount] + * @property {string} [due_date] - Due date for repayment + * @property {boolean} [is_eligible_for_txn] - Eligiblity flag to complete transaction + * @property {BalanceDetails} [limit] * @property {string} [merchant_customer_ref_id] - Unique aggregator customer id + * @property {string} [repayment_url] - Url for repayment + * @property {string} [soa_url] - Statement of accounts. Show payment history. * @property {string} [status] - Customer Credit status * @property {string} [status_message] - Message to customer + * @property {BalanceDetails} [total_due_amount] */ /** * @typedef CustomerCreditSummaryResponse - * @property {CreditSummary} [data] - Credit summary of user. + * @property {CreditSummary} [data] * @property {boolean} success - Payment confirmation updated or not. */ /** * @typedef CustomerOnboardingRequest * @property {string} aggregator - Aggregator Name - * @property {BusinessDetails} [business_info] - Business summary. - * @property {DeviceDetails} [device] - Device Details. - * @property {MarketplaceInfo} [marketplace_info] - Market Place info. + * @property {BusinessDetails} [business_info] + * @property {DeviceDetails} [device] + * @property {MarketplaceInfo} [marketplace_info] * @property {string} [mcc] - Mcc - * @property {UserPersonalInfoInDetails} personal_info - Credit summary of user. + * @property {UserPersonalInfoInDetails} [personal_info] * @property {string} source - CallbackURL */ /** * @typedef CustomerOnboardingResponse - * @property {OnboardSummary} data - Redirect URL. + * @property {OnboardSummary} data * @property {boolean} success - Status updated or not. */ @@ -372,7 +406,7 @@ const Joi = require("joi"); /** * @typedef EpaylaterBannerResponse - * @property {EpaylaterBannerData} data - Epaylater KYC banner details. + * @property {EpaylaterBannerData} data * @property {boolean} success - Successful or not. */ @@ -403,7 +437,7 @@ const Joi = require("joi"); /** * @typedef ErrorResponse - * @property {Object} [error] + * @property {ErrorDescription} [error] * @property {string} message - Message * @property {number} status_code - HTTP status code * @property {boolean} success - Successful or failure @@ -439,7 +473,7 @@ const Joi = require("joi"); * @typedef IntentApp * @property {string} [code] - Code * @property {string} [display_name] - Display_name - * @property {Object} [logos] - Logos + * @property {PaymentModeLogo} [logos] * @property {string} [package_name] - Package_name */ @@ -489,9 +523,13 @@ const Joi = require("joi"); /** * @typedef OnboardSummary - * @property {string} redirect_url - URL to which the user may redirect. - * @property {Object} session - User Session - * @property {boolean} status - Operation Status + * @property {string} [activation_url] - Url for activation + * @property {boolean} [is_eligible_for_txn] - Whether is eligible for transaction + * @property {string} [merchant_customer_ref_id] - Rupifi customer ID + * @property {string} [redirect_url] - URL to which the user may redirect. + * @property {Object} [session] - User Session + * @property {boolean} status - Transaction status + * @property {string} [status_remark] - Decription of status */ /** @@ -541,20 +579,20 @@ const Joi = require("joi"); /** * @typedef PaymentFlow - * @property {Object} [ajiodhan] - Ajiodhan - * @property {Object} [bqr_razorpay] - BQR_Razorpay - * @property {Object} [ccavenue] - Ccavenue - * @property {Object} [epaylater] - Epaylater - * @property {Object} [fynd] - Fynd - * @property {Object} [jiopay] - Jiopay - * @property {Object} [juspay] - Juspay - * @property {Object} [mswipe] - Mswipe - * @property {Object} [payubiz] - Payubiz - * @property {Object} [razorpay] - Razorpay - * @property {Object} [rupifi] - Rupifi - * @property {Object} [simpl] - Simpl - * @property {Object} [stripe] - Stripe - * @property {Object} [upi_razorpay] - UPI_Razorpay + * @property {AggregatorRoute} [ajiodhan] + * @property {AggregatorRoute} [bqr_razorpay] + * @property {AggregatorRoute} [ccavenue] + * @property {AggregatorRoute} [epaylater] + * @property {AggregatorRoute} [fynd] + * @property {AggregatorRoute} [jiopay] + * @property {AggregatorRoute} [juspay] + * @property {AggregatorRoute} [mswipe] + * @property {AggregatorRoute} [payubiz] + * @property {AggregatorRoute} [razorpay] + * @property {AggregatorRoute} [rupifi] + * @property {AggregatorRoute} [simpl] + * @property {AggregatorRoute} [stripe] + * @property {AggregatorRoute} [upi_razorpay] */ /** @@ -602,6 +640,13 @@ const Joi = require("joi"); * @property {string} payment_identifier - Payment identifier */ +/** + * @typedef PaymentMethodsMetaOrder + * @property {string} merchant_code - Merchant code + * @property {string} payment_gateway - Payment gateway name + * @property {string} payment_identifier - Payment identifier + */ + /** * @typedef PaymentModeList * @property {string} aggregator_name - Aggregator_name @@ -632,8 +677,9 @@ const Joi = require("joi"); * Intent_app_error_dict_list * @property {string[]} [intent_app_error_list] - Intent_app_error_list * @property {boolean} [intent_flow] - Intent_flow - * @property {Object} [logo_url] - Logo + * @property {PaymentModeLogo} [logo_url] * @property {string} [merchant_code] - Merchant code + * @property {Object} [meta] - Payment methods meta * @property {string} [name] - Name * @property {string} [nickname] - Nickname * @property {number} [remaining_limit] - Remaining limit @@ -649,14 +695,57 @@ const Joi = require("joi"); /** * @typedef PaymentModeRouteResponse - * @property {PaymentOptionAndFlow} payment_options - Payment_options + * @property {AdvancePaymentObject[]} [advance_payment] - Advance Payment Array + * @property {Object} [payment_breakup] - Payment Breakup for advance payment + * @property {PaymentOptionAndFlow} payment_options * @property {boolean} success - Response is successful or not */ /** * @typedef PaymentOptionAndFlow - * @property {PaymentFlow} payment_flows - Payment_flows - * @property {RootPaymentMode[]} payment_option - Payment options + * @property {PaymentFlow} payment_flows + * @property {RootPaymentMode} payment_option + */ + +/** + * @typedef PaymentOrderData + * @property {string} [aggregator] - Aggregator name + * @property {number} [amount] - Amount + * @property {string} [callback_url] - Callback url for aggregator + * @property {string} [contact] - Mobile number + * @property {string} [currency] - Currency + * @property {string} [customer_id] - Aggregator customer id + * @property {string} [email] - Email + * @property {string} [merchant_order_id] - Merchant order id + * @property {string} [method] - Method + * @property {string} [order_id] - Aggregator order id + */ + +/** + * @typedef PaymentOrderMethods + * @property {number} amount - Amount to be collected + * @property {PaymentMethodsMetaOrder} meta + * @property {string} mode - Payment mode + * @property {string} name - Payment mode name + * @property {string} [payment] - Payment type i.e. Required / Blocked + */ + +/** + * @typedef PaymentOrderRequest + * @property {string} order_id - Order id + * @property {PaymentOrderMethods[]} [payment_methods] + * @property {string} [shipment_id] - Shipment_id + */ + +/** + * @typedef PaymentOrderResponse + * @property {string} [callback_url] - Callback url for aggregator + * @property {PaymentOrderData} [data] + * @property {string} message - Message + * @property {string} [order_id] - Merchant order id + * @property {string} [payment_confirm_url] - Payment confirm url for aggregator + * @property {number} status_code - HTTP status code + * @property {boolean} success - Successful or failure */ /** @@ -701,7 +790,7 @@ const Joi = require("joi"); /** * @typedef RedirectToAggregatorResponse - * @property {RedirectURL} data - Redirect URL. + * @property {RedirectURL} data * @property {boolean} success - Status updated or not. */ @@ -739,7 +828,7 @@ const Joi = require("joi"); /** * @typedef ResendOrCancelPaymentResponse - * @property {LinkStatus} data - Data about link action status. + * @property {LinkStatus} data * @property {boolean} success - Response is successful or not. */ @@ -773,7 +862,7 @@ const Joi = require("joi"); /** * @typedef RupifiBannerResponse - * @property {RupifiBannerData} data - Rupifi KYC banner details. + * @property {RupifiBannerData} data * @property {boolean} success - Successful or not. */ @@ -789,6 +878,13 @@ const Joi = require("joi"); * @property {boolean} [success] - Response is successful or not */ +/** + * @typedef SplitObject + * @property {number} [amount_remaining] - Amount pending to be paid + * @property {number} [splits_remaining] - Number of splits remaining + * @property {number} [total_number_of_splits] - Maximum amount of splits allowed + */ + /** * @typedef TransferItemsDetails * @property {string} [display_name] - Beneficiary Display Name @@ -822,7 +918,7 @@ const Joi = require("joi"); /** * @typedef UserPersonalInfoInDetails - * @property {KYCAddress} address_as_per_id - Address details + * @property {KYCAddress} address_as_per_id * @property {string} dob - DOB * @property {string} [driving_license] - Driver License * @property {string} [email] - Email @@ -874,10 +970,23 @@ const Joi = require("joi"); /** * @typedef ValidateVPAResponse - * @property {ValidateUPI} data - Data about UPI ID validate. + * @property {ValidateUPI} data * @property {boolean} success - Response is successful or not. */ +/** + * @typedef WalletDelinkRequestSchema + * @property {string} aggregator - Aggregator Name + * @property {string} wallet_code - Wallet Code + */ + +/** + * @typedef WalletLinkRequestSchema + * @property {string} aggregator - Aggregator Name + * @property {string} mobile - Mobile Number for Wallet + * @property {string} wallet_code - Wallet Code + */ + /** * @typedef WalletOtpRequest * @property {string} country_code - Country Code of the Mobile Number @@ -892,6 +1001,19 @@ const Joi = require("joi"); * @property {boolean} [success] - Response is successful or not */ +/** + * @typedef WalletResponseSchema + * @property {Object} data - Response received from aggregator + * @property {boolean} success - Success/Failure of the API call + */ + +/** + * @typedef WalletVerifyRequestSchema + * @property {string} aggregator - Aggregator Name + * @property {string} link_token - Token for wallet linking + * @property {number} otp - OTP received for wallet linking + */ + /** * @typedef WrongOtpError * @property {string} description - Wrong OTP Code @@ -947,6 +1069,38 @@ class PaymentApplicationModel { }); } + /** @returns {AdvanceObject} */ + static AdvanceObject() { + return Joi.object({ + all_prepayment_type: Joi.array().items( + Joi.string().allow("").allow(null) + ), + allow_custom_advance_amount: Joi.boolean().allow(null), + amount: Joi.number(), + cancellation_type: Joi.string().allow("").allow(null), + description: Joi.string().allow("").allow(null), + display_name: Joi.string().allow("").allow(null), + is_active: Joi.boolean().allow(null), + prepayment_type: Joi.string().allow("").allow(null), + prepayment_value: Joi.number().allow(null), + refund_time_limit: Joi.number().allow(null), + time_unit: Joi.string().allow("").allow(null), + }); + } + + /** @returns {AdvancePaymentObject} */ + static AdvancePaymentObject() { + return Joi.object({ + advance: PaymentApplicationModel.AdvanceObject(), + display_name: Joi.string().allow("").allow(null), + display_priority: Joi.number().allow(null), + list: Joi.array().items(PaymentApplicationModel.PaymentModeList()), + name: Joi.string().allow("").allow(null), + payment_mode_id: Joi.number().allow(null), + split: PaymentApplicationModel.SplitObject(), + }); + } + /** @returns {AggregatorConfigDetail} */ static AggregatorConfigDetail() { return Joi.object({ @@ -1229,7 +1383,6 @@ class PaymentApplicationModel { assign_card_id: Joi.string().allow("").allow(null), cart_id: Joi.string().allow("").required(), checkout_mode: Joi.string().allow("").required(), - pincode: Joi.string().allow("").required(), }); } @@ -1269,13 +1422,21 @@ class PaymentApplicationModel { /** @returns {CreditSummary} */ static CreditSummary() { return Joi.object({ + activation_url: Joi.string().allow("").allow(null), amount_available: PaymentApplicationModel.BalanceDetails(), balance: PaymentApplicationModel.BalanceDetails(), buyer_status: Joi.string().allow("").allow(null), credit_line_id: Joi.string().allow("").allow(null), + due_amount: PaymentApplicationModel.BalanceDetails(), + due_date: Joi.string().allow("").allow(null), + is_eligible_for_txn: Joi.boolean().allow(null), + limit: PaymentApplicationModel.BalanceDetails(), merchant_customer_ref_id: Joi.string().allow("").allow(null), + repayment_url: Joi.string().allow("").allow(null), + soa_url: Joi.string().allow("").allow(null), status: Joi.string().allow("").allow(null), status_message: Joi.string().allow("").allow(null), + total_due_amount: PaymentApplicationModel.BalanceDetails(), }); } @@ -1295,7 +1456,7 @@ class PaymentApplicationModel { device: PaymentApplicationModel.DeviceDetails(), marketplace_info: PaymentApplicationModel.MarketplaceInfo(), mcc: Joi.string().allow("").allow(null), - personal_info: PaymentApplicationModel.UserPersonalInfoInDetails().required(), + personal_info: PaymentApplicationModel.UserPersonalInfoInDetails(), source: Joi.string().allow("").required(), }); } @@ -1387,7 +1548,7 @@ class PaymentApplicationModel { /** @returns {ErrorResponse} */ static ErrorResponse() { return Joi.object({ - error: Joi.any().allow(null), + error: PaymentApplicationModel.ErrorDescription(), message: Joi.string().allow("").required(), status_code: Joi.number().required(), success: Joi.boolean().required(), @@ -1431,7 +1592,7 @@ class PaymentApplicationModel { return Joi.object({ code: Joi.string().allow("").allow(null), display_name: Joi.string().allow("").allow(null), - logos: Joi.any().allow(null), + logos: PaymentApplicationModel.PaymentModeLogo(), package_name: Joi.string().allow("").allow(null), }); } @@ -1495,9 +1656,13 @@ class PaymentApplicationModel { /** @returns {OnboardSummary} */ static OnboardSummary() { return Joi.object({ - redirect_url: Joi.string().allow("").required(), - session: Joi.any().required(), + activation_url: Joi.string().allow(""), + is_eligible_for_txn: Joi.boolean(), + merchant_customer_ref_id: Joi.string().allow(""), + redirect_url: Joi.string().allow(""), + session: Joi.any(), status: Joi.boolean().required(), + status_remark: Joi.string().allow(""), }); } @@ -1559,20 +1724,20 @@ class PaymentApplicationModel { /** @returns {PaymentFlow} */ static PaymentFlow() { return Joi.object({ - ajiodhan: Joi.any().allow(null), - bqr_razorpay: Joi.any().allow(null), - ccavenue: Joi.any().allow(null), - epaylater: Joi.any().allow(null), - fynd: Joi.any().allow(null), - jiopay: Joi.any().allow(null), - juspay: Joi.any().allow(null), - mswipe: Joi.any().allow(null), - payubiz: Joi.any().allow(null), - razorpay: Joi.any().allow(null), - rupifi: Joi.any().allow(null), - simpl: Joi.any().allow(null), - stripe: Joi.any().allow(null), - upi_razorpay: Joi.any().allow(null), + ajiodhan: PaymentApplicationModel.AggregatorRoute(), + bqr_razorpay: PaymentApplicationModel.AggregatorRoute(), + ccavenue: PaymentApplicationModel.AggregatorRoute(), + epaylater: PaymentApplicationModel.AggregatorRoute(), + fynd: PaymentApplicationModel.AggregatorRoute(), + jiopay: PaymentApplicationModel.AggregatorRoute(), + juspay: PaymentApplicationModel.AggregatorRoute(), + mswipe: PaymentApplicationModel.AggregatorRoute(), + payubiz: PaymentApplicationModel.AggregatorRoute(), + razorpay: PaymentApplicationModel.AggregatorRoute(), + rupifi: PaymentApplicationModel.AggregatorRoute(), + simpl: PaymentApplicationModel.AggregatorRoute(), + stripe: PaymentApplicationModel.AggregatorRoute(), + upi_razorpay: PaymentApplicationModel.AggregatorRoute(), }); } @@ -1627,6 +1792,15 @@ class PaymentApplicationModel { }); } + /** @returns {PaymentMethodsMetaOrder} */ + static PaymentMethodsMetaOrder() { + return Joi.object({ + merchant_code: Joi.string().allow("").required(), + payment_gateway: Joi.string().allow("").required(), + payment_identifier: Joi.string().allow("").required(), + }); + } + /** @returns {PaymentModeList} */ static PaymentModeList() { return Joi.object({ @@ -1658,8 +1832,9 @@ class PaymentApplicationModel { ), intent_app_error_list: Joi.array().items(Joi.string().allow("")), intent_flow: Joi.boolean().allow(null), - logo_url: Joi.any().allow(null), + logo_url: PaymentApplicationModel.PaymentModeLogo(), merchant_code: Joi.string().allow("").allow(null), + meta: Joi.any().allow(null), name: Joi.string().allow("").allow(null), nickname: Joi.string().allow("").allow(null), remaining_limit: Joi.number().allow(null), @@ -1679,6 +1854,10 @@ class PaymentApplicationModel { /** @returns {PaymentModeRouteResponse} */ static PaymentModeRouteResponse() { return Joi.object({ + advance_payment: Joi.array().items( + PaymentApplicationModel.AdvancePaymentObject() + ), + payment_breakup: Joi.any(), payment_options: PaymentApplicationModel.PaymentOptionAndFlow().required(), success: Joi.boolean().required(), }); @@ -1688,9 +1867,58 @@ class PaymentApplicationModel { static PaymentOptionAndFlow() { return Joi.object({ payment_flows: PaymentApplicationModel.PaymentFlow().required(), - payment_option: Joi.array() - .items(PaymentApplicationModel.RootPaymentMode()) - .required(), + payment_option: PaymentApplicationModel.RootPaymentMode().required(), + }); + } + + /** @returns {PaymentOrderData} */ + static PaymentOrderData() { + return Joi.object({ + aggregator: Joi.string().allow("").allow(null), + amount: Joi.number().allow(null), + callback_url: Joi.string().allow("").allow(null), + contact: Joi.string().allow("").allow(null), + currency: Joi.string().allow("").allow(null), + customer_id: Joi.string().allow("").allow(null), + email: Joi.string().allow("").allow(null), + merchant_order_id: Joi.string().allow("").allow(null), + method: Joi.string().allow("").allow(null), + order_id: Joi.string().allow("").allow(null), + }); + } + + /** @returns {PaymentOrderMethods} */ + static PaymentOrderMethods() { + return Joi.object({ + amount: Joi.number().required(), + meta: PaymentApplicationModel.PaymentMethodsMetaOrder().required(), + mode: Joi.string().allow("").required(), + name: Joi.string().allow("").required(), + payment: Joi.string().allow(""), + }); + } + + /** @returns {PaymentOrderRequest} */ + static PaymentOrderRequest() { + return Joi.object({ + order_id: Joi.string().allow("").required(), + payment_methods: Joi.array().items( + PaymentApplicationModel.PaymentOrderMethods() + ), + shipment_id: Joi.string().allow(""), + }); + } + + /** @returns {PaymentOrderResponse} */ + static PaymentOrderResponse() { + return Joi.object({ + callback_url: Joi.string().allow("").allow(null), + data: PaymentApplicationModel.PaymentOrderData(), + message: Joi.string().allow("").required(), + order_id: Joi.string().allow("").allow(null), + payment_confirm_url: Joi.string().allow("").allow(null), + status_code: Joi.number().required(), + success: Joi.boolean().required(), }); } @@ -1855,6 +2083,15 @@ class PaymentApplicationModel { }); } + /** @returns {SplitObject} */ + static SplitObject() { + return Joi.object({ + amount_remaining: Joi.number().allow(null), + splits_remaining: Joi.number().allow(null), + total_number_of_splits: Joi.number().allow(null), + }); + } + /** @returns {TransferItemsDetails} */ static TransferItemsDetails() { return Joi.object({ @@ -1968,6 +2205,23 @@ class PaymentApplicationModel { }); } + /** @returns {WalletDelinkRequestSchema} */ + static WalletDelinkRequestSchema() { + return Joi.object({ + aggregator: Joi.string().allow("").required(), + wallet_code: Joi.string().allow("").required(), + }); + } + + /** @returns {WalletLinkRequestSchema} */ + static WalletLinkRequestSchema() { + return Joi.object({ + aggregator: Joi.string().allow("").required(), + mobile: Joi.string().allow("").required(), + wallet_code: Joi.string().allow("").required(), + }); + } + /** @returns {WalletOtpRequest} */ static WalletOtpRequest() { return Joi.object({ @@ -1985,6 +2239,23 @@ class PaymentApplicationModel { }); } + /** @returns {WalletResponseSchema} */ + static WalletResponseSchema() { + return Joi.object({ + data: Joi.any().required(), + success: Joi.boolean().required(), + }); + } + + /** @returns {WalletVerifyRequestSchema} */ + static WalletVerifyRequestSchema() { + return Joi.object({ + aggregator: Joi.string().allow("").required(), + link_token: Joi.string().allow("").required(), + otp: Joi.number().required(), + }); + } + /** @returns {WrongOtpError} */ static WrongOtpError() { return Joi.object({ diff --git a/sdk/application/Payment/PaymentApplicationValidator.d.ts b/sdk/application/Payment/PaymentApplicationValidator.d.ts index 0984d84f3..b8af0bc1c 100644 --- a/sdk/application/Payment/PaymentApplicationValidator.d.ts +++ b/sdk/application/Payment/PaymentApplicationValidator.d.ts @@ -40,6 +40,10 @@ export = PaymentApplicationValidator; * @typedef CreatePaymentLinkParam * @property {PaymentApplicationModel.CreatePaymentLinkRequest} body */ +/** + * @typedef CreatePaymentOrderParam + * @property {PaymentApplicationModel.PaymentOrderRequest} body + */ /** * @typedef CustomerCreditSummaryParam * @property {string} [aggregator] @@ -52,6 +56,10 @@ export = PaymentApplicationValidator; * @typedef DeleteUserCardParam * @property {PaymentApplicationModel.DeletehCardRequest} body */ +/** + * @typedef DelinkWalletParam + * @property {PaymentApplicationModel.WalletDelinkRequestSchema} body + */ /** * @typedef EnableOrDisableRefundTransferModeParam * @property {PaymentApplicationModel.UpdateRefundTransferModeRequest} body @@ -84,14 +92,17 @@ export = PaymentApplicationValidator; /** * @typedef GetPaymentModeRoutesParam * @property {number} amount - Payable amount. - * @property {string} cartId - Identifier of the cart. - * @property {string} pincode - The PIN Code of the destination address, e.g. 400059 - * @property {string} checkoutMode - Option to checkout for self or for others. + * @property {string} [cartId] - Identifier of the cart. + * @property {string} [checkoutMode] - Option to checkout for self or for others. * @property {boolean} [refresh] - This is a boolean value. Select `true` to * remove temporary cache files on payment gateway and replace with the latest one. + * @property {string} [orderId] * @property {string} [cardReference] - Card reference id of user's debit or credit card. * @property {string} [userDetails] - URIencoded JSON containing details of an * anonymous user. + * @property {boolean} [displaySplit] - Display Split Payment Option or not + * @property {boolean} [advancePayment] - Display Advance Payment Options or Normal + * @property {string} [shipmentId] */ /** * @typedef GetPaymentModeRoutesPaymentLinkParam @@ -100,9 +111,9 @@ export = PaymentApplicationValidator; /** * @typedef GetPosPaymentModeRoutesParam * @property {number} amount - Payable amount. - * @property {string} cartId - Identifier of the cart. + * @property {string} [cartId] - Identifier of the cart. * @property {string} pincode - The PIN Code of the destination address, e.g. 400059 - * @property {string} checkoutMode - Option to checkout for self or for others. + * @property {string} [checkoutMode] - Option to checkout for self or for others. * @property {boolean} [refresh] - This is a boolean value. Select `true` to * remove temporary cache files on payment gateway and replace with the latest one. * @property {string} [cardReference] - Card reference id of user's debit or credit card. @@ -126,6 +137,10 @@ export = PaymentApplicationValidator; * @typedef InitialisePaymentPaymentLinkParam * @property {PaymentApplicationModel.PaymentInitializationRequest} body */ +/** + * @typedef LinkWalletParam + * @property {PaymentApplicationModel.WalletVerifyRequestSchema} body + */ /** * @typedef OutstandingOrderDetailsParam * @property {string} [aggregator] @@ -186,6 +201,10 @@ export = PaymentApplicationValidator; * @typedef VerifyOtpAndAddBeneficiaryForWalletParam * @property {PaymentApplicationModel.WalletOtpRequest} body */ +/** + * @typedef WalletLinkInitateParam + * @property {PaymentApplicationModel.WalletLinkRequestSchema} body + */ declare class PaymentApplicationValidator { /** @returns {AddBeneficiaryDetailsParam} */ static addBeneficiaryDetails(): AddBeneficiaryDetailsParam; @@ -207,12 +226,16 @@ declare class PaymentApplicationValidator { static createOrderHandlerPaymentLink(): CreateOrderHandlerPaymentLinkParam; /** @returns {CreatePaymentLinkParam} */ static createPaymentLink(): CreatePaymentLinkParam; + /** @returns {CreatePaymentOrderParam} */ + static createPaymentOrder(): CreatePaymentOrderParam; /** @returns {CustomerCreditSummaryParam} */ static customerCreditSummary(): CustomerCreditSummaryParam; /** @returns {CustomerOnboardParam} */ static customerOnboard(): CustomerOnboardParam; /** @returns {DeleteUserCardParam} */ static deleteUserCard(): DeleteUserCardParam; + /** @returns {DelinkWalletParam} */ + static delinkWallet(): DelinkWalletParam; /** @returns {EnableOrDisableRefundTransferModeParam} */ static enableOrDisableRefundTransferMode(): EnableOrDisableRefundTransferModeParam; /** @returns {GetActiveCardAggregatorParam} */ @@ -243,6 +266,8 @@ declare class PaymentApplicationValidator { static initialisePayment(): InitialisePaymentParam; /** @returns {InitialisePaymentPaymentLinkParam} */ static initialisePaymentPaymentLink(): InitialisePaymentPaymentLinkParam; + /** @returns {LinkWalletParam} */ + static linkWallet(): LinkWalletParam; /** @returns {OutstandingOrderDetailsParam} */ static outstandingOrderDetails(): OutstandingOrderDetailsParam; /** @returns {PaidOrderDetailsParam} */ @@ -271,9 +296,11 @@ declare class PaymentApplicationValidator { static verifyOtpAndAddBeneficiaryForBank(): VerifyOtpAndAddBeneficiaryForBankParam; /** @returns {VerifyOtpAndAddBeneficiaryForWalletParam} */ static verifyOtpAndAddBeneficiaryForWallet(): VerifyOtpAndAddBeneficiaryForWalletParam; + /** @returns {WalletLinkInitateParam} */ + static walletLinkInitate(): WalletLinkInitateParam; } declare namespace PaymentApplicationValidator { - export { AddBeneficiaryDetailsParam, AddRefundBankAccountUsingOTPParam, AttachCardToCustomerParam, CancelPaymentLinkParam, CardDetailsParam, CheckAndUpdatePaymentStatusParam, CheckAndUpdatePaymentStatusPaymentLinkParam, CheckCreditParam, CreateOrderHandlerPaymentLinkParam, CreatePaymentLinkParam, CustomerCreditSummaryParam, CustomerOnboardParam, DeleteUserCardParam, EnableOrDisableRefundTransferModeParam, GetActiveCardAggregatorParam, GetActiveRefundTransferModesParam, GetActiveUserCardsParam, GetAggregatorsConfigParam, GetEpaylaterBannerDetailsParam, GetOrderBeneficiariesDetailParam, GetPaymentLinkParam, GetPaymentModeRoutesParam, GetPaymentModeRoutesPaymentLinkParam, GetPosPaymentModeRoutesParam, GetRupifiBannerDetailsParam, GetUserBeneficiariesDetailParam, InitialisePaymentParam, InitialisePaymentPaymentLinkParam, OutstandingOrderDetailsParam, PaidOrderDetailsParam, PollingPaymentLinkParam, RedirectToAggregatorParam, RenderHTMLParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, UpdateDefaultBeneficiaryParam, ValidateVPAParam, VerifyAndChargePaymentParam, VerifyCustomerForPaymentParam, VerifyIfscCodeParam, VerifyOtpAndAddBeneficiaryForBankParam, VerifyOtpAndAddBeneficiaryForWalletParam }; + export { AddBeneficiaryDetailsParam, AddRefundBankAccountUsingOTPParam, AttachCardToCustomerParam, CancelPaymentLinkParam, CardDetailsParam, CheckAndUpdatePaymentStatusParam, CheckAndUpdatePaymentStatusPaymentLinkParam, CheckCreditParam, CreateOrderHandlerPaymentLinkParam, CreatePaymentLinkParam, CreatePaymentOrderParam, CustomerCreditSummaryParam, CustomerOnboardParam, DeleteUserCardParam, DelinkWalletParam, EnableOrDisableRefundTransferModeParam, GetActiveCardAggregatorParam, GetActiveRefundTransferModesParam, GetActiveUserCardsParam, GetAggregatorsConfigParam, GetEpaylaterBannerDetailsParam, GetOrderBeneficiariesDetailParam, GetPaymentLinkParam, GetPaymentModeRoutesParam, GetPaymentModeRoutesPaymentLinkParam, GetPosPaymentModeRoutesParam, GetRupifiBannerDetailsParam, GetUserBeneficiariesDetailParam, InitialisePaymentParam, InitialisePaymentPaymentLinkParam, LinkWalletParam, OutstandingOrderDetailsParam, PaidOrderDetailsParam, PollingPaymentLinkParam, RedirectToAggregatorParam, RenderHTMLParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, UpdateDefaultBeneficiaryParam, ValidateVPAParam, VerifyAndChargePaymentParam, VerifyCustomerForPaymentParam, VerifyIfscCodeParam, VerifyOtpAndAddBeneficiaryForBankParam, VerifyOtpAndAddBeneficiaryForWalletParam, WalletLinkInitateParam }; } type AddBeneficiaryDetailsParam = { body: PaymentApplicationModel.AddBeneficiaryDetailsRequest; @@ -309,6 +336,9 @@ type CreateOrderHandlerPaymentLinkParam = { type CreatePaymentLinkParam = { body: PaymentApplicationModel.CreatePaymentLinkRequest; }; +type CreatePaymentOrderParam = { + body: PaymentApplicationModel.PaymentOrderRequest; +}; type CustomerCreditSummaryParam = { aggregator?: string; }; @@ -318,6 +348,9 @@ type CustomerOnboardParam = { type DeleteUserCardParam = { body: PaymentApplicationModel.DeletehCardRequest; }; +type DelinkWalletParam = { + body: PaymentApplicationModel.WalletDelinkRequestSchema; +}; type EnableOrDisableRefundTransferModeParam = { body: PaymentApplicationModel.UpdateRefundTransferModeRequest; }; @@ -356,20 +389,17 @@ type GetPaymentModeRoutesParam = { /** * - Identifier of the cart. */ - cartId: string; - /** - * - The PIN Code of the destination address, e.g. 400059 - */ - pincode: string; + cartId?: string; /** * - Option to checkout for self or for others. */ - checkoutMode: string; + checkoutMode?: string; /** * - This is a boolean value. Select `true` to * remove temporary cache files on payment gateway and replace with the latest one. */ refresh?: boolean; + orderId?: string; /** * - Card reference id of user's debit or credit card. */ @@ -379,6 +409,15 @@ type GetPaymentModeRoutesParam = { * anonymous user. */ userDetails?: string; + /** + * - Display Split Payment Option or not + */ + displaySplit?: boolean; + /** + * - Display Advance Payment Options or Normal + */ + advancePayment?: boolean; + shipmentId?: string; }; type GetPaymentModeRoutesPaymentLinkParam = { /** @@ -394,7 +433,7 @@ type GetPosPaymentModeRoutesParam = { /** * - Identifier of the cart. */ - cartId: string; + cartId?: string; /** * - The PIN Code of the destination address, e.g. 400059 */ @@ -402,7 +441,7 @@ type GetPosPaymentModeRoutesParam = { /** * - Option to checkout for self or for others. */ - checkoutMode: string; + checkoutMode?: string; /** * - This is a boolean value. Select `true` to * remove temporary cache files on payment gateway and replace with the latest one. @@ -437,6 +476,9 @@ type InitialisePaymentParam = { type InitialisePaymentPaymentLinkParam = { body: PaymentApplicationModel.PaymentInitializationRequest; }; +type LinkWalletParam = { + body: PaymentApplicationModel.WalletVerifyRequestSchema; +}; type OutstandingOrderDetailsParam = { aggregator?: string; }; @@ -492,6 +534,9 @@ type VerifyOtpAndAddBeneficiaryForBankParam = { type VerifyOtpAndAddBeneficiaryForWalletParam = { body: PaymentApplicationModel.WalletOtpRequest; }; +type WalletLinkInitateParam = { + body: PaymentApplicationModel.WalletLinkRequestSchema; +}; type GetActiveRefundTransferModesParam = any; type GetEpaylaterBannerDetailsParam = any; type GetRupifiBannerDetailsParam = any; diff --git a/sdk/application/Payment/PaymentApplicationValidator.js b/sdk/application/Payment/PaymentApplicationValidator.js index 62f665030..1092870fa 100644 --- a/sdk/application/Payment/PaymentApplicationValidator.js +++ b/sdk/application/Payment/PaymentApplicationValidator.js @@ -53,6 +53,11 @@ const PaymentApplicationModel = require("./PaymentApplicationModel"); * @property {PaymentApplicationModel.CreatePaymentLinkRequest} body */ +/** + * @typedef CreatePaymentOrderParam + * @property {PaymentApplicationModel.PaymentOrderRequest} body + */ + /** * @typedef CustomerCreditSummaryParam * @property {string} [aggregator] @@ -68,6 +73,11 @@ const PaymentApplicationModel = require("./PaymentApplicationModel"); * @property {PaymentApplicationModel.DeletehCardRequest} body */ +/** + * @typedef DelinkWalletParam + * @property {PaymentApplicationModel.WalletDelinkRequestSchema} body + */ + /** * @typedef EnableOrDisableRefundTransferModeParam * @property {PaymentApplicationModel.UpdateRefundTransferModeRequest} body @@ -108,14 +118,17 @@ const PaymentApplicationModel = require("./PaymentApplicationModel"); /** * @typedef GetPaymentModeRoutesParam * @property {number} amount - Payable amount. - * @property {string} cartId - Identifier of the cart. - * @property {string} pincode - The PIN Code of the destination address, e.g. 400059 - * @property {string} checkoutMode - Option to checkout for self or for others. + * @property {string} [cartId] - Identifier of the cart. + * @property {string} [checkoutMode] - Option to checkout for self or for others. * @property {boolean} [refresh] - This is a boolean value. Select `true` to * remove temporary cache files on payment gateway and replace with the latest one. + * @property {string} [orderId] * @property {string} [cardReference] - Card reference id of user's debit or credit card. * @property {string} [userDetails] - URIencoded JSON containing details of an * anonymous user. + * @property {boolean} [displaySplit] - Display Split Payment Option or not + * @property {boolean} [advancePayment] - Display Advance Payment Options or Normal + * @property {string} [shipmentId] */ /** @@ -126,9 +139,9 @@ const PaymentApplicationModel = require("./PaymentApplicationModel"); /** * @typedef GetPosPaymentModeRoutesParam * @property {number} amount - Payable amount. - * @property {string} cartId - Identifier of the cart. + * @property {string} [cartId] - Identifier of the cart. * @property {string} pincode - The PIN Code of the destination address, e.g. 400059 - * @property {string} checkoutMode - Option to checkout for self or for others. + * @property {string} [checkoutMode] - Option to checkout for self or for others. * @property {boolean} [refresh] - This is a boolean value. Select `true` to * remove temporary cache files on payment gateway and replace with the latest one. * @property {string} [cardReference] - Card reference id of user's debit or credit card. @@ -157,6 +170,11 @@ const PaymentApplicationModel = require("./PaymentApplicationModel"); * @property {PaymentApplicationModel.PaymentInitializationRequest} body */ +/** + * @typedef LinkWalletParam + * @property {PaymentApplicationModel.WalletVerifyRequestSchema} body + */ + /** * @typedef OutstandingOrderDetailsParam * @property {string} [aggregator] @@ -231,6 +249,11 @@ const PaymentApplicationModel = require("./PaymentApplicationModel"); * @property {PaymentApplicationModel.WalletOtpRequest} body */ +/** + * @typedef WalletLinkInitateParam + * @property {PaymentApplicationModel.WalletLinkRequestSchema} body + */ + class PaymentApplicationValidator { /** @returns {AddBeneficiaryDetailsParam} */ static addBeneficiaryDetails() { @@ -303,6 +326,13 @@ class PaymentApplicationValidator { }).required(); } + /** @returns {CreatePaymentOrderParam} */ + static createPaymentOrder() { + return Joi.object({ + body: PaymentApplicationModel.PaymentOrderRequest().required(), + }).required(); + } + /** @returns {CustomerCreditSummaryParam} */ static customerCreditSummary() { return Joi.object({ @@ -324,6 +354,13 @@ class PaymentApplicationValidator { }).required(); } + /** @returns {DelinkWalletParam} */ + static delinkWallet() { + return Joi.object({ + body: PaymentApplicationModel.WalletDelinkRequestSchema().required(), + }).required(); + } + /** @returns {EnableOrDisableRefundTransferModeParam} */ static enableOrDisableRefundTransferMode() { return Joi.object({ @@ -381,12 +418,15 @@ class PaymentApplicationValidator { static getPaymentModeRoutes() { return Joi.object({ amount: Joi.number().required(), - cartId: Joi.string().allow("").required(), - pincode: Joi.string().allow("").required(), - checkoutMode: Joi.string().allow("").required(), + cartId: Joi.string().allow(""), + checkoutMode: Joi.string().allow(""), refresh: Joi.boolean(), + orderId: Joi.string().allow(""), cardReference: Joi.string().allow(""), userDetails: Joi.string().allow(""), + displaySplit: Joi.boolean(), + advancePayment: Joi.boolean(), + shipmentId: Joi.string().allow(""), }).required(); } @@ -401,9 +441,9 @@ class PaymentApplicationValidator { static getPosPaymentModeRoutes() { return Joi.object({ amount: Joi.number().required(), - cartId: Joi.string().allow("").required(), + cartId: Joi.string().allow(""), pincode: Joi.string().allow("").required(), - checkoutMode: Joi.string().allow("").required(), + checkoutMode: Joi.string().allow(""), refresh: Joi.boolean(), cardReference: Joi.string().allow(""), orderType: Joi.string().allow("").required(), @@ -437,6 +477,13 @@ class PaymentApplicationValidator { }).required(); } + /** @returns {LinkWalletParam} */ + static linkWallet() { + return Joi.object({ + body: PaymentApplicationModel.WalletVerifyRequestSchema().required(), + }).required(); + } + /** @returns {OutstandingOrderDetailsParam} */ static outstandingOrderDetails() { return Joi.object({ @@ -535,6 +582,13 @@ class PaymentApplicationValidator { body: PaymentApplicationModel.WalletOtpRequest().required(), }).required(); } + + /** @returns {WalletLinkInitateParam} */ + static walletLinkInitate() { + return Joi.object({ + body: PaymentApplicationModel.WalletLinkRequestSchema().required(), + }).required(); + } } module.exports = PaymentApplicationValidator; diff --git a/sdk/application/PosCart/PosCartApplicationModel.d.ts b/sdk/application/PosCart/PosCartApplicationModel.d.ts index c711edc43..21567606b 100644 --- a/sdk/application/PosCart/PosCartApplicationModel.d.ts +++ b/sdk/application/PosCart/PosCartApplicationModel.d.ts @@ -59,7 +59,9 @@ export = PosCartApplicationModel; * @property {Object} [meta] * @property {string} [name] * @property {string} [phone] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] - State code for international address * @property {string[]} [tags] * @property {string} [user_id] */ @@ -78,6 +80,7 @@ export = PosCartApplicationModel; * @property {number} [article_quantity] - Quantity of article on which * promotion is applicable * @property {BuyRules[]} [buy_rules] - Buy rules for promotions + * @property {CartCurrency} [currency] * @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions * @property {boolean} [mrp_promotion] - If applied promotion is applied on * product MRP or ESP @@ -551,6 +554,7 @@ export = PosCartApplicationModel; * @property {string} [seller_identifier] * @property {string} [size] * @property {StoreInfo} [store] + * @property {string[]} [tags] - A list of article tags * @property {string} [type] * @property {string} [uid] */ @@ -594,6 +598,11 @@ export = PosCartApplicationModel; * @property {string} [max] * @property {string} [min] */ +/** + * @typedef PromiseISOFormat + * @property {string} [max] - Max promise in ISO format. + * @property {string} [min] - Min Promise in ISO format. + */ /** * @typedef PromiseTimestamp * @property {number} [max] @@ -673,6 +682,7 @@ export = PosCartApplicationModel; /** * @typedef ShipmentPromise * @property {PromiseFormatted} [formatted] + * @property {PromiseISOFormat} [iso] * @property {PromiseTimestamp} [timestamp] */ /** @@ -764,7 +774,7 @@ export = PosCartApplicationModel; declare class PosCartApplicationModel { } declare namespace PosCartApplicationModel { - export { ActionQuery, AddCartDetailResponse, AddCartRequest, AddProductCart, Address, AppliedFreeArticles, AppliedPromotion, ApplyCouponRequest, ArticleGiftDetail, ArticlePriceInfo, BaseInfo, BasePrice, BulkPriceOffer, BulkPriceResponse, BuyRules, CartBreakup, CartCheckoutCustomMeta, CartCheckoutResponse, CartCurrency, CartDeliveryModesResponse, CartDetailResponse, CartItemCountResponse, CartMetaMissingResponse, CartMetaRequest, CartMetaResponse, CartPosCheckoutDetailRequest, CartProduct, CartProductIdentifer, CartProductInfo, CartShipmentsResponse, CategoryInfo, CheckCart, Coupon, CouponBreakup, CouponDetails, CouponValidity, CustomerDetails, DeleteAddressResponse, DiscountRulesApp, DisplayBreakup, Files, FreeGiftItem, GeoLocation, GetAddressesResponse, GetCouponResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, GiftDetail, LoyaltyPoints, OfferItem, OfferPrice, OfferSeller, Ownership, PageCoupon, PaymentCouponValidate, PaymentSelectionLock, PickupStoreDetail, ProductAction, ProductArticle, ProductAvailability, ProductAvailabilitySize, ProductImage, ProductPrice, ProductPriceInfo, PromiseFormatted, PromiseTimestamp, PromoMeta, RawBreakup, RewardPointRequest, SaveAddressResponse, SelectCartAddressRequest, SharedCart, SharedCartDetails, SharedCartResponse, ShipmentPromise, ShipmentResponse, StaffCheckout, StoreDetailsResponse, StoreInfo, Tags, UpdateAddressResponse, UpdateCartDetailResponse, UpdateCartPaymentRequest, UpdateCartRequest, UpdateCartShipmentItem, UpdateCartShipmentRequest, UpdateProductCart }; + export { ActionQuery, AddCartDetailResponse, AddCartRequest, AddProductCart, Address, AppliedFreeArticles, AppliedPromotion, ApplyCouponRequest, ArticleGiftDetail, ArticlePriceInfo, BaseInfo, BasePrice, BulkPriceOffer, BulkPriceResponse, BuyRules, CartBreakup, CartCheckoutCustomMeta, CartCheckoutResponse, CartCurrency, CartDeliveryModesResponse, CartDetailResponse, CartItemCountResponse, CartMetaMissingResponse, CartMetaRequest, CartMetaResponse, CartPosCheckoutDetailRequest, CartProduct, CartProductIdentifer, CartProductInfo, CartShipmentsResponse, CategoryInfo, CheckCart, Coupon, CouponBreakup, CouponDetails, CouponValidity, CustomerDetails, DeleteAddressResponse, DiscountRulesApp, DisplayBreakup, Files, FreeGiftItem, GeoLocation, GetAddressesResponse, GetCouponResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, GiftDetail, LoyaltyPoints, OfferItem, OfferPrice, OfferSeller, Ownership, PageCoupon, PaymentCouponValidate, PaymentSelectionLock, PickupStoreDetail, ProductAction, ProductArticle, ProductAvailability, ProductAvailabilitySize, ProductImage, ProductPrice, ProductPriceInfo, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, PromoMeta, RawBreakup, RewardPointRequest, SaveAddressResponse, SelectCartAddressRequest, SharedCart, SharedCartDetails, SharedCartResponse, ShipmentPromise, ShipmentResponse, StaffCheckout, StoreDetailsResponse, StoreInfo, Tags, UpdateAddressResponse, UpdateCartDetailResponse, UpdateCartPaymentRequest, UpdateCartRequest, UpdateCartShipmentItem, UpdateCartShipmentRequest, UpdateProductCart }; } /** @returns {ActionQuery} */ declare function ActionQuery(): ActionQuery; @@ -840,7 +850,12 @@ type Address = { meta?: any; name?: string; phone?: string; + sector?: string; state?: string; + /** + * - State code for international address + */ + state_code?: string; tags?: string[]; user_id?: string; }; @@ -885,6 +900,7 @@ type AppliedPromotion = { * - Buy rules for promotions */ buy_rules?: BuyRules[]; + currency?: CartCurrency; /** * - Discount rules for promotions */ @@ -1560,6 +1576,10 @@ type ProductArticle = { seller_identifier?: string; size?: string; store?: StoreInfo; + /** + * - A list of article tags + */ + tags?: string[]; type?: string; uid?: string; }; @@ -1609,6 +1629,18 @@ type PromiseFormatted = { max?: string; min?: string; }; +/** @returns {PromiseISOFormat} */ +declare function PromiseISOFormat(): PromiseISOFormat; +type PromiseISOFormat = { + /** + * - Max promise in ISO format. + */ + max?: string; + /** + * - Min Promise in ISO format. + */ + min?: string; +}; /** @returns {PromiseTimestamp} */ declare function PromiseTimestamp(): PromiseTimestamp; type PromiseTimestamp = { @@ -1710,6 +1742,7 @@ type SharedCartResponse = { declare function ShipmentPromise(): ShipmentPromise; type ShipmentPromise = { formatted?: PromiseFormatted; + iso?: PromiseISOFormat; timestamp?: PromiseTimestamp; }; /** @returns {ShipmentResponse} */ diff --git a/sdk/application/PosCart/PosCartApplicationModel.js b/sdk/application/PosCart/PosCartApplicationModel.js index e02106545..0cdad4dbb 100644 --- a/sdk/application/PosCart/PosCartApplicationModel.js +++ b/sdk/application/PosCart/PosCartApplicationModel.js @@ -64,7 +64,9 @@ const Joi = require("joi"); * @property {Object} [meta] * @property {string} [name] * @property {string} [phone] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] - State code for international address * @property {string[]} [tags] * @property {string} [user_id] */ @@ -85,6 +87,7 @@ const Joi = require("joi"); * @property {number} [article_quantity] - Quantity of article on which * promotion is applicable * @property {BuyRules[]} [buy_rules] - Buy rules for promotions + * @property {CartCurrency} [currency] * @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions * @property {boolean} [mrp_promotion] - If applied promotion is applied on * product MRP or ESP @@ -610,6 +613,7 @@ const Joi = require("joi"); * @property {string} [seller_identifier] * @property {string} [size] * @property {StoreInfo} [store] + * @property {string[]} [tags] - A list of article tags * @property {string} [type] * @property {string} [uid] */ @@ -660,6 +664,12 @@ const Joi = require("joi"); * @property {string} [min] */ +/** + * @typedef PromiseISOFormat + * @property {string} [max] - Max promise in ISO format. + * @property {string} [min] - Min Promise in ISO format. + */ + /** * @typedef PromiseTimestamp * @property {number} [max] @@ -748,6 +758,7 @@ const Joi = require("joi"); /** * @typedef ShipmentPromise * @property {PromiseFormatted} [formatted] + * @property {PromiseISOFormat} [iso] * @property {PromiseTimestamp} [timestamp] */ @@ -923,7 +934,9 @@ class PosCartApplicationModel { meta: Joi.any(), name: Joi.string().allow(""), phone: Joi.string().allow(""), + sector: Joi.string().allow(""), state: Joi.string().allow(""), + state_code: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), user_id: Joi.string().allow(""), }); @@ -948,6 +961,7 @@ class PosCartApplicationModel { ), article_quantity: Joi.number(), buy_rules: Joi.array().items(PosCartApplicationModel.BuyRules()), + currency: PosCartApplicationModel.CartCurrency(), discount_rules: Joi.array().items( PosCartApplicationModel.DiscountRulesApp() ), @@ -1580,6 +1594,7 @@ class PosCartApplicationModel { seller_identifier: Joi.string().allow(""), size: Joi.string().allow(""), store: PosCartApplicationModel.StoreInfo(), + tags: Joi.array().items(Joi.string().allow("")), type: Joi.string().allow(""), uid: Joi.string().allow(""), }); @@ -1645,6 +1660,14 @@ class PosCartApplicationModel { }); } + /** @returns {PromiseISOFormat} */ + static PromiseISOFormat() { + return Joi.object({ + max: Joi.string().allow(""), + min: Joi.string().allow(""), + }); + } + /** @returns {PromiseTimestamp} */ static PromiseTimestamp() { return Joi.object({ @@ -1752,6 +1775,7 @@ class PosCartApplicationModel { static ShipmentPromise() { return Joi.object({ formatted: PosCartApplicationModel.PromiseFormatted(), + iso: PosCartApplicationModel.PromiseISOFormat(), timestamp: PosCartApplicationModel.PromiseTimestamp(), }); } diff --git a/sdk/application/Theme/ThemeApplicationClient.d.ts b/sdk/application/Theme/ThemeApplicationClient.d.ts index 81b38dd14..7af67a9ba 100644 --- a/sdk/application/Theme/ThemeApplicationClient.d.ts +++ b/sdk/application/Theme/ThemeApplicationClient.d.ts @@ -39,7 +39,7 @@ declare class Theme { * @summary: Get page of a theme * @description: Use this API to retrieve a page of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getPage/). */ - getPage({ themeId, pageValue, requestHeaders }?: ThemeApplicationValidator.GetPageParam, { responseHeaders }?: object): Promise; + getPage({ themeId, pageValue, filters, company, requestHeaders }?: ThemeApplicationValidator.GetPageParam, { responseHeaders }?: object): Promise; /** * @param {ThemeApplicationValidator.GetThemeForPreviewParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/application/Theme/ThemeApplicationClient.js b/sdk/application/Theme/ThemeApplicationClient.js index 57605838b..d86cce28f 100644 --- a/sdk/application/Theme/ThemeApplicationClient.js +++ b/sdk/application/Theme/ThemeApplicationClient.js @@ -201,11 +201,13 @@ class Theme { * @description: Use this API to retrieve a page of a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/theme/getPage/). */ async getPage( - { themeId, pageValue, requestHeaders } = { requestHeaders: {} }, + { themeId, pageValue, filters, company, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { error } = ThemeApplicationValidator.getPage().validate( - { themeId, pageValue }, + { themeId, pageValue, filters, company }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -214,7 +216,7 @@ class Theme { // Showing warrnings if extra unknown parameters are found const { error: warrning } = ThemeApplicationValidator.getPage().validate( - { themeId, pageValue }, + { themeId, pageValue, filters, company }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -225,6 +227,8 @@ class Theme { } const query_params = {}; + query_params["filters"] = filters; + query_params["company"] = company; const xHeaders = {}; diff --git a/sdk/application/Theme/ThemeApplicationModel.d.ts b/sdk/application/Theme/ThemeApplicationModel.d.ts index 35aec80b1..44be00046 100644 --- a/sdk/application/Theme/ThemeApplicationModel.d.ts +++ b/sdk/application/Theme/ThemeApplicationModel.d.ts @@ -1,4 +1,17 @@ export = ThemeApplicationModel; +/** + * @typedef Action + * @property {ActionPage} [page] + * @property {ActionPage} [popup] + * @property {string} [type] + */ +/** + * @typedef ActionPage + * @property {Object} [params] + * @property {Object} [query] + * @property {PageType} type + * @property {string} [url] + */ /** * @typedef AdvanceSetting * @property {DividerStrokeHighlightSetting} [divider_stroke_highlight] @@ -20,11 +33,20 @@ export = ThemeApplicationModel; * @property {boolean} [show_footer_auth] - Whether to show footer authentication or not * @property {boolean} [show_header_auth] - Whether to show header authentication or not */ +/** + * @typedef AvailablePagePlatformPredicate + * @property {boolean} [android] - Section visibility on android platform + * @property {boolean} [ios] - Section visibility on ios platform + * @property {boolean} [web] - Section visibility on web platform + */ /** * @typedef AvailablePagePredicate + * @property {AvailablePagePlatformPredicate} [platform] * @property {AvailablePageRoutePredicate} [route] + * @property {AvailablePageSchedulePredicate} [schedule] * @property {AvailablePageScreenPredicate} [screen] * @property {AvailablePageUserPredicate} [user] + * @property {string[]} [zones] - An array of zone ids associated with the section */ /** * @typedef AvailablePageRoutePredicate @@ -32,6 +54,12 @@ export = ThemeApplicationModel; * @property {Object} [query] * @property {string} [selected] */ +/** + * @typedef AvailablePageSchedulePredicate + * @property {string} [cron] + * @property {string} [end] + * @property {string} [start] + */ /** * @typedef AvailablePageSchema * @property {string} [_id] @@ -67,7 +95,11 @@ export = ThemeApplicationModel; /** * @typedef AvailablePageSeo * @property {string} [_id] + * @property {SEObreadcrumb[]} [breadcrumb] + * @property {string} [canonical_url] * @property {string} [description] + * @property {SEOMetaItem[]} [meta_tags] + * @property {SEOSitemap} [sitemap] * @property {string} [title] */ /** @@ -236,16 +268,6 @@ export = ThemeApplicationModel; * @property {string} [desktop] - The URL of the desktop image * @property {string} [mobile] - The URL of the mobile image */ -/** - * @typedef Meta - * @property {string} [description] - The description of the theme - * @property {Images} [images] - * @property {string[]} [industry] - An array of industries associated with the theme - * @property {string} [name] - The name of the theme - * @property {ThemePayment} [payment] - * @property {Release} [release] - * @property {string} [slug] - The slug of the theme - */ /** * @typedef OverlayPopupSetting * @property {string} [dialog_backgroung] - The dialog background color @@ -338,6 +360,26 @@ export = ThemeApplicationModel; * @property {RangeProp} [slide_interval] * @property {TextProp} [title] */ +/** + * @typedef SEObreadcrumb + * @property {Action} [action] + * @property {string} [url] + */ +/** + * @typedef SEOMetaItem + * @property {SEOMetaItems[]} [items] + * @property {string} [title] + */ +/** + * @typedef SEOMetaItems + * @property {string} [key] + * @property {string} [value] + */ +/** + * @typedef SEOSitemap + * @property {string} [frequency] + * @property {number} [priority] + */ /** * @typedef StaticConfig * @property {StaticProps} [props] @@ -366,6 +408,16 @@ export = ThemeApplicationModel; * @property {string} [name] - The name of the configuration * @property {string[]} [page] - An array of pages */ +/** + * @typedef ThemeMeta + * @property {string} [description] - The description of the theme + * @property {Images} [images] + * @property {string[]} [industry] - An array of industries associated with the theme + * @property {string} [name] - The name of the theme + * @property {ThemePayment} [payment] + * @property {Release} [release] + * @property {string} [slug] - The slug of the theme + */ /** * @typedef ThemePayment * @property {number} [amount] - The amount of the theme @@ -383,16 +435,18 @@ export = ThemeApplicationModel; * @property {boolean} [applied] - Whether the theme has been applied or not * @property {Assets} [assets] * @property {SectionItem[]} [available_sections] - Available sections information + * @property {number} [company_id] - The company id in which sales channel exists * @property {Config} [config] * @property {string} [created_at] - The creation timestamp of the theme * @property {Font} [font] * @property {boolean} [is_private] - Whether the theme is private or not * @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace - * @property {Meta} [meta] + * @property {ThemeMeta} [meta] * @property {string} [name] - The name of the theme * @property {Object} [styles] - The styles associated with the theme * @property {string[]} [tags] - An array of tags associated with the theme * @property {string} [template_theme_id] - The ID of the template theme + * @property {string} [theme_type] * @property {string} [updated_at] - The last update timestamp of the theme * @property {string} [version] - The version of the theme */ @@ -419,11 +473,74 @@ export = ThemeApplicationModel; * @property {string} [success_background] - The success background color * @property {string} [success_text] - The success text color */ +/** + * @typedef {| "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"} PageType + */ declare class ThemeApplicationModel { } declare namespace ThemeApplicationModel { - export { AdvanceSetting, AllAvailablePageSchema, Assets, AuthConfig, AvailablePagePredicate, AvailablePageRoutePredicate, AvailablePageSchema, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageSectionMetaAttributes, AvailablePageSeo, AvailablePageUserPredicate, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, Block, BlockProps, ButtonSetting, CheckboxProp, Colors, CommonJS, Config, CSS, CustomConfig, CustomProps, DividerStrokeHighlightSetting, Font, FontVariant, FontVariants, FooterSetting, GeneralSetting, GlobalConfig, GlobalSchema, HeaderSetting, ImagePickerProp, Images, Meta, OverlayPopupSetting, Page, PaletteConfig, Predicate, Preset, Prop, RangeProp, Release, Route, SaleDiscountSetting, Screen, Section, SectionItem, SectionPreset, SectionProps, StaticConfig, StaticProps, TextProp, TextSetting, ThemeConfiguration, ThemePayment, ThemeSetting, ThemesSchema, ThemeUserSchema, UMDJs, UrlProp, UserAlertsSetting }; + export { Action, ActionPage, AdvanceSetting, AllAvailablePageSchema, Assets, AuthConfig, AvailablePagePlatformPredicate, AvailablePagePredicate, AvailablePageRoutePredicate, AvailablePageSchedulePredicate, AvailablePageSchema, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageSectionMetaAttributes, AvailablePageSeo, AvailablePageUserPredicate, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, Block, BlockProps, ButtonSetting, CheckboxProp, Colors, CommonJS, Config, CSS, CustomConfig, CustomProps, DividerStrokeHighlightSetting, Font, FontVariant, FontVariants, FooterSetting, GeneralSetting, GlobalConfig, GlobalSchema, HeaderSetting, ImagePickerProp, Images, OverlayPopupSetting, Page, PaletteConfig, Predicate, Preset, Prop, RangeProp, Release, Route, SaleDiscountSetting, Screen, Section, SectionItem, SectionPreset, SectionProps, SEObreadcrumb, SEOMetaItem, SEOMetaItems, SEOSitemap, StaticConfig, StaticProps, TextProp, TextSetting, ThemeConfiguration, ThemeMeta, ThemePayment, ThemeSetting, ThemesSchema, ThemeUserSchema, UMDJs, UrlProp, UserAlertsSetting, PageType }; } +/** @returns {Action} */ +declare function Action(): Action; +type Action = { + page?: ActionPage; + popup?: ActionPage; + type?: string; +}; +/** @returns {ActionPage} */ +declare function ActionPage(): ActionPage; +type ActionPage = { + params?: any; + query?: any; + type: PageType; + url?: string; +}; /** @returns {AdvanceSetting} */ declare function AdvanceSetting(): AdvanceSetting; type AdvanceSetting = { @@ -455,12 +572,34 @@ type AuthConfig = { */ show_header_auth?: boolean; }; +/** @returns {AvailablePagePlatformPredicate} */ +declare function AvailablePagePlatformPredicate(): AvailablePagePlatformPredicate; +type AvailablePagePlatformPredicate = { + /** + * - Section visibility on android platform + */ + android?: boolean; + /** + * - Section visibility on ios platform + */ + ios?: boolean; + /** + * - Section visibility on web platform + */ + web?: boolean; +}; /** @returns {AvailablePagePredicate} */ declare function AvailablePagePredicate(): AvailablePagePredicate; type AvailablePagePredicate = { + platform?: AvailablePagePlatformPredicate; route?: AvailablePageRoutePredicate; + schedule?: AvailablePageSchedulePredicate; screen?: AvailablePageScreenPredicate; user?: AvailablePageUserPredicate; + /** + * - An array of zone ids associated with the section + */ + zones?: string[]; }; /** @returns {AvailablePageRoutePredicate} */ declare function AvailablePageRoutePredicate(): AvailablePageRoutePredicate; @@ -469,6 +608,13 @@ type AvailablePageRoutePredicate = { query?: any; selected?: string; }; +/** @returns {AvailablePageSchedulePredicate} */ +declare function AvailablePageSchedulePredicate(): AvailablePageSchedulePredicate; +type AvailablePageSchedulePredicate = { + cron?: string; + end?: string; + start?: string; +}; /** @returns {AvailablePageSchema} */ declare function AvailablePageSchema(): AvailablePageSchema; type AvailablePageSchema = { @@ -509,7 +655,11 @@ type AvailablePageSectionMetaAttributes = { declare function AvailablePageSeo(): AvailablePageSeo; type AvailablePageSeo = { _id?: string; + breadcrumb?: SEObreadcrumb[]; + canonical_url?: string; description?: string; + meta_tags?: SEOMetaItem[]; + sitemap?: SEOSitemap; title?: string; }; /** @returns {AvailablePageUserPredicate} */ @@ -888,29 +1038,6 @@ type Images = { */ mobile?: string; }; -/** @returns {Meta} */ -declare function Meta(): Meta; -type Meta = { - /** - * - The description of the theme - */ - description?: string; - images?: Images; - /** - * - An array of industries associated with the theme - */ - industry?: string[]; - /** - * - The name of the theme - */ - name?: string; - payment?: ThemePayment; - release?: Release; - /** - * - The slug of the theme - */ - slug?: string; -}; /** @returns {OverlayPopupSetting} */ declare function OverlayPopupSetting(): OverlayPopupSetting; type OverlayPopupSetting = { @@ -1090,6 +1217,30 @@ type SectionProps = { slide_interval?: RangeProp; title?: TextProp; }; +/** @returns {SEObreadcrumb} */ +declare function SEObreadcrumb(): SEObreadcrumb; +type SEObreadcrumb = { + action?: Action; + url?: string; +}; +/** @returns {SEOMetaItem} */ +declare function SEOMetaItem(): SEOMetaItem; +type SEOMetaItem = { + items?: SEOMetaItems[]; + title?: string; +}; +/** @returns {SEOMetaItems} */ +declare function SEOMetaItems(): SEOMetaItems; +type SEOMetaItems = { + key?: string; + value?: string; +}; +/** @returns {SEOSitemap} */ +declare function SEOSitemap(): SEOSitemap; +type SEOSitemap = { + frequency?: string; + priority?: number; +}; /** @returns {StaticConfig} */ declare function StaticConfig(): StaticConfig; type StaticConfig = { @@ -1147,6 +1298,29 @@ type ThemeConfiguration = { */ page?: string[]; }; +/** @returns {ThemeMeta} */ +declare function ThemeMeta(): ThemeMeta; +type ThemeMeta = { + /** + * - The description of the theme + */ + description?: string; + images?: Images; + /** + * - An array of industries associated with the theme + */ + industry?: string[]; + /** + * - The name of the theme + */ + name?: string; + payment?: ThemePayment; + release?: Release; + /** + * - The slug of the theme + */ + slug?: string; +}; /** @returns {ThemePayment} */ declare function ThemePayment(): ThemePayment; type ThemePayment = { @@ -1191,6 +1365,10 @@ type ThemesSchema = { * - Available sections information */ available_sections?: SectionItem[]; + /** + * - The company id in which sales channel exists + */ + company_id?: number; config?: Config; /** * - The creation timestamp of the theme @@ -1205,7 +1383,7 @@ type ThemesSchema = { * - The ID of the theme in the marketplace */ marketplace_theme_id?: string; - meta?: Meta; + meta?: ThemeMeta; /** * - The name of the theme */ @@ -1222,6 +1400,7 @@ type ThemesSchema = { * - The ID of the template theme */ template_theme_id?: string; + theme_type?: string; /** * - The last update timestamp of the theme */ @@ -1288,3 +1467,10 @@ type UserAlertsSetting = { */ success_text?: string; }; +/** + * Enum: PageType Used By: Theme + * + * @returns {PageType} + */ +declare function PageType(): PageType; +type PageType = "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"; diff --git a/sdk/application/Theme/ThemeApplicationModel.js b/sdk/application/Theme/ThemeApplicationModel.js index f75c17a2e..67ec081be 100644 --- a/sdk/application/Theme/ThemeApplicationModel.js +++ b/sdk/application/Theme/ThemeApplicationModel.js @@ -1,5 +1,20 @@ const Joi = require("joi"); +/** + * @typedef Action + * @property {ActionPage} [page] + * @property {ActionPage} [popup] + * @property {string} [type] + */ + +/** + * @typedef ActionPage + * @property {Object} [params] + * @property {Object} [query] + * @property {PageType} type + * @property {string} [url] + */ + /** * @typedef AdvanceSetting * @property {DividerStrokeHighlightSetting} [divider_stroke_highlight] @@ -25,11 +40,21 @@ const Joi = require("joi"); * @property {boolean} [show_header_auth] - Whether to show header authentication or not */ +/** + * @typedef AvailablePagePlatformPredicate + * @property {boolean} [android] - Section visibility on android platform + * @property {boolean} [ios] - Section visibility on ios platform + * @property {boolean} [web] - Section visibility on web platform + */ + /** * @typedef AvailablePagePredicate + * @property {AvailablePagePlatformPredicate} [platform] * @property {AvailablePageRoutePredicate} [route] + * @property {AvailablePageSchedulePredicate} [schedule] * @property {AvailablePageScreenPredicate} [screen] * @property {AvailablePageUserPredicate} [user] + * @property {string[]} [zones] - An array of zone ids associated with the section */ /** @@ -39,6 +64,13 @@ const Joi = require("joi"); * @property {string} [selected] */ +/** + * @typedef AvailablePageSchedulePredicate + * @property {string} [cron] + * @property {string} [end] + * @property {string} [start] + */ + /** * @typedef AvailablePageSchema * @property {string} [_id] @@ -78,7 +110,11 @@ const Joi = require("joi"); /** * @typedef AvailablePageSeo * @property {string} [_id] + * @property {SEObreadcrumb[]} [breadcrumb] + * @property {string} [canonical_url] * @property {string} [description] + * @property {SEOMetaItem[]} [meta_tags] + * @property {SEOSitemap} [sitemap] * @property {string} [title] */ @@ -272,17 +308,6 @@ const Joi = require("joi"); * @property {string} [mobile] - The URL of the mobile image */ -/** - * @typedef Meta - * @property {string} [description] - The description of the theme - * @property {Images} [images] - * @property {string[]} [industry] - An array of industries associated with the theme - * @property {string} [name] - The name of the theme - * @property {ThemePayment} [payment] - * @property {Release} [release] - * @property {string} [slug] - The slug of the theme - */ - /** * @typedef OverlayPopupSetting * @property {string} [dialog_backgroung] - The dialog background color @@ -390,6 +415,30 @@ const Joi = require("joi"); * @property {TextProp} [title] */ +/** + * @typedef SEObreadcrumb + * @property {Action} [action] + * @property {string} [url] + */ + +/** + * @typedef SEOMetaItem + * @property {SEOMetaItems[]} [items] + * @property {string} [title] + */ + +/** + * @typedef SEOMetaItems + * @property {string} [key] + * @property {string} [value] + */ + +/** + * @typedef SEOSitemap + * @property {string} [frequency] + * @property {number} [priority] + */ + /** * @typedef StaticConfig * @property {StaticProps} [props] @@ -423,6 +472,17 @@ const Joi = require("joi"); * @property {string[]} [page] - An array of pages */ +/** + * @typedef ThemeMeta + * @property {string} [description] - The description of the theme + * @property {Images} [images] + * @property {string[]} [industry] - An array of industries associated with the theme + * @property {string} [name] - The name of the theme + * @property {ThemePayment} [payment] + * @property {Release} [release] + * @property {string} [slug] - The slug of the theme + */ + /** * @typedef ThemePayment * @property {number} [amount] - The amount of the theme @@ -442,16 +502,18 @@ const Joi = require("joi"); * @property {boolean} [applied] - Whether the theme has been applied or not * @property {Assets} [assets] * @property {SectionItem[]} [available_sections] - Available sections information + * @property {number} [company_id] - The company id in which sales channel exists * @property {Config} [config] * @property {string} [created_at] - The creation timestamp of the theme * @property {Font} [font] * @property {boolean} [is_private] - Whether the theme is private or not * @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace - * @property {Meta} [meta] + * @property {ThemeMeta} [meta] * @property {string} [name] - The name of the theme * @property {Object} [styles] - The styles associated with the theme * @property {string[]} [tags] - An array of tags associated with the theme * @property {string} [template_theme_id] - The ID of the template theme + * @property {string} [theme_type] * @property {string} [updated_at] - The last update timestamp of the theme * @property {string} [version] - The version of the theme */ @@ -483,7 +545,81 @@ const Joi = require("joi"); * @property {string} [success_text] - The success text color */ +/** + * @typedef {| "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"} PageType + */ + class ThemeApplicationModel { + /** @returns {Action} */ + static Action() { + return Joi.object({ + page: ThemeApplicationModel.ActionPage(), + popup: ThemeApplicationModel.ActionPage(), + type: Joi.string().allow(""), + }); + } + + /** @returns {ActionPage} */ + static ActionPage() { + return Joi.object({ + params: Joi.object().pattern( + /\S/, + Joi.array().items(Joi.string().allow("")) + ), + query: Joi.object().pattern( + /\S/, + Joi.array().items(Joi.string().allow("")) + ), + type: ThemeApplicationModel.PageType().required(), + url: Joi.string().allow(""), + }); + } + /** @returns {AdvanceSetting} */ static AdvanceSetting() { return Joi.object({ @@ -517,12 +653,24 @@ class ThemeApplicationModel { }); } + /** @returns {AvailablePagePlatformPredicate} */ + static AvailablePagePlatformPredicate() { + return Joi.object({ + android: Joi.boolean(), + ios: Joi.boolean(), + web: Joi.boolean(), + }); + } + /** @returns {AvailablePagePredicate} */ static AvailablePagePredicate() { return Joi.object({ + platform: ThemeApplicationModel.AvailablePagePlatformPredicate(), route: ThemeApplicationModel.AvailablePageRoutePredicate(), + schedule: ThemeApplicationModel.AvailablePageSchedulePredicate(), screen: ThemeApplicationModel.AvailablePageScreenPredicate(), user: ThemeApplicationModel.AvailablePageUserPredicate(), + zones: Joi.array().items(Joi.string().allow("")), }); } @@ -535,6 +683,15 @@ class ThemeApplicationModel { }); } + /** @returns {AvailablePageSchedulePredicate} */ + static AvailablePageSchedulePredicate() { + return Joi.object({ + cron: Joi.string().allow(""), + end: Joi.string().allow(""), + start: Joi.string().allow(""), + }); + } + /** @returns {AvailablePageSchema} */ static AvailablePageSchema() { return Joi.object({ @@ -587,7 +744,11 @@ class ThemeApplicationModel { static AvailablePageSeo() { return Joi.object({ _id: Joi.string().allow(""), + breadcrumb: Joi.array().items(ThemeApplicationModel.SEObreadcrumb()), + canonical_url: Joi.string().allow(""), description: Joi.string().allow(""), + meta_tags: Joi.array().items(ThemeApplicationModel.SEOMetaItem()), + sitemap: ThemeApplicationModel.SEOSitemap(), title: Joi.string().allow(""), }); } @@ -827,19 +988,6 @@ class ThemeApplicationModel { }); } - /** @returns {Meta} */ - static Meta() { - return Joi.object({ - description: Joi.string().allow(""), - images: ThemeApplicationModel.Images(), - industry: Joi.array().items(Joi.string().allow("")), - name: Joi.string().allow(""), - payment: ThemeApplicationModel.ThemePayment(), - release: ThemeApplicationModel.Release(), - slug: Joi.string().allow(""), - }); - } - /** @returns {OverlayPopupSetting} */ static OverlayPopupSetting() { return Joi.object({ @@ -977,6 +1125,38 @@ class ThemeApplicationModel { }); } + /** @returns {SEObreadcrumb} */ + static SEObreadcrumb() { + return Joi.object({ + action: ThemeApplicationModel.Action(), + url: Joi.string().allow(""), + }); + } + + /** @returns {SEOMetaItem} */ + static SEOMetaItem() { + return Joi.object({ + items: Joi.array().items(ThemeApplicationModel.SEOMetaItems()), + title: Joi.string().allow(""), + }); + } + + /** @returns {SEOMetaItems} */ + static SEOMetaItems() { + return Joi.object({ + key: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {SEOSitemap} */ + static SEOSitemap() { + return Joi.object({ + frequency: Joi.string().allow(""), + priority: Joi.number(), + }); + } + /** @returns {StaticConfig} */ static StaticConfig() { return Joi.object({ @@ -1020,6 +1200,19 @@ class ThemeApplicationModel { }); } + /** @returns {ThemeMeta} */ + static ThemeMeta() { + return Joi.object({ + description: Joi.string().allow(""), + images: ThemeApplicationModel.Images(), + industry: Joi.array().items(Joi.string().allow("")), + name: Joi.string().allow(""), + payment: ThemeApplicationModel.ThemePayment(), + release: ThemeApplicationModel.Release(), + slug: Joi.string().allow(""), + }); + } + /** @returns {ThemePayment} */ static ThemePayment() { return Joi.object({ @@ -1046,16 +1239,18 @@ class ThemeApplicationModel { available_sections: Joi.array().items( ThemeApplicationModel.SectionItem() ), + company_id: Joi.number(), config: ThemeApplicationModel.Config(), created_at: Joi.string().allow(""), font: ThemeApplicationModel.Font(), is_private: Joi.boolean(), marketplace_theme_id: Joi.string().allow(""), - meta: ThemeApplicationModel.Meta(), + meta: ThemeApplicationModel.ThemeMeta(), name: Joi.string().allow(""), styles: Joi.any(), tags: Joi.array().items(Joi.string().allow("")), template_theme_id: Joi.string().allow(""), + theme_type: Joi.string().allow(""), updated_at: Joi.string().allow(""), version: Joi.string().allow(""), }); @@ -1095,5 +1290,106 @@ class ThemeApplicationModel { success_text: Joi.string().allow(""), }); } + + /** + * Enum: PageType Used By: Theme + * + * @returns {PageType} + */ + static PageType() { + return Joi.string().valid( + "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" + ); + } } module.exports = ThemeApplicationModel; diff --git a/sdk/application/Theme/ThemeApplicationValidator.d.ts b/sdk/application/Theme/ThemeApplicationValidator.d.ts index 6c08b8a08..76ecd062a 100644 --- a/sdk/application/Theme/ThemeApplicationValidator.d.ts +++ b/sdk/application/Theme/ThemeApplicationValidator.d.ts @@ -8,6 +8,8 @@ export = ThemeApplicationValidator; * @typedef GetPageParam * @property {string} themeId - ID of the theme to be retrieved * @property {string} pageValue - Value of the page to be retrieved + * @property {string} [filters] - Filters on sections to be applied or not + * @property {number} [company] - Company id of the application */ /** * @typedef GetThemeForPreviewParam @@ -41,6 +43,14 @@ type GetPageParam = { * - Value of the page to be retrieved */ pageValue: string; + /** + * - Filters on sections to be applied or not + */ + filters?: string; + /** + * - Company id of the application + */ + company?: number; }; type GetThemeForPreviewParam = { /** diff --git a/sdk/application/Theme/ThemeApplicationValidator.js b/sdk/application/Theme/ThemeApplicationValidator.js index 79c2d3748..aa92c5fa5 100644 --- a/sdk/application/Theme/ThemeApplicationValidator.js +++ b/sdk/application/Theme/ThemeApplicationValidator.js @@ -13,6 +13,8 @@ const ThemeApplicationModel = require("./ThemeApplicationModel"); * @typedef GetPageParam * @property {string} themeId - ID of the theme to be retrieved * @property {string} pageValue - Value of the page to be retrieved + * @property {string} [filters] - Filters on sections to be applied or not + * @property {number} [company] - Company id of the application */ /** @@ -38,6 +40,8 @@ class ThemeApplicationValidator { return Joi.object({ themeId: Joi.string().allow("").required(), pageValue: Joi.string().allow("").required(), + filters: Joi.string().allow(""), + company: Joi.number(), }).required(); } diff --git a/sdk/application/User/UserApplicationClient.d.ts b/sdk/application/User/UserApplicationClient.d.ts index a53f28f86..226fadfd6 100644 --- a/sdk/application/User/UserApplicationClient.d.ts +++ b/sdk/application/User/UserApplicationClient.d.ts @@ -12,6 +12,7 @@ declare class User { getListOfActiveSessions: string; getLoggedInUser: string; getPlatformConfig: string; + getUserAttributes: string; hasPassword: string; loginWithAppleIOS: string; loginWithEmailAndPassword: string; @@ -37,6 +38,8 @@ declare class User { setMobileNumberAsPrimary: string; updatePassword: string; updateProfile: string; + updateUserAttributes: string; + userExists: string; verifyEmail: string; verifyEmailForgotOTP: string; verifyEmailOTP: string; @@ -136,6 +139,16 @@ declare class User { * @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getPlatformConfig/). */ getPlatformConfig({ name, requestHeaders }?: UserApplicationValidator.GetPlatformConfigParam, { responseHeaders }?: object): Promise; + /** + * @param {UserApplicationValidator.GetUserAttributesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getUserAttributes + * @summary: Get user attributes + * @description: Use this API to get the list of user attributes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getUserAttributes/). + */ + getUserAttributes({ slug, requestHeaders }?: UserApplicationValidator.GetUserAttributesParam, { responseHeaders }?: object): Promise; /** * @param {UserApplicationValidator.HasPasswordParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -392,6 +405,26 @@ declare class User { * @description: Use this API to update details in the user profile. Details can be first name, last name, gender, email, phone number, or profile picture. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updateProfile/). */ updateProfile({ body, platform, requestHeaders }?: UserApplicationValidator.UpdateProfileParam, { responseHeaders }?: object): Promise; + /** + * @param {UserApplicationValidator.UpdateUserAttributesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name updateUserAttributes + * @summary: Update user attributes + * @description: Use this API to update user attributes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updateUserAttributes/). + */ + updateUserAttributes({ body, requestHeaders }?: UserApplicationValidator.UpdateUserAttributesParam, { responseHeaders }?: object): Promise; + /** + * @param {UserApplicationValidator.UserExistsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name userExists + * @summary: Check user is already registered or not + * @description: Use this API to 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 }?: UserApplicationValidator.UserExistsParam, { responseHeaders }?: object): Promise; /** * @param {UserApplicationValidator.VerifyEmailParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/application/User/UserApplicationClient.js b/sdk/application/User/UserApplicationClient.js index ed9f55e82..78b3b131b 100644 --- a/sdk/application/User/UserApplicationClient.js +++ b/sdk/application/User/UserApplicationClient.js @@ -25,6 +25,8 @@ class User { "/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", @@ -69,6 +71,9 @@ class User { "/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", @@ -819,6 +824,85 @@ class User { return response; } + /** + * @param {UserApplicationValidator.GetUserAttributesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getUserAttributes + * @summary: Get user attributes + * @description: Use this API to get the list of user attributes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/getUserAttributes/). + */ + async getUserAttributes( + { slug, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = UserApplicationValidator.getUserAttributes().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, + } = UserApplicationValidator.getUserAttributes().validate( + { slug }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > User > getUserAttributes \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["slug"] = slug; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getUserAttributes"], + params: {}, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserApplicationModel.UserAttributes().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 application > User > getUserAttributes \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {UserApplicationValidator.HasPasswordParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -2801,6 +2885,161 @@ class User { return response; } + /** + * @param {UserApplicationValidator.UpdateUserAttributesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name updateUserAttributes + * @summary: Update user attributes + * @description: Use this API to update user attributes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/user/updateUserAttributes/). + */ + async updateUserAttributes( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = UserApplicationValidator.updateUserAttributes().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, + } = UserApplicationValidator.updateUserAttributes().validate( + { body }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > User > updateUserAttributes \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "patch", + constructUrl({ + url: this._urls["updateUserAttributes"], + params: {}, + }), + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserApplicationModel.UserAttributes().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 application > User > updateUserAttributes \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {UserApplicationValidator.UserExistsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../ApplicationAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name userExists + * @summary: Check user is already registered or not + * @description: Use this API to 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/). + */ + async userExists( + { q, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = UserApplicationValidator.userExists().validate( + { q }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = UserApplicationValidator.userExists().validate( + { q }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for application > User > userExists \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["q"] = q; + + const xHeaders = {}; + + const response = await ApplicationAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["userExists"], + params: {}, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserApplicationModel.UserExistsResponse().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 application > User > userExists \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {UserApplicationValidator.VerifyEmailParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/application/User/UserApplicationModel.d.ts b/sdk/application/User/UserApplicationModel.d.ts index 201de4529..e97866f6c 100644 --- a/sdk/application/User/UserApplicationModel.d.ts +++ b/sdk/application/User/UserApplicationModel.d.ts @@ -202,7 +202,6 @@ export = UserApplicationModel; */ /** * @typedef PasswordLoginRequestSchema - * @property {string} [captcha_code] * @property {string} [password] * @property {string} [username] */ @@ -323,7 +322,6 @@ export = UserApplicationModel; /** * @typedef SendEmailOtpRequestSchema * @property {string} [action] - * @property {string} [captcha_code] * @property {string} [email] * @property {string} [register_token] * @property {string} [token] @@ -344,7 +342,6 @@ export = UserApplicationModel; * @typedef SendMobileOtpRequestSchema * @property {string} [action] * @property {string} [android_hash] - * @property {string} [captcha_code] * @property {string} [country_code] * @property {string} [force] * @property {string} [mobile] @@ -357,7 +354,6 @@ export = UserApplicationModel; /** * @typedef SendOtpRequestSchema * @property {string} [android_hash] - * @property {string} [captcha_code] * @property {string} [country_code] * @property {string} [mobile] */ @@ -379,12 +375,10 @@ export = UserApplicationModel; */ /** * @typedef SendResetPasswordEmailRequestSchema - * @property {string} [captcha_code] * @property {string} [email] */ /** * @typedef SendResetPasswordMobileRequestSchema - * @property {string} [captcha_code] * @property {string} [country_code] * @property {string} [mobile] */ @@ -428,6 +422,18 @@ export = UserApplicationModel; * @property {string} [new_password] * @property {string} [old_password] */ +/** + * @typedef UpdateUserAttributesRequest + * @property {Object} [attributes] + */ +/** + * @typedef UserAttributes + * @property {Object} [attributes] + */ +/** + * @typedef UserExistsResponse + * @property {boolean} [user_exists] + */ /** * @typedef UserObjectSchema * @property {UserSchema} [user] @@ -502,7 +508,7 @@ export = UserApplicationModel; declare class UserApplicationModel { } declare namespace UserApplicationModel { - export { Accountkit, APIError, AuthenticationApiErrorSchema, AuthenticationInternalServerErrorSchema, AuthSuccess, CodeRequestBodySchema, DeleteAccountConsent, DeleteAccountReasons, DeleteApplicationUserRequestSchema, DeleteUserSuccess, EditEmailRequestSchema, EditMobileRequestSchema, EditProfileMobileSchema, EditProfileRequestSchema, Email, EmailOtpSuccess, Facebook, FlashCard, ForgotPasswordRequestSchema, FormRegisterRequestSchema, FormRegisterRequestSchemaPhone, Google, HasPasswordSuccess, Login, LoginSuccess, LogoutSuccess, LookAndFeel, MetaSchema, OAuthRequestAppleSchema, OAuthRequestAppleSchemaOauth, OAuthRequestAppleSchemaProfile, OAuthRequestSchema, OAuthRequestSchemaOauth2, OAuthRequestSchemaProfile, OtpSuccess, PasswordLoginRequestSchema, PhoneNumber, PlatformEmail, PlatformMobile, PlatformSchema, ProfileEditSuccess, RegisterFormSuccess, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, RequiredFields, ResetForgotPasswordSuccess, ResetPasswordSuccess, SendEmailForgotOtpRequestSchema, SendEmailOtpRequestSchema, SendEmailVerifyLinkSuccess, SendMobileForgotOtpRequestSchema, SendMobileOtpRequestSchema, SendMobileVerifyLinkSuccess, SendOtpRequestSchema, SendOtpResponse, SendResetPasswordEmailRequestSchema, SendResetPasswordMobileRequestSchema, SendVerificationLinkMobileRequestSchema, SessionExpiry, SessionListSuccess, Social, SocialTokens, TokenRequestBodySchema, UpdatePasswordRequestSchema, UserObjectSchema, UserSchema, VerifyEmailForgotOtpRequestSchema, VerifyEmailOtpRequestSchema, VerifyEmailOTPSuccess, VerifyEmailSuccess, VerifyForgotOtpSuccess, VerifyMobileForgotOtpRequestSchema, VerifyMobileOTPSuccess, VerifyOtpRequestSchema, VerifyOtpSuccess }; + export { Accountkit, APIError, AuthenticationApiErrorSchema, AuthenticationInternalServerErrorSchema, AuthSuccess, CodeRequestBodySchema, DeleteAccountConsent, DeleteAccountReasons, DeleteApplicationUserRequestSchema, DeleteUserSuccess, EditEmailRequestSchema, EditMobileRequestSchema, EditProfileMobileSchema, EditProfileRequestSchema, Email, EmailOtpSuccess, Facebook, FlashCard, ForgotPasswordRequestSchema, FormRegisterRequestSchema, FormRegisterRequestSchemaPhone, Google, HasPasswordSuccess, Login, LoginSuccess, LogoutSuccess, LookAndFeel, MetaSchema, OAuthRequestAppleSchema, OAuthRequestAppleSchemaOauth, OAuthRequestAppleSchemaProfile, OAuthRequestSchema, OAuthRequestSchemaOauth2, OAuthRequestSchemaProfile, OtpSuccess, PasswordLoginRequestSchema, PhoneNumber, PlatformEmail, PlatformMobile, PlatformSchema, ProfileEditSuccess, RegisterFormSuccess, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, RequiredFields, ResetForgotPasswordSuccess, ResetPasswordSuccess, SendEmailForgotOtpRequestSchema, SendEmailOtpRequestSchema, SendEmailVerifyLinkSuccess, SendMobileForgotOtpRequestSchema, SendMobileOtpRequestSchema, SendMobileVerifyLinkSuccess, SendOtpRequestSchema, SendOtpResponse, SendResetPasswordEmailRequestSchema, SendResetPasswordMobileRequestSchema, SendVerificationLinkMobileRequestSchema, SessionExpiry, SessionListSuccess, Social, SocialTokens, TokenRequestBodySchema, UpdatePasswordRequestSchema, UpdateUserAttributesRequest, UserAttributes, UserExistsResponse, UserObjectSchema, UserSchema, VerifyEmailForgotOtpRequestSchema, VerifyEmailOtpRequestSchema, VerifyEmailOTPSuccess, VerifyEmailSuccess, VerifyForgotOtpSuccess, VerifyMobileForgotOtpRequestSchema, VerifyMobileOTPSuccess, VerifyOtpRequestSchema, VerifyOtpSuccess }; } /** @returns {Accountkit} */ declare function Accountkit(): Accountkit; @@ -746,7 +752,6 @@ type OtpSuccess = { /** @returns {PasswordLoginRequestSchema} */ declare function PasswordLoginRequestSchema(): PasswordLoginRequestSchema; type PasswordLoginRequestSchema = { - captcha_code?: string; password?: string; username?: string; }; @@ -881,7 +886,6 @@ type SendEmailForgotOtpRequestSchema = { declare function SendEmailOtpRequestSchema(): SendEmailOtpRequestSchema; type SendEmailOtpRequestSchema = { action?: string; - captcha_code?: string; email?: string; register_token?: string; token?: string; @@ -905,7 +909,6 @@ declare function SendMobileOtpRequestSchema(): SendMobileOtpRequestSchema; type SendMobileOtpRequestSchema = { action?: string; android_hash?: string; - captcha_code?: string; country_code?: string; force?: string; mobile?: string; @@ -920,7 +923,6 @@ type SendMobileVerifyLinkSuccess = { declare function SendOtpRequestSchema(): SendOtpRequestSchema; type SendOtpRequestSchema = { android_hash?: string; - captcha_code?: string; country_code?: string; mobile?: string; }; @@ -944,13 +946,11 @@ type SendOtpResponse = { /** @returns {SendResetPasswordEmailRequestSchema} */ declare function SendResetPasswordEmailRequestSchema(): SendResetPasswordEmailRequestSchema; type SendResetPasswordEmailRequestSchema = { - captcha_code?: string; email?: string; }; /** @returns {SendResetPasswordMobileRequestSchema} */ declare function SendResetPasswordMobileRequestSchema(): SendResetPasswordMobileRequestSchema; type SendResetPasswordMobileRequestSchema = { - captcha_code?: string; country_code?: string; mobile?: string; }; @@ -1001,6 +1001,21 @@ type UpdatePasswordRequestSchema = { new_password?: string; old_password?: string; }; +/** @returns {UpdateUserAttributesRequest} */ +declare function UpdateUserAttributesRequest(): UpdateUserAttributesRequest; +type UpdateUserAttributesRequest = { + attributes?: any; +}; +/** @returns {UserAttributes} */ +declare function UserAttributes(): UserAttributes; +type UserAttributes = { + attributes?: any; +}; +/** @returns {UserExistsResponse} */ +declare function UserExistsResponse(): UserExistsResponse; +type UserExistsResponse = { + user_exists?: boolean; +}; /** @returns {UserObjectSchema} */ declare function UserObjectSchema(): UserObjectSchema; type UserObjectSchema = { diff --git a/sdk/application/User/UserApplicationModel.js b/sdk/application/User/UserApplicationModel.js index 2b5bc454b..baab67d41 100644 --- a/sdk/application/User/UserApplicationModel.js +++ b/sdk/application/User/UserApplicationModel.js @@ -238,7 +238,6 @@ const Joi = require("joi"); /** * @typedef PasswordLoginRequestSchema - * @property {string} [captcha_code] * @property {string} [password] * @property {string} [username] */ @@ -373,7 +372,6 @@ const Joi = require("joi"); /** * @typedef SendEmailOtpRequestSchema * @property {string} [action] - * @property {string} [captcha_code] * @property {string} [email] * @property {string} [register_token] * @property {string} [token] @@ -397,7 +395,6 @@ const Joi = require("joi"); * @typedef SendMobileOtpRequestSchema * @property {string} [action] * @property {string} [android_hash] - * @property {string} [captcha_code] * @property {string} [country_code] * @property {string} [force] * @property {string} [mobile] @@ -412,7 +409,6 @@ const Joi = require("joi"); /** * @typedef SendOtpRequestSchema * @property {string} [android_hash] - * @property {string} [captcha_code] * @property {string} [country_code] * @property {string} [mobile] */ @@ -436,13 +432,11 @@ const Joi = require("joi"); /** * @typedef SendResetPasswordEmailRequestSchema - * @property {string} [captcha_code] * @property {string} [email] */ /** * @typedef SendResetPasswordMobileRequestSchema - * @property {string} [captcha_code] * @property {string} [country_code] * @property {string} [mobile] */ @@ -494,6 +488,21 @@ const Joi = require("joi"); * @property {string} [old_password] */ +/** + * @typedef UpdateUserAttributesRequest + * @property {Object} [attributes] + */ + +/** + * @typedef UserAttributes + * @property {Object} [attributes] + */ + +/** + * @typedef UserExistsResponse + * @property {boolean} [user_exists] + */ + /** * @typedef UserObjectSchema * @property {UserSchema} [user] @@ -886,7 +895,6 @@ class UserApplicationModel { /** @returns {PasswordLoginRequestSchema} */ static PasswordLoginRequestSchema() { return Joi.object({ - captcha_code: Joi.string().allow(""), password: Joi.string().allow(""), username: Joi.string().allow(""), }); @@ -1051,7 +1059,6 @@ class UserApplicationModel { static SendEmailOtpRequestSchema() { return Joi.object({ action: Joi.string().allow(""), - captcha_code: Joi.string().allow(""), email: Joi.string().allow(""), register_token: Joi.string().allow(""), token: Joi.string().allow(""), @@ -1081,7 +1088,6 @@ class UserApplicationModel { return Joi.object({ action: Joi.string().allow(""), android_hash: Joi.string().allow(""), - captcha_code: Joi.string().allow(""), country_code: Joi.string().allow(""), force: Joi.string().allow(""), mobile: Joi.string().allow(""), @@ -1100,7 +1106,6 @@ class UserApplicationModel { static SendOtpRequestSchema() { return Joi.object({ android_hash: Joi.string().allow(""), - captcha_code: Joi.string().allow(""), country_code: Joi.string().allow(""), mobile: Joi.string().allow(""), }); @@ -1128,7 +1133,6 @@ class UserApplicationModel { /** @returns {SendResetPasswordEmailRequestSchema} */ static SendResetPasswordEmailRequestSchema() { return Joi.object({ - captcha_code: Joi.string().allow(""), email: Joi.string().allow(""), }); } @@ -1136,7 +1140,6 @@ class UserApplicationModel { /** @returns {SendResetPasswordMobileRequestSchema} */ static SendResetPasswordMobileRequestSchema() { return Joi.object({ - captcha_code: Joi.string().allow(""), country_code: Joi.string().allow(""), mobile: Joi.string().allow(""), }); @@ -1203,6 +1206,27 @@ class UserApplicationModel { }); } + /** @returns {UpdateUserAttributesRequest} */ + static UpdateUserAttributesRequest() { + return Joi.object({ + attributes: Joi.any(), + }); + } + + /** @returns {UserAttributes} */ + static UserAttributes() { + return Joi.object({ + attributes: Joi.any(), + }); + } + + /** @returns {UserExistsResponse} */ + static UserExistsResponse() { + return Joi.object({ + user_exists: Joi.boolean(), + }); + } + /** @returns {UserObjectSchema} */ static UserObjectSchema() { return Joi.object({ diff --git a/sdk/application/User/UserApplicationValidator.d.ts b/sdk/application/User/UserApplicationValidator.d.ts index f34bc3080..19399cb17 100644 --- a/sdk/application/User/UserApplicationValidator.d.ts +++ b/sdk/application/User/UserApplicationValidator.d.ts @@ -48,6 +48,10 @@ export = UserApplicationValidator; * @typedef GetPlatformConfigParam * @property {string} [name] - Name of the application, e.g. Fynd */ +/** + * @typedef GetUserAttributesParam + * @property {string} [slug] - Filter by attribute slug. + */ /** @typedef HasPasswordParam */ /** * @typedef LoginWithAppleIOSParam @@ -158,6 +162,14 @@ export = UserApplicationValidator; * @property {string} [platform] - ID of the application * @property {UserApplicationModel.EditProfileRequestSchema} body */ +/** + * @typedef UpdateUserAttributesParam + * @property {UserApplicationModel.UpdateUserAttributesRequest} body + */ +/** + * @typedef UserExistsParam + * @property {string} q - Email id or phone number of user + */ /** * @typedef VerifyEmailParam * @property {UserApplicationModel.CodeRequestBodySchema} body @@ -205,6 +217,8 @@ declare class UserApplicationValidator { static getLoggedInUser(): any; /** @returns {GetPlatformConfigParam} */ static getPlatformConfig(): GetPlatformConfigParam; + /** @returns {GetUserAttributesParam} */ + static getUserAttributes(): GetUserAttributesParam; /** @returns {HasPasswordParam} */ static hasPassword(): any; /** @returns {LoginWithAppleIOSParam} */ @@ -255,6 +269,10 @@ declare class UserApplicationValidator { static updatePassword(): UpdatePasswordParam; /** @returns {UpdateProfileParam} */ static updateProfile(): UpdateProfileParam; + /** @returns {UpdateUserAttributesParam} */ + static updateUserAttributes(): UpdateUserAttributesParam; + /** @returns {UserExistsParam} */ + static userExists(): UserExistsParam; /** @returns {VerifyEmailParam} */ static verifyEmail(): VerifyEmailParam; /** @returns {VerifyEmailForgotOTPParam} */ @@ -269,7 +287,7 @@ declare class UserApplicationValidator { static verifyMobileOTP(): VerifyMobileOTPParam; } declare namespace UserApplicationValidator { - export { AddEmailParam, AddMobileNumberParam, DeleteEmailParam, DeleteMobileNumberParam, DeleteUserParam, ForgotPasswordParam, GetListOfActiveSessionsParam, GetLoggedInUserParam, GetPlatformConfigParam, HasPasswordParam, LoginWithAppleIOSParam, LoginWithEmailAndPasswordParam, LoginWithFacebookParam, LoginWithGoogleParam, LoginWithGoogleAndroidParam, LoginWithGoogleIOSParam, LoginWithOTPParam, LoginWithTokenParam, LogoutParam, RegisterWithFormParam, ResetForgotPasswordParam, SendForgotOTPOnEmailParam, SendForgotOTPOnMobileParam, SendOTPOnEmailParam, SendOTPOnMobileParam, SendResetPasswordEmailParam, SendResetPasswordMobileParam, SendResetTokenParam, SendVerificationLinkToEmailParam, SendVerificationLinkToMobileParam, SetEmailAsPrimaryParam, SetMobileNumberAsPrimaryParam, UpdatePasswordParam, UpdateProfileParam, VerifyEmailParam, VerifyEmailForgotOTPParam, VerifyEmailOTPParam, VerifyMobileParam, VerifyMobileForgotOTPParam, VerifyMobileOTPParam }; + export { AddEmailParam, AddMobileNumberParam, DeleteEmailParam, DeleteMobileNumberParam, DeleteUserParam, ForgotPasswordParam, GetListOfActiveSessionsParam, GetLoggedInUserParam, GetPlatformConfigParam, GetUserAttributesParam, HasPasswordParam, LoginWithAppleIOSParam, LoginWithEmailAndPasswordParam, LoginWithFacebookParam, LoginWithGoogleParam, LoginWithGoogleAndroidParam, LoginWithGoogleIOSParam, LoginWithOTPParam, LoginWithTokenParam, LogoutParam, RegisterWithFormParam, ResetForgotPasswordParam, SendForgotOTPOnEmailParam, SendForgotOTPOnMobileParam, SendOTPOnEmailParam, SendOTPOnMobileParam, SendResetPasswordEmailParam, SendResetPasswordMobileParam, SendResetTokenParam, SendVerificationLinkToEmailParam, SendVerificationLinkToMobileParam, SetEmailAsPrimaryParam, SetMobileNumberAsPrimaryParam, UpdatePasswordParam, UpdateProfileParam, UpdateUserAttributesParam, UserExistsParam, VerifyEmailParam, VerifyEmailForgotOTPParam, VerifyEmailOTPParam, VerifyMobileParam, VerifyMobileForgotOTPParam, VerifyMobileOTPParam }; } type AddEmailParam = { /** @@ -353,6 +371,12 @@ type GetPlatformConfigParam = { */ name?: string; }; +type GetUserAttributesParam = { + /** + * - Filter by attribute slug. + */ + slug?: string; +}; type LoginWithAppleIOSParam = { /** * - ID of the application @@ -486,6 +510,15 @@ type UpdateProfileParam = { platform?: string; body: UserApplicationModel.EditProfileRequestSchema; }; +type UpdateUserAttributesParam = { + body: UserApplicationModel.UpdateUserAttributesRequest; +}; +type UserExistsParam = { + /** + * - Email id or phone number of user + */ + q: string; +}; type VerifyEmailParam = { body: UserApplicationModel.CodeRequestBodySchema; }; diff --git a/sdk/application/User/UserApplicationValidator.js b/sdk/application/User/UserApplicationValidator.js index 1a1c5a863..b0cc11e5c 100644 --- a/sdk/application/User/UserApplicationValidator.js +++ b/sdk/application/User/UserApplicationValidator.js @@ -60,6 +60,11 @@ const UserApplicationModel = require("./UserApplicationModel"); * @property {string} [name] - Name of the application, e.g. Fynd */ +/** + * @typedef GetUserAttributesParam + * @property {string} [slug] - Filter by attribute slug. + */ + /** @typedef HasPasswordParam */ /** @@ -195,6 +200,16 @@ const UserApplicationModel = require("./UserApplicationModel"); * @property {UserApplicationModel.EditProfileRequestSchema} body */ +/** + * @typedef UpdateUserAttributesParam + * @property {UserApplicationModel.UpdateUserAttributesRequest} body + */ + +/** + * @typedef UserExistsParam + * @property {string} q - Email id or phone number of user + */ + /** * @typedef VerifyEmailParam * @property {UserApplicationModel.CodeRequestBodySchema} body @@ -300,6 +315,13 @@ class UserApplicationValidator { }); } + /** @returns {GetUserAttributesParam} */ + static getUserAttributes() { + return Joi.object({ + slug: Joi.string().allow(""), + }); + } + /** @returns {HasPasswordParam} */ static hasPassword() { return Joi.object({}); @@ -487,6 +509,20 @@ class UserApplicationValidator { }).required(); } + /** @returns {UpdateUserAttributesParam} */ + static updateUserAttributes() { + return Joi.object({ + body: UserApplicationModel.UpdateUserAttributesRequest().required(), + }).required(); + } + + /** @returns {UserExistsParam} */ + static userExists() { + return Joi.object({ + q: Joi.string().allow("").required(), + }).required(); + } + /** @returns {VerifyEmailParam} */ static verifyEmail() { return Joi.object({ diff --git a/sdk/partner/Lead/LeadPartnerClient.d.ts b/sdk/partner/Lead/LeadPartnerClient.d.ts new file mode 100644 index 000000000..a068969e7 --- /dev/null +++ b/sdk/partner/Lead/LeadPartnerClient.d.ts @@ -0,0 +1,125 @@ +export = Lead; +declare class Lead { + constructor(config: any); + config: any; + /** + * @param {LeadPartnerValidator.GetTicketsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getTickets + * @summary: Gets the list of partner level tickets and/or ticket filters depending on query params + * @description: Gets the list of partner level tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getTickets/). + */ + getTickets({ items, filters, q, status, priority, category, pageNo, pageSize, requestHeaders, }?: LeadPartnerValidator.GetTicketsParam, { responseHeaders }?: object): Promise; + /** + * @param {Object} arg - Arg object. + * @param {boolean} [arg.items] - Decides that the reponse will contain the + * list of tickets + * @param {boolean} [arg.filters] - Decides that the reponse will contain + * the ticket filters + * @param {string} [arg.q] - Search through ticket titles and description + * @param {string} [arg.status] - Filter tickets on status + * @param {LeadPartnerModel.PriorityEnum} [arg.priority] - Filter tickets on priority + * @param {string} [arg.category] - Filter tickets on category + * @param {number} [arg.pageSize] - Number of items to retrieve in each + * page. Default is 12. + * @returns {Paginator} + * @summary: Gets the list of partner level tickets and/or ticket filters depending on query params + * @description: Gets the list of partner level tickets and/or ticket filters + */ + getTicketsPaginator({ items, filters, q, status, priority, category, pageSize, }?: { + items?: boolean; + filters?: boolean; + q?: string; + status?: string; + priority?: LeadPartnerModel.PriorityEnum; + category?: string; + pageSize?: number; + }): Paginator; + /** + * @param {LeadPartnerValidator.CreateTicketParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createTicket + * @summary: Creates a partner level ticket + * @description: Creates a partner level ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/createTicket/). + */ + createTicket({ body, requestHeaders }?: LeadPartnerValidator.CreateTicketParam, { responseHeaders }?: object): Promise; + /** + * @param {LeadPartnerValidator.GetTicketParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getTicket + * @summary: Retreives ticket details of a partner level ticket with ticket ID + * @description: Retreives ticket details of a partner level ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getTicket/). + */ + getTicket({ id, requestHeaders }?: LeadPartnerValidator.GetTicketParam, { responseHeaders }?: object): Promise; + /** + * @param {LeadPartnerValidator.EditTicketParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name editTicket + * @summary: Edits ticket details of a partner level ticket + * @description: Edits ticket details of a partner level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/editTicket/). + */ + editTicket({ id, body, requestHeaders }?: LeadPartnerValidator.EditTicketParam, { responseHeaders }?: object): Promise; + /** + * @param {LeadPartnerValidator.CreateHistoryParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createHistory + * @summary: Create history for specific partner level ticket + * @description: Create history for specific partner level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/createHistory/). + */ + createHistory({ id, body, requestHeaders }?: LeadPartnerValidator.CreateHistoryParam, { responseHeaders }?: object): Promise; + /** + * @param {LeadPartnerValidator.GetTicketHistoryParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getTicketHistory + * @summary: Gets history list for specific partner level ticket + * @description: Gets history list for specific partner level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getTicketHistory/). + */ + getTicketHistory({ id, requestHeaders }?: LeadPartnerValidator.GetTicketHistoryParam, { responseHeaders }?: object): Promise; + /** + * @param {LeadPartnerValidator.GetTokenForVideoRoomParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getTokenForVideoRoom + * @summary: Get Token to join a specific Video Room using it's unqiue name + * @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getTokenForVideoRoom/). + */ + getTokenForVideoRoom({ uniqueName, requestHeaders }?: LeadPartnerValidator.GetTokenForVideoRoomParam, { responseHeaders }?: object): Promise; + /** + * @param {LeadPartnerValidator.GetVideoParticipantsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getVideoParticipants + * @summary: Get participants of a specific Video Room using it's unique name + * @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getVideoParticipants/). + */ + getVideoParticipants({ uniqueName, requestHeaders }?: LeadPartnerValidator.GetVideoParticipantsParam, { responseHeaders }?: object): Promise; + /** + * @param {LeadPartnerValidator.GetGeneralConfigParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; +} +import LeadPartnerModel = require("./LeadPartnerModel"); +import Paginator = require("../../common/Paginator"); diff --git a/sdk/partner/Lead/LeadPartnerClient.js b/sdk/partner/Lead/LeadPartnerClient.js new file mode 100644 index 000000000..930defe37 --- /dev/null +++ b/sdk/partner/Lead/LeadPartnerClient.js @@ -0,0 +1,785 @@ +const PartnerAPIClient = require("../PartnerAPIClient"); +const { + FDKClientValidationError, + FDKResponseValidationError, +} = require("../../common/FDKError"); +const Paginator = require("../../common/Paginator"); +const LeadPartnerValidator = require("./LeadPartnerValidator"); +const LeadPartnerModel = require("./LeadPartnerModel"); +const { Logger } = require("./../../common/Logger"); +const Joi = require("joi"); + +class Lead { + constructor(config) { + this.config = config; + } + + /** + * @param {LeadPartnerValidator.GetTicketsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getTickets + * @summary: Gets the list of partner level tickets and/or ticket filters depending on query params + * @description: Gets the list of partner level tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getTickets/). + */ + async getTickets( + { + items, + filters, + q, + status, + priority, + category, + pageNo, + pageSize, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LeadPartnerValidator.getTickets().validate( + { + items, + filters, + q, + status, + priority, + category, + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = LeadPartnerValidator.getTickets().validate( + { + items, + filters, + q, + status, + priority, + category, + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Lead > getTickets \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["items"] = items; + query_params["filters"] = filters; + query_params["q"] = q; + query_params["status"] = status; + query_params["priority"] = priority; + query_params["category"] = category; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/lead/v1.0/organization/${this.config.organizationId}/ticket`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPartnerModel.TicketList().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 > Lead > getTickets \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {Object} arg - Arg object. + * @param {boolean} [arg.items] - Decides that the reponse will contain the + * list of tickets + * @param {boolean} [arg.filters] - Decides that the reponse will contain + * the ticket filters + * @param {string} [arg.q] - Search through ticket titles and description + * @param {string} [arg.status] - Filter tickets on status + * @param {LeadPartnerModel.PriorityEnum} [arg.priority] - Filter tickets on priority + * @param {string} [arg.category] - Filter tickets on category + * @param {number} [arg.pageSize] - Number of items to retrieve in each + * page. Default is 12. + * @returns {Paginator} + * @summary: Gets the list of partner level tickets and/or ticket filters depending on query params + * @description: Gets the list of partner level tickets and/or ticket filters + */ + getTicketsPaginator({ + items, + filters, + q, + status, + priority, + category, + pageSize, + } = {}) { + const paginator = new Paginator(); + const callback = async () => { + const pageId = paginator.nextId; + const pageNo = paginator.pageNo; + const pageType = "number"; + const data = await this.getTickets({ + items: items, + filters: filters, + q: q, + status: status, + priority: priority, + category: category, + 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 {LeadPartnerValidator.CreateTicketParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createTicket + * @summary: Creates a partner level ticket + * @description: Creates a partner level ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/createTicket/). + */ + async createTicket( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LeadPartnerValidator.createTicket().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 } = LeadPartnerValidator.createTicket().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Lead > createTicket \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/lead/v1.0/organization/${this.config.organizationId}/ticket`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPartnerModel.Ticket().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 > Lead > createTicket \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LeadPartnerValidator.GetTicketParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getTicket + * @summary: Retreives ticket details of a partner level ticket with ticket ID + * @description: Retreives ticket details of a partner level ticket - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getTicket/). + */ + async getTicket( + { id, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LeadPartnerValidator.getTicket().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 } = LeadPartnerValidator.getTicket().validate( + { + id, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Lead > getTicket \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/lead/v1.0/organization/${this.config.organizationId}/ticket/${id}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPartnerModel.Ticket().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 > Lead > getTicket \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LeadPartnerValidator.EditTicketParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name editTicket + * @summary: Edits ticket details of a partner level ticket + * @description: Edits ticket details of a partner level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/editTicket/). + */ + async editTicket( + { id, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LeadPartnerValidator.editTicket().validate( + { + 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 } = LeadPartnerValidator.editTicket().validate( + { + id, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Lead > editTicket \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "put", + `/service/partner/lead/v1.0/organization/${this.config.organizationId}/ticket/${id}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPartnerModel.Ticket().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 > Lead > editTicket \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LeadPartnerValidator.CreateHistoryParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createHistory + * @summary: Create history for specific partner level ticket + * @description: Create history for specific partner level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/createHistory/). + */ + async createHistory( + { id, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LeadPartnerValidator.createHistory().validate( + { + 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 } = LeadPartnerValidator.createHistory().validate( + { + id, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Lead > createHistory \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/lead/v1.0/organization/${this.config.organizationId}/ticket/${id}/history`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPartnerModel.TicketHistory().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 > Lead > createHistory \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LeadPartnerValidator.GetTicketHistoryParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getTicketHistory + * @summary: Gets history list for specific partner level ticket + * @description: Gets history list for specific partner level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getTicketHistory/). + */ + async getTicketHistory( + { id, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LeadPartnerValidator.getTicketHistory().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, + } = LeadPartnerValidator.getTicketHistory().validate( + { + id, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Lead > getTicketHistory \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/lead/v1.0/organization/${this.config.organizationId}/ticket/${id}/history`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPartnerModel.TicketHistoryList().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 > Lead > getTicketHistory \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LeadPartnerValidator.GetTokenForVideoRoomParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getTokenForVideoRoom + * @summary: Get Token to join a specific Video Room using it's unqiue name + * @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getTokenForVideoRoom/). + */ + async getTokenForVideoRoom( + { uniqueName, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LeadPartnerValidator.getTokenForVideoRoom().validate( + { + uniqueName, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LeadPartnerValidator.getTokenForVideoRoom().validate( + { + uniqueName, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Lead > getTokenForVideoRoom \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/lead/v1.0/organization/${this.config.organizationId}/video/room/${uniqueName}/token`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPartnerModel.GetTokenForVideoRoomResponse().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 > Lead > getTokenForVideoRoom \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LeadPartnerValidator.GetVideoParticipantsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getVideoParticipants + * @summary: Get participants of a specific Video Room using it's unique name + * @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/lead/getVideoParticipants/). + */ + async getVideoParticipants( + { uniqueName, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LeadPartnerValidator.getVideoParticipants().validate( + { + uniqueName, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LeadPartnerValidator.getVideoParticipants().validate( + { + uniqueName, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Lead > getVideoParticipants \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/lead/v1.0/organization/${this.config.organizationId}/video/room/${uniqueName}/participants`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPartnerModel.GetParticipantsInsideVideoRoomResponse().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 > Lead > getVideoParticipants \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LeadPartnerValidator.GetGeneralConfigParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async getGeneralConfig( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LeadPartnerValidator.getGeneralConfig().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LeadPartnerValidator.getGeneralConfig().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Lead > getGeneralConfig \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/lead/v1.0/organization/${this.config.organizationId}/general-config`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPartnerModel.GeneralConfigResponse().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 > Lead > getGeneralConfig \n ${res_error}`, + }); + } + } + + return response; + } +} +module.exports = Lead; diff --git a/sdk/partner/Lead/LeadPartnerModel.d.ts b/sdk/partner/Lead/LeadPartnerModel.d.ts new file mode 100644 index 000000000..159ad7cbb --- /dev/null +++ b/sdk/partner/Lead/LeadPartnerModel.d.ts @@ -0,0 +1,1127 @@ +export = LeadPartnerModel; +/** + * @typedef AddTicketPayload + * @property {Object} [_custom_json] - Optional custom data that needs to be sent + * @property {string} category - Category of the ticket + * @property {TicketContent} content + * @property {Object} [created_by] - Creator of the ticket + * @property {PriorityEnum} [priority] + * @property {string} [status] - Status of the ticket + */ +/** + * @typedef AgentChangePayload + * @property {string} agent_id - Agent's unique ID + */ +/** + * @typedef CloseVideoRoomResponse + * @property {boolean} success - Denotes if operation was successfully + */ +/** + * @typedef CreateCustomFormPayload + * @property {string} [description] - Description of the form + * @property {string} [header_image] - Header image that is to be shown for the form + * @property {Object[]} inputs - List of all the form components + * @property {PollForAssignment} [poll_for_assignment] + * @property {PriorityEnum} priority + * @property {boolean} [should_notify] - Indicates if staff should be notified + * when a response is received + * @property {string} slug - Slug for the form + * @property {string} [success_message] - Success message that will be shown on submission + * @property {string} title - Title for the form + */ +/** + * @typedef CreatedOn + * @property {string} user_agent - Useragent details + */ +/** + * @typedef CreateVideoRoomPayload + * @property {NotifyUser[]} [notify] - List of people to be notified + * @property {string} unique_name - Ticket id + */ +/** + * @typedef CreateVideoRoomResponse + * @property {string} unique_name - Video Room's unique name + */ +/** + * @typedef CustomForm + * @property {string} _id - Unique identifier for the form + * @property {string} application_id - Application ID for form + * @property {CreatedOn} [created_on] + * @property {string} [description] - Form description that will be shown to the user + * @property {string} [header_image] - Form header image that will be shown to the user + * @property {Object[]} inputs - List of all the form fields + * @property {boolean} login_required - Denotes if login is required to make a + * form response submission + * @property {PollForAssignment} [poll_for_assignment] + * @property {Priority} priority + * @property {boolean} should_notify - Denotes if new response submission for + * the form should be notified to the assignees + * @property {string} slug - Slug for the form, which is to be used for accessing the form + * @property {SubmitButton} [submit_button] + * @property {string} [success_message] - Message that is to be shown on + * succesfull form response submission + * @property {string} title - Form title that will be shown to the user + */ +/** + * @typedef CustomFormList + * @property {CustomForm[]} [items] - List of forms + * @property {Page} [page] + */ +/** + * @typedef Debug + * @property {string} [platform] - Platform of user + * @property {string} [source] - Source of user + */ +/** + * @typedef EditCustomFormPayload + * @property {string} [description] - Description of the form + * @property {string} [header_image] - Header image that is to be shown for the form + * @property {Object[]} inputs - List of all the form components + * @property {boolean} [login_required] - Denotes if login is required to make a + * form response submission + * @property {PollForAssignment} [poll_for_assignment] + * @property {PriorityEnum} priority + * @property {boolean} [should_notify] - Indicates if staff should be notified + * when a response is received + * @property {string} [success_message] - Success message that will be shown on submission + * @property {string} title - Title for the form + */ +/** + * @typedef EditTicketPayload + * @property {AgentChangePayload} [assigned_to] + * @property {string} [category] - Category assigned to the ticket + * @property {TicketContent} [content] + * @property {PriorityEnum} [priority] + * @property {string} [source] - Denotes if the ticket was created at partner or + * application level + * @property {string} [status] - Denotes in what state is the ticket + * @property {string} [sub_category] - Sub-category assigned to the ticket + * @property {string[]} [tags] - Tags relevant to ticket + */ +/** + * @typedef Email + * @property {boolean} [active] - Denotes if the email is active + * @property {string} [email] - Email Address + * @property {boolean} [primary] - Denotes it's the primary email for the account + * @property {boolean} [verified] - Denotes it's a verified email + */ +/** + * @typedef FeedbackForm + * @property {Object} [inputs] - Input details for the feed back form + * @property {Object} [timestamps] - Gives details of category releted data + * @property {string} [title] - Title for the feed back form + */ +/** + * @typedef FeedbackResponseItem + * @property {string} display - Question/Title of the form field + * @property {string} key - Key of the form field + * @property {string} value - User response value for the form field + */ +/** + * @typedef Filter + * @property {Object[]} assignees - List of support staff availble for tickets assignment + * @property {TicketCategory[]} [categories] - List of possible categories for tickets + * @property {Priority[]} priorities - List of possible priorities for tickets + * @property {Status[]} statuses - List of possible statuses for tickets + */ +/** + * @typedef GeneralConfigIntegrationSchema + * @property {string} [type] + */ +/** + * @typedef GeneralConfigResponse + * @property {string[]} [available_integration] + * @property {GeneralConfigIntegrationSchema} [integration] + * @property {SupportCommunicationSchema[]} [support_communication] + * @property {string} [type] + */ +/** + * @typedef GetParticipantsInsideVideoRoomResponse + * @property {Participant[]} participants - List of participants of the video room + */ +/** + * @typedef GetTokenForVideoRoomResponse + * @property {string} access_token - Access token to be used for video room + */ +/** + * @typedef NotifyUser + * @property {string} country_code - Country code + * @property {string} phone_number - Phone number + */ +/** + * @typedef Page + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type + */ +/** + * @typedef Participant + * @property {string} [identity] - Unique identifier of participant + * @property {string} [status] - Status of participant + * @property {UserSchema} [user] + */ +/** + * @typedef PhoneNumber + * @property {boolean} [active] - Denotes if the phone number is active + * @property {number} [country_code] - Country code + * @property {string} [phone] - Phone number + * @property {boolean} [primary] - Denotes it's the primary phone number for the account + * @property {boolean} [verified] - Denotes it's a verified phone number + */ +/** + * @typedef PollForAssignment + * @property {number} duration - Duration for polling of staff + * @property {string} failure_message - Message if polling failed + * @property {string} message - Message for polling + * @property {string} success_message - Message for successful polling + */ +/** + * @typedef Priority + * @property {string} color - Color for priority + * @property {string} display - Display text for priority + * @property {PriorityEnum} key + */ +/** + * @typedef Status + * @property {string} color - Color for status + * @property {string} display - Display text for status + * @property {string} key - Key for status + */ +/** + * @typedef SubmitButton + * @property {string} background_color - Color for submit button + * @property {string} title - Title for submit button + * @property {string} title_color - Title color submit button + */ +/** + * @typedef SupportCommunicationSchema + * @property {string} [description] + * @property {boolean} [enabled] + * @property {string} [title] + * @property {string} [type] + * @property {Object} [value] + */ +/** + * @typedef Ticket + * @property {Object} [_custom_json] - Custom json relevant to the ticket + * @property {string} _id - Unique identifier for the ticket + * @property {Object} [assigned_to] - Details of support staff to whom ticket is assigned + * @property {TicketCategory} category + * @property {TicketContent} [content] + * @property {TicketContext} [context] + * @property {string} [created_at] - Time when the ticket was created + * @property {Object} [created_by] - User details of ticket creator + * @property {CreatedOn} [created_on] + * @property {Object} [integration] - Integration type and its details of the ticket + * @property {boolean} [is_feedback_pending] - Denotes if feedback submission is + * pending for the ticket + * @property {Priority} priority + * @property {string} [response_id] - Details of partner and application + * realated to the ticket + * @property {TicketSourceEnum} source + * @property {Status} status + * @property {string} [sub_category] - Sub-category assigned to the ticket + * @property {string[]} [tags] - Tags relevant to ticket + * @property {string} [updated_at] - Time when the ticket was last updated + */ +/** + * @typedef TicketAsset + * @property {string} [display] - Display text for asset + * @property {TicketAssetTypeEnum} type + * @property {string} value - To be used for details + */ +/** + * @typedef TicketCategory + * @property {string} display - Category display value identifier + * @property {FeedbackForm} [feedback_form] + * @property {number} [group_id] - Group id of category releted data + * @property {string} key - Category key value identifier + * @property {TicketCategory} [sub_categories] + */ +/** + * @typedef TicketContent + * @property {TicketAsset[]} [attachments] - List of all attachments related to the ticket + * @property {string} [description] - Long description of issue + * @property {string} title - Title for ticket + */ +/** + * @typedef TicketContext + * @property {string} [application_id] - Application ID related to the ticket + * @property {string} partner_id - Partner ID related to the ticket + */ +/** + * @typedef TicketFeedback + * @property {string} _id - Unique identifier for the feedback + * @property {string} [category] - Category of the ticket + * @property {string} [created_at] - Time when the feedback was created + * @property {string} partner_id - Partner id for which ticket was raised + * @property {FeedbackResponseItem[]} response + * @property {string} ticket_id - Readable ticket number + * @property {string} [updated_at] - Time when the feedback was last updated + * @property {Object} [user] - User who submitted the feedback + */ +/** + * @typedef TicketFeedbackList + * @property {TicketFeedback[]} [items] - List of all ticket feedback for the ticket + */ +/** + * @typedef TicketFeedbackPayload + * @property {Object} [form_response] - Key-value pairs of all the form fields + * and their response + */ +/** + * @typedef TicketHistory + * @property {string} _id - Unique identifier of the history event + * @property {string} [created_at] - Time of creation of the history event + * @property {Object} [created_by] - User who created the history event + * @property {CreatedOn} [created_on] + * @property {string} ticket_id - Readable ticket number + * @property {string} type - Type of the history event + * @property {string} [updated_at] - Time of last update of the history event + * @property {Object} value - Data of the history event + */ +/** + * @typedef TicketHistoryList + * @property {TicketHistory[]} [items] - List of ticket history + * @property {Page} [page] + */ +/** + * @typedef TicketHistoryPayload + * @property {HistoryTypeEnum} type + * @property {Object} value - Details of history event + */ +/** + * @typedef TicketList + * @property {Filter} [filters] + * @property {Ticket[]} [items] - List of tickets + * @property {Page} [page] + */ +/** + * @typedef UserSchema + * @property {string} [_id] - Unique identifier of user + * @property {string} [account_type] - Type of account + * @property {boolean} [active] - Is account active + * @property {string} [created_at] - Time of user creation + * @property {Debug} [debug] + * @property {Email[]} [emails] - List of email addresses + * @property {string} [first_name] - First name + * @property {string} [gender] - Gender of user + * @property {boolean} [has_old_password_hash] - Denotes if user has old password hash + * @property {string} [last_name] - Last name + * @property {PhoneNumber[]} [phone_numbers] - List of phone numbers + * @property {string} [profile_pic_url] - URL for profile pic + * @property {string} [uid] - Unique identifier of user + * @property {string} [updated_at] - Last time of user details update + * @property {string} [username] - Username of user + */ +/** @typedef {"rating" | "log" | "comment"} HistoryTypeEnum */ +/** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */ +/** + * @typedef {| "image" + * | "video" + * | "file" + * | "youtube" + * | "product" + * | "collection" + * | "brand" + * | "shipment" + * | "order"} TicketAssetTypeEnum + */ +/** @typedef {"platform_panel" | "sales_channel"} TicketSourceEnum */ +declare class LeadPartnerModel { +} +declare namespace LeadPartnerModel { + export { AddTicketPayload, AgentChangePayload, CloseVideoRoomResponse, CreateCustomFormPayload, CreatedOn, CreateVideoRoomPayload, CreateVideoRoomResponse, CustomForm, CustomFormList, Debug, EditCustomFormPayload, EditTicketPayload, Email, FeedbackForm, FeedbackResponseItem, Filter, GeneralConfigIntegrationSchema, GeneralConfigResponse, GetParticipantsInsideVideoRoomResponse, GetTokenForVideoRoomResponse, NotifyUser, Page, Participant, PhoneNumber, PollForAssignment, Priority, Status, SubmitButton, SupportCommunicationSchema, Ticket, TicketAsset, TicketCategory, TicketContent, TicketContext, TicketFeedback, TicketFeedbackList, TicketFeedbackPayload, TicketHistory, TicketHistoryList, TicketHistoryPayload, TicketList, UserSchema, HistoryTypeEnum, PriorityEnum, TicketAssetTypeEnum, TicketSourceEnum }; +} +/** @returns {AddTicketPayload} */ +declare function AddTicketPayload(): AddTicketPayload; +type AddTicketPayload = { + /** + * - Optional custom data that needs to be sent + */ + _custom_json?: any; + /** + * - Category of the ticket + */ + category: string; + content: TicketContent; + /** + * - Creator of the ticket + */ + created_by?: any; + priority?: PriorityEnum; + /** + * - Status of the ticket + */ + status?: string; +}; +/** @returns {AgentChangePayload} */ +declare function AgentChangePayload(): AgentChangePayload; +type AgentChangePayload = { + /** + * - Agent's unique ID + */ + agent_id: string; +}; +/** @returns {CloseVideoRoomResponse} */ +declare function CloseVideoRoomResponse(): CloseVideoRoomResponse; +type CloseVideoRoomResponse = { + /** + * - Denotes if operation was successfully + */ + success: boolean; +}; +/** @returns {CreateCustomFormPayload} */ +declare function CreateCustomFormPayload(): CreateCustomFormPayload; +type CreateCustomFormPayload = { + /** + * - Description of the form + */ + description?: string; + /** + * - Header image that is to be shown for the form + */ + header_image?: string; + /** + * - List of all the form components + */ + inputs: any[]; + poll_for_assignment?: PollForAssignment; + priority: PriorityEnum; + /** + * - Indicates if staff should be notified + * when a response is received + */ + should_notify?: boolean; + /** + * - Slug for the form + */ + slug: string; + /** + * - Success message that will be shown on submission + */ + success_message?: string; + /** + * - Title for the form + */ + title: string; +}; +/** @returns {CreatedOn} */ +declare function CreatedOn(): CreatedOn; +type CreatedOn = { + /** + * - Useragent details + */ + user_agent: string; +}; +/** @returns {CreateVideoRoomPayload} */ +declare function CreateVideoRoomPayload(): CreateVideoRoomPayload; +type CreateVideoRoomPayload = { + /** + * - List of people to be notified + */ + notify?: NotifyUser[]; + /** + * - Ticket id + */ + unique_name: string; +}; +/** @returns {CreateVideoRoomResponse} */ +declare function CreateVideoRoomResponse(): CreateVideoRoomResponse; +type CreateVideoRoomResponse = { + /** + * - Video Room's unique name + */ + unique_name: string; +}; +/** @returns {CustomForm} */ +declare function CustomForm(): CustomForm; +type CustomForm = { + /** + * - Unique identifier for the form + */ + _id: string; + /** + * - Application ID for form + */ + application_id: string; + created_on?: CreatedOn; + /** + * - Form description that will be shown to the user + */ + description?: string; + /** + * - Form header image that will be shown to the user + */ + header_image?: string; + /** + * - List of all the form fields + */ + inputs: any[]; + /** + * - Denotes if login is required to make a + * form response submission + */ + login_required: boolean; + poll_for_assignment?: PollForAssignment; + priority: Priority; + /** + * - Denotes if new response submission for + * the form should be notified to the assignees + */ + should_notify: boolean; + /** + * - Slug for the form, which is to be used for accessing the form + */ + slug: string; + submit_button?: SubmitButton; + /** + * - Message that is to be shown on + * succesfull form response submission + */ + success_message?: string; + /** + * - Form title that will be shown to the user + */ + title: string; +}; +/** @returns {CustomFormList} */ +declare function CustomFormList(): CustomFormList; +type CustomFormList = { + /** + * - List of forms + */ + items?: CustomForm[]; + page?: Page; +}; +/** @returns {Debug} */ +declare function Debug(): Debug; +type Debug = { + /** + * - Platform of user + */ + platform?: string; + /** + * - Source of user + */ + source?: string; +}; +/** @returns {EditCustomFormPayload} */ +declare function EditCustomFormPayload(): EditCustomFormPayload; +type EditCustomFormPayload = { + /** + * - Description of the form + */ + description?: string; + /** + * - Header image that is to be shown for the form + */ + header_image?: string; + /** + * - List of all the form components + */ + inputs: any[]; + /** + * - Denotes if login is required to make a + * form response submission + */ + login_required?: boolean; + poll_for_assignment?: PollForAssignment; + priority: PriorityEnum; + /** + * - Indicates if staff should be notified + * when a response is received + */ + should_notify?: boolean; + /** + * - Success message that will be shown on submission + */ + success_message?: string; + /** + * - Title for the form + */ + title: string; +}; +/** @returns {EditTicketPayload} */ +declare function EditTicketPayload(): EditTicketPayload; +type EditTicketPayload = { + assigned_to?: AgentChangePayload; + /** + * - Category assigned to the ticket + */ + category?: string; + content?: TicketContent; + priority?: PriorityEnum; + /** + * - Denotes if the ticket was created at partner or + * application level + */ + source?: string; + /** + * - Denotes in what state is the ticket + */ + status?: string; + /** + * - Sub-category assigned to the ticket + */ + sub_category?: string; + /** + * - Tags relevant to ticket + */ + tags?: string[]; +}; +/** @returns {Email} */ +declare function Email(): Email; +type Email = { + /** + * - Denotes if the email is active + */ + active?: boolean; + /** + * - Email Address + */ + email?: string; + /** + * - Denotes it's the primary email for the account + */ + primary?: boolean; + /** + * - Denotes it's a verified email + */ + verified?: boolean; +}; +/** @returns {FeedbackForm} */ +declare function FeedbackForm(): FeedbackForm; +type FeedbackForm = { + /** + * - Input details for the feed back form + */ + inputs?: any; + /** + * - Gives details of category releted data + */ + timestamps?: any; + /** + * - Title for the feed back form + */ + title?: string; +}; +/** @returns {FeedbackResponseItem} */ +declare function FeedbackResponseItem(): FeedbackResponseItem; +type FeedbackResponseItem = { + /** + * - Question/Title of the form field + */ + display: string; + /** + * - Key of the form field + */ + key: string; + /** + * - User response value for the form field + */ + value: string; +}; +/** @returns {Filter} */ +declare function Filter(): Filter; +type Filter = { + /** + * - List of support staff availble for tickets assignment + */ + assignees: any[]; + /** + * - List of possible categories for tickets + */ + categories?: TicketCategory[]; + /** + * - List of possible priorities for tickets + */ + priorities: Priority[]; + /** + * - List of possible statuses for tickets + */ + statuses: Status[]; +}; +/** @returns {GeneralConfigIntegrationSchema} */ +declare function GeneralConfigIntegrationSchema(): GeneralConfigIntegrationSchema; +type GeneralConfigIntegrationSchema = { + type?: string; +}; +/** @returns {GeneralConfigResponse} */ +declare function GeneralConfigResponse(): GeneralConfigResponse; +type GeneralConfigResponse = { + available_integration?: string[]; + integration?: GeneralConfigIntegrationSchema; + support_communication?: SupportCommunicationSchema[]; + type?: string; +}; +/** @returns {GetParticipantsInsideVideoRoomResponse} */ +declare function GetParticipantsInsideVideoRoomResponse(): GetParticipantsInsideVideoRoomResponse; +type GetParticipantsInsideVideoRoomResponse = { + /** + * - List of participants of the video room + */ + participants: Participant[]; +}; +/** @returns {GetTokenForVideoRoomResponse} */ +declare function GetTokenForVideoRoomResponse(): GetTokenForVideoRoomResponse; +type GetTokenForVideoRoomResponse = { + /** + * - Access token to be used for video room + */ + access_token: string; +}; +/** @returns {NotifyUser} */ +declare function NotifyUser(): NotifyUser; +type NotifyUser = { + /** + * - Country code + */ + country_code: string; + /** + * - Phone number + */ + phone_number: string; +}; +/** @returns {Page} */ +declare function Page(): Page; +type Page = { + current?: number; + has_next?: boolean; + has_previous?: boolean; + item_total?: number; + next_id?: string; + size?: number; + type: string; +}; +/** @returns {Participant} */ +declare function Participant(): Participant; +type Participant = { + /** + * - Unique identifier of participant + */ + identity?: string; + /** + * - Status of participant + */ + status?: string; + user?: UserSchema; +}; +/** @returns {PhoneNumber} */ +declare function PhoneNumber(): PhoneNumber; +type PhoneNumber = { + /** + * - Denotes if the phone number is active + */ + active?: boolean; + /** + * - Country code + */ + country_code?: number; + /** + * - Phone number + */ + phone?: string; + /** + * - Denotes it's the primary phone number for the account + */ + primary?: boolean; + /** + * - Denotes it's a verified phone number + */ + verified?: boolean; +}; +/** @returns {PollForAssignment} */ +declare function PollForAssignment(): PollForAssignment; +type PollForAssignment = { + /** + * - Duration for polling of staff + */ + duration: number; + /** + * - Message if polling failed + */ + failure_message: string; + /** + * - Message for polling + */ + message: string; + /** + * - Message for successful polling + */ + success_message: string; +}; +/** @returns {Priority} */ +declare function Priority(): Priority; +type Priority = { + /** + * - Color for priority + */ + color: string; + /** + * - Display text for priority + */ + display: string; + key: PriorityEnum; +}; +/** @returns {Status} */ +declare function Status(): Status; +type Status = { + /** + * - Color for status + */ + color: string; + /** + * - Display text for status + */ + display: string; + /** + * - Key for status + */ + key: string; +}; +/** @returns {SubmitButton} */ +declare function SubmitButton(): SubmitButton; +type SubmitButton = { + /** + * - Color for submit button + */ + background_color: string; + /** + * - Title for submit button + */ + title: string; + /** + * - Title color submit button + */ + title_color: string; +}; +/** @returns {SupportCommunicationSchema} */ +declare function SupportCommunicationSchema(): SupportCommunicationSchema; +type SupportCommunicationSchema = { + description?: string; + enabled?: boolean; + title?: string; + type?: string; + value?: any; +}; +/** @returns {Ticket} */ +declare function Ticket(): Ticket; +type Ticket = { + /** + * - Custom json relevant to the ticket + */ + _custom_json?: any; + /** + * - Unique identifier for the ticket + */ + _id: string; + /** + * - Details of support staff to whom ticket is assigned + */ + assigned_to?: any; + category: TicketCategory; + content?: TicketContent; + context?: TicketContext; + /** + * - Time when the ticket was created + */ + created_at?: string; + /** + * - User details of ticket creator + */ + created_by?: any; + created_on?: CreatedOn; + /** + * - Integration type and its details of the ticket + */ + integration?: any; + /** + * - Denotes if feedback submission is + * pending for the ticket + */ + is_feedback_pending?: boolean; + priority: Priority; + /** + * - Details of partner and application + * realated to the ticket + */ + response_id?: string; + source: TicketSourceEnum; + status: Status; + /** + * - Sub-category assigned to the ticket + */ + sub_category?: string; + /** + * - Tags relevant to ticket + */ + tags?: string[]; + /** + * - Time when the ticket was last updated + */ + updated_at?: string; +}; +/** @returns {TicketAsset} */ +declare function TicketAsset(): TicketAsset; +type TicketAsset = { + /** + * - Display text for asset + */ + display?: string; + type: TicketAssetTypeEnum; + /** + * - To be used for details + */ + value: string; +}; +/** @returns {TicketCategory} */ +declare function TicketCategory(): TicketCategory; +type TicketCategory = { + /** + * - Category display value identifier + */ + display: string; + feedback_form?: FeedbackForm; + /** + * - Group id of category releted data + */ + group_id?: number; + /** + * - Category key value identifier + */ + key: string; + sub_categories?: TicketCategory; +}; +/** @returns {TicketContent} */ +declare function TicketContent(): TicketContent; +type TicketContent = { + /** + * - List of all attachments related to the ticket + */ + attachments?: TicketAsset[]; + /** + * - Long description of issue + */ + description?: string; + /** + * - Title for ticket + */ + title: string; +}; +/** @returns {TicketContext} */ +declare function TicketContext(): TicketContext; +type TicketContext = { + /** + * - Application ID related to the ticket + */ + application_id?: string; + /** + * - Partner ID related to the ticket + */ + partner_id: string; +}; +/** @returns {TicketFeedback} */ +declare function TicketFeedback(): TicketFeedback; +type TicketFeedback = { + /** + * - Unique identifier for the feedback + */ + _id: string; + /** + * - Category of the ticket + */ + category?: string; + /** + * - Time when the feedback was created + */ + created_at?: string; + /** + * - Partner id for which ticket was raised + */ + partner_id: string; + response: FeedbackResponseItem[]; + /** + * - Readable ticket number + */ + ticket_id: string; + /** + * - Time when the feedback was last updated + */ + updated_at?: string; + /** + * - User who submitted the feedback + */ + user?: any; +}; +/** @returns {TicketFeedbackList} */ +declare function TicketFeedbackList(): TicketFeedbackList; +type TicketFeedbackList = { + /** + * - List of all ticket feedback for the ticket + */ + items?: TicketFeedback[]; +}; +/** @returns {TicketFeedbackPayload} */ +declare function TicketFeedbackPayload(): TicketFeedbackPayload; +type TicketFeedbackPayload = { + /** + * - Key-value pairs of all the form fields + * and their response + */ + form_response?: any; +}; +/** @returns {TicketHistory} */ +declare function TicketHistory(): TicketHistory; +type TicketHistory = { + /** + * - Unique identifier of the history event + */ + _id: string; + /** + * - Time of creation of the history event + */ + created_at?: string; + /** + * - User who created the history event + */ + created_by?: any; + created_on?: CreatedOn; + /** + * - Readable ticket number + */ + ticket_id: string; + /** + * - Type of the history event + */ + type: string; + /** + * - Time of last update of the history event + */ + updated_at?: string; + /** + * - Data of the history event + */ + value: any; +}; +/** @returns {TicketHistoryList} */ +declare function TicketHistoryList(): TicketHistoryList; +type TicketHistoryList = { + /** + * - List of ticket history + */ + items?: TicketHistory[]; + page?: Page; +}; +/** @returns {TicketHistoryPayload} */ +declare function TicketHistoryPayload(): TicketHistoryPayload; +type TicketHistoryPayload = { + type: HistoryTypeEnum; + /** + * - Details of history event + */ + value: any; +}; +/** @returns {TicketList} */ +declare function TicketList(): TicketList; +type TicketList = { + filters?: Filter; + /** + * - List of tickets + */ + items?: Ticket[]; + page?: Page; +}; +/** @returns {UserSchema} */ +declare function UserSchema(): UserSchema; +type UserSchema = { + /** + * - Unique identifier of user + */ + _id?: string; + /** + * - Type of account + */ + account_type?: string; + /** + * - Is account active + */ + active?: boolean; + /** + * - Time of user creation + */ + created_at?: string; + debug?: Debug; + /** + * - List of email addresses + */ + emails?: Email[]; + /** + * - First name + */ + first_name?: string; + /** + * - Gender of user + */ + gender?: string; + /** + * - Denotes if user has old password hash + */ + has_old_password_hash?: boolean; + /** + * - Last name + */ + last_name?: string; + /** + * - List of phone numbers + */ + phone_numbers?: PhoneNumber[]; + /** + * - URL for profile pic + */ + profile_pic_url?: string; + /** + * - Unique identifier of user + */ + uid?: string; + /** + * - Last time of user details update + */ + updated_at?: string; + /** + * - Username of user + */ + username?: string; +}; +/** + * Enum: HistoryTypeEnum Used By: Lead + * + * @returns {HistoryTypeEnum} + */ +declare function HistoryTypeEnum(): HistoryTypeEnum; +type HistoryTypeEnum = "rating" | "log" | "comment"; +/** + * Enum: PriorityEnum Used By: Lead + * + * @returns {PriorityEnum} + */ +declare function PriorityEnum(): PriorityEnum; +type PriorityEnum = "low" | "medium" | "high" | "urgent"; +/** + * Enum: TicketAssetTypeEnum Used By: Lead + * + * @returns {TicketAssetTypeEnum} + */ +declare function TicketAssetTypeEnum(): TicketAssetTypeEnum; +type TicketAssetTypeEnum = "image" | "video" | "file" | "youtube" | "product" | "collection" | "brand" | "shipment" | "order"; +/** + * Enum: TicketSourceEnum Used By: Lead + * + * @returns {TicketSourceEnum} + */ +declare function TicketSourceEnum(): TicketSourceEnum; +type TicketSourceEnum = "platform_panel" | "sales_channel"; diff --git a/sdk/partner/Lead/LeadPartnerModel.js b/sdk/partner/Lead/LeadPartnerModel.js new file mode 100644 index 000000000..192c6d9ea --- /dev/null +++ b/sdk/partner/Lead/LeadPartnerModel.js @@ -0,0 +1,896 @@ +const Joi = require("joi"); + +/** + * @typedef AddTicketPayload + * @property {Object} [_custom_json] - Optional custom data that needs to be sent + * @property {string} category - Category of the ticket + * @property {TicketContent} content + * @property {Object} [created_by] - Creator of the ticket + * @property {PriorityEnum} [priority] + * @property {string} [status] - Status of the ticket + */ + +/** + * @typedef AgentChangePayload + * @property {string} agent_id - Agent's unique ID + */ + +/** + * @typedef CloseVideoRoomResponse + * @property {boolean} success - Denotes if operation was successfully + */ + +/** + * @typedef CreateCustomFormPayload + * @property {string} [description] - Description of the form + * @property {string} [header_image] - Header image that is to be shown for the form + * @property {Object[]} inputs - List of all the form components + * @property {PollForAssignment} [poll_for_assignment] + * @property {PriorityEnum} priority + * @property {boolean} [should_notify] - Indicates if staff should be notified + * when a response is received + * @property {string} slug - Slug for the form + * @property {string} [success_message] - Success message that will be shown on submission + * @property {string} title - Title for the form + */ + +/** + * @typedef CreatedOn + * @property {string} user_agent - Useragent details + */ + +/** + * @typedef CreateVideoRoomPayload + * @property {NotifyUser[]} [notify] - List of people to be notified + * @property {string} unique_name - Ticket id + */ + +/** + * @typedef CreateVideoRoomResponse + * @property {string} unique_name - Video Room's unique name + */ + +/** + * @typedef CustomForm + * @property {string} _id - Unique identifier for the form + * @property {string} application_id - Application ID for form + * @property {CreatedOn} [created_on] + * @property {string} [description] - Form description that will be shown to the user + * @property {string} [header_image] - Form header image that will be shown to the user + * @property {Object[]} inputs - List of all the form fields + * @property {boolean} login_required - Denotes if login is required to make a + * form response submission + * @property {PollForAssignment} [poll_for_assignment] + * @property {Priority} priority + * @property {boolean} should_notify - Denotes if new response submission for + * the form should be notified to the assignees + * @property {string} slug - Slug for the form, which is to be used for accessing the form + * @property {SubmitButton} [submit_button] + * @property {string} [success_message] - Message that is to be shown on + * succesfull form response submission + * @property {string} title - Form title that will be shown to the user + */ + +/** + * @typedef CustomFormList + * @property {CustomForm[]} [items] - List of forms + * @property {Page} [page] + */ + +/** + * @typedef Debug + * @property {string} [platform] - Platform of user + * @property {string} [source] - Source of user + */ + +/** + * @typedef EditCustomFormPayload + * @property {string} [description] - Description of the form + * @property {string} [header_image] - Header image that is to be shown for the form + * @property {Object[]} inputs - List of all the form components + * @property {boolean} [login_required] - Denotes if login is required to make a + * form response submission + * @property {PollForAssignment} [poll_for_assignment] + * @property {PriorityEnum} priority + * @property {boolean} [should_notify] - Indicates if staff should be notified + * when a response is received + * @property {string} [success_message] - Success message that will be shown on submission + * @property {string} title - Title for the form + */ + +/** + * @typedef EditTicketPayload + * @property {AgentChangePayload} [assigned_to] + * @property {string} [category] - Category assigned to the ticket + * @property {TicketContent} [content] + * @property {PriorityEnum} [priority] + * @property {string} [source] - Denotes if the ticket was created at partner or + * application level + * @property {string} [status] - Denotes in what state is the ticket + * @property {string} [sub_category] - Sub-category assigned to the ticket + * @property {string[]} [tags] - Tags relevant to ticket + */ + +/** + * @typedef Email + * @property {boolean} [active] - Denotes if the email is active + * @property {string} [email] - Email Address + * @property {boolean} [primary] - Denotes it's the primary email for the account + * @property {boolean} [verified] - Denotes it's a verified email + */ + +/** + * @typedef FeedbackForm + * @property {Object} [inputs] - Input details for the feed back form + * @property {Object} [timestamps] - Gives details of category releted data + * @property {string} [title] - Title for the feed back form + */ + +/** + * @typedef FeedbackResponseItem + * @property {string} display - Question/Title of the form field + * @property {string} key - Key of the form field + * @property {string} value - User response value for the form field + */ + +/** + * @typedef Filter + * @property {Object[]} assignees - List of support staff availble for tickets assignment + * @property {TicketCategory[]} [categories] - List of possible categories for tickets + * @property {Priority[]} priorities - List of possible priorities for tickets + * @property {Status[]} statuses - List of possible statuses for tickets + */ + +/** + * @typedef GeneralConfigIntegrationSchema + * @property {string} [type] + */ + +/** + * @typedef GeneralConfigResponse + * @property {string[]} [available_integration] + * @property {GeneralConfigIntegrationSchema} [integration] + * @property {SupportCommunicationSchema[]} [support_communication] + * @property {string} [type] + */ + +/** + * @typedef GetParticipantsInsideVideoRoomResponse + * @property {Participant[]} participants - List of participants of the video room + */ + +/** + * @typedef GetTokenForVideoRoomResponse + * @property {string} access_token - Access token to be used for video room + */ + +/** + * @typedef NotifyUser + * @property {string} country_code - Country code + * @property {string} phone_number - Phone number + */ + +/** + * @typedef Page + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type + */ + +/** + * @typedef Participant + * @property {string} [identity] - Unique identifier of participant + * @property {string} [status] - Status of participant + * @property {UserSchema} [user] + */ + +/** + * @typedef PhoneNumber + * @property {boolean} [active] - Denotes if the phone number is active + * @property {number} [country_code] - Country code + * @property {string} [phone] - Phone number + * @property {boolean} [primary] - Denotes it's the primary phone number for the account + * @property {boolean} [verified] - Denotes it's a verified phone number + */ + +/** + * @typedef PollForAssignment + * @property {number} duration - Duration for polling of staff + * @property {string} failure_message - Message if polling failed + * @property {string} message - Message for polling + * @property {string} success_message - Message for successful polling + */ + +/** + * @typedef Priority + * @property {string} color - Color for priority + * @property {string} display - Display text for priority + * @property {PriorityEnum} key + */ + +/** + * @typedef Status + * @property {string} color - Color for status + * @property {string} display - Display text for status + * @property {string} key - Key for status + */ + +/** + * @typedef SubmitButton + * @property {string} background_color - Color for submit button + * @property {string} title - Title for submit button + * @property {string} title_color - Title color submit button + */ + +/** + * @typedef SupportCommunicationSchema + * @property {string} [description] + * @property {boolean} [enabled] + * @property {string} [title] + * @property {string} [type] + * @property {Object} [value] + */ + +/** + * @typedef Ticket + * @property {Object} [_custom_json] - Custom json relevant to the ticket + * @property {string} _id - Unique identifier for the ticket + * @property {Object} [assigned_to] - Details of support staff to whom ticket is assigned + * @property {TicketCategory} category + * @property {TicketContent} [content] + * @property {TicketContext} [context] + * @property {string} [created_at] - Time when the ticket was created + * @property {Object} [created_by] - User details of ticket creator + * @property {CreatedOn} [created_on] + * @property {Object} [integration] - Integration type and its details of the ticket + * @property {boolean} [is_feedback_pending] - Denotes if feedback submission is + * pending for the ticket + * @property {Priority} priority + * @property {string} [response_id] - Details of partner and application + * realated to the ticket + * @property {TicketSourceEnum} source + * @property {Status} status + * @property {string} [sub_category] - Sub-category assigned to the ticket + * @property {string[]} [tags] - Tags relevant to ticket + * @property {string} [updated_at] - Time when the ticket was last updated + */ + +/** + * @typedef TicketAsset + * @property {string} [display] - Display text for asset + * @property {TicketAssetTypeEnum} type + * @property {string} value - To be used for details + */ + +/** + * @typedef TicketCategory + * @property {string} display - Category display value identifier + * @property {FeedbackForm} [feedback_form] + * @property {number} [group_id] - Group id of category releted data + * @property {string} key - Category key value identifier + * @property {TicketCategory} [sub_categories] + */ + +/** + * @typedef TicketContent + * @property {TicketAsset[]} [attachments] - List of all attachments related to the ticket + * @property {string} [description] - Long description of issue + * @property {string} title - Title for ticket + */ + +/** + * @typedef TicketContext + * @property {string} [application_id] - Application ID related to the ticket + * @property {string} partner_id - Partner ID related to the ticket + */ + +/** + * @typedef TicketFeedback + * @property {string} _id - Unique identifier for the feedback + * @property {string} [category] - Category of the ticket + * @property {string} [created_at] - Time when the feedback was created + * @property {string} partner_id - Partner id for which ticket was raised + * @property {FeedbackResponseItem[]} response + * @property {string} ticket_id - Readable ticket number + * @property {string} [updated_at] - Time when the feedback was last updated + * @property {Object} [user] - User who submitted the feedback + */ + +/** + * @typedef TicketFeedbackList + * @property {TicketFeedback[]} [items] - List of all ticket feedback for the ticket + */ + +/** + * @typedef TicketFeedbackPayload + * @property {Object} [form_response] - Key-value pairs of all the form fields + * and their response + */ + +/** + * @typedef TicketHistory + * @property {string} _id - Unique identifier of the history event + * @property {string} [created_at] - Time of creation of the history event + * @property {Object} [created_by] - User who created the history event + * @property {CreatedOn} [created_on] + * @property {string} ticket_id - Readable ticket number + * @property {string} type - Type of the history event + * @property {string} [updated_at] - Time of last update of the history event + * @property {Object} value - Data of the history event + */ + +/** + * @typedef TicketHistoryList + * @property {TicketHistory[]} [items] - List of ticket history + * @property {Page} [page] + */ + +/** + * @typedef TicketHistoryPayload + * @property {HistoryTypeEnum} type + * @property {Object} value - Details of history event + */ + +/** + * @typedef TicketList + * @property {Filter} [filters] + * @property {Ticket[]} [items] - List of tickets + * @property {Page} [page] + */ + +/** + * @typedef UserSchema + * @property {string} [_id] - Unique identifier of user + * @property {string} [account_type] - Type of account + * @property {boolean} [active] - Is account active + * @property {string} [created_at] - Time of user creation + * @property {Debug} [debug] + * @property {Email[]} [emails] - List of email addresses + * @property {string} [first_name] - First name + * @property {string} [gender] - Gender of user + * @property {boolean} [has_old_password_hash] - Denotes if user has old password hash + * @property {string} [last_name] - Last name + * @property {PhoneNumber[]} [phone_numbers] - List of phone numbers + * @property {string} [profile_pic_url] - URL for profile pic + * @property {string} [uid] - Unique identifier of user + * @property {string} [updated_at] - Last time of user details update + * @property {string} [username] - Username of user + */ + +/** @typedef {"rating" | "log" | "comment"} HistoryTypeEnum */ + +/** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */ + +/** + * @typedef {| "image" + * | "video" + * | "file" + * | "youtube" + * | "product" + * | "collection" + * | "brand" + * | "shipment" + * | "order"} TicketAssetTypeEnum + */ + +/** @typedef {"platform_panel" | "sales_channel"} TicketSourceEnum */ + +class LeadPartnerModel { + /** @returns {AddTicketPayload} */ + static AddTicketPayload() { + return Joi.object({ + _custom_json: Joi.any(), + category: Joi.string().allow("").required(), + content: LeadPartnerModel.TicketContent().required(), + created_by: Joi.any(), + priority: LeadPartnerModel.PriorityEnum(), + status: Joi.string().allow(""), + }); + } + + /** @returns {AgentChangePayload} */ + static AgentChangePayload() { + return Joi.object({ + agent_id: Joi.string().allow("").required(), + }); + } + + /** @returns {CloseVideoRoomResponse} */ + static CloseVideoRoomResponse() { + return Joi.object({ + success: Joi.boolean().required(), + }); + } + + /** @returns {CreateCustomFormPayload} */ + static CreateCustomFormPayload() { + return Joi.object({ + description: Joi.string().allow(""), + header_image: Joi.string().allow(""), + inputs: Joi.array().items(Joi.any()).required(), + poll_for_assignment: LeadPartnerModel.PollForAssignment(), + priority: LeadPartnerModel.PriorityEnum().required(), + should_notify: Joi.boolean(), + slug: Joi.string().allow("").required(), + success_message: Joi.string().allow(""), + title: Joi.string().allow("").required(), + }); + } + + /** @returns {CreatedOn} */ + static CreatedOn() { + return Joi.object({ + user_agent: Joi.string().allow("").required(), + }); + } + + /** @returns {CreateVideoRoomPayload} */ + static CreateVideoRoomPayload() { + return Joi.object({ + notify: Joi.array().items(LeadPartnerModel.NotifyUser()), + unique_name: Joi.string().allow("").required(), + }); + } + + /** @returns {CreateVideoRoomResponse} */ + static CreateVideoRoomResponse() { + return Joi.object({ + unique_name: Joi.string().allow("").required(), + }); + } + + /** @returns {CustomForm} */ + static CustomForm() { + return Joi.object({ + _id: Joi.string().allow("").required(), + application_id: Joi.string().allow("").required(), + created_on: LeadPartnerModel.CreatedOn(), + description: Joi.string().allow(""), + header_image: Joi.string().allow(""), + inputs: Joi.array().items(Joi.any()).required(), + login_required: Joi.boolean().required(), + poll_for_assignment: LeadPartnerModel.PollForAssignment(), + priority: LeadPartnerModel.Priority().required(), + should_notify: Joi.boolean().required(), + slug: Joi.string().allow("").required(), + submit_button: LeadPartnerModel.SubmitButton(), + success_message: Joi.string().allow(""), + title: Joi.string().allow("").required(), + }); + } + + /** @returns {CustomFormList} */ + static CustomFormList() { + return Joi.object({ + items: Joi.array().items(LeadPartnerModel.CustomForm()), + page: LeadPartnerModel.Page(), + }); + } + + /** @returns {Debug} */ + static Debug() { + return Joi.object({ + platform: Joi.string().allow(""), + source: Joi.string().allow(""), + }); + } + + /** @returns {EditCustomFormPayload} */ + static EditCustomFormPayload() { + return Joi.object({ + description: Joi.string().allow(""), + header_image: Joi.string().allow(""), + inputs: Joi.array().items(Joi.any()).required(), + login_required: Joi.boolean(), + poll_for_assignment: LeadPartnerModel.PollForAssignment(), + priority: LeadPartnerModel.PriorityEnum().required(), + should_notify: Joi.boolean(), + success_message: Joi.string().allow(""), + title: Joi.string().allow("").required(), + }); + } + + /** @returns {EditTicketPayload} */ + static EditTicketPayload() { + return Joi.object({ + assigned_to: LeadPartnerModel.AgentChangePayload(), + category: Joi.string().allow(""), + content: LeadPartnerModel.TicketContent(), + priority: LeadPartnerModel.PriorityEnum(), + source: Joi.string().allow(""), + status: Joi.string().allow(""), + sub_category: Joi.string().allow(""), + tags: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {Email} */ + static Email() { + return Joi.object({ + active: Joi.boolean(), + email: Joi.string().allow(""), + primary: Joi.boolean(), + verified: Joi.boolean(), + }); + } + + /** @returns {FeedbackForm} */ + static FeedbackForm() { + return Joi.object({ + inputs: Joi.any(), + timestamps: Joi.any(), + title: Joi.string().allow(""), + }); + } + + /** @returns {FeedbackResponseItem} */ + static FeedbackResponseItem() { + return Joi.object({ + display: Joi.string().allow("").required(), + key: Joi.string().allow("").required(), + value: Joi.string().allow("").required(), + }); + } + + /** @returns {Filter} */ + static Filter() { + return Joi.object({ + assignees: Joi.array().items(Joi.any()).required(), + categories: Joi.array().items(LeadPartnerModel.TicketCategory()), + priorities: Joi.array().items(LeadPartnerModel.Priority()).required(), + statuses: Joi.array().items(LeadPartnerModel.Status()).required(), + }); + } + + /** @returns {GeneralConfigIntegrationSchema} */ + static GeneralConfigIntegrationSchema() { + return Joi.object({ + type: Joi.string().allow(""), + }); + } + + /** @returns {GeneralConfigResponse} */ + static GeneralConfigResponse() { + return Joi.object({ + available_integration: Joi.array().items(Joi.string().allow("")), + integration: LeadPartnerModel.GeneralConfigIntegrationSchema(), + support_communication: Joi.array().items( + LeadPartnerModel.SupportCommunicationSchema() + ), + type: Joi.string().allow(""), + }); + } + + /** @returns {GetParticipantsInsideVideoRoomResponse} */ + static GetParticipantsInsideVideoRoomResponse() { + return Joi.object({ + participants: Joi.array() + .items(LeadPartnerModel.Participant()) + .required(), + }); + } + + /** @returns {GetTokenForVideoRoomResponse} */ + static GetTokenForVideoRoomResponse() { + return Joi.object({ + access_token: Joi.string().allow("").required(), + }); + } + + /** @returns {NotifyUser} */ + static NotifyUser() { + return Joi.object({ + country_code: Joi.string().allow("").required(), + phone_number: Joi.string().allow("").required(), + }); + } + + /** @returns {Page} */ + static Page() { + return Joi.object({ + current: Joi.number(), + has_next: Joi.boolean(), + has_previous: Joi.boolean(), + item_total: Joi.number(), + next_id: Joi.string().allow(""), + size: Joi.number(), + type: Joi.string().allow("").required(), + }); + } + + /** @returns {Participant} */ + static Participant() { + return Joi.object({ + identity: Joi.string().allow(""), + status: Joi.string().allow(""), + user: LeadPartnerModel.UserSchema(), + }); + } + + /** @returns {PhoneNumber} */ + static PhoneNumber() { + return Joi.object({ + active: Joi.boolean(), + country_code: Joi.number(), + phone: Joi.string().allow(""), + primary: Joi.boolean(), + verified: Joi.boolean(), + }); + } + + /** @returns {PollForAssignment} */ + static PollForAssignment() { + return Joi.object({ + duration: Joi.number().required(), + failure_message: Joi.string().allow("").required(), + message: Joi.string().allow("").required(), + success_message: Joi.string().allow("").required(), + }); + } + + /** @returns {Priority} */ + static Priority() { + return Joi.object({ + color: Joi.string().allow("").required(), + display: Joi.string().allow("").required(), + key: LeadPartnerModel.PriorityEnum().required(), + }); + } + + /** @returns {Status} */ + static Status() { + return Joi.object({ + color: Joi.string().allow("").required(), + display: Joi.string().allow("").required(), + key: Joi.string().allow("").required(), + }); + } + + /** @returns {SubmitButton} */ + static SubmitButton() { + return Joi.object({ + background_color: Joi.string().allow("").required(), + title: Joi.string().allow("").required(), + title_color: Joi.string().allow("").required(), + }); + } + + /** @returns {SupportCommunicationSchema} */ + static SupportCommunicationSchema() { + return Joi.object({ + description: Joi.string().allow(""), + enabled: Joi.boolean(), + title: Joi.string().allow(""), + type: Joi.string().allow(""), + value: Joi.any(), + }); + } + + /** @returns {Ticket} */ + static Ticket() { + return Joi.object({ + _custom_json: Joi.any(), + _id: Joi.string().allow("").required(), + assigned_to: Joi.any(), + category: LeadPartnerModel.TicketCategory().required(), + content: LeadPartnerModel.TicketContent(), + context: LeadPartnerModel.TicketContext(), + created_at: Joi.string().allow(""), + created_by: Joi.any(), + created_on: LeadPartnerModel.CreatedOn(), + integration: Joi.any(), + is_feedback_pending: Joi.boolean(), + priority: LeadPartnerModel.Priority().required(), + response_id: Joi.string().allow(""), + source: LeadPartnerModel.TicketSourceEnum().required(), + status: LeadPartnerModel.Status().required(), + sub_category: Joi.string().allow(""), + tags: Joi.array().items(Joi.string().allow("")), + updated_at: Joi.string().allow(""), + }); + } + + /** @returns {TicketAsset} */ + static TicketAsset() { + return Joi.object({ + display: Joi.string().allow(""), + type: LeadPartnerModel.TicketAssetTypeEnum().required(), + value: Joi.string().allow("").required(), + }); + } + + /** @returns {TicketCategory} */ + static TicketCategory() { + return Joi.object({ + display: Joi.string().allow("").required(), + feedback_form: LeadPartnerModel.FeedbackForm(), + group_id: Joi.number(), + key: Joi.string().allow("").required(), + sub_categories: Joi.link("#TicketCategory"), + }).id("TicketCategory"); + } + + /** @returns {TicketContent} */ + static TicketContent() { + return Joi.object({ + attachments: Joi.array().items(LeadPartnerModel.TicketAsset()), + description: Joi.string().allow(""), + title: Joi.string().allow("").required(), + }); + } + + /** @returns {TicketContext} */ + static TicketContext() { + return Joi.object({ + application_id: Joi.string().allow(""), + partner_id: Joi.string().allow("").required(), + }); + } + + /** @returns {TicketFeedback} */ + static TicketFeedback() { + return Joi.object({ + _id: Joi.string().allow("").required(), + category: Joi.string().allow(""), + created_at: Joi.string().allow(""), + partner_id: Joi.string().allow("").required(), + response: Joi.array() + .items(LeadPartnerModel.FeedbackResponseItem()) + .required(), + ticket_id: Joi.string().allow("").required(), + updated_at: Joi.string().allow(""), + user: Joi.any(), + }); + } + + /** @returns {TicketFeedbackList} */ + static TicketFeedbackList() { + return Joi.object({ + items: Joi.array().items(LeadPartnerModel.TicketFeedback()), + }); + } + + /** @returns {TicketFeedbackPayload} */ + static TicketFeedbackPayload() { + return Joi.object({ + form_response: Joi.any(), + }); + } + + /** @returns {TicketHistory} */ + static TicketHistory() { + return Joi.object({ + _id: Joi.string().allow("").required(), + created_at: Joi.string().allow(""), + created_by: Joi.any(), + created_on: LeadPartnerModel.CreatedOn(), + ticket_id: Joi.string().allow("").required(), + type: Joi.string().allow("").required(), + updated_at: Joi.string().allow(""), + value: Joi.any().required(), + }); + } + + /** @returns {TicketHistoryList} */ + static TicketHistoryList() { + return Joi.object({ + items: Joi.array().items(LeadPartnerModel.TicketHistory()), + page: LeadPartnerModel.Page(), + }); + } + + /** @returns {TicketHistoryPayload} */ + static TicketHistoryPayload() { + return Joi.object({ + type: LeadPartnerModel.HistoryTypeEnum().required(), + value: Joi.any().required(), + }); + } + + /** @returns {TicketList} */ + static TicketList() { + return Joi.object({ + filters: LeadPartnerModel.Filter(), + items: Joi.array().items(LeadPartnerModel.Ticket()), + page: LeadPartnerModel.Page(), + }); + } + + /** @returns {UserSchema} */ + static UserSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + account_type: Joi.string().allow(""), + active: Joi.boolean(), + created_at: Joi.string().allow(""), + debug: LeadPartnerModel.Debug(), + emails: Joi.array().items(LeadPartnerModel.Email()), + first_name: Joi.string().allow(""), + gender: Joi.string().allow(""), + has_old_password_hash: Joi.boolean(), + last_name: Joi.string().allow(""), + phone_numbers: Joi.array().items(LeadPartnerModel.PhoneNumber()), + profile_pic_url: Joi.string().allow(""), + uid: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + username: Joi.string().allow(""), + }); + } + + /** + * Enum: HistoryTypeEnum Used By: Lead + * + * @returns {HistoryTypeEnum} + */ + static HistoryTypeEnum() { + return Joi.string().valid( + "rating", + + "log", + + "comment" + ); + } + + /** + * Enum: PriorityEnum Used By: Lead + * + * @returns {PriorityEnum} + */ + static PriorityEnum() { + return Joi.string().valid( + "low", + + "medium", + + "high", + + "urgent" + ); + } + + /** + * Enum: TicketAssetTypeEnum Used By: Lead + * + * @returns {TicketAssetTypeEnum} + */ + static TicketAssetTypeEnum() { + return Joi.string().valid( + "image", + + "video", + + "file", + + "youtube", + + "product", + + "collection", + + "brand", + + "shipment", + + "order" + ); + } + + /** + * Enum: TicketSourceEnum Used By: Lead + * + * @returns {TicketSourceEnum} + */ + static TicketSourceEnum() { + return Joi.string().valid( + "platform_panel", + + "sales_channel" + ); + } +} +module.exports = LeadPartnerModel; diff --git a/sdk/partner/Lead/LeadPartnerValidator.d.ts b/sdk/partner/Lead/LeadPartnerValidator.d.ts new file mode 100644 index 000000000..3b47d46a0 --- /dev/null +++ b/sdk/partner/Lead/LeadPartnerValidator.d.ts @@ -0,0 +1,12 @@ +export = LeadValidator; +declare class LeadValidator { + static getTickets(): any; + static createTicket(): any; + static getTicket(): any; + static editTicket(): any; + static createHistory(): any; + static getTicketHistory(): any; + static getTokenForVideoRoom(): any; + static getVideoParticipants(): any; + static getGeneralConfig(): any; +} diff --git a/sdk/partner/Lead/LeadPartnerValidator.js b/sdk/partner/Lead/LeadPartnerValidator.js new file mode 100644 index 000000000..e6e3b2d0d --- /dev/null +++ b/sdk/partner/Lead/LeadPartnerValidator.js @@ -0,0 +1,67 @@ +const Joi = require("joi"); + +const LeadModel = require("./LeadPartnerModel"); +class LeadValidator { + static getTickets() { + return Joi.object({ + items: Joi.boolean(), + filters: Joi.boolean(), + q: Joi.string().allow(""), + status: Joi.string().allow(""), + priority: LeadModel.PriorityEnum(), + category: Joi.string().allow(""), + pageNo: Joi.number(), + pageSize: Joi.number(), + }).required(); + } + + static createTicket() { + return Joi.object({ + body: LeadModel.AddTicketPayload().required(), + }).required(); + } + + static getTicket() { + return Joi.object({ + id: Joi.string().allow("").required(), + }).required(); + } + + static editTicket() { + return Joi.object({ + id: Joi.string().allow("").required(), + body: LeadModel.EditTicketPayload().required(), + }).required(); + } + + static createHistory() { + return Joi.object({ + id: Joi.string().allow("").required(), + body: LeadModel.TicketHistoryPayload().required(), + }).required(); + } + + static getTicketHistory() { + return Joi.object({ + id: Joi.string().allow("").required(), + }).required(); + } + + static getTokenForVideoRoom() { + return Joi.object({ + uniqueName: Joi.string().allow("").required(), + }).required(); + } + + static getVideoParticipants() { + return Joi.object({ + uniqueName: Joi.string().allow("").required(), + }).required(); + } + + static getGeneralConfig() { + return Joi.object({}).required(); + } +} + +module.exports = LeadValidator; diff --git a/sdk/partner/Logistics/LogisticsPartnerClient.d.ts b/sdk/partner/Logistics/LogisticsPartnerClient.d.ts new file mode 100644 index 000000000..0bc9a3c7f --- /dev/null +++ b/sdk/partner/Logistics/LogisticsPartnerClient.d.ts @@ -0,0 +1,155 @@ +export = Logistics; +declare class Logistics { + constructor(config: any); + config: any; + /** + * @param {LogisticsPartnerValidator.SampleFileServiceabilityParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {LogisticsPartnerValidator.GetSampleFileServiceabilityStatusParam} arg + * - Arg object. + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {LogisticsPartnerValidator.BulkTatParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {LogisticsPartnerValidator.GetBulkTatParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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.BulkServiceabilityParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {LogisticsPartnerValidator.GetBulkServiceabilityParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {LogisticsPartnerValidator.CreateCourierPartnerAccountParam} arg + * - Arg object. + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createCourierPartnerAccount + * @summary: Creation of Courier Account + * @description: This API Creates a new Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createCourierPartnerAccount/). + */ + createCourierPartnerAccount({ companyId, body, requestHeaders }?: LogisticsPartnerValidator.CreateCourierPartnerAccountParam, { responseHeaders }?: object): Promise; + /** + * @param {LogisticsPartnerValidator.GetCourierPartnerAccountsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {LogisticsPartnerValidator.UpdateCourierPartnerAccountParam} arg + * - Arg object. + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {LogisticsPartnerValidator.GetCourierPartnerAccountParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {LogisticsPartnerValidator.CreateCourierPartnerSchemeParam} arg - + * Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name createCourierPartnerScheme + * @summary: Create Scheme for courier partner extension + * @description: Create Scheme for courier partner extension - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createCourierPartnerScheme/). + */ + createCourierPartnerScheme({ body, requestHeaders }?: LogisticsPartnerValidator.CreateCourierPartnerSchemeParam, { responseHeaders }?: object): Promise; + /** + * @param {LogisticsPartnerValidator.UpdateCourierPartnerSchemeParam} arg - + * Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {LogisticsPartnerValidator.GetCountriesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCountries + * @summary: Get all countries and associated data. + * @description: Retrieve of all countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCountries/). + */ + getCountries({ onboarding, pageNo, pageSize, q, requestHeaders }?: LogisticsPartnerValidator.GetCountriesParam, { responseHeaders }?: object): Promise; +} +import LogisticsPartnerModel = require("./LogisticsPartnerModel"); diff --git a/sdk/partner/Logistics/LogisticsPartnerClient.js b/sdk/partner/Logistics/LogisticsPartnerClient.js new file mode 100644 index 000000000..ec8ad3482 --- /dev/null +++ b/sdk/partner/Logistics/LogisticsPartnerClient.js @@ -0,0 +1,1195 @@ +const PartnerAPIClient = require("../PartnerAPIClient"); +const { + FDKClientValidationError, + FDKResponseValidationError, +} = require("../../common/FDKError"); +const Paginator = require("../../common/Paginator"); +const LogisticsPartnerValidator = require("./LogisticsPartnerValidator"); +const LogisticsPartnerModel = require("./LogisticsPartnerModel"); +const { Logger } = require("./../../common/Logger"); +const Joi = require("joi"); + +class Logistics { + constructor(config) { + this.config = config; + } + + /** + * @param {LogisticsPartnerValidator.SampleFileServiceabilityParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async sampleFileServiceability( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LogisticsPartnerValidator.sampleFileServiceability().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, + } = LogisticsPartnerValidator.sampleFileServiceability().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > sampleFileServiceability \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/localities/bulk-sample`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.BulkRegionServiceabilityTatResponseItemData().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 > sampleFileServiceability \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.GetSampleFileServiceabilityStatusParam} arg + * - Arg object. + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async getSampleFileServiceabilityStatus( + { pageNo, pageSize, batchId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LogisticsPartnerValidator.getSampleFileServiceabilityStatus().validate( + { + pageNo, + pageSize, + batchId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticsPartnerValidator.getSampleFileServiceabilityStatus().validate( + { + pageNo, + pageSize, + batchId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > getSampleFileServiceabilityStatus \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["batch_id"] = batchId; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/localities/bulk-sample`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.BulkRegionServiceabilityTatResponse().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 > getSampleFileServiceabilityStatus \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.BulkTatParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async bulkTat( + { extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticsPartnerValidator.bulkTat().validate( + { + extensionId, + 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.bulkTat().validate( + { + extensionId, + schemeId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > bulkTat \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.BulkRegionResponseItemData().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 > bulkTat \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.GetBulkTatParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async getBulkTat( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + startDate, + endDate, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticsPartnerValidator.getBulkTat().validate( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + 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 } = LogisticsPartnerValidator.getBulkTat().validate( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + startDate, + endDate, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > getBulkTat \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["batch_id"] = batchId; + query_params["action"] = action; + query_params["status"] = status; + query_params["country"] = country; + query_params["region"] = region; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.BulkRegionResponse().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 > getBulkTat \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} - + * 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/). + */ + async bulkServiceability( + { extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticsPartnerValidator.bulkServiceability().validate( + { + extensionId, + 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.bulkServiceability().validate( + { + extensionId, + schemeId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > bulkServiceability \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.BulkRegionResponseItemData().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 > bulkServiceability \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.GetBulkServiceabilityParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async getBulkServiceability( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + startDate, + endDate, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LogisticsPartnerValidator.getBulkServiceability().validate( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + 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, + } = LogisticsPartnerValidator.getBulkServiceability().validate( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + startDate, + endDate, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > getBulkServiceability \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["batch_id"] = batchId; + query_params["action"] = action; + query_params["status"] = status; + query_params["country"] = country; + query_params["region"] = region; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.BulkRegionResponse().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 > getBulkServiceability \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.CreateCourierPartnerAccountParam} arg + * - Arg object. + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createCourierPartnerAccount + * @summary: Creation of Courier Account + * @description: This API Creates a new Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createCourierPartnerAccount/). + */ + async createCourierPartnerAccount( + { companyId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LogisticsPartnerValidator.createCourierPartnerAccount().validate( + { + 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, + } = LogisticsPartnerValidator.createCourierPartnerAccount().validate( + { + companyId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > createCourierPartnerAccount \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/company/${companyId}/courier-partner/account`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.CourierAccount().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 > createCourierPartnerAccount \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.GetCourierPartnerAccountsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async getCourierPartnerAccounts( + { + companyId, + pageNo, + pageSize, + stage, + paymentMode, + transportType, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LogisticsPartnerValidator.getCourierPartnerAccounts().validate( + { + companyId, + pageNo, + pageSize, + stage, + paymentMode, + transportType, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticsPartnerValidator.getCourierPartnerAccounts().validate( + { + companyId, + pageNo, + pageSize, + stage, + paymentMode, + transportType, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > getCourierPartnerAccounts \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["stage"] = stage; + query_params["payment_mode"] = paymentMode; + query_params["transport_type"] = transportType; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/company/${companyId}/courier-partner/account`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.CompanyCourierPartnerAccountListResponse().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 > getCourierPartnerAccounts \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.UpdateCourierPartnerAccountParam} arg + * - Arg object. + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async updateCourierPartnerAccount( + { companyId, accountId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LogisticsPartnerValidator.updateCourierPartnerAccount().validate( + { + companyId, + accountId, + 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.updateCourierPartnerAccount().validate( + { + companyId, + accountId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > updateCourierPartnerAccount \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "put", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/company/${companyId}/courier-partner/account/${accountId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.CourierAccountResponse().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 > updateCourierPartnerAccount \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.GetCourierPartnerAccountParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async getCourierPartnerAccount( + { companyId, accountId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LogisticsPartnerValidator.getCourierPartnerAccount().validate( + { + companyId, + accountId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticsPartnerValidator.getCourierPartnerAccount().validate( + { + companyId, + accountId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > getCourierPartnerAccount \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/company/${companyId}/courier-partner/account/${accountId}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.CourierAccountResponse().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 > getCourierPartnerAccount \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.CreateCourierPartnerSchemeParam} arg - + * Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name createCourierPartnerScheme + * @summary: Create Scheme for courier partner extension + * @description: Create Scheme for courier partner extension - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/createCourierPartnerScheme/). + */ + async createCourierPartnerScheme( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LogisticsPartnerValidator.createCourierPartnerScheme().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, + } = LogisticsPartnerValidator.createCourierPartnerScheme().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > createCourierPartnerScheme \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/courier-partner/scheme/`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.CourierPartnerSchemeModel().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 > createCourierPartnerScheme \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.UpdateCourierPartnerSchemeParam} arg - + * Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async updateCourierPartnerScheme( + { schemeId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LogisticsPartnerValidator.updateCourierPartnerScheme().validate( + { + 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.updateCourierPartnerScheme().validate( + { + schemeId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > updateCourierPartnerScheme \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "put", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/courier-partner/scheme/${schemeId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.CourierPartnerSchemeUpdateRequest().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 > updateCourierPartnerScheme \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LogisticsPartnerValidator.GetCountriesParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCountries + * @summary: Get all countries and associated data. + * @description: Retrieve of all countries. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/logistics/getCountries/). + */ + async getCountries( + { onboarding, pageNo, pageSize, q, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = LogisticsPartnerValidator.getCountries().validate( + { + onboarding, + pageNo, + pageSize, + q, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = LogisticsPartnerValidator.getCountries().validate( + { + onboarding, + pageNo, + pageSize, + q, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Logistics > getCountries \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["onboarding"] = onboarding; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["q"] = q; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/logistics/v1.0/organization/${this.config.organizationId}/countries`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LogisticsPartnerModel.GetCountries().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 > getCountries \n ${res_error}`, + }); + } + } + + return response; + } +} +module.exports = Logistics; diff --git a/sdk/partner/Logistics/LogisticsPartnerModel.d.ts b/sdk/partner/Logistics/LogisticsPartnerModel.d.ts new file mode 100644 index 000000000..f87a9a4a2 --- /dev/null +++ b/sdk/partner/Logistics/LogisticsPartnerModel.d.ts @@ -0,0 +1,372 @@ +export = LogisticsPartnerModel; +/** + * @typedef ArithmeticOperations + * @property {number} [gt] + * @property {number} [gte] + * @property {number} [lt] + * @property {number} [lte] + */ +/** + * @typedef BulkRegionJobSerializer + * @property {string} action + * @property {string} country + * @property {string} [file_path] + * @property {string} region + */ +/** + * @typedef BulkRegionResponse + * @property {BulkRegionResponseItemData[]} items + * @property {Page} page + */ +/** + * @typedef BulkRegionResponseItemData + * @property {string} action + * @property {string} batch_id + * @property {string} country + * @property {string} [error_file_path] + * @property {number} [failed] + * @property {Object[]} [failed_records] + * @property {string} file_path + * @property {string} region + * @property {string} status + * @property {number} [success] + * @property {number} [total] + */ +/** + * @typedef BulkRegionServiceabilityTatRequest + * @property {string} country + * @property {string} region + * @property {string} type + */ +/** + * @typedef BulkRegionServiceabilityTatResponse + * @property {BulkRegionServiceabilityTatResponseItemData[]} [items] + * @property {Page} [page] + */ +/** + * @typedef BulkRegionServiceabilityTatResponseItemData + * @property {string} [batch_id] + * @property {string} [country] + * @property {Object[]} [failed_records] + * @property {string} [file_path] + * @property {string} [region] + * @property {string} [status] + * @property {string} [type] + */ +/** + * @typedef CompanyCourierPartnerAccountListResponse + * @property {CourierAccountResponse[]} items + * @property {Page} page + */ +/** + * @typedef CourierAccount + * @property {string} account_id + * @property {string} extension_id + * @property {boolean} is_own_account + * @property {boolean} is_self_ship + * @property {string} scheme_id + * @property {string} stage + */ +/** + * @typedef CourierAccountResponse + * @property {string} account_id + * @property {boolean} is_own_account + * @property {boolean} is_self_ship + * @property {string} scheme_id + * @property {CourierPartnerSchemeModel} scheme_rules + * @property {string} stage + */ +/** + * @typedef CourierPartnerAccountFailureResponse + * @property {ErrorResponse[]} error + * @property {boolean} success + */ +/** + * @typedef CourierPartnerSchemeFeatures + * @property {boolean} [cold_storage_goods] + * @property {boolean} [dangerous_goods] + * @property {boolean} [doorstep_exchange] + * @property {boolean} [doorstep_qc] + * @property {boolean} [doorstep_return] + * @property {boolean} [ewaybill] + * @property {boolean} [fragile_goods] + * @property {boolean} [mps] + * @property {boolean} [multi_pick_multi_drop] + * @property {boolean} [multi_pick_single_drop] + * @property {boolean} [ndr] + * @property {number} [ndr_attempts] + * @property {boolean} [openbox_delivery] + * @property {boolean} [product_installation] + * @property {boolean} [qr] + * @property {boolean} [restricted_goods] + * @property {boolean} [single_pick_multi_drop] + * @property {string} [status_updates] + */ +/** + * @typedef CourierPartnerSchemeModel + * @property {string} delivery_type + * @property {string} extension_id + * @property {CourierPartnerSchemeFeatures} feature + * @property {string} name + * @property {string[]} payment_mode + * @property {string} region + * @property {string} scheme_id + * @property {string} stage + * @property {string} transport_type + * @property {ArithmeticOperations} weight + */ +/** + * @typedef CourierPartnerSchemeUpdateRequest + * @property {string} delivery_type + * @property {CourierPartnerSchemeFeatures} feature + * @property {string} name + * @property {string[]} payment_mode + * @property {string} region + * @property {string} stage + * @property {string} transport_type + * @property {ArithmeticOperations} weight + */ +/** + * @typedef ErrorResponse + * @property {string} message + * @property {string} type + * @property {string} value + */ +/** + * @typedef FailureResponse + * @property {ErrorResponse[]} error + * @property {boolean} success + */ +/** + * @typedef GetCountries + * @property {GetCountriesItems[]} items + * @property {Page} page + */ +/** + * @typedef GetCountriesItems + * @property {string} [currency] + * @property {string} [display_name] + * @property {HierarchyItems[]} [hierarchy] + * @property {string} [id] + * @property {string} [iso2] + * @property {string} [iso3] + * @property {string} [latitude] + * @property {string} [longitude] + * @property {string} [name] + * @property {string} [phone_code] + * @property {string[]} [timezones] + * @property {string} [type] + */ +/** + * @typedef HierarchyItems + * @property {string} [display_name] + * @property {string} [slug] + */ +/** + * @typedef Page + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type + */ +declare class LogisticsPartnerModel { +} +declare namespace LogisticsPartnerModel { + export { ArithmeticOperations, BulkRegionJobSerializer, BulkRegionResponse, BulkRegionResponseItemData, BulkRegionServiceabilityTatRequest, BulkRegionServiceabilityTatResponse, BulkRegionServiceabilityTatResponseItemData, CompanyCourierPartnerAccountListResponse, CourierAccount, CourierAccountResponse, CourierPartnerAccountFailureResponse, CourierPartnerSchemeFeatures, CourierPartnerSchemeModel, CourierPartnerSchemeUpdateRequest, ErrorResponse, FailureResponse, GetCountries, GetCountriesItems, HierarchyItems, Page }; +} +/** @returns {ArithmeticOperations} */ +declare function ArithmeticOperations(): ArithmeticOperations; +type ArithmeticOperations = { + gt?: number; + gte?: number; + lt?: number; + lte?: number; +}; +/** @returns {BulkRegionJobSerializer} */ +declare function BulkRegionJobSerializer(): BulkRegionJobSerializer; +type BulkRegionJobSerializer = { + action: string; + country: string; + file_path?: string; + region: string; +}; +/** @returns {BulkRegionResponse} */ +declare function BulkRegionResponse(): BulkRegionResponse; +type BulkRegionResponse = { + items: BulkRegionResponseItemData[]; + page: Page; +}; +/** @returns {BulkRegionResponseItemData} */ +declare function BulkRegionResponseItemData(): BulkRegionResponseItemData; +type BulkRegionResponseItemData = { + action: string; + batch_id: string; + country: string; + error_file_path?: string; + failed?: number; + failed_records?: any[]; + file_path: string; + region: string; + status: string; + success?: number; + total?: number; +}; +/** @returns {BulkRegionServiceabilityTatRequest} */ +declare function BulkRegionServiceabilityTatRequest(): BulkRegionServiceabilityTatRequest; +type BulkRegionServiceabilityTatRequest = { + country: string; + region: string; + type: string; +}; +/** @returns {BulkRegionServiceabilityTatResponse} */ +declare function BulkRegionServiceabilityTatResponse(): BulkRegionServiceabilityTatResponse; +type BulkRegionServiceabilityTatResponse = { + items?: BulkRegionServiceabilityTatResponseItemData[]; + page?: Page; +}; +/** @returns {BulkRegionServiceabilityTatResponseItemData} */ +declare function BulkRegionServiceabilityTatResponseItemData(): BulkRegionServiceabilityTatResponseItemData; +type BulkRegionServiceabilityTatResponseItemData = { + batch_id?: string; + country?: string; + failed_records?: any[]; + file_path?: string; + region?: string; + status?: string; + type?: string; +}; +/** @returns {CompanyCourierPartnerAccountListResponse} */ +declare function CompanyCourierPartnerAccountListResponse(): CompanyCourierPartnerAccountListResponse; +type CompanyCourierPartnerAccountListResponse = { + items: CourierAccountResponse[]; + page: Page; +}; +/** @returns {CourierAccount} */ +declare function CourierAccount(): CourierAccount; +type CourierAccount = { + account_id: string; + extension_id: string; + is_own_account: boolean; + is_self_ship: boolean; + scheme_id: string; + stage: string; +}; +/** @returns {CourierAccountResponse} */ +declare function CourierAccountResponse(): CourierAccountResponse; +type CourierAccountResponse = { + account_id: string; + is_own_account: boolean; + is_self_ship: boolean; + scheme_id: string; + scheme_rules: CourierPartnerSchemeModel; + stage: string; +}; +/** @returns {CourierPartnerAccountFailureResponse} */ +declare function CourierPartnerAccountFailureResponse(): CourierPartnerAccountFailureResponse; +type CourierPartnerAccountFailureResponse = { + error: ErrorResponse[]; + success: boolean; +}; +/** @returns {CourierPartnerSchemeFeatures} */ +declare function CourierPartnerSchemeFeatures(): CourierPartnerSchemeFeatures; +type CourierPartnerSchemeFeatures = { + cold_storage_goods?: boolean; + dangerous_goods?: boolean; + doorstep_exchange?: boolean; + doorstep_qc?: boolean; + doorstep_return?: boolean; + ewaybill?: boolean; + fragile_goods?: boolean; + mps?: boolean; + multi_pick_multi_drop?: boolean; + multi_pick_single_drop?: boolean; + ndr?: boolean; + ndr_attempts?: number; + openbox_delivery?: boolean; + product_installation?: boolean; + qr?: boolean; + restricted_goods?: boolean; + single_pick_multi_drop?: boolean; + status_updates?: string; +}; +/** @returns {CourierPartnerSchemeModel} */ +declare function CourierPartnerSchemeModel(): CourierPartnerSchemeModel; +type CourierPartnerSchemeModel = { + delivery_type: string; + extension_id: string; + feature: CourierPartnerSchemeFeatures; + name: string; + payment_mode: string[]; + region: string; + scheme_id: string; + stage: string; + transport_type: string; + weight: ArithmeticOperations; +}; +/** @returns {CourierPartnerSchemeUpdateRequest} */ +declare function CourierPartnerSchemeUpdateRequest(): CourierPartnerSchemeUpdateRequest; +type CourierPartnerSchemeUpdateRequest = { + delivery_type: string; + feature: CourierPartnerSchemeFeatures; + name: string; + payment_mode: string[]; + region: string; + stage: string; + transport_type: string; + weight: ArithmeticOperations; +}; +/** @returns {ErrorResponse} */ +declare function ErrorResponse(): ErrorResponse; +type ErrorResponse = { + message: string; + type: string; + value: string; +}; +/** @returns {FailureResponse} */ +declare function FailureResponse(): FailureResponse; +type FailureResponse = { + error: ErrorResponse[]; + success: boolean; +}; +/** @returns {GetCountries} */ +declare function GetCountries(): GetCountries; +type GetCountries = { + items: GetCountriesItems[]; + page: Page; +}; +/** @returns {GetCountriesItems} */ +declare function GetCountriesItems(): GetCountriesItems; +type GetCountriesItems = { + currency?: string; + display_name?: string; + hierarchy?: HierarchyItems[]; + id?: string; + iso2?: string; + iso3?: string; + latitude?: string; + longitude?: string; + name?: string; + phone_code?: string; + timezones?: string[]; + type?: string; +}; +/** @returns {HierarchyItems} */ +declare function HierarchyItems(): HierarchyItems; +type HierarchyItems = { + display_name?: string; + slug?: string; +}; +/** @returns {Page} */ +declare function Page(): Page; +type Page = { + current?: number; + has_next?: boolean; + has_previous?: boolean; + item_total?: number; + next_id?: string; + size?: number; + type: string; +}; diff --git a/sdk/partner/Logistics/LogisticsPartnerModel.js b/sdk/partner/Logistics/LogisticsPartnerModel.js new file mode 100644 index 000000000..a5b8d67ed --- /dev/null +++ b/sdk/partner/Logistics/LogisticsPartnerModel.js @@ -0,0 +1,442 @@ +const Joi = require("joi"); + +/** + * @typedef ArithmeticOperations + * @property {number} [gt] + * @property {number} [gte] + * @property {number} [lt] + * @property {number} [lte] + */ + +/** + * @typedef BulkRegionJobSerializer + * @property {string} action + * @property {string} country + * @property {string} [file_path] + * @property {string} region + */ + +/** + * @typedef BulkRegionResponse + * @property {BulkRegionResponseItemData[]} items + * @property {Page} page + */ + +/** + * @typedef BulkRegionResponseItemData + * @property {string} action + * @property {string} batch_id + * @property {string} country + * @property {string} [error_file_path] + * @property {number} [failed] + * @property {Object[]} [failed_records] + * @property {string} file_path + * @property {string} region + * @property {string} status + * @property {number} [success] + * @property {number} [total] + */ + +/** + * @typedef BulkRegionServiceabilityTatRequest + * @property {string} country + * @property {string} region + * @property {string} type + */ + +/** + * @typedef BulkRegionServiceabilityTatResponse + * @property {BulkRegionServiceabilityTatResponseItemData[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef BulkRegionServiceabilityTatResponseItemData + * @property {string} [batch_id] + * @property {string} [country] + * @property {Object[]} [failed_records] + * @property {string} [file_path] + * @property {string} [region] + * @property {string} [status] + * @property {string} [type] + */ + +/** + * @typedef CompanyCourierPartnerAccountListResponse + * @property {CourierAccountResponse[]} items + * @property {Page} page + */ + +/** + * @typedef CourierAccount + * @property {string} account_id + * @property {string} extension_id + * @property {boolean} is_own_account + * @property {boolean} is_self_ship + * @property {string} scheme_id + * @property {string} stage + */ + +/** + * @typedef CourierAccountResponse + * @property {string} account_id + * @property {boolean} is_own_account + * @property {boolean} is_self_ship + * @property {string} scheme_id + * @property {CourierPartnerSchemeModel} scheme_rules + * @property {string} stage + */ + +/** + * @typedef CourierPartnerAccountFailureResponse + * @property {ErrorResponse[]} error + * @property {boolean} success + */ + +/** + * @typedef CourierPartnerSchemeFeatures + * @property {boolean} [cold_storage_goods] + * @property {boolean} [dangerous_goods] + * @property {boolean} [doorstep_exchange] + * @property {boolean} [doorstep_qc] + * @property {boolean} [doorstep_return] + * @property {boolean} [ewaybill] + * @property {boolean} [fragile_goods] + * @property {boolean} [mps] + * @property {boolean} [multi_pick_multi_drop] + * @property {boolean} [multi_pick_single_drop] + * @property {boolean} [ndr] + * @property {number} [ndr_attempts] + * @property {boolean} [openbox_delivery] + * @property {boolean} [product_installation] + * @property {boolean} [qr] + * @property {boolean} [restricted_goods] + * @property {boolean} [single_pick_multi_drop] + * @property {string} [status_updates] + */ + +/** + * @typedef CourierPartnerSchemeModel + * @property {string} delivery_type + * @property {string} extension_id + * @property {CourierPartnerSchemeFeatures} feature + * @property {string} name + * @property {string[]} payment_mode + * @property {string} region + * @property {string} scheme_id + * @property {string} stage + * @property {string} transport_type + * @property {ArithmeticOperations} weight + */ + +/** + * @typedef CourierPartnerSchemeUpdateRequest + * @property {string} delivery_type + * @property {CourierPartnerSchemeFeatures} feature + * @property {string} name + * @property {string[]} payment_mode + * @property {string} region + * @property {string} stage + * @property {string} transport_type + * @property {ArithmeticOperations} weight + */ + +/** + * @typedef ErrorResponse + * @property {string} message + * @property {string} type + * @property {string} value + */ + +/** + * @typedef FailureResponse + * @property {ErrorResponse[]} error + * @property {boolean} success + */ + +/** + * @typedef GetCountries + * @property {GetCountriesItems[]} items + * @property {Page} page + */ + +/** + * @typedef GetCountriesItems + * @property {string} [currency] + * @property {string} [display_name] + * @property {HierarchyItems[]} [hierarchy] + * @property {string} [id] + * @property {string} [iso2] + * @property {string} [iso3] + * @property {string} [latitude] + * @property {string} [longitude] + * @property {string} [name] + * @property {string} [phone_code] + * @property {string[]} [timezones] + * @property {string} [type] + */ + +/** + * @typedef HierarchyItems + * @property {string} [display_name] + * @property {string} [slug] + */ + +/** + * @typedef Page + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type + */ + +class LogisticsPartnerModel { + /** @returns {ArithmeticOperations} */ + static ArithmeticOperations() { + return Joi.object({ + gt: Joi.number(), + gte: Joi.number(), + lt: Joi.number(), + lte: Joi.number(), + }); + } + + /** @returns {BulkRegionJobSerializer} */ + static BulkRegionJobSerializer() { + return Joi.object({ + action: Joi.string().allow("").required(), + country: Joi.string().allow("").required(), + file_path: Joi.string().allow(""), + region: Joi.string().allow("").required(), + }); + } + + /** @returns {BulkRegionResponse} */ + static BulkRegionResponse() { + return Joi.object({ + items: Joi.array() + .items(LogisticsPartnerModel.BulkRegionResponseItemData()) + .required(), + page: LogisticsPartnerModel.Page().required(), + }); + } + + /** @returns {BulkRegionResponseItemData} */ + static BulkRegionResponseItemData() { + return Joi.object({ + action: Joi.string().allow("").required(), + batch_id: Joi.string().allow("").required(), + country: Joi.string().allow("").required(), + error_file_path: Joi.string().allow(""), + failed: Joi.number(), + failed_records: Joi.array().items(Joi.any()), + file_path: Joi.string().allow("").required(), + region: Joi.string().allow("").required(), + status: Joi.string().allow("").required(), + success: Joi.number(), + total: Joi.number(), + }); + } + + /** @returns {BulkRegionServiceabilityTatRequest} */ + static BulkRegionServiceabilityTatRequest() { + return Joi.object({ + country: Joi.string().allow("").required(), + region: Joi.string().allow("").required(), + type: Joi.string().allow("").required(), + }); + } + + /** @returns {BulkRegionServiceabilityTatResponse} */ + static BulkRegionServiceabilityTatResponse() { + return Joi.object({ + items: Joi.array().items( + LogisticsPartnerModel.BulkRegionServiceabilityTatResponseItemData() + ), + page: LogisticsPartnerModel.Page(), + }); + } + + /** @returns {BulkRegionServiceabilityTatResponseItemData} */ + static BulkRegionServiceabilityTatResponseItemData() { + return Joi.object({ + batch_id: Joi.string().allow(""), + country: Joi.string().allow(""), + failed_records: Joi.array().items(Joi.any()), + file_path: Joi.string().allow(""), + region: Joi.string().allow(""), + status: Joi.string().allow(""), + type: Joi.string().allow(""), + }); + } + + /** @returns {CompanyCourierPartnerAccountListResponse} */ + static CompanyCourierPartnerAccountListResponse() { + return Joi.object({ + items: Joi.array() + .items(LogisticsPartnerModel.CourierAccountResponse()) + .required(), + page: LogisticsPartnerModel.Page().required(), + }); + } + + /** @returns {CourierAccount} */ + static CourierAccount() { + return Joi.object({ + account_id: Joi.string().allow("").required(), + extension_id: Joi.string().allow("").required(), + is_own_account: Joi.boolean().required(), + is_self_ship: Joi.boolean().required(), + scheme_id: Joi.string().allow("").required(), + stage: Joi.string().allow("").required(), + }); + } + + /** @returns {CourierAccountResponse} */ + static CourierAccountResponse() { + return Joi.object({ + account_id: Joi.string().allow("").required(), + is_own_account: Joi.boolean().required(), + is_self_ship: Joi.boolean().required(), + scheme_id: Joi.string().allow("").required(), + scheme_rules: LogisticsPartnerModel.CourierPartnerSchemeModel().required(), + stage: Joi.string().allow("").required(), + }); + } + + /** @returns {CourierPartnerAccountFailureResponse} */ + static CourierPartnerAccountFailureResponse() { + return Joi.object({ + error: Joi.array() + .items(LogisticsPartnerModel.ErrorResponse()) + .required(), + success: Joi.boolean().required(), + }); + } + + /** @returns {CourierPartnerSchemeFeatures} */ + static CourierPartnerSchemeFeatures() { + return Joi.object({ + cold_storage_goods: Joi.boolean(), + dangerous_goods: Joi.boolean(), + doorstep_exchange: Joi.boolean(), + doorstep_qc: Joi.boolean(), + doorstep_return: Joi.boolean(), + ewaybill: Joi.boolean(), + fragile_goods: Joi.boolean(), + mps: Joi.boolean(), + multi_pick_multi_drop: Joi.boolean(), + multi_pick_single_drop: Joi.boolean(), + ndr: Joi.boolean(), + ndr_attempts: Joi.number(), + openbox_delivery: Joi.boolean(), + product_installation: Joi.boolean(), + qr: Joi.boolean(), + restricted_goods: Joi.boolean(), + single_pick_multi_drop: Joi.boolean(), + status_updates: Joi.string().allow(""), + }); + } + + /** @returns {CourierPartnerSchemeModel} */ + static CourierPartnerSchemeModel() { + return Joi.object({ + delivery_type: Joi.string().allow("").required(), + extension_id: Joi.string().allow("").required(), + feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(), + name: Joi.string().allow("").required(), + payment_mode: Joi.array().items(Joi.string().allow("")).required(), + region: Joi.string().allow("").required(), + scheme_id: Joi.string().allow("").required(), + stage: Joi.string().allow("").required(), + transport_type: Joi.string().allow("").required(), + weight: LogisticsPartnerModel.ArithmeticOperations().required(), + }); + } + + /** @returns {CourierPartnerSchemeUpdateRequest} */ + static CourierPartnerSchemeUpdateRequest() { + return Joi.object({ + delivery_type: Joi.string().allow("").required(), + feature: LogisticsPartnerModel.CourierPartnerSchemeFeatures().required(), + name: Joi.string().allow("").required(), + payment_mode: Joi.array().items(Joi.string().allow("")).required(), + region: Joi.string().allow("").required(), + stage: Joi.string().allow("").required(), + transport_type: Joi.string().allow("").required(), + weight: LogisticsPartnerModel.ArithmeticOperations().required(), + }); + } + + /** @returns {ErrorResponse} */ + static ErrorResponse() { + return Joi.object({ + message: Joi.string().allow("").required(), + type: Joi.string().allow("").required(), + value: Joi.string().allow("").required(), + }); + } + + /** @returns {FailureResponse} */ + static FailureResponse() { + return Joi.object({ + error: Joi.array() + .items(LogisticsPartnerModel.ErrorResponse()) + .required(), + success: Joi.boolean().required(), + }); + } + + /** @returns {GetCountries} */ + static GetCountries() { + return Joi.object({ + items: Joi.array() + .items(LogisticsPartnerModel.GetCountriesItems()) + .required(), + page: LogisticsPartnerModel.Page().required(), + }); + } + + /** @returns {GetCountriesItems} */ + static GetCountriesItems() { + return Joi.object({ + currency: Joi.string().allow(""), + display_name: Joi.string().allow(""), + hierarchy: Joi.array().items(LogisticsPartnerModel.HierarchyItems()), + id: Joi.string().allow(""), + iso2: Joi.string().allow(""), + iso3: Joi.string().allow(""), + latitude: Joi.string().allow(""), + longitude: Joi.string().allow(""), + name: Joi.string().allow(""), + phone_code: Joi.string().allow(""), + timezones: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + }); + } + + /** @returns {HierarchyItems} */ + static HierarchyItems() { + return Joi.object({ + display_name: Joi.string().allow(""), + slug: Joi.string().allow(""), + }); + } + + /** @returns {Page} */ + static Page() { + return Joi.object({ + current: Joi.number(), + has_next: Joi.boolean(), + has_previous: Joi.boolean(), + item_total: Joi.number(), + next_id: Joi.string().allow(""), + size: Joi.number(), + type: Joi.string().allow("").required(), + }); + } +} +module.exports = LogisticsPartnerModel; diff --git a/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts b/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts new file mode 100644 index 000000000..13d7911fb --- /dev/null +++ b/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts @@ -0,0 +1,16 @@ +export = LogisticsValidator; +declare class LogisticsValidator { + static sampleFileServiceability(): any; + static getSampleFileServiceabilityStatus(): any; + static bulkTat(): any; + static getBulkTat(): any; + static bulkServiceability(): any; + static getBulkServiceability(): any; + static createCourierPartnerAccount(): any; + static getCourierPartnerAccounts(): any; + static updateCourierPartnerAccount(): any; + static getCourierPartnerAccount(): any; + static createCourierPartnerScheme(): any; + static updateCourierPartnerScheme(): any; + static getCountries(): any; +} diff --git a/sdk/partner/Logistics/LogisticsPartnerValidator.js b/sdk/partner/Logistics/LogisticsPartnerValidator.js new file mode 100644 index 000000000..b4d8b4975 --- /dev/null +++ b/sdk/partner/Logistics/LogisticsPartnerValidator.js @@ -0,0 +1,123 @@ +const Joi = require("joi"); + +const LogisticsModel = require("./LogisticsPartnerModel"); +class LogisticsValidator { + static sampleFileServiceability() { + return Joi.object({ + body: LogisticsModel.BulkRegionServiceabilityTatRequest().required(), + }).required(); + } + + static getSampleFileServiceabilityStatus() { + return Joi.object({ + pageNo: Joi.number(), + pageSize: Joi.number(), + batchId: Joi.string().allow(""), + }).required(); + } + + static bulkTat() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + body: LogisticsModel.BulkRegionJobSerializer().required(), + }).required(); + } + + static getBulkTat() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + pageNo: Joi.number(), + pageSize: Joi.number(), + batchId: Joi.string().allow(""), + action: Joi.string().allow(""), + status: Joi.string().allow(""), + country: Joi.string().allow(""), + region: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), + }).required(); + } + + static bulkServiceability() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + body: LogisticsModel.BulkRegionJobSerializer().required(), + }).required(); + } + + static getBulkServiceability() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + pageNo: Joi.number(), + pageSize: Joi.number(), + batchId: Joi.string().allow(""), + action: Joi.string().allow(""), + status: Joi.string().allow(""), + country: Joi.string().allow(""), + region: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), + }).required(); + } + + static createCourierPartnerAccount() { + return Joi.object({ + companyId: Joi.number().required(), + body: LogisticsModel.CourierAccount().required(), + }).required(); + } + + static getCourierPartnerAccounts() { + return Joi.object({ + companyId: Joi.number().required(), + pageNo: Joi.number(), + pageSize: Joi.number(), + stage: Joi.string().allow(""), + paymentMode: Joi.string().allow(""), + transportType: Joi.string().allow(""), + }).required(); + } + + static updateCourierPartnerAccount() { + return Joi.object({ + companyId: Joi.number().required(), + accountId: Joi.string().allow("").required(), + body: LogisticsModel.CourierAccount().required(), + }).required(); + } + + static getCourierPartnerAccount() { + return Joi.object({ + companyId: Joi.number().required(), + accountId: Joi.string().allow("").required(), + }).required(); + } + + static createCourierPartnerScheme() { + return Joi.object({ + body: LogisticsModel.CourierPartnerSchemeModel().required(), + }).required(); + } + + static updateCourierPartnerScheme() { + return Joi.object({ + schemeId: Joi.string().allow("").required(), + body: LogisticsModel.CourierPartnerSchemeUpdateRequest().required(), + }).required(); + } + + static getCountries() { + return Joi.object({ + onboarding: Joi.boolean(), + pageNo: Joi.number(), + pageSize: Joi.number(), + q: Joi.string().allow(""), + }).required(); + } +} + +module.exports = LogisticsValidator; diff --git a/sdk/partner/PartnerClient.d.ts b/sdk/partner/PartnerClient.d.ts index a69d282e5..311ac97b1 100644 --- a/sdk/partner/PartnerClient.d.ts +++ b/sdk/partner/PartnerClient.d.ts @@ -14,7 +14,10 @@ declare class PartnerClient { constructor(config: import("./PartnerConfig")); config: import("./PartnerConfig"); fileStorage: FileStorage; + lead: Lead; + logistics: Logistics; theme: Theme; + webhook: Webhook; /** * Sets the extra headers for the partner client. * @@ -24,4 +27,7 @@ declare class PartnerClient { setExtraHeaders(header: object): void; } import FileStorage = require("./FileStorage/FileStoragePartnerClient"); +import Lead = require("./Lead/LeadPartnerClient"); +import Logistics = require("./Logistics/LogisticsPartnerClient"); import Theme = require("./Theme/ThemePartnerClient"); +import Webhook = require("./Webhook/WebhookPartnerClient"); diff --git a/sdk/partner/PartnerClient.js b/sdk/partner/PartnerClient.js index b13b2a976..4e92ef5d2 100644 --- a/sdk/partner/PartnerClient.js +++ b/sdk/partner/PartnerClient.js @@ -1,7 +1,13 @@ const FileStorage = require("./FileStorage/FileStoragePartnerClient"); +const Lead = require("./Lead/LeadPartnerClient"); + +const Logistics = require("./Logistics/LogisticsPartnerClient"); + const Theme = require("./Theme/ThemePartnerClient"); +const Webhook = require("./Webhook/WebhookPartnerClient"); + const { FDKClientValidationError } = require("../common/FDKError"); /** @@ -19,7 +25,10 @@ class PartnerClient { constructor(config) { this.config = config; this.fileStorage = new FileStorage(config); + this.lead = new Lead(config); + this.logistics = new Logistics(config); this.theme = new Theme(config); + this.webhook = new Webhook(config); } /** diff --git a/sdk/partner/Theme/ThemePartnerClient.d.ts b/sdk/partner/Theme/ThemePartnerClient.d.ts index d7129667d..a32791d0c 100644 --- a/sdk/partner/Theme/ThemePartnerClient.d.ts +++ b/sdk/partner/Theme/ThemePartnerClient.d.ts @@ -192,5 +192,15 @@ declare class Theme { * @description: Retrieve a list of theme versions for a specific theme in an organization. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/getThemeVersions/). */ getThemeVersions({ themeSlug, pageSize, pageNo, requestHeaders }?: ThemePartnerValidator.GetThemeVersionsParam, { responseHeaders }?: object): Promise; + /** + * @param {ThemePartnerValidator.CreateThemeParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createTheme + * @summary: Create a new theme + * @description: Themes improve the look and appearance of a website. Use this API to create a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/createTheme/). + */ + createTheme({ companyId, applicationId, body, requestHeaders }?: ThemePartnerValidator.CreateThemeParam, { responseHeaders }?: object): Promise; } import ThemePartnerModel = require("./ThemePartnerModel"); diff --git a/sdk/partner/Theme/ThemePartnerClient.js b/sdk/partner/Theme/ThemePartnerClient.js index 2beb8a49b..13cc6400a 100644 --- a/sdk/partner/Theme/ThemePartnerClient.js +++ b/sdk/partner/Theme/ThemePartnerClient.js @@ -1529,5 +1529,85 @@ class Theme { return response; } + + /** + * @param {ThemePartnerValidator.CreateThemeParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createTheme + * @summary: Create a new theme + * @description: Themes improve the look and appearance of a website. Use this API to create a theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/partner/theme/createTheme/). + */ + async createTheme( + { companyId, applicationId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ThemePartnerValidator.createTheme().validate( + { + companyId, + applicationId, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = ThemePartnerValidator.createTheme().validate( + { + companyId, + applicationId, + + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Theme > createTheme \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/theme/v1.0/organization/${this.config.organizationId}/company/${companyId}/application/${applicationId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ThemePartnerModel.ThemesSchema().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 > Theme > createTheme \n ${res_error}`, + }); + } + } + + return response; + } } module.exports = Theme; diff --git a/sdk/partner/Theme/ThemePartnerModel.d.ts b/sdk/partner/Theme/ThemePartnerModel.d.ts index 3d6a168ca..92e07dde4 100644 --- a/sdk/partner/Theme/ThemePartnerModel.d.ts +++ b/sdk/partner/Theme/ThemePartnerModel.d.ts @@ -145,6 +145,18 @@ export = ThemePartnerModel; * @property {string[]} [developer_contact] - Developer contact information * @property {string} [seller_contact] - Seller contact information */ +/** + * @typedef CreateNewTheme + * @property {SectionItem[]} available_sections - Available sections information + * @property {string} [current] - The current configuration + * @property {GlobalSchema} [global_schema] + * @property {ThemeConfiguration[]} [list] - A list of configurations + * @property {string} name - The name of the theme + * @property {Page[]} [pages] + * @property {Preset} [preset] + * @property {string} theme_type - Type of the Theme + * @property {string} version - The version of the theme + */ /** * @typedef CSS * @property {string[]} [links] @@ -324,16 +336,6 @@ export = ThemePartnerModel; * @property {PaginationSchema} [page] * @property {MarketplaceTheme[]} [themes] */ -/** - * @typedef Meta - * @property {string} [description] - The description of the theme - * @property {Images} [images] - * @property {string[]} [industry] - An array of industries associated with the theme - * @property {string} [name] - The name of the theme - * @property {ThemePayment} [payment] - * @property {Release} [release] - * @property {string} [slug] - The slug of the theme - */ /** * @typedef OverlayPopupSetting * @property {string} [dialog_backgroung] - The dialog background color @@ -341,8 +343,13 @@ export = ThemePartnerModel; */ /** * @typedef Page - * @property {Section[]} [sections] - * @property {string} [value] - The value of the page. + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type */ /** * @typedef PaginationSchema @@ -462,6 +469,16 @@ export = ThemePartnerModel; * @property {string} [name] - The name of the configuration * @property {string[]} [page] - An array of pages */ +/** + * @typedef ThemeMeta + * @property {string} [description] - The description of the theme + * @property {Images} [images] + * @property {string[]} [industry] - An array of industries associated with the theme + * @property {string} [name] - The name of the theme + * @property {ThemePayment} [payment] + * @property {Release} [release] + * @property {string} [slug] - The slug of the theme + */ /** * @typedef ThemePayment * @property {number} [amount] - The amount of the theme @@ -494,16 +511,18 @@ export = ThemePartnerModel; * @property {boolean} [applied] - Whether the theme has been applied or not * @property {Assets} [assets] * @property {SectionItem[]} [available_sections] - Available sections information + * @property {number} [company_id] - The company id in which sales channel exists * @property {Config} [config] * @property {string} [created_at] - The creation timestamp of the theme * @property {Font} [font] * @property {boolean} [is_private] - Whether the theme is private or not * @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace - * @property {Meta} [meta] + * @property {ThemeMeta} [meta] * @property {string} [name] - The name of the theme * @property {Object} [styles] - The styles associated with the theme * @property {string[]} [tags] - An array of tags associated with the theme * @property {string} [template_theme_id] - The ID of the template theme + * @property {string} [theme_type] * @property {string} [updated_at] - The last update timestamp of the theme * @property {string} [version] - The version of the theme */ @@ -545,7 +564,7 @@ export = ThemePartnerModel; declare class ThemePartnerModel { } declare namespace ThemePartnerModel { - export { AdvanceSetting, AllAvailablePageSchema, Assets, AuthConfig, AvailablePagePredicate, AvailablePageRoutePredicate, AvailablePageSchema, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageSectionMetaAttributes, AvailablePageSeo, AvailablePageUserPredicate, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, Block, BlockProps, ButtonSetting, CarouselItem, CatalogSize, CheckboxProp, Colors, Comments, CommonJS, Config, ContactInfo, CSS, CustomConfig, CustomProps, DividerStrokeHighlightSetting, Documentation, ExploreInfo, Feature, FeatureItem, Font, FontVariant, FontVariants, FooterSetting, GeneralSetting, GlobalConfig, GlobalSchema, HeaderSetting, Highlight, ImagePickerProp, Images, MarketplaceTheme, MarketplaceThemeImages, MarketplaceThemeSchema, Meta, OverlayPopupSetting, Page, PaginationSchema, PaletteConfig, PaymentInfo, Predicate, Preset, Prop, RangeProp, Release, Route, SaleDiscountSetting, Screen, Section, SectionItem, SectionPreset, SectionProps, StaticConfig, StaticProps, TextProp, TextSetting, ThemeConfiguration, ThemePayment, ThemeRejectionReasons, ThemeSetting, ThemesSchema, ThemeUserSchema, UMDJs, UpdateThemeRequestBody, UrlProp, UserAlertsSetting, Variation }; + export { AdvanceSetting, AllAvailablePageSchema, Assets, AuthConfig, AvailablePagePredicate, AvailablePageRoutePredicate, AvailablePageSchema, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageSectionMetaAttributes, AvailablePageSeo, AvailablePageUserPredicate, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, Block, BlockProps, ButtonSetting, CarouselItem, CatalogSize, CheckboxProp, Colors, Comments, CommonJS, Config, ContactInfo, CreateNewTheme, CSS, CustomConfig, CustomProps, DividerStrokeHighlightSetting, Documentation, ExploreInfo, Feature, FeatureItem, Font, FontVariant, FontVariants, FooterSetting, GeneralSetting, GlobalConfig, GlobalSchema, HeaderSetting, Highlight, ImagePickerProp, Images, MarketplaceTheme, MarketplaceThemeImages, MarketplaceThemeSchema, OverlayPopupSetting, Page, PaginationSchema, PaletteConfig, PaymentInfo, Predicate, Preset, Prop, RangeProp, Release, Route, SaleDiscountSetting, Screen, Section, SectionItem, SectionPreset, SectionProps, StaticConfig, StaticProps, TextProp, TextSetting, ThemeConfiguration, ThemeMeta, ThemePayment, ThemeRejectionReasons, ThemeSetting, ThemesSchema, ThemeUserSchema, UMDJs, UpdateThemeRequestBody, UrlProp, UserAlertsSetting, Variation }; } /** @returns {AdvanceSetting} */ declare function AdvanceSetting(): AdvanceSetting; @@ -793,6 +812,37 @@ type ContactInfo = { */ seller_contact?: string; }; +/** @returns {CreateNewTheme} */ +declare function CreateNewTheme(): CreateNewTheme; +type CreateNewTheme = { + /** + * - Available sections information + */ + available_sections: SectionItem[]; + /** + * - The current configuration + */ + current?: string; + global_schema?: GlobalSchema; + /** + * - A list of configurations + */ + list?: ThemeConfiguration[]; + /** + * - The name of the theme + */ + name: string; + pages?: Page[]; + preset?: Preset; + /** + * - Type of the Theme + */ + theme_type: string; + /** + * - The version of the theme + */ + version: string; +}; /** @returns {CSS} */ declare function CSS(): CSS; type CSS = { @@ -1219,29 +1269,6 @@ type MarketplaceThemeSchema = { page?: PaginationSchema; themes?: MarketplaceTheme[]; }; -/** @returns {Meta} */ -declare function Meta(): Meta; -type Meta = { - /** - * - The description of the theme - */ - description?: string; - images?: Images; - /** - * - An array of industries associated with the theme - */ - industry?: string[]; - /** - * - The name of the theme - */ - name?: string; - payment?: ThemePayment; - release?: Release; - /** - * - The slug of the theme - */ - slug?: string; -}; /** @returns {OverlayPopupSetting} */ declare function OverlayPopupSetting(): OverlayPopupSetting; type OverlayPopupSetting = { @@ -1257,11 +1284,13 @@ type OverlayPopupSetting = { /** @returns {Page} */ declare function Page(): Page; type Page = { - sections?: Section[]; - /** - * - The value of the page. - */ - value?: string; + current?: number; + has_next?: boolean; + has_previous?: boolean; + item_total?: number; + next_id?: string; + size?: number; + type: string; }; /** @returns {PaginationSchema} */ declare function PaginationSchema(): PaginationSchema; @@ -1497,6 +1526,29 @@ type ThemeConfiguration = { */ page?: string[]; }; +/** @returns {ThemeMeta} */ +declare function ThemeMeta(): ThemeMeta; +type ThemeMeta = { + /** + * - The description of the theme + */ + description?: string; + images?: Images; + /** + * - An array of industries associated with the theme + */ + industry?: string[]; + /** + * - The name of the theme + */ + name?: string; + payment?: ThemePayment; + release?: Release; + /** + * - The slug of the theme + */ + slug?: string; +}; /** @returns {ThemePayment} */ declare function ThemePayment(): ThemePayment; type ThemePayment = { @@ -1584,6 +1636,10 @@ type ThemesSchema = { * - Available sections information */ available_sections?: SectionItem[]; + /** + * - The company id in which sales channel exists + */ + company_id?: number; config?: Config; /** * - The creation timestamp of the theme @@ -1598,7 +1654,7 @@ type ThemesSchema = { * - The ID of the theme in the marketplace */ marketplace_theme_id?: string; - meta?: Meta; + meta?: ThemeMeta; /** * - The name of the theme */ @@ -1615,6 +1671,7 @@ type ThemesSchema = { * - The ID of the template theme */ template_theme_id?: string; + theme_type?: string; /** * - The last update timestamp of the theme */ diff --git a/sdk/partner/Theme/ThemePartnerModel.js b/sdk/partner/Theme/ThemePartnerModel.js index 5e656ec86..0d885c12b 100644 --- a/sdk/partner/Theme/ThemePartnerModel.js +++ b/sdk/partner/Theme/ThemePartnerModel.js @@ -171,6 +171,19 @@ const Joi = require("joi"); * @property {string} [seller_contact] - Seller contact information */ +/** + * @typedef CreateNewTheme + * @property {SectionItem[]} available_sections - Available sections information + * @property {string} [current] - The current configuration + * @property {GlobalSchema} [global_schema] + * @property {ThemeConfiguration[]} [list] - A list of configurations + * @property {string} name - The name of the theme + * @property {Page[]} [pages] + * @property {Preset} [preset] + * @property {string} theme_type - Type of the Theme + * @property {string} version - The version of the theme + */ + /** * @typedef CSS * @property {string[]} [links] @@ -372,17 +385,6 @@ const Joi = require("joi"); * @property {MarketplaceTheme[]} [themes] */ -/** - * @typedef Meta - * @property {string} [description] - The description of the theme - * @property {Images} [images] - * @property {string[]} [industry] - An array of industries associated with the theme - * @property {string} [name] - The name of the theme - * @property {ThemePayment} [payment] - * @property {Release} [release] - * @property {string} [slug] - The slug of the theme - */ - /** * @typedef OverlayPopupSetting * @property {string} [dialog_backgroung] - The dialog background color @@ -391,8 +393,13 @@ const Joi = require("joi"); /** * @typedef Page - * @property {Section[]} [sections] - * @property {string} [value] - The value of the page. + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type */ /** @@ -533,6 +540,17 @@ const Joi = require("joi"); * @property {string[]} [page] - An array of pages */ +/** + * @typedef ThemeMeta + * @property {string} [description] - The description of the theme + * @property {Images} [images] + * @property {string[]} [industry] - An array of industries associated with the theme + * @property {string} [name] - The name of the theme + * @property {ThemePayment} [payment] + * @property {Release} [release] + * @property {string} [slug] - The slug of the theme + */ + /** * @typedef ThemePayment * @property {number} [amount] - The amount of the theme @@ -568,16 +586,18 @@ const Joi = require("joi"); * @property {boolean} [applied] - Whether the theme has been applied or not * @property {Assets} [assets] * @property {SectionItem[]} [available_sections] - Available sections information + * @property {number} [company_id] - The company id in which sales channel exists * @property {Config} [config] * @property {string} [created_at] - The creation timestamp of the theme * @property {Font} [font] * @property {boolean} [is_private] - Whether the theme is private or not * @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace - * @property {Meta} [meta] + * @property {ThemeMeta} [meta] * @property {string} [name] - The name of the theme * @property {Object} [styles] - The styles associated with the theme * @property {string[]} [tags] - An array of tags associated with the theme * @property {string} [template_theme_id] - The ID of the template theme + * @property {string} [theme_type] * @property {string} [updated_at] - The last update timestamp of the theme * @property {string} [version] - The version of the theme */ @@ -851,6 +871,23 @@ class ThemePartnerModel { }); } + /** @returns {CreateNewTheme} */ + static CreateNewTheme() { + return Joi.object({ + available_sections: Joi.array() + .items(ThemePartnerModel.SectionItem()) + .required(), + current: Joi.string().allow(""), + global_schema: ThemePartnerModel.GlobalSchema(), + list: Joi.array().items(ThemePartnerModel.ThemeConfiguration()), + name: Joi.string().allow("").required(), + pages: Joi.array().items(ThemePartnerModel.Page()), + preset: ThemePartnerModel.Preset(), + theme_type: Joi.string().allow("").required(), + version: Joi.string().allow("").required(), + }); + } + /** @returns {CSS} */ static CSS() { return Joi.object({ @@ -1091,19 +1128,6 @@ class ThemePartnerModel { }); } - /** @returns {Meta} */ - static Meta() { - return Joi.object({ - description: Joi.string().allow(""), - images: ThemePartnerModel.Images(), - industry: Joi.array().items(Joi.string().allow("")), - name: Joi.string().allow(""), - payment: ThemePartnerModel.ThemePayment(), - release: ThemePartnerModel.Release(), - slug: Joi.string().allow(""), - }); - } - /** @returns {OverlayPopupSetting} */ static OverlayPopupSetting() { return Joi.object({ @@ -1115,8 +1139,13 @@ class ThemePartnerModel { /** @returns {Page} */ static Page() { return Joi.object({ - sections: Joi.array().items(ThemePartnerModel.Section()), - value: Joi.string().allow(""), + current: Joi.number(), + has_next: Joi.boolean(), + has_previous: Joi.boolean(), + item_total: Joi.number(), + next_id: Joi.string().allow(""), + size: Joi.number(), + type: Joi.string().allow("").required(), }); } @@ -1298,6 +1327,19 @@ class ThemePartnerModel { }); } + /** @returns {ThemeMeta} */ + static ThemeMeta() { + return Joi.object({ + description: Joi.string().allow(""), + images: ThemePartnerModel.Images(), + industry: Joi.array().items(Joi.string().allow("")), + name: Joi.string().allow(""), + payment: ThemePartnerModel.ThemePayment(), + release: ThemePartnerModel.Release(), + slug: Joi.string().allow(""), + }); + } + /** @returns {ThemePayment} */ static ThemePayment() { return Joi.object({ @@ -1338,16 +1380,18 @@ class ThemePartnerModel { applied: Joi.boolean(), assets: ThemePartnerModel.Assets(), available_sections: Joi.array().items(ThemePartnerModel.SectionItem()), + company_id: Joi.number(), config: ThemePartnerModel.Config(), created_at: Joi.string().allow(""), font: ThemePartnerModel.Font(), is_private: Joi.boolean(), marketplace_theme_id: Joi.string().allow(""), - meta: ThemePartnerModel.Meta(), + meta: ThemePartnerModel.ThemeMeta(), name: Joi.string().allow(""), styles: Joi.any(), tags: Joi.array().items(Joi.string().allow("")), template_theme_id: Joi.string().allow(""), + theme_type: Joi.string().allow(""), updated_at: Joi.string().allow(""), version: Joi.string().allow(""), }); diff --git a/sdk/partner/Theme/ThemePartnerValidator.d.ts b/sdk/partner/Theme/ThemePartnerValidator.d.ts index b25ecfee7..347b5cb97 100644 --- a/sdk/partner/Theme/ThemePartnerValidator.d.ts +++ b/sdk/partner/Theme/ThemePartnerValidator.d.ts @@ -19,4 +19,5 @@ declare class ThemeValidator { static createNewThemeInOrganization(): any; static getThemeRejectionReasons(): any; static getThemeVersions(): any; + static createTheme(): any; } diff --git a/sdk/partner/Theme/ThemePartnerValidator.js b/sdk/partner/Theme/ThemePartnerValidator.js index 187ea392c..e02c599d2 100644 --- a/sdk/partner/Theme/ThemePartnerValidator.js +++ b/sdk/partner/Theme/ThemePartnerValidator.js @@ -152,6 +152,15 @@ class ThemeValidator { pageNo: Joi.number(), }).required(); } + + static createTheme() { + return Joi.object({ + companyId: Joi.number().required(), + applicationId: Joi.string().allow("").required(), + + body: ThemeModel.CreateNewTheme().required(), + }).required(); + } } module.exports = ThemeValidator; diff --git a/sdk/partner/Webhook/WebhookPartnerClient.d.ts b/sdk/partner/Webhook/WebhookPartnerClient.d.ts new file mode 100644 index 000000000..f28d42eb1 --- /dev/null +++ b/sdk/partner/Webhook/WebhookPartnerClient.d.ts @@ -0,0 +1,99 @@ +export = Webhook; +declare class Webhook { + constructor(config: any); + config: any; + /** + * @param {WebhookPartnerValidator.FetchDeliverySummaryParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {WebhookPartnerValidator.GetDeliveryDetailInsightsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {WebhookPartnerValidator.FetchDeliveryTsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {WebhookPartnerValidator.FetchReportFiltersParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {WebhookPartnerValidator.CancelReportDownloadParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {WebhookPartnerValidator.GetHistoricalReportsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {WebhookPartnerValidator.GetInvalidEventListParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {WebhookPartnerValidator.FetchSubscribersParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; + /** + * @param {WebhookPartnerValidator.UpdateSubscriberParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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; +} +import WebhookPartnerModel = require("./WebhookPartnerModel"); diff --git a/sdk/partner/Webhook/WebhookPartnerClient.js b/sdk/partner/Webhook/WebhookPartnerClient.js new file mode 100644 index 000000000..27b49c289 --- /dev/null +++ b/sdk/partner/Webhook/WebhookPartnerClient.js @@ -0,0 +1,753 @@ +const PartnerAPIClient = require("../PartnerAPIClient"); +const { + FDKClientValidationError, + FDKResponseValidationError, +} = require("../../common/FDKError"); +const Paginator = require("../../common/Paginator"); +const WebhookPartnerValidator = require("./WebhookPartnerValidator"); +const WebhookPartnerModel = require("./WebhookPartnerModel"); +const { Logger } = require("./../../common/Logger"); +const Joi = require("joi"); + +class Webhook { + constructor(config) { + this.config = config; + } + + /** + * @param {WebhookPartnerValidator.FetchDeliverySummaryParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async fetchDeliverySummary( + { extensionId, startDate, endDate, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPartnerValidator.fetchDeliverySummary().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.fetchDeliverySummary().validate( + { + extensionId, + startDate, + endDate, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Webhook > fetchDeliverySummary \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/delivery_summary`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPartnerModel.DeliverySummaryResponse().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 > fetchDeliverySummary \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPartnerValidator.GetDeliveryDetailInsightsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async getDeliveryDetailInsights( + { extensionId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = WebhookPartnerValidator.getDeliveryDetailInsights().validate( + { + extensionId, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPartnerValidator.getDeliveryDetailInsights().validate( + { + extensionId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Webhook > getDeliveryDetailInsights \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/webhook/v1.0/organization/${this.config.organizationId}/extension/${extensionId}/report/delivery_details`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPartnerModel.DeliveryDetailsResponse().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 > getDeliveryDetailInsights \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPartnerValidator.FetchDeliveryTsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async fetchDeliveryTs( + { extensionId, startDate, endDate, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPartnerValidator.fetchDeliveryTs().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.fetchDeliveryTs().validate( + { + extensionId, + startDate, + endDate, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Webhook > fetchDeliveryTs \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/delivery_ts`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPartnerModel.DeliveryTsResponse().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 > fetchDeliveryTs \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPartnerValidator.FetchReportFiltersParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async fetchReportFilters( + { extensionId, startDate, endDate, pageNo, pageSize, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPartnerValidator.fetchReportFilters().validate( + { + extensionId, + startDate, + endDate, + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPartnerValidator.fetchReportFilters().validate( + { + extensionId, + startDate, + endDate, + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Webhook > fetchReportFilters \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/webhook/v1.0/organization/${this.config.organizationId}/extension/${extensionId}/report/filters`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { error: res_error } = Joi.array() + .items(WebhookPartnerModel.FilterReportResponse()) + .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 > fetchReportFilters \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPartnerValidator.CancelReportDownloadParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async cancelReportDownload( + { extensionId, filename, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPartnerValidator.cancelReportDownload().validate( + { + extensionId, + filename, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPartnerValidator.cancelReportDownload().validate( + { + extensionId, + filename, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Webhook > cancelReportDownload \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/webhook/v1.0/organization/${this.config.organizationId}/extension/${extensionId}/reports/cancel/file/${filename}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPartnerModel.CancelDownloadResponse().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 > cancelReportDownload \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPartnerValidator.GetHistoricalReportsParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async getHistoricalReports( + { extensionId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPartnerValidator.getHistoricalReports().validate( + { + extensionId, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPartnerValidator.getHistoricalReports().validate( + { + extensionId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Webhook > getHistoricalReports \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/webhook/v1.0/organization/${this.config.organizationId}/extension/${extensionId}/report/history`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPartnerModel.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 partner > Webhook > getHistoricalReports \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPartnerValidator.GetInvalidEventListParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async getInvalidEventList( + { extensionId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPartnerValidator.getInvalidEventList().validate( + { + extensionId, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPartnerValidator.getInvalidEventList().validate( + { + extensionId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Webhook > getInvalidEventList \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "post", + `/service/partner/webhook/v1.0/organization/${this.config.organizationId}/extension/${extensionId}/report/invalid_events`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { error: res_error } = Joi.array() + .items(WebhookPartnerModel.InvalidEventsResponse()) + .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 > getInvalidEventList \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPartnerValidator.FetchSubscribersParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async fetchSubscribers( + { extensionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPartnerValidator.fetchSubscribers().validate( + { + extensionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPartnerValidator.fetchSubscribers().validate( + { + extensionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Webhook > fetchSubscribers \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "get", + `/service/partner/webhook/v1.0/organization/${this.config.organizationId}/extension/${extensionId}/subscriber/`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPartnerModel.SubscriberConfigResponse().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 > fetchSubscribers \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPartnerValidator.UpdateSubscriberParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PartnerAPIClient").Options} - Options + * @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/). + */ + async updateSubscriber( + { extensionId, subscriberId, body, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPartnerValidator.updateSubscriber().validate( + { + extensionId, + subscriberId, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPartnerValidator.updateSubscriber().validate( + { + extensionId, + subscriberId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for partner > Webhook > updateSubscriber \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PartnerAPIClient.execute( + this.config, + "patch", + `/service/partner/webhook/v1.0/organization/${this.config.organizationId}/extension/${extensionId}/subscriber/${subscriberId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPartnerModel.UpdateSubscriberResponse().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 > updateSubscriber \n ${res_error}`, + }); + } + } + + return response; + } +} +module.exports = Webhook; diff --git a/sdk/partner/Webhook/WebhookPartnerModel.d.ts b/sdk/partner/Webhook/WebhookPartnerModel.d.ts new file mode 100644 index 000000000..9977e8d44 --- /dev/null +++ b/sdk/partner/Webhook/WebhookPartnerModel.d.ts @@ -0,0 +1,566 @@ +export = WebhookPartnerModel; +/** + * @typedef Association + * @property {string[]} [application_id] + * @property {number} [company_id] + * @property {string} [criteria] + * @property {string} [extension_id] + */ +/** + * @typedef AuthMeta + * @property {string} [secret] + * @property {string} [type] + */ +/** + * @typedef CancelDownloadResponse + * @property {string} [message] + * @property {string} [result] + */ +/** + * @typedef CdnObject + * @property {Url[]} [urls] + */ +/** + * @typedef DeliveryDetailsRequest + * @property {string} [company_id] + * @property {string} [end_date] + * @property {EventDeliveryDetailSchema[]} [event] + * @property {number} [page_no] + * @property {number} [page_size] + * @property {string} [start_date] + * @property {string} [status] + */ +/** + * @typedef DeliveryDetailsResponse + * @property {Page} [page] + * @property {EventProcessReportObject[]} [rows] + */ +/** + * @typedef DeliveryEventLevelSchema + * @property {string} [event] + * @property {number} [failed] + * @property {number} [failed_percentage] + * @property {number} [removed_webhooks] + * @property {number} [response_time] + * @property {number} [success] + * @property {number} [total] + */ +/** + * @typedef DeliverySummaryResponse + * @property {DeliveryEventLevelSchema[]} [delivery_event_level] + * @property {DeliverySummarySchema} [delivery_summary] + */ +/** + * @typedef DeliverySummarySchema + * @property {number} [failed_percentage] + * @property {number} [removed_webhooks] + * @property {number} [response_time] + * @property {number} [success] + */ +/** + * @typedef DeliveryTsResponse + * @property {DeliveryTsSchema[]} [delivery_ts] + */ +/** + * @typedef DeliveryTsSchema + * @property {number} [failed] + * @property {number} [removed_webhooks] + * @property {number} [success] + * @property {string} [timestamp] + */ +/** + * @typedef DownloadReponse + * @property {string} [file_name] + */ +/** + * @typedef EventConfigResponse + * @property {string} [created_on] + * @property {string} [description] + * @property {string} [display_name] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {Object} [event_schema] + * @property {string} [event_type] + * @property {number} [id] + * @property {SubscriberEventMapping} [subscriber_event_mapping] + * @property {string} [updated_on] + * @property {string} [version] + */ +/** + * @typedef EventDeliveryDetailSchema + * @property {string} [event_category] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [version] + */ +/** + * @typedef EventProcessReportObject + * @property {number} [attempt] - The attempt number of the event. + * @property {Object} [data] - The data associated with the event. + * @property {string} [event_name] - The name of the processed event. + * @property {string} [event_trace_id] + * @property {number} [last_attempted_on] - The timestamp of the last attempted event. + * @property {string} [message_id] + * @property {string} [name] - The name of the event. + * @property {number} [response_code] - The response code of the event. + * @property {string} [response_message] - The response message of the event. + * @property {number} [response_time] - The response time of the event. + * @property {string} [status] - The status of the event (e.g., "FAILED"). + * @property {string} [webhook_url] - The webhook URL associated with the event. + */ +/** + * @typedef FilterReportResponse + * @property {string} [filter_name] + * @property {Object[]} [values] + */ +/** + * @typedef HistoryAssociation + * @property {number} [company_id] + * @property {number[]} [subscriber_ids] + */ +/** + * @typedef HistoryFilters + * @property {string} [end_date] - The end date and time of the history report. + * @property {string[]} [events] + * @property {string} [search_text] + * @property {string} [start_date] - The start date and time of the history report. + * @property {string} [status] - The status of the history report (e.g., "FAILED"). + * @property {number[]} [subscribers] - An array of subscriber IDs associated + * with the history report. + */ +/** + * @typedef HistoryItems + * @property {HistoryAssociation} [association] + * @property {string} [created_on] - The date and time when the history report + * was created. + * @property {string} [filename] - The filename of the history report. + * @property {HistoryFilters} [filters] + * @property {number} [id] - The ID of the history report. + * @property {string} [message] - A message related to the history report. + * @property {string} [status] - The status of the history report (e.g., "COMPLETED"). + * @property {string} [updated_on] - The date and time when the history report + * was last updated. + * @property {UploadServiceObject} [upload_service_response] + */ +/** + * @typedef HistoryPayload + * @property {number} [company_id] + * @property {number} [page_no] - The page number of the history report. + * @property {number} [page_size] - The number of records per page. + * @property {string} [type] - The type of history report (e.g., "platform"). + */ +/** + * @typedef HistoryResponse + * @property {HistoryItems[]} [items] + * @property {Page} [page] + */ +/** + * @typedef InvalidEventsRequest + * @property {string} [category] + * @property {string} [end_date] + * @property {string} [event_name] + * @property {string} [start_date] + * @property {string} [version] + */ +/** + * @typedef InvalidEventsResponse + * @property {string} [category] + * @property {number} [count] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [version] + */ +/** + * @typedef ItemSchema + * @property {Association} [association] + * @property {AuthMeta} [auth_meta] + * @property {string} [created_on] + * @property {Object} [custom_headers] + * @property {string} [email_id] + * @property {EventConfigResponse[]} [event_configs] + * @property {number[]} [event_id] + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [status] + * @property {string} [type] + * @property {string} [updated_on] + * @property {string} [webhook_url] + */ +/** + * @typedef Page + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type + */ +/** + * @typedef SubscriberConfigResponse + * @property {ItemSchema[]} [items] + * @property {Page} [page] + */ +/** + * @typedef SubscriberEventMapping + * @property {string} [created_on] + * @property {number} [event_id] + * @property {number} [id] + * @property {number} [subscriber_id] + */ +/** + * @typedef UpdateSubscriberRequest + * @property {string} [status] + */ +/** + * @typedef UpdateSubscriberResponse + * @property {string} [message] + */ +/** + * @typedef UploadServiceObject + * @property {CdnObject} [cdn] + */ +/** + * @typedef Url + * @property {string} [name] - The name of the uploaded report file. + * @property {string} [url] - The URL of the uploaded report file. + */ +declare class WebhookPartnerModel { +} +declare namespace WebhookPartnerModel { + export { Association, AuthMeta, CancelDownloadResponse, CdnObject, DeliveryDetailsRequest, DeliveryDetailsResponse, DeliveryEventLevelSchema, DeliverySummaryResponse, DeliverySummarySchema, DeliveryTsResponse, DeliveryTsSchema, DownloadReponse, EventConfigResponse, EventDeliveryDetailSchema, EventProcessReportObject, FilterReportResponse, HistoryAssociation, HistoryFilters, HistoryItems, HistoryPayload, HistoryResponse, InvalidEventsRequest, InvalidEventsResponse, ItemSchema, Page, SubscriberConfigResponse, SubscriberEventMapping, UpdateSubscriberRequest, UpdateSubscriberResponse, UploadServiceObject, Url }; +} +/** @returns {Association} */ +declare function Association(): Association; +type Association = { + application_id?: string[]; + company_id?: number; + criteria?: string; + extension_id?: string; +}; +/** @returns {AuthMeta} */ +declare function AuthMeta(): AuthMeta; +type AuthMeta = { + secret?: string; + type?: string; +}; +/** @returns {CancelDownloadResponse} */ +declare function CancelDownloadResponse(): CancelDownloadResponse; +type CancelDownloadResponse = { + message?: string; + result?: string; +}; +/** @returns {CdnObject} */ +declare function CdnObject(): CdnObject; +type CdnObject = { + urls?: Url[]; +}; +/** @returns {DeliveryDetailsRequest} */ +declare function DeliveryDetailsRequest(): DeliveryDetailsRequest; +type DeliveryDetailsRequest = { + company_id?: string; + end_date?: string; + event?: EventDeliveryDetailSchema[]; + page_no?: number; + page_size?: number; + start_date?: string; + status?: string; +}; +/** @returns {DeliveryDetailsResponse} */ +declare function DeliveryDetailsResponse(): DeliveryDetailsResponse; +type DeliveryDetailsResponse = { + page?: Page; + rows?: EventProcessReportObject[]; +}; +/** @returns {DeliveryEventLevelSchema} */ +declare function DeliveryEventLevelSchema(): DeliveryEventLevelSchema; +type DeliveryEventLevelSchema = { + event?: string; + failed?: number; + failed_percentage?: number; + removed_webhooks?: number; + response_time?: number; + success?: number; + total?: number; +}; +/** @returns {DeliverySummaryResponse} */ +declare function DeliverySummaryResponse(): DeliverySummaryResponse; +type DeliverySummaryResponse = { + delivery_event_level?: DeliveryEventLevelSchema[]; + delivery_summary?: DeliverySummarySchema; +}; +/** @returns {DeliverySummarySchema} */ +declare function DeliverySummarySchema(): DeliverySummarySchema; +type DeliverySummarySchema = { + failed_percentage?: number; + removed_webhooks?: number; + response_time?: number; + success?: number; +}; +/** @returns {DeliveryTsResponse} */ +declare function DeliveryTsResponse(): DeliveryTsResponse; +type DeliveryTsResponse = { + delivery_ts?: DeliveryTsSchema[]; +}; +/** @returns {DeliveryTsSchema} */ +declare function DeliveryTsSchema(): DeliveryTsSchema; +type DeliveryTsSchema = { + failed?: number; + removed_webhooks?: number; + success?: number; + timestamp?: string; +}; +/** @returns {DownloadReponse} */ +declare function DownloadReponse(): DownloadReponse; +type DownloadReponse = { + file_name?: string; +}; +/** @returns {EventConfigResponse} */ +declare function EventConfigResponse(): EventConfigResponse; +type EventConfigResponse = { + created_on?: string; + description?: string; + display_name?: string; + event_category?: string; + event_name?: string; + event_schema?: any; + event_type?: string; + id?: number; + subscriber_event_mapping?: SubscriberEventMapping; + updated_on?: string; + version?: string; +}; +/** @returns {EventDeliveryDetailSchema} */ +declare function EventDeliveryDetailSchema(): EventDeliveryDetailSchema; +type EventDeliveryDetailSchema = { + event_category?: string; + event_name?: string; + event_type?: string; + version?: string; +}; +/** @returns {EventProcessReportObject} */ +declare function EventProcessReportObject(): EventProcessReportObject; +type EventProcessReportObject = { + /** + * - The attempt number of the event. + */ + attempt?: number; + /** + * - The data associated with the event. + */ + data?: any; + /** + * - The name of the processed event. + */ + event_name?: string; + event_trace_id?: string; + /** + * - The timestamp of the last attempted event. + */ + last_attempted_on?: number; + message_id?: string; + /** + * - The name of the event. + */ + name?: string; + /** + * - The response code of the event. + */ + response_code?: number; + /** + * - The response message of the event. + */ + response_message?: string; + /** + * - The response time of the event. + */ + response_time?: number; + /** + * - The status of the event (e.g., "FAILED"). + */ + status?: string; + /** + * - The webhook URL associated with the event. + */ + webhook_url?: string; +}; +/** @returns {FilterReportResponse} */ +declare function FilterReportResponse(): FilterReportResponse; +type FilterReportResponse = { + filter_name?: string; + values?: any[]; +}; +/** @returns {HistoryAssociation} */ +declare function HistoryAssociation(): HistoryAssociation; +type HistoryAssociation = { + company_id?: number; + subscriber_ids?: number[]; +}; +/** @returns {HistoryFilters} */ +declare function HistoryFilters(): HistoryFilters; +type HistoryFilters = { + /** + * - The end date and time of the history report. + */ + end_date?: string; + events?: string[]; + search_text?: string; + /** + * - The start date and time of the history report. + */ + start_date?: string; + /** + * - The status of the history report (e.g., "FAILED"). + */ + status?: string; + /** + * - An array of subscriber IDs associated + * with the history report. + */ + subscribers?: number[]; +}; +/** @returns {HistoryItems} */ +declare function HistoryItems(): HistoryItems; +type HistoryItems = { + association?: HistoryAssociation; + /** + * - The date and time when the history report + * was created. + */ + created_on?: string; + /** + * - The filename of the history report. + */ + filename?: string; + filters?: HistoryFilters; + /** + * - The ID of the history report. + */ + id?: number; + /** + * - A message related to the history report. + */ + message?: string; + /** + * - The status of the history report (e.g., "COMPLETED"). + */ + status?: string; + /** + * - The date and time when the history report + * was last updated. + */ + updated_on?: string; + upload_service_response?: UploadServiceObject; +}; +/** @returns {HistoryPayload} */ +declare function HistoryPayload(): HistoryPayload; +type HistoryPayload = { + company_id?: number; + /** + * - The page number of the history report. + */ + page_no?: number; + /** + * - The number of records per page. + */ + page_size?: number; + /** + * - The type of history report (e.g., "platform"). + */ + type?: string; +}; +/** @returns {HistoryResponse} */ +declare function HistoryResponse(): HistoryResponse; +type HistoryResponse = { + items?: HistoryItems[]; + page?: Page; +}; +/** @returns {InvalidEventsRequest} */ +declare function InvalidEventsRequest(): InvalidEventsRequest; +type InvalidEventsRequest = { + category?: string; + end_date?: string; + event_name?: string; + start_date?: string; + version?: string; +}; +/** @returns {InvalidEventsResponse} */ +declare function InvalidEventsResponse(): InvalidEventsResponse; +type InvalidEventsResponse = { + category?: string; + count?: number; + event_name?: string; + event_type?: string; + version?: string; +}; +/** @returns {ItemSchema} */ +declare function ItemSchema(): ItemSchema; +type ItemSchema = { + association?: Association; + auth_meta?: AuthMeta; + created_on?: string; + custom_headers?: any; + email_id?: string; + event_configs?: EventConfigResponse[]; + event_id?: number[]; + id?: number; + modified_by?: string; + name?: string; + status?: string; + type?: string; + updated_on?: string; + webhook_url?: string; +}; +/** @returns {Page} */ +declare function Page(): Page; +type Page = { + current?: number; + has_next?: boolean; + has_previous?: boolean; + item_total?: number; + next_id?: string; + size?: number; + type: string; +}; +/** @returns {SubscriberConfigResponse} */ +declare function SubscriberConfigResponse(): SubscriberConfigResponse; +type SubscriberConfigResponse = { + items?: ItemSchema[]; + page?: Page; +}; +/** @returns {SubscriberEventMapping} */ +declare function SubscriberEventMapping(): SubscriberEventMapping; +type SubscriberEventMapping = { + created_on?: string; + event_id?: number; + id?: number; + subscriber_id?: number; +}; +/** @returns {UpdateSubscriberRequest} */ +declare function UpdateSubscriberRequest(): UpdateSubscriberRequest; +type UpdateSubscriberRequest = { + status?: string; +}; +/** @returns {UpdateSubscriberResponse} */ +declare function UpdateSubscriberResponse(): UpdateSubscriberResponse; +type UpdateSubscriberResponse = { + message?: string; +}; +/** @returns {UploadServiceObject} */ +declare function UploadServiceObject(): UploadServiceObject; +type UploadServiceObject = { + cdn?: CdnObject; +}; +/** @returns {Url} */ +declare function Url(): Url; +type Url = { + /** + * - The name of the uploaded report file. + */ + name?: string; + /** + * - The URL of the uploaded report file. + */ + url?: string; +}; diff --git a/sdk/partner/Webhook/WebhookPartnerModel.js b/sdk/partner/Webhook/WebhookPartnerModel.js new file mode 100644 index 000000000..75bf4cd81 --- /dev/null +++ b/sdk/partner/Webhook/WebhookPartnerModel.js @@ -0,0 +1,583 @@ +const Joi = require("joi"); + +/** + * @typedef Association + * @property {string[]} [application_id] + * @property {number} [company_id] + * @property {string} [criteria] + * @property {string} [extension_id] + */ + +/** + * @typedef AuthMeta + * @property {string} [secret] + * @property {string} [type] + */ + +/** + * @typedef CancelDownloadResponse + * @property {string} [message] + * @property {string} [result] + */ + +/** + * @typedef CdnObject + * @property {Url[]} [urls] + */ + +/** + * @typedef DeliveryDetailsRequest + * @property {string} [company_id] + * @property {string} [end_date] + * @property {EventDeliveryDetailSchema[]} [event] + * @property {number} [page_no] + * @property {number} [page_size] + * @property {string} [start_date] + * @property {string} [status] + */ + +/** + * @typedef DeliveryDetailsResponse + * @property {Page} [page] + * @property {EventProcessReportObject[]} [rows] + */ + +/** + * @typedef DeliveryEventLevelSchema + * @property {string} [event] + * @property {number} [failed] + * @property {number} [failed_percentage] + * @property {number} [removed_webhooks] + * @property {number} [response_time] + * @property {number} [success] + * @property {number} [total] + */ + +/** + * @typedef DeliverySummaryResponse + * @property {DeliveryEventLevelSchema[]} [delivery_event_level] + * @property {DeliverySummarySchema} [delivery_summary] + */ + +/** + * @typedef DeliverySummarySchema + * @property {number} [failed_percentage] + * @property {number} [removed_webhooks] + * @property {number} [response_time] + * @property {number} [success] + */ + +/** + * @typedef DeliveryTsResponse + * @property {DeliveryTsSchema[]} [delivery_ts] + */ + +/** + * @typedef DeliveryTsSchema + * @property {number} [failed] + * @property {number} [removed_webhooks] + * @property {number} [success] + * @property {string} [timestamp] + */ + +/** + * @typedef DownloadReponse + * @property {string} [file_name] + */ + +/** + * @typedef EventConfigResponse + * @property {string} [created_on] + * @property {string} [description] + * @property {string} [display_name] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {Object} [event_schema] + * @property {string} [event_type] + * @property {number} [id] + * @property {SubscriberEventMapping} [subscriber_event_mapping] + * @property {string} [updated_on] + * @property {string} [version] + */ + +/** + * @typedef EventDeliveryDetailSchema + * @property {string} [event_category] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [version] + */ + +/** + * @typedef EventProcessReportObject + * @property {number} [attempt] - The attempt number of the event. + * @property {Object} [data] - The data associated with the event. + * @property {string} [event_name] - The name of the processed event. + * @property {string} [event_trace_id] + * @property {number} [last_attempted_on] - The timestamp of the last attempted event. + * @property {string} [message_id] + * @property {string} [name] - The name of the event. + * @property {number} [response_code] - The response code of the event. + * @property {string} [response_message] - The response message of the event. + * @property {number} [response_time] - The response time of the event. + * @property {string} [status] - The status of the event (e.g., "FAILED"). + * @property {string} [webhook_url] - The webhook URL associated with the event. + */ + +/** + * @typedef FilterReportResponse + * @property {string} [filter_name] + * @property {Object[]} [values] + */ + +/** + * @typedef HistoryAssociation + * @property {number} [company_id] + * @property {number[]} [subscriber_ids] + */ + +/** + * @typedef HistoryFilters + * @property {string} [end_date] - The end date and time of the history report. + * @property {string[]} [events] + * @property {string} [search_text] + * @property {string} [start_date] - The start date and time of the history report. + * @property {string} [status] - The status of the history report (e.g., "FAILED"). + * @property {number[]} [subscribers] - An array of subscriber IDs associated + * with the history report. + */ + +/** + * @typedef HistoryItems + * @property {HistoryAssociation} [association] + * @property {string} [created_on] - The date and time when the history report + * was created. + * @property {string} [filename] - The filename of the history report. + * @property {HistoryFilters} [filters] + * @property {number} [id] - The ID of the history report. + * @property {string} [message] - A message related to the history report. + * @property {string} [status] - The status of the history report (e.g., "COMPLETED"). + * @property {string} [updated_on] - The date and time when the history report + * was last updated. + * @property {UploadServiceObject} [upload_service_response] + */ + +/** + * @typedef HistoryPayload + * @property {number} [company_id] + * @property {number} [page_no] - The page number of the history report. + * @property {number} [page_size] - The number of records per page. + * @property {string} [type] - The type of history report (e.g., "platform"). + */ + +/** + * @typedef HistoryResponse + * @property {HistoryItems[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef InvalidEventsRequest + * @property {string} [category] + * @property {string} [end_date] + * @property {string} [event_name] + * @property {string} [start_date] + * @property {string} [version] + */ + +/** + * @typedef InvalidEventsResponse + * @property {string} [category] + * @property {number} [count] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [version] + */ + +/** + * @typedef ItemSchema + * @property {Association} [association] + * @property {AuthMeta} [auth_meta] + * @property {string} [created_on] + * @property {Object} [custom_headers] + * @property {string} [email_id] + * @property {EventConfigResponse[]} [event_configs] + * @property {number[]} [event_id] + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [status] + * @property {string} [type] + * @property {string} [updated_on] + * @property {string} [webhook_url] + */ + +/** + * @typedef Page + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {string} [next_id] + * @property {number} [size] + * @property {string} type + */ + +/** + * @typedef SubscriberConfigResponse + * @property {ItemSchema[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef SubscriberEventMapping + * @property {string} [created_on] + * @property {number} [event_id] + * @property {number} [id] + * @property {number} [subscriber_id] + */ + +/** + * @typedef UpdateSubscriberRequest + * @property {string} [status] + */ + +/** + * @typedef UpdateSubscriberResponse + * @property {string} [message] + */ + +/** + * @typedef UploadServiceObject + * @property {CdnObject} [cdn] + */ + +/** + * @typedef Url + * @property {string} [name] - The name of the uploaded report file. + * @property {string} [url] - The URL of the uploaded report file. + */ + +class WebhookPartnerModel { + /** @returns {Association} */ + static Association() { + return Joi.object({ + application_id: Joi.array().items(Joi.string().allow("")), + company_id: Joi.number(), + criteria: Joi.string().allow(""), + extension_id: Joi.string().allow(""), + }); + } + + /** @returns {AuthMeta} */ + static AuthMeta() { + return Joi.object({ + secret: Joi.string().allow(""), + type: Joi.string().allow(""), + }); + } + + /** @returns {CancelDownloadResponse} */ + static CancelDownloadResponse() { + return Joi.object({ + message: Joi.string().allow(""), + result: Joi.string().allow(""), + }); + } + + /** @returns {CdnObject} */ + static CdnObject() { + return Joi.object({ + urls: Joi.array().items(WebhookPartnerModel.Url()), + }); + } + + /** @returns {DeliveryDetailsRequest} */ + static DeliveryDetailsRequest() { + return Joi.object({ + company_id: Joi.string().allow(""), + end_date: Joi.string().allow(""), + event: Joi.array().items(WebhookPartnerModel.EventDeliveryDetailSchema()), + page_no: Joi.number(), + page_size: Joi.number(), + start_date: Joi.string().allow(""), + status: Joi.string().allow(""), + }); + } + + /** @returns {DeliveryDetailsResponse} */ + static DeliveryDetailsResponse() { + return Joi.object({ + page: WebhookPartnerModel.Page(), + rows: Joi.array().items(WebhookPartnerModel.EventProcessReportObject()), + }); + } + + /** @returns {DeliveryEventLevelSchema} */ + static DeliveryEventLevelSchema() { + return Joi.object({ + event: Joi.string().allow(""), + failed: Joi.number(), + failed_percentage: Joi.number(), + removed_webhooks: Joi.number(), + response_time: Joi.number(), + success: Joi.number(), + total: Joi.number(), + }); + } + + /** @returns {DeliverySummaryResponse} */ + static DeliverySummaryResponse() { + return Joi.object({ + delivery_event_level: Joi.array().items( + WebhookPartnerModel.DeliveryEventLevelSchema() + ), + delivery_summary: WebhookPartnerModel.DeliverySummarySchema(), + }); + } + + /** @returns {DeliverySummarySchema} */ + static DeliverySummarySchema() { + return Joi.object({ + failed_percentage: Joi.number(), + removed_webhooks: Joi.number(), + response_time: Joi.number(), + success: Joi.number(), + }); + } + + /** @returns {DeliveryTsResponse} */ + static DeliveryTsResponse() { + return Joi.object({ + delivery_ts: Joi.array().items(WebhookPartnerModel.DeliveryTsSchema()), + }); + } + + /** @returns {DeliveryTsSchema} */ + static DeliveryTsSchema() { + return Joi.object({ + failed: Joi.number(), + removed_webhooks: Joi.number(), + success: Joi.number(), + timestamp: Joi.string().allow(""), + }); + } + + /** @returns {DownloadReponse} */ + static DownloadReponse() { + return Joi.object({ + file_name: Joi.string().allow(""), + }); + } + + /** @returns {EventConfigResponse} */ + static EventConfigResponse() { + return Joi.object({ + created_on: Joi.string().allow(""), + description: Joi.string().allow("").allow(null), + display_name: Joi.string().allow(""), + event_category: Joi.string().allow(""), + event_name: Joi.string().allow(""), + event_schema: Joi.object().pattern(/\S/, Joi.any()), + event_type: Joi.string().allow(""), + id: Joi.number(), + subscriber_event_mapping: WebhookPartnerModel.SubscriberEventMapping(), + updated_on: Joi.string().allow(""), + version: Joi.string().allow(""), + }); + } + + /** @returns {EventDeliveryDetailSchema} */ + static EventDeliveryDetailSchema() { + return Joi.object({ + event_category: Joi.string().allow(""), + event_name: Joi.string().allow(""), + event_type: Joi.string().allow(""), + version: Joi.string().allow(""), + }); + } + + /** @returns {EventProcessReportObject} */ + static EventProcessReportObject() { + return Joi.object({ + attempt: Joi.number(), + data: Joi.object().pattern(/\S/, Joi.any()), + event_name: Joi.string().allow(""), + event_trace_id: Joi.string().allow(""), + last_attempted_on: Joi.number(), + message_id: Joi.string().allow(""), + name: Joi.string().allow(""), + response_code: Joi.number(), + response_message: Joi.string().allow(""), + response_time: Joi.number(), + status: Joi.string().allow(""), + webhook_url: Joi.string().allow(""), + }); + } + + /** @returns {FilterReportResponse} */ + static FilterReportResponse() { + return Joi.object({ + filter_name: Joi.string().allow(""), + values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), + }); + } + + /** @returns {HistoryAssociation} */ + static HistoryAssociation() { + return Joi.object({ + company_id: Joi.number(), + subscriber_ids: Joi.array().items(Joi.number()), + }); + } + + /** @returns {HistoryFilters} */ + static HistoryFilters() { + return Joi.object({ + end_date: Joi.string().allow(""), + events: Joi.array().items(Joi.string().allow("")), + search_text: Joi.string().allow(""), + start_date: Joi.string().allow(""), + status: Joi.string().allow(""), + subscribers: Joi.array().items(Joi.number()), + }); + } + + /** @returns {HistoryItems} */ + static HistoryItems() { + return Joi.object({ + association: WebhookPartnerModel.HistoryAssociation(), + created_on: Joi.string().allow(""), + filename: Joi.string().allow(""), + filters: WebhookPartnerModel.HistoryFilters(), + id: Joi.number(), + message: Joi.string().allow(""), + status: Joi.string().allow(""), + updated_on: Joi.string().allow("").allow(null), + upload_service_response: WebhookPartnerModel.UploadServiceObject(), + }); + } + + /** @returns {HistoryPayload} */ + static HistoryPayload() { + return Joi.object({ + company_id: Joi.number(), + page_no: Joi.number(), + page_size: Joi.number(), + type: Joi.string().allow(""), + }); + } + + /** @returns {HistoryResponse} */ + static HistoryResponse() { + return Joi.object({ + items: Joi.array().items(WebhookPartnerModel.HistoryItems()), + page: WebhookPartnerModel.Page(), + }); + } + + /** @returns {InvalidEventsRequest} */ + static InvalidEventsRequest() { + return Joi.object({ + category: Joi.string().allow(""), + end_date: Joi.string().allow(""), + event_name: Joi.string().allow(""), + start_date: Joi.string().allow(""), + version: Joi.string().allow(""), + }); + } + + /** @returns {InvalidEventsResponse} */ + static InvalidEventsResponse() { + return Joi.object({ + category: Joi.string().allow(""), + count: Joi.number(), + event_name: Joi.string().allow(""), + event_type: Joi.string().allow(""), + version: Joi.string().allow(""), + }); + } + + /** @returns {ItemSchema} */ + static ItemSchema() { + return Joi.object({ + association: WebhookPartnerModel.Association(), + auth_meta: WebhookPartnerModel.AuthMeta(), + created_on: Joi.string().allow(""), + custom_headers: Joi.any(), + email_id: Joi.string().allow(""), + event_configs: Joi.array().items( + WebhookPartnerModel.EventConfigResponse() + ), + event_id: Joi.array().items(Joi.number()), + id: Joi.number(), + modified_by: Joi.string().allow(""), + name: Joi.string().allow(""), + status: Joi.string().allow(""), + type: Joi.string().allow("").allow(null), + updated_on: Joi.string().allow(""), + webhook_url: Joi.string().allow(""), + }); + } + + /** @returns {Page} */ + static Page() { + return Joi.object({ + current: Joi.number(), + has_next: Joi.boolean(), + has_previous: Joi.boolean(), + item_total: Joi.number(), + next_id: Joi.string().allow(""), + size: Joi.number(), + type: Joi.string().allow("").required(), + }); + } + + /** @returns {SubscriberConfigResponse} */ + static SubscriberConfigResponse() { + return Joi.object({ + items: Joi.array().items(WebhookPartnerModel.ItemSchema()), + page: WebhookPartnerModel.Page(), + }); + } + + /** @returns {SubscriberEventMapping} */ + static SubscriberEventMapping() { + return Joi.object({ + created_on: Joi.string().allow(""), + event_id: Joi.number(), + id: Joi.number(), + subscriber_id: Joi.number(), + }); + } + + /** @returns {UpdateSubscriberRequest} */ + static UpdateSubscriberRequest() { + return Joi.object({ + status: Joi.string().allow(""), + }); + } + + /** @returns {UpdateSubscriberResponse} */ + static UpdateSubscriberResponse() { + return Joi.object({ + message: Joi.string().allow(""), + }); + } + + /** @returns {UploadServiceObject} */ + static UploadServiceObject() { + return Joi.object({ + cdn: WebhookPartnerModel.CdnObject(), + }); + } + + /** @returns {Url} */ + static Url() { + return Joi.object({ + name: Joi.string().allow(""), + url: Joi.string().allow(""), + }); + } +} +module.exports = WebhookPartnerModel; diff --git a/sdk/partner/Webhook/WebhookPartnerValidator.d.ts b/sdk/partner/Webhook/WebhookPartnerValidator.d.ts new file mode 100644 index 000000000..df035c22d --- /dev/null +++ b/sdk/partner/Webhook/WebhookPartnerValidator.d.ts @@ -0,0 +1,12 @@ +export = WebhookValidator; +declare class WebhookValidator { + static fetchDeliverySummary(): any; + static getDeliveryDetailInsights(): any; + static fetchDeliveryTs(): any; + static fetchReportFilters(): any; + static cancelReportDownload(): any; + static getHistoricalReports(): any; + static getInvalidEventList(): any; + static fetchSubscribers(): any; + static updateSubscriber(): any; +} diff --git a/sdk/partner/Webhook/WebhookPartnerValidator.js b/sdk/partner/Webhook/WebhookPartnerValidator.js new file mode 100644 index 000000000..70aba7ba0 --- /dev/null +++ b/sdk/partner/Webhook/WebhookPartnerValidator.js @@ -0,0 +1,74 @@ +const Joi = require("joi"); + +const WebhookModel = require("./WebhookPartnerModel"); +class WebhookValidator { + static fetchDeliverySummary() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + startDate: Joi.string().allow("").required(), + endDate: Joi.string().allow("").required(), + }).required(); + } + + static getDeliveryDetailInsights() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + body: WebhookModel.DeliveryDetailsRequest().required(), + }).required(); + } + + static fetchDeliveryTs() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + startDate: Joi.string().allow("").required(), + endDate: Joi.string().allow("").required(), + }).required(); + } + + static fetchReportFilters() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + startDate: Joi.string().allow("").required(), + endDate: Joi.string().allow("").required(), + pageNo: Joi.number().required(), + pageSize: Joi.number().required(), + }).required(); + } + + static cancelReportDownload() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + filename: Joi.string().allow("").required(), + }).required(); + } + + static getHistoricalReports() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + body: WebhookModel.HistoryPayload().required(), + }).required(); + } + + static getInvalidEventList() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + body: WebhookModel.InvalidEventsRequest().required(), + }).required(); + } + + static fetchSubscribers() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + }).required(); + } + + static updateSubscriber() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + subscriberId: Joi.number().required(), + body: WebhookModel.UpdateSubscriberRequest().required(), + }).required(); + } +} + +module.exports = WebhookValidator; diff --git a/sdk/partner/index.d.ts b/sdk/partner/index.d.ts index 009063909..77504f1b1 100644 --- a/sdk/partner/index.d.ts +++ b/sdk/partner/index.d.ts @@ -2,5 +2,8 @@ export const PartnerConfig: typeof import("./PartnerConfig"); export const PartnerClient: typeof import("./PartnerClient"); export namespace PartnerModel { const FileStoragePartnerModel: typeof import("./FileStorage/FileStoragePartnerModel"); + const LeadPartnerModel: typeof import("./Lead/LeadPartnerModel"); + const LogisticsPartnerModel: typeof import("./Logistics/LogisticsPartnerModel"); const ThemePartnerModel: typeof import("./Theme/ThemePartnerModel"); + const WebhookPartnerModel: typeof import("./Webhook/WebhookPartnerModel"); } diff --git a/sdk/partner/index.js b/sdk/partner/index.js index e4b10600f..0f634b7af 100644 --- a/sdk/partner/index.js +++ b/sdk/partner/index.js @@ -4,6 +4,12 @@ module.exports = { PartnerModel: { FileStoragePartnerModel: require("./FileStorage/FileStoragePartnerModel"), + LeadPartnerModel: require("./Lead/LeadPartnerModel"), + + LogisticsPartnerModel: require("./Logistics/LogisticsPartnerModel"), + ThemePartnerModel: require("./Theme/ThemePartnerModel"), + + WebhookPartnerModel: require("./Webhook/WebhookPartnerModel"), }, }; diff --git a/sdk/platform/AuditTrail/AuditTrailPlatformClient.js b/sdk/platform/AuditTrail/AuditTrailPlatformClient.js index 13a2497b0..8b069f732 100644 --- a/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +++ b/sdk/platform/AuditTrail/AuditTrailPlatformClient.js @@ -60,7 +60,7 @@ class AuditTrail { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/`, + `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -225,7 +225,7 @@ class AuditTrail { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs/`, + `/service/platform/audit-trail/v1.0/company/${this.config.companyId}/logs`, query_params, undefined, { ...xHeaders, ...requestHeaders }, diff --git a/sdk/platform/Billing/BillingPlatformClient.d.ts b/sdk/platform/Billing/BillingPlatformClient.d.ts index 5b8bbe394..a7cfcba92 100644 --- a/sdk/platform/Billing/BillingPlatformClient.d.ts +++ b/sdk/platform/Billing/BillingPlatformClient.d.ts @@ -104,7 +104,7 @@ declare class Billing { * @summary: Get subscription subscription limits * @description: Get subscription subscription limits. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getFeatureLimitConfig/). */ - getFeatureLimitConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getFeatureLimitConfig({ productSuite, type, requestHeaders }?: BillingPlatformValidator.GetFeatureLimitConfigParam, { responseHeaders }?: object): Promise; /** * @param {BillingPlatformValidator.GetInvoiceByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -146,6 +146,16 @@ declare class Billing { * @description: Get created subscription charge details - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getSubscriptionCharge/). */ getSubscriptionCharge({ extensionId, subscriptionId, requestHeaders }?: BillingPlatformValidator.GetSubscriptionChargeParam, { responseHeaders }?: object): Promise; + /** + * @param {BillingPlatformValidator.GetentityDetailParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getentityDetail + * @summary: Generic api to get the entity detail + * @description: Generic api to get the entity detail - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getentityDetail/). + */ + getentityDetail({ entityName, channel, entityId, component, componentName, requestHeaders, }?: BillingPlatformValidator.GetentityDetailParam, { responseHeaders }?: object): Promise; /** * @param {BillingPlatformValidator.PlanStatusUpdateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Billing/BillingPlatformClient.js b/sdk/platform/Billing/BillingPlatformClient.js index 03676ce7c..9ce0fd364 100644 --- a/sdk/platform/Billing/BillingPlatformClient.js +++ b/sdk/platform/Billing/BillingPlatformClient.js @@ -747,11 +747,14 @@ class Billing { * @description: Get subscription subscription limits. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getFeatureLimitConfig/). */ async getFeatureLimitConfig( - { requestHeaders } = { requestHeaders: {} }, + { productSuite, type, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = BillingPlatformValidator.getFeatureLimitConfig().validate( - {}, + { + productSuite, + type, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -762,7 +765,10 @@ class Billing { const { error: warrning, } = BillingPlatformValidator.getFeatureLimitConfig().validate( - {}, + { + productSuite, + type, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -773,6 +779,8 @@ class Billing { } const query_params = {}; + query_params["product_suite"] = productSuite; + query_params["type"] = type; const xHeaders = {}; @@ -1121,6 +1129,105 @@ class Billing { return response; } + /** + * @param {BillingPlatformValidator.GetentityDetailParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getentityDetail + * @summary: Generic api to get the entity detail + * @description: Generic api to get the entity detail - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/billing/getentityDetail/). + */ + async getentityDetail( + { + entityName, + channel, + entityId, + component, + componentName, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = BillingPlatformValidator.getentityDetail().validate( + { + entityName, + channel, + entityId, + component, + componentName, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = BillingPlatformValidator.getentityDetail().validate( + { + entityName, + channel, + entityId, + component, + componentName, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Billing > getentityDetail \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["entity_name"] = entityName; + query_params["entity_id"] = entityId; + query_params["channel"] = channel; + query_params["component"] = component; + query_params["component_name"] = componentName; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/billing/v1.0/company/${this.config.companyId}/entity/detail`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = BillingPlatformModel.EntityResponse().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 > Billing > getentityDetail \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {BillingPlatformValidator.PlanStatusUpdateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Billing/BillingPlatformModel.d.ts b/sdk/platform/Billing/BillingPlatformModel.d.ts index 1a3cdb02a..514221a63 100644 --- a/sdk/platform/Billing/BillingPlatformModel.d.ts +++ b/sdk/platform/Billing/BillingPlatformModel.d.ts @@ -62,6 +62,11 @@ export = BillingPlatformModel; * @property {string} [end_date] * @property {string} [start_date] */ +/** + * @typedef Details + * @property {Features[]} [features] + * @property {FeeComponents[]} [fee_components] + */ /** * @typedef EntityChargePrice * @property {number} amount - Amount for price. Minimum value 1 @@ -71,6 +76,13 @@ export = BillingPlatformModel; * @typedef EntityChargeRecurring * @property {string} interval */ +/** + * @typedef EntityResponse + * @property {Details[]} [items] + * @property {number} [page] + * @property {number} [page_size] + * @property {boolean} [success] + */ /** * @typedef EntitySubscription * @property {string} [_id] @@ -84,6 +96,25 @@ export = BillingPlatformModel; * @property {number} [trial_days] * @property {SubscriptionTrialPeriod} [trial_period] */ +/** + * @typedef Features + * @property {string} [description] + * @property {string} [display_text] + * @property {boolean} [enabled] + * @property {string} [group] + * @property {string} [name] + * @property {string} [slug] + */ +/** + * @typedef FeeComponents + * @property {string[]} [brand] + * @property {string} [business_lead] + * @property {Object[]} [channel] + * @property {Object[]} [components] + * @property {string[]} [location] + * @property {Object} [settle_cycle_period] + * @property {string} [settlement_type] + */ /** * @typedef InternalServerError * @property {string} [code] - Error code @@ -496,7 +527,7 @@ export = BillingPlatformModel; declare class BillingPlatformModel { } declare namespace BillingPlatformModel { - export { BadRequest, CancelSubscriptionReq, CancelSubscriptionRes, ChargeLineItem, CheckValidityResponse, CreateOneTimeCharge, CreateOneTimeChargeResponse, CreateSubscriptionCharge, CreateSubscriptionResponse, CurrentPeriod, EntityChargePrice, EntityChargeRecurring, EntitySubscription, InternalServerError, Invoice, InvoiceDetails, InvoiceDetailsClient, InvoiceDetailsPeriod, InvoiceDetailsStatusTrail, InvoiceItems, InvoiceItemsPeriod, InvoiceItemsPlan, InvoiceItemsPlanRecurring, InvoicePaymentMethod, Invoices, InvoicesData, InvoicesDataClient, InvoicesDataPaymentMethod, InvoicesDataPeriod, Meta, OneTimeChargeEntity, OneTimeChargeItem, Phone, Plan, PlanRecurring, PlanStatusUpdateReq, ResourceNotFound, SubscribePlanRes, Subscription, SubscriptionActivateReq, SubscriptionActivateRes, SubscriptionBillingAddress, SubscriptionCharge, SubscriptionCurrentPeriod, SubscriptionCustomer, SubscriptionCustomerCreate, SubscriptionInvoiceSettings, SubscriptionLimit, SubscriptionLimitApplication, SubscriptionLimitExtensions, SubscriptionLimitIntegrations, SubscriptionLimitMarketplace, SubscriptionLimitOtherPlatform, SubscriptionLimitProducts, SubscriptionLimitTeam, SubscriptionPauseCollection, SubscriptionStatus, SubscriptionTrial, SubscriptionTrialPeriod, SunscribePlan }; + export { BadRequest, CancelSubscriptionReq, CancelSubscriptionRes, ChargeLineItem, CheckValidityResponse, CreateOneTimeCharge, CreateOneTimeChargeResponse, CreateSubscriptionCharge, CreateSubscriptionResponse, CurrentPeriod, Details, EntityChargePrice, EntityChargeRecurring, EntityResponse, EntitySubscription, Features, FeeComponents, InternalServerError, Invoice, InvoiceDetails, InvoiceDetailsClient, InvoiceDetailsPeriod, InvoiceDetailsStatusTrail, InvoiceItems, InvoiceItemsPeriod, InvoiceItemsPlan, InvoiceItemsPlanRecurring, InvoicePaymentMethod, Invoices, InvoicesData, InvoicesDataClient, InvoicesDataPaymentMethod, InvoicesDataPeriod, Meta, OneTimeChargeEntity, OneTimeChargeItem, Phone, Plan, PlanRecurring, PlanStatusUpdateReq, ResourceNotFound, SubscribePlanRes, Subscription, SubscriptionActivateReq, SubscriptionActivateRes, SubscriptionBillingAddress, SubscriptionCharge, SubscriptionCurrentPeriod, SubscriptionCustomer, SubscriptionCustomerCreate, SubscriptionInvoiceSettings, SubscriptionLimit, SubscriptionLimitApplication, SubscriptionLimitExtensions, SubscriptionLimitIntegrations, SubscriptionLimitMarketplace, SubscriptionLimitOtherPlatform, SubscriptionLimitProducts, SubscriptionLimitTeam, SubscriptionPauseCollection, SubscriptionStatus, SubscriptionTrial, SubscriptionTrialPeriod, SunscribePlan }; } /** @returns {BadRequest} */ declare function BadRequest(): BadRequest; @@ -574,6 +605,12 @@ type CurrentPeriod = { end_date?: string; start_date?: string; }; +/** @returns {Details} */ +declare function Details(): Details; +type Details = { + features?: Features[]; + fee_components?: FeeComponents[]; +}; /** @returns {EntityChargePrice} */ declare function EntityChargePrice(): EntityChargePrice; type EntityChargePrice = { @@ -588,6 +625,14 @@ declare function EntityChargeRecurring(): EntityChargeRecurring; type EntityChargeRecurring = { interval: string; }; +/** @returns {EntityResponse} */ +declare function EntityResponse(): EntityResponse; +type EntityResponse = { + items?: Details[]; + page?: number; + page_size?: number; + success?: boolean; +}; /** @returns {EntitySubscription} */ declare function EntitySubscription(): EntitySubscription; type EntitySubscription = { @@ -602,6 +647,27 @@ type EntitySubscription = { trial_days?: number; trial_period?: SubscriptionTrialPeriod; }; +/** @returns {Features} */ +declare function Features(): Features; +type Features = { + description?: string; + display_text?: string; + enabled?: boolean; + group?: string; + name?: string; + slug?: string; +}; +/** @returns {FeeComponents} */ +declare function FeeComponents(): FeeComponents; +type FeeComponents = { + brand?: string[]; + business_lead?: string; + channel?: any[]; + components?: any[]; + location?: string[]; + settle_cycle_period?: any; + settlement_type?: string; +}; /** @returns {InternalServerError} */ declare function InternalServerError(): InternalServerError; type InternalServerError = { diff --git a/sdk/platform/Billing/BillingPlatformModel.js b/sdk/platform/Billing/BillingPlatformModel.js index 8b108aaa8..dbfba894e 100644 --- a/sdk/platform/Billing/BillingPlatformModel.js +++ b/sdk/platform/Billing/BillingPlatformModel.js @@ -73,6 +73,12 @@ const Joi = require("joi"); * @property {string} [start_date] */ +/** + * @typedef Details + * @property {Features[]} [features] + * @property {FeeComponents[]} [fee_components] + */ + /** * @typedef EntityChargePrice * @property {number} amount - Amount for price. Minimum value 1 @@ -84,6 +90,14 @@ const Joi = require("joi"); * @property {string} interval */ +/** + * @typedef EntityResponse + * @property {Details[]} [items] + * @property {number} [page] + * @property {number} [page_size] + * @property {boolean} [success] + */ + /** * @typedef EntitySubscription * @property {string} [_id] @@ -98,6 +112,27 @@ const Joi = require("joi"); * @property {SubscriptionTrialPeriod} [trial_period] */ +/** + * @typedef Features + * @property {string} [description] + * @property {string} [display_text] + * @property {boolean} [enabled] + * @property {string} [group] + * @property {string} [name] + * @property {string} [slug] + */ + +/** + * @typedef FeeComponents + * @property {string[]} [brand] + * @property {string} [business_lead] + * @property {Object[]} [channel] + * @property {Object[]} [components] + * @property {string[]} [location] + * @property {Object} [settle_cycle_period] + * @property {string} [settlement_type] + */ + /** * @typedef InternalServerError * @property {string} [code] - Error code @@ -650,6 +685,14 @@ class BillingPlatformModel { }); } + /** @returns {Details} */ + static Details() { + return Joi.object({ + features: Joi.array().items(BillingPlatformModel.Features()), + fee_components: Joi.array().items(BillingPlatformModel.FeeComponents()), + }); + } + /** @returns {EntityChargePrice} */ static EntityChargePrice() { return Joi.object({ @@ -665,6 +708,16 @@ class BillingPlatformModel { }); } + /** @returns {EntityResponse} */ + static EntityResponse() { + return Joi.object({ + items: Joi.array().items(BillingPlatformModel.Details()), + page: Joi.number(), + page_size: Joi.number(), + success: Joi.boolean(), + }); + } + /** @returns {EntitySubscription} */ static EntitySubscription() { return Joi.object({ @@ -681,6 +734,31 @@ class BillingPlatformModel { }); } + /** @returns {Features} */ + static Features() { + return Joi.object({ + description: Joi.string().allow(""), + display_text: Joi.string().allow(""), + enabled: Joi.boolean(), + group: Joi.string().allow(""), + name: Joi.string().allow(""), + slug: Joi.string().allow(""), + }); + } + + /** @returns {FeeComponents} */ + static FeeComponents() { + return Joi.object({ + brand: Joi.array().items(Joi.string().allow("")), + business_lead: Joi.string().allow(""), + channel: Joi.array().items(Joi.any()), + components: Joi.array().items(Joi.any()), + location: Joi.array().items(Joi.string().allow("")), + settle_cycle_period: Joi.any(), + settlement_type: Joi.string().allow(""), + }); + } + /** @returns {InternalServerError} */ static InternalServerError() { return Joi.object({ diff --git a/sdk/platform/Billing/BillingPlatformValidator.d.ts b/sdk/platform/Billing/BillingPlatformValidator.d.ts index 2c86cfac2..bc5470fd8 100644 --- a/sdk/platform/Billing/BillingPlatformValidator.d.ts +++ b/sdk/platform/Billing/BillingPlatformValidator.d.ts @@ -34,7 +34,11 @@ export = BillingPlatformValidator; */ /** @typedef GetCustomerDetailParam */ /** @typedef GetEnterprisePlansParam */ -/** @typedef GetFeatureLimitConfigParam */ +/** + * @typedef GetFeatureLimitConfigParam + * @property {string} [productSuite] + * @property {string} [type] + */ /** * @typedef GetInvoiceByIdParam * @property {string} invoiceId - Invoice id @@ -46,6 +50,14 @@ export = BillingPlatformValidator; * @property {string} extensionId - Extension _id * @property {string} subscriptionId - Subscription charge _id */ +/** + * @typedef GetentityDetailParam + * @property {string} entityName - Entity name. + * @property {string} [entityId] - Entity unique id. + * @property {string} channel - Ordering channel. + * @property {string} [component] - The coponents the user would like to know. + * @property {string} [componentName] - The name of component the preferred to be fetched. + */ /** * @typedef PlanStatusUpdateParam * @property {BillingPlatformModel.PlanStatusUpdateReq} body @@ -78,7 +90,7 @@ declare class BillingPlatformValidator { /** @returns {GetEnterprisePlansParam} */ static getEnterprisePlans(): any; /** @returns {GetFeatureLimitConfigParam} */ - static getFeatureLimitConfig(): any; + static getFeatureLimitConfig(): GetFeatureLimitConfigParam; /** @returns {GetInvoiceByIdParam} */ static getInvoiceById(): GetInvoiceByIdParam; /** @returns {GetInvoicesParam} */ @@ -87,6 +99,8 @@ declare class BillingPlatformValidator { static getSubscription(): any; /** @returns {GetSubscriptionChargeParam} */ static getSubscriptionCharge(): GetSubscriptionChargeParam; + /** @returns {GetentityDetailParam} */ + static getentityDetail(): GetentityDetailParam; /** @returns {PlanStatusUpdateParam} */ static planStatusUpdate(): PlanStatusUpdateParam; /** @returns {SubscripePlanParam} */ @@ -95,7 +109,7 @@ declare class BillingPlatformValidator { static upsertCustomerDetail(): UpsertCustomerDetailParam; } declare namespace BillingPlatformValidator { - export { ActivateSubscriptionPlanParam, CancelSubscriptionChargeParam, CancelSubscriptionPlanParam, CheckCouponValidityParam, CreateOneTimeChargeParam, CreateSubscriptionChargeParam, GetChargeDetailsParam, GetCustomerDetailParam, GetEnterprisePlansParam, GetFeatureLimitConfigParam, GetInvoiceByIdParam, GetInvoicesParam, GetSubscriptionParam, GetSubscriptionChargeParam, PlanStatusUpdateParam, SubscripePlanParam, UpsertCustomerDetailParam }; + export { ActivateSubscriptionPlanParam, CancelSubscriptionChargeParam, CancelSubscriptionPlanParam, CheckCouponValidityParam, CreateOneTimeChargeParam, CreateSubscriptionChargeParam, GetChargeDetailsParam, GetCustomerDetailParam, GetEnterprisePlansParam, GetFeatureLimitConfigParam, GetInvoiceByIdParam, GetInvoicesParam, GetSubscriptionParam, GetSubscriptionChargeParam, GetentityDetailParam, PlanStatusUpdateParam, SubscripePlanParam, UpsertCustomerDetailParam }; } type ActivateSubscriptionPlanParam = { body: BillingPlatformModel.SubscriptionActivateReq; @@ -147,6 +161,10 @@ type GetChargeDetailsParam = { */ chargeId: string; }; +type GetFeatureLimitConfigParam = { + productSuite?: string; + type?: string; +}; type GetInvoiceByIdParam = { /** * - Invoice id @@ -163,6 +181,28 @@ type GetSubscriptionChargeParam = { */ subscriptionId: string; }; +type GetentityDetailParam = { + /** + * - Entity name. + */ + entityName: string; + /** + * - Entity unique id. + */ + entityId?: string; + /** + * - Ordering channel. + */ + channel: string; + /** + * - The coponents the user would like to know. + */ + component?: string; + /** + * - The name of component the preferred to be fetched. + */ + componentName?: string; +}; type PlanStatusUpdateParam = { body: BillingPlatformModel.PlanStatusUpdateReq; }; @@ -174,7 +214,6 @@ type UpsertCustomerDetailParam = { }; type GetCustomerDetailParam = any; type GetEnterprisePlansParam = any; -type GetFeatureLimitConfigParam = any; type GetInvoicesParam = any; type GetSubscriptionParam = any; import BillingPlatformModel = require("./BillingPlatformModel"); diff --git a/sdk/platform/Billing/BillingPlatformValidator.js b/sdk/platform/Billing/BillingPlatformValidator.js index 4dd93b807..40ae8de18 100644 --- a/sdk/platform/Billing/BillingPlatformValidator.js +++ b/sdk/platform/Billing/BillingPlatformValidator.js @@ -46,7 +46,11 @@ const BillingPlatformModel = require("./BillingPlatformModel"); /** @typedef GetEnterprisePlansParam */ -/** @typedef GetFeatureLimitConfigParam */ +/** + * @typedef GetFeatureLimitConfigParam + * @property {string} [productSuite] + * @property {string} [type] + */ /** * @typedef GetInvoiceByIdParam @@ -63,6 +67,15 @@ const BillingPlatformModel = require("./BillingPlatformModel"); * @property {string} subscriptionId - Subscription charge _id */ +/** + * @typedef GetentityDetailParam + * @property {string} entityName - Entity name. + * @property {string} [entityId] - Entity unique id. + * @property {string} channel - Ordering channel. + * @property {string} [component] - The coponents the user would like to know. + * @property {string} [componentName] - The name of component the preferred to be fetched. + */ + /** * @typedef PlanStatusUpdateParam * @property {BillingPlatformModel.PlanStatusUpdateReq} body @@ -145,7 +158,10 @@ class BillingPlatformValidator { /** @returns {GetFeatureLimitConfigParam} */ static getFeatureLimitConfig() { - return Joi.object({}).required(); + return Joi.object({ + productSuite: Joi.string().allow(""), + type: Joi.string().allow(""), + }).required(); } /** @returns {GetInvoiceByIdParam} */ @@ -173,6 +189,17 @@ class BillingPlatformValidator { }).required(); } + /** @returns {GetentityDetailParam} */ + static getentityDetail() { + return Joi.object({ + entityName: Joi.string().allow("").required(), + entityId: Joi.string().allow(""), + channel: Joi.string().allow("").required(), + component: Joi.string().allow(""), + componentName: Joi.string().allow(""), + }).required(); + } + /** @returns {PlanStatusUpdateParam} */ static planStatusUpdate() { return Joi.object({ diff --git a/sdk/platform/Cart/CartPlatformApplicationClient.d.ts b/sdk/platform/Cart/CartPlatformApplicationClient.d.ts index 75cfcb047..08f5c5681 100644 --- a/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +++ b/sdk/platform/Cart/CartPlatformApplicationClient.d.ts @@ -207,7 +207,7 @@ declare class Cart { * @summary: Fetch Coupon * @description: Use this API to get a list of available coupons along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAppCoupons/). */ - getAppCoupons({ id, buyNow, requestHeaders }?: CartPlatformApplicationValidator.GetAppCouponsParam, { responseHeaders }?: object): Promise; + getAppCoupons({ id, buyNow, slug, storeId, requestHeaders }?: CartPlatformApplicationValidator.GetAppCouponsParam, { responseHeaders }?: object): Promise; /** * @param {CartPlatformApplicationValidator.GetAvailableDeliveryModesParam} arg * - Arg object diff --git a/sdk/platform/Cart/CartPlatformApplicationClient.js b/sdk/platform/Cart/CartPlatformApplicationClient.js index 461eca1b1..b18f376f4 100644 --- a/sdk/platform/Cart/CartPlatformApplicationClient.js +++ b/sdk/platform/Cart/CartPlatformApplicationClient.js @@ -1449,13 +1449,15 @@ class Cart { * @description: Use this API to get a list of available coupons along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAppCoupons/). */ async getAppCoupons( - { id, buyNow, requestHeaders } = { requestHeaders: {} }, + { id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = CartPlatformApplicationValidator.getAppCoupons().validate( { id, buyNow, + slug, + storeId, }, { abortEarly: false, allowUnknown: true } ); @@ -1470,6 +1472,8 @@ class Cart { { id, buyNow, + slug, + storeId, }, { abortEarly: false, allowUnknown: false } ); @@ -1483,6 +1487,8 @@ class Cart { const query_params = {}; query_params["id"] = id; query_params["buy_now"] = buyNow; + query_params["slug"] = slug; + query_params["store_id"] = storeId; const response = await PlatformAPIClient.execute( this.config, diff --git a/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts b/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts index 146500bf1..7fc7b8e1b 100644 --- a/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +++ b/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts @@ -94,6 +94,8 @@ export = CartPlatformApplicationValidator; * @typedef GetAppCouponsParam * @property {string} [id] * @property {boolean} [buyNow] + * @property {string} [slug] + * @property {string} [storeId] */ /** * @typedef GetAvailableDeliveryModesParam @@ -546,6 +548,8 @@ type GetAddressesParam = { type GetAppCouponsParam = { id?: string; buyNow?: boolean; + slug?: string; + storeId?: string; }; type GetAvailableDeliveryModesParam = { areaCode: string; diff --git a/sdk/platform/Cart/CartPlatformApplicationValidator.js b/sdk/platform/Cart/CartPlatformApplicationValidator.js index 6da0b49ce..5ee037282 100644 --- a/sdk/platform/Cart/CartPlatformApplicationValidator.js +++ b/sdk/platform/Cart/CartPlatformApplicationValidator.js @@ -113,6 +113,8 @@ const CartPlatformModel = require("./CartPlatformModel"); * @typedef GetAppCouponsParam * @property {string} [id] * @property {boolean} [buyNow] + * @property {string} [slug] + * @property {string} [storeId] */ /** @@ -549,6 +551,8 @@ class CartPlatformApplicationValidator { return Joi.object({ id: Joi.string().allow(""), buyNow: Joi.boolean(), + slug: Joi.string().allow(""), + storeId: Joi.string().allow(""), }).required(); } diff --git a/sdk/platform/Cart/CartPlatformModel.d.ts b/sdk/platform/Cart/CartPlatformModel.d.ts index c92690a97..fbe30bacf 100644 --- a/sdk/platform/Cart/CartPlatformModel.d.ts +++ b/sdk/platform/Cart/CartPlatformModel.d.ts @@ -90,6 +90,7 @@ export = CartPlatformModel; * @property {string[]} [product_group_tags] * @property {number} [quantity] * @property {number} [seller_id] + * @property {string} [seller_identifier] - Add items using seller identifier for store os * @property {number} [store_id] */ /** @@ -107,6 +108,7 @@ export = CartPlatformModel; * @property {number} [article_quantity] - Quantity of article on which * promotion is applicable * @property {BuyRules[]} [buy_rules] - Buy rules for promotions + * @property {CartCurrency} [currency] * @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions * @property {boolean} [mrp_promotion] - If applied promotion is applied on * product MRP or ESP @@ -262,6 +264,7 @@ export = CartPlatformModel; * @property {string} [cart_id] * @property {number} [cart_value] * @property {string} [created_on] + * @property {string} [currency_code] * @property {number} [item_counts] * @property {Object} [pick_up_customer_details] * @property {string} [user_id] @@ -404,16 +407,19 @@ export = CartPlatformModel; */ /** * @typedef Coupon + * @property {string} [coupon_applicable_message] * @property {string} [coupon_code] * @property {string} [coupon_type] * @property {number} [coupon_value] * @property {string} [description] + * @property {string} [end_date] * @property {string} [expires_on] * @property {boolean} [is_applicable] * @property {boolean} [is_applied] * @property {number} [max_discount_value] * @property {string} [message] * @property {number} [minimum_cart_value] + * @property {string} [start_date] * @property {string} [sub_title] * @property {string} [title] */ @@ -820,6 +826,7 @@ export = CartPlatformModel; /** * @typedef OverrideCartItemPromo * @property {Object[]} [item_list] + * @property {string} [parent_promo_id] * @property {string} promo_amount * @property {string} [promo_desc] * @property {string} promo_id @@ -952,6 +959,7 @@ export = CartPlatformModel; */ /** * @typedef PlatformAddress + * @property {Object} [_custom_json] * @property {string} [address] * @property {string} [address_type] * @property {string} [area] @@ -962,6 +970,8 @@ export = CartPlatformModel; * @property {string} [city] * @property {string} [country] * @property {string} [country_code] + * @property {string} [country_iso_code] + * @property {string} [country_phone_code] * @property {string} [created_by_user_id] * @property {string} [email] * @property {GeoLocation} [geo_location] @@ -973,7 +983,9 @@ export = CartPlatformModel; * @property {Object} [meta] * @property {string} [name] * @property {string} [phone] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] - State code for international address * @property {string[]} [tags] * @property {string} [user_id] */ @@ -1130,6 +1142,9 @@ export = CartPlatformModel; * authenticated * @property {string} message - The message associated with the price adjustment * @property {Object} [meta] + * @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 {string} type - Type of price adjusment * @property {number} value */ @@ -1148,6 +1163,9 @@ export = CartPlatformModel; * authenticated * @property {string} message - The message associated with the price adjustment * @property {Object} [meta] + * @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 {string} type - Type of price adjusment * @property {number} value */ @@ -1155,6 +1173,11 @@ export = CartPlatformModel; * @typedef PriceAdjustmentResponse * @property {PriceAdjustment} [data] */ +/** + * @typedef PriceAdjustmentRestrictions + * @property {Object} [post_order] - This field holds the post-order + * restrictions, indicated by nested fields ['cancellation_allowed','return_allowed'] + */ /** * @typedef PriceAdjustmentUpdate * @property {boolean} [allowed_refund] - Flag indicating whether refunds are @@ -1170,6 +1193,9 @@ export = CartPlatformModel; * @property {string} message - The message associated with the price adjustment * @property {Object} [meta] * @property {string} [modified_by] - The entity that modified the field + * @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied + * to this particular item or product, including whether or not cancellation + * and return are allowed. * @property {string} type - Type of price adjusment * @property {number} value */ @@ -1202,6 +1228,7 @@ export = CartPlatformModel; * @property {string} [seller_identifier] * @property {string} [size] * @property {StoreInfo} [store] + * @property {string[]} [tags] - A list of article tags * @property {string} [type] * @property {string} [uid] */ @@ -1245,6 +1272,11 @@ export = CartPlatformModel; * @property {string} [max] * @property {string} [min] */ +/** + * @typedef PromiseISOFormat + * @property {string} [max] - Max promise in ISO format. + * @property {string} [min] - Min Promise in ISO format. + */ /** * @typedef PromiseTimestamp * @property {number} [max] @@ -1411,12 +1443,12 @@ export = CartPlatformModel; * @property {boolean} [anonymous_users] * @property {number} [order_quantity] * @property {number[]} [ordering_stores] - * @property {PromotionPaymentModes[]} [payments] + * @property {Object} [payments] * @property {string[]} [platforms] * @property {PostOrder1} [post_order] * @property {number[]} [user_groups] * @property {string[]} [user_id] - * @property {Object} [user_registered] + * @property {UserRegistered} [user_registered] * @property {UsesRestriction1} uses */ /** @@ -1488,6 +1520,7 @@ export = CartPlatformModel; /** * @typedef ShipmentPromise * @property {PromiseFormatted} [formatted] + * @property {PromiseISOFormat} [iso] * @property {PromiseTimestamp} [timestamp] */ /** @@ -1687,7 +1720,7 @@ export = CartPlatformModel; declare class CartPlatformModel { } declare namespace CartPlatformModel { - export { AbandonedCart, AbandonedCartResponse, ActionQuery, ActivePromosResponse, AddCartDetailResponse, AddCartRequest, AddProductCart, AppliedFreeArticles, AppliedPromotion, ApplyCouponRequest, Article, ArticlePriceInfo, BaseInfo, BasePrice, BulkBundleRestriction, BuyRules, CartBreakup, CartCheckoutCustomMeta, CartCheckoutResponse, CartCommonConfig, CartCurrency, CartDeliveryModesResponse, CartDetailCoupon, CartDetailResponse, CartItem, CartItemCountResponse, CartItemMeta, CartList, CartMetaConfigAdd, CartMetaConfigUpdate, CartMetaMissingResponse, CartMetaResponse, CartProduct, CartProductIdentifer, CartProductInfo, CategoryInfo, Charges, ChargesThreshold, CheckCart, Collection, CompareObject, Coupon, CouponAction, CouponAdd, CouponAuthor, CouponBreakup, CouponDateMeta, CouponDetails, CouponPartialUpdate, CouponSchedule, CouponsResponse, CouponUpdate, CouponValidity, CustomerDetails, DeleteAddressResponse, DeleteCartDetailResponse, DeleteCartRequest, DeliveryCharges, DeliveryChargesConfig, DiscountOffer, DiscountRule, DiscountRulesApp, DisplayBreakup, DisplayMeta, DisplayMeta1, DisplayMetaDict, Files, FreeGiftItem, GeoLocation, GetCouponResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, Identifier, ItemCriteria, LoyaltyPoints, MultiCartResponse, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenapiCartDetailsRequest, OpenapiCartDetailsResponse, OpenApiCartServiceabilityRequest, OpenApiCartServiceabilityResponse, OpenApiCheckoutResponse, OpenApiErrorResponse, OpenApiFiles, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OperationErrorResponse, OverrideCartItem, OverrideCartItemPromo, OverrideCheckoutReq, OverrideCheckoutResponse, Ownership, Ownership1, Ownership2, Page, PageCoupon, PaymentAllowValue, PaymentAllowValue1, PaymentCouponValidate, PaymentMeta, PaymentMethod, PaymentModes, PaymentSelectionLock, PickupStoreDetail, PlatformAddCartRequest, PlatformAddress, PlatformCartCheckoutDetailRequest, PlatformCartCheckoutDetailV2Request, PlatformCartMetaRequest, PlatformCartShipmentsResponse, PlatformGetAddressesResponse, PlatformSelectCartAddressRequest, PlatformShipmentResponse, PlatformUpdateCartRequest, PostOrder, PostOrder1, PriceAdjustment, PriceAdjustmentAdd, PriceAdjustmentResponse, PriceAdjustmentUpdate, PriceRange, ProductAction, ProductArticle, ProductAvailability, ProductAvailabilitySize, ProductImage, ProductPrice, ProductPriceInfo, PromiseFormatted, PromiseTimestamp, PromoMeta, PromotionAction, PromotionAdd, PromotionAuthor, PromotionDateMeta, PromotionListItem, PromotionPartialUpdate, PromotionPaymentModes, PromotionSchedule, PromotionsResponse, PromotionUpdate, RawBreakup, Restrictions, Restrictions1, Rule, RuleDefinition, SaveAddressResponse, SharedCart, SharedCartDetails, SharedCartResponse, ShipmentArticle, ShipmentPromise, ShippingAddress, StaffCheckout, State, StoreDetailsResponse, StoreInfo, SuccessMessage, Tags, UpdateAddressResponse, UpdateCartDetailResponse, UpdateCartPaymentRequest, UpdateCartPaymentRequestV2, UpdateCartRequest, UpdateCartShipmentItem, UpdateCartShipmentRequest, UpdateProductCart, UpdateUserCartMapping, UserCartMappingResponse, UserInfo, UserRegistered, UsesRemaining, UsesRemaining1, UsesRestriction, UsesRestriction1, Validation, Validity, Visibility }; + export { AbandonedCart, AbandonedCartResponse, ActionQuery, ActivePromosResponse, AddCartDetailResponse, AddCartRequest, AddProductCart, AppliedFreeArticles, AppliedPromotion, ApplyCouponRequest, Article, ArticlePriceInfo, BaseInfo, BasePrice, BulkBundleRestriction, BuyRules, CartBreakup, CartCheckoutCustomMeta, CartCheckoutResponse, CartCommonConfig, CartCurrency, CartDeliveryModesResponse, CartDetailCoupon, CartDetailResponse, CartItem, CartItemCountResponse, CartItemMeta, CartList, CartMetaConfigAdd, CartMetaConfigUpdate, CartMetaMissingResponse, CartMetaResponse, CartProduct, CartProductIdentifer, CartProductInfo, CategoryInfo, Charges, ChargesThreshold, CheckCart, Collection, CompareObject, Coupon, CouponAction, CouponAdd, CouponAuthor, CouponBreakup, CouponDateMeta, CouponDetails, CouponPartialUpdate, CouponSchedule, CouponsResponse, CouponUpdate, CouponValidity, CustomerDetails, DeleteAddressResponse, DeleteCartDetailResponse, DeleteCartRequest, DeliveryCharges, DeliveryChargesConfig, DiscountOffer, DiscountRule, DiscountRulesApp, DisplayBreakup, DisplayMeta, DisplayMeta1, DisplayMetaDict, Files, FreeGiftItem, GeoLocation, GetCouponResponse, GetShareCartLinkRequest, GetShareCartLinkResponse, Identifier, ItemCriteria, LoyaltyPoints, MultiCartResponse, MultiTenderPaymentMeta, MultiTenderPaymentMethod, OpenapiCartDetailsRequest, OpenapiCartDetailsResponse, OpenApiCartServiceabilityRequest, OpenApiCartServiceabilityResponse, OpenApiCheckoutResponse, OpenApiErrorResponse, OpenApiFiles, OpenApiOrderItem, OpenApiPlatformCheckoutReq, OperationErrorResponse, OverrideCartItem, OverrideCartItemPromo, OverrideCheckoutReq, OverrideCheckoutResponse, Ownership, Ownership1, Ownership2, Page, PageCoupon, PaymentAllowValue, PaymentAllowValue1, PaymentCouponValidate, PaymentMeta, PaymentMethod, PaymentModes, PaymentSelectionLock, PickupStoreDetail, PlatformAddCartRequest, PlatformAddress, PlatformCartCheckoutDetailRequest, PlatformCartCheckoutDetailV2Request, PlatformCartMetaRequest, PlatformCartShipmentsResponse, PlatformGetAddressesResponse, PlatformSelectCartAddressRequest, PlatformShipmentResponse, PlatformUpdateCartRequest, PostOrder, PostOrder1, PriceAdjustment, PriceAdjustmentAdd, PriceAdjustmentResponse, PriceAdjustmentRestrictions, PriceAdjustmentUpdate, PriceRange, ProductAction, ProductArticle, ProductAvailability, ProductAvailabilitySize, ProductImage, ProductPrice, ProductPriceInfo, PromiseFormatted, PromiseISOFormat, PromiseTimestamp, PromoMeta, PromotionAction, PromotionAdd, PromotionAuthor, PromotionDateMeta, PromotionListItem, PromotionPartialUpdate, PromotionPaymentModes, PromotionSchedule, PromotionsResponse, PromotionUpdate, RawBreakup, Restrictions, Restrictions1, Rule, RuleDefinition, SaveAddressResponse, SharedCart, SharedCartDetails, SharedCartResponse, ShipmentArticle, ShipmentPromise, ShippingAddress, StaffCheckout, State, StoreDetailsResponse, StoreInfo, SuccessMessage, Tags, UpdateAddressResponse, UpdateCartDetailResponse, UpdateCartPaymentRequest, UpdateCartPaymentRequestV2, UpdateCartRequest, UpdateCartShipmentItem, UpdateCartShipmentRequest, UpdateProductCart, UpdateUserCartMapping, UserCartMappingResponse, UserInfo, UserRegistered, UsesRemaining, UsesRemaining1, UsesRestriction, UsesRestriction1, Validation, Validity, Visibility }; } /** @returns {AbandonedCart} */ declare function AbandonedCart(): AbandonedCart; @@ -1829,6 +1862,10 @@ type AddProductCart = { product_group_tags?: string[]; quantity?: number; seller_id?: number; + /** + * - Add items using seller identifier for store os + */ + seller_identifier?: string; store_id?: number; }; /** @returns {AppliedFreeArticles} */ @@ -1872,6 +1909,7 @@ type AppliedPromotion = { * - Buy rules for promotions */ buy_rules?: BuyRules[]; + currency?: CartCurrency; /** * - Discount rules for promotions */ @@ -2109,6 +2147,7 @@ type CartList = { cart_id?: string; cart_value?: number; created_on?: string; + currency_code?: string; item_counts?: number; pick_up_customer_details?: any; user_id?: string; @@ -2274,16 +2313,19 @@ type CompareObject = { /** @returns {Coupon} */ declare function Coupon(): Coupon; type Coupon = { + coupon_applicable_message?: string; coupon_code?: string; coupon_type?: string; coupon_value?: number; description?: string; + end_date?: string; expires_on?: string; is_applicable?: boolean; is_applied?: boolean; max_discount_value?: number; message?: string; minimum_cart_value?: number; + start_date?: string; sub_title?: string; title?: string; }; @@ -2804,6 +2846,7 @@ type OverrideCartItem = { declare function OverrideCartItemPromo(): OverrideCartItemPromo; type OverrideCartItemPromo = { item_list?: any[]; + parent_promo_id?: string; promo_amount: string; promo_desc?: string; promo_id: string; @@ -2959,6 +3002,7 @@ type PlatformAddCartRequest = { /** @returns {PlatformAddress} */ declare function PlatformAddress(): PlatformAddress; type PlatformAddress = { + _custom_json?: any; address?: string; address_type?: string; area?: string; @@ -2969,6 +3013,8 @@ type PlatformAddress = { city?: string; country?: string; country_code?: string; + country_iso_code?: string; + country_phone_code?: string; created_by_user_id?: string; email?: string; geo_location?: GeoLocation; @@ -2980,7 +3026,12 @@ type PlatformAddress = { meta?: any; name?: string; phone?: string; + sector?: string; state?: string; + /** + * - State code for international address + */ + state_code?: string; tags?: string[]; user_id?: string; }; @@ -3187,6 +3238,12 @@ type PriceAdjustment = { */ message: string; meta?: any; + /** + * - This field accepts + * the restrictions applied to this particular item or service, including + * whether or not cancellation and return are allowed, etc + */ + restrictions?: PriceAdjustmentRestrictions; /** * - Type of price adjusment */ @@ -3233,6 +3290,12 @@ type PriceAdjustmentAdd = { */ message: string; meta?: any; + /** + * - This field accepts + * the restrictions applied to this particular item or service, including + * whether or not cancellation and return are allowed, etc + */ + restrictions?: PriceAdjustmentRestrictions; /** * - Type of price adjusment */ @@ -3244,6 +3307,15 @@ declare function PriceAdjustmentResponse(): PriceAdjustmentResponse; type PriceAdjustmentResponse = { data?: PriceAdjustment; }; +/** @returns {PriceAdjustmentRestrictions} */ +declare function PriceAdjustmentRestrictions(): PriceAdjustmentRestrictions; +type PriceAdjustmentRestrictions = { + /** + * - This field holds the post-order + * restrictions, indicated by nested fields ['cancellation_allowed','return_allowed'] + */ + post_order?: any; +}; /** @returns {PriceAdjustmentUpdate} */ declare function PriceAdjustmentUpdate(): PriceAdjustmentUpdate; type PriceAdjustmentUpdate = { @@ -3284,6 +3356,12 @@ type PriceAdjustmentUpdate = { * - The entity that modified the field */ modified_by?: string; + /** + * - Restrictions applied + * to this particular item or product, including whether or not cancellation + * and return are allowed. + */ + restrictions?: PriceAdjustmentRestrictions; /** * - Type of price adjusment */ @@ -3322,6 +3400,10 @@ type ProductArticle = { seller_identifier?: string; size?: string; store?: StoreInfo; + /** + * - A list of article tags + */ + tags?: string[]; type?: string; uid?: string; }; @@ -3371,6 +3453,18 @@ type PromiseFormatted = { max?: string; min?: string; }; +/** @returns {PromiseISOFormat} */ +declare function PromiseISOFormat(): PromiseISOFormat; +type PromiseISOFormat = { + /** + * - Max promise in ISO format. + */ + max?: string; + /** + * - Min Promise in ISO format. + */ + min?: string; +}; /** @returns {PromiseTimestamp} */ declare function PromiseTimestamp(): PromiseTimestamp; type PromiseTimestamp = { @@ -3606,12 +3700,12 @@ type Restrictions1 = { anonymous_users?: boolean; order_quantity?: number; ordering_stores?: number[]; - payments?: PromotionPaymentModes[]; + payments?: any; platforms?: string[]; post_order?: PostOrder1; user_groups?: number[]; user_id?: string[]; - user_registered?: any; + user_registered?: UserRegistered; uses: UsesRestriction1; }; /** @returns {Rule} */ @@ -3703,6 +3797,7 @@ type ShipmentArticle = { declare function ShipmentPromise(): ShipmentPromise; type ShipmentPromise = { formatted?: PromiseFormatted; + iso?: PromiseISOFormat; timestamp?: PromiseTimestamp; }; /** @returns {ShippingAddress} */ diff --git a/sdk/platform/Cart/CartPlatformModel.js b/sdk/platform/Cart/CartPlatformModel.js index 7d3092134..e9a148b0a 100644 --- a/sdk/platform/Cart/CartPlatformModel.js +++ b/sdk/platform/Cart/CartPlatformModel.js @@ -97,6 +97,7 @@ const Joi = require("joi"); * @property {string[]} [product_group_tags] * @property {number} [quantity] * @property {number} [seller_id] + * @property {string} [seller_identifier] - Add items using seller identifier for store os * @property {number} [store_id] */ @@ -116,6 +117,7 @@ const Joi = require("joi"); * @property {number} [article_quantity] - Quantity of article on which * promotion is applicable * @property {BuyRules[]} [buy_rules] - Buy rules for promotions + * @property {CartCurrency} [currency] * @property {DiscountRulesApp[]} [discount_rules] - Discount rules for promotions * @property {boolean} [mrp_promotion] - If applied promotion is applied on * product MRP or ESP @@ -290,6 +292,7 @@ const Joi = require("joi"); * @property {string} [cart_id] * @property {number} [cart_value] * @property {string} [created_on] + * @property {string} [currency_code] * @property {number} [item_counts] * @property {Object} [pick_up_customer_details] * @property {string} [user_id] @@ -446,16 +449,19 @@ const Joi = require("joi"); /** * @typedef Coupon + * @property {string} [coupon_applicable_message] * @property {string} [coupon_code] * @property {string} [coupon_type] * @property {number} [coupon_value] * @property {string} [description] + * @property {string} [end_date] * @property {string} [expires_on] * @property {boolean} [is_applicable] * @property {boolean} [is_applied] * @property {number} [max_discount_value] * @property {string} [message] * @property {number} [minimum_cart_value] + * @property {string} [start_date] * @property {string} [sub_title] * @property {string} [title] */ @@ -910,6 +916,7 @@ const Joi = require("joi"); /** * @typedef OverrideCartItemPromo * @property {Object[]} [item_list] + * @property {string} [parent_promo_id] * @property {string} promo_amount * @property {string} [promo_desc] * @property {string} promo_id @@ -1059,6 +1066,7 @@ const Joi = require("joi"); /** * @typedef PlatformAddress + * @property {Object} [_custom_json] * @property {string} [address] * @property {string} [address_type] * @property {string} [area] @@ -1069,6 +1077,8 @@ const Joi = require("joi"); * @property {string} [city] * @property {string} [country] * @property {string} [country_code] + * @property {string} [country_iso_code] + * @property {string} [country_phone_code] * @property {string} [created_by_user_id] * @property {string} [email] * @property {GeoLocation} [geo_location] @@ -1080,7 +1090,9 @@ const Joi = require("joi"); * @property {Object} [meta] * @property {string} [name] * @property {string} [phone] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] - State code for international address * @property {string[]} [tags] * @property {string} [user_id] */ @@ -1248,6 +1260,9 @@ const Joi = require("joi"); * authenticated * @property {string} message - The message associated with the price adjustment * @property {Object} [meta] + * @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 {string} type - Type of price adjusment * @property {number} value */ @@ -1267,6 +1282,9 @@ const Joi = require("joi"); * authenticated * @property {string} message - The message associated with the price adjustment * @property {Object} [meta] + * @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 {string} type - Type of price adjusment * @property {number} value */ @@ -1276,6 +1294,12 @@ const Joi = require("joi"); * @property {PriceAdjustment} [data] */ +/** + * @typedef PriceAdjustmentRestrictions + * @property {Object} [post_order] - This field holds the post-order + * restrictions, indicated by nested fields ['cancellation_allowed','return_allowed'] + */ + /** * @typedef PriceAdjustmentUpdate * @property {boolean} [allowed_refund] - Flag indicating whether refunds are @@ -1291,6 +1315,9 @@ const Joi = require("joi"); * @property {string} message - The message associated with the price adjustment * @property {Object} [meta] * @property {string} [modified_by] - The entity that modified the field + * @property {PriceAdjustmentRestrictions} [restrictions] - Restrictions applied + * to this particular item or product, including whether or not cancellation + * and return are allowed. * @property {string} type - Type of price adjusment * @property {number} value */ @@ -1326,6 +1353,7 @@ const Joi = require("joi"); * @property {string} [seller_identifier] * @property {string} [size] * @property {StoreInfo} [store] + * @property {string[]} [tags] - A list of article tags * @property {string} [type] * @property {string} [uid] */ @@ -1376,6 +1404,12 @@ const Joi = require("joi"); * @property {string} [min] */ +/** + * @typedef PromiseISOFormat + * @property {string} [max] - Max promise in ISO format. + * @property {string} [min] - Min Promise in ISO format. + */ + /** * @typedef PromiseTimestamp * @property {number} [max] @@ -1556,12 +1590,12 @@ const Joi = require("joi"); * @property {boolean} [anonymous_users] * @property {number} [order_quantity] * @property {number[]} [ordering_stores] - * @property {PromotionPaymentModes[]} [payments] + * @property {Object} [payments] * @property {string[]} [platforms] * @property {PostOrder1} [post_order] * @property {number[]} [user_groups] * @property {string[]} [user_id] - * @property {Object} [user_registered] + * @property {UserRegistered} [user_registered] * @property {UsesRestriction1} uses */ @@ -1641,6 +1675,7 @@ const Joi = require("joi"); /** * @typedef ShipmentPromise * @property {PromiseFormatted} [formatted] + * @property {PromiseISOFormat} [iso] * @property {PromiseTimestamp} [timestamp] */ @@ -1974,6 +2009,7 @@ class CartPlatformModel { product_group_tags: Joi.array().items(Joi.string().allow("").allow(null)), quantity: Joi.number(), seller_id: Joi.number(), + seller_identifier: Joi.string().allow(""), store_id: Joi.number(), }); } @@ -1997,6 +2033,7 @@ class CartPlatformModel { ), article_quantity: Joi.number(), buy_rules: Joi.array().items(CartPlatformModel.BuyRules()), + currency: CartPlatformModel.CartCurrency(), discount_rules: Joi.array().items(CartPlatformModel.DiscountRulesApp()), mrp_promotion: Joi.boolean(), offer_text: Joi.string().allow(""), @@ -2209,6 +2246,7 @@ class CartPlatformModel { cart_id: Joi.string().allow(""), cart_value: Joi.number(), created_on: Joi.string().allow(""), + currency_code: Joi.string().allow(""), item_counts: Joi.number(), pick_up_customer_details: Joi.any(), user_id: Joi.string().allow(""), @@ -2394,16 +2432,19 @@ class CartPlatformModel { /** @returns {Coupon} */ static Coupon() { return Joi.object({ + coupon_applicable_message: Joi.string().allow(""), coupon_code: Joi.string().allow(""), coupon_type: Joi.string().allow("").allow(null), coupon_value: Joi.number(), description: Joi.string().allow("").allow(null), + end_date: Joi.string().allow("").allow(null), expires_on: Joi.string().allow(""), is_applicable: Joi.boolean(), is_applied: Joi.boolean(), max_discount_value: Joi.number(), message: Joi.string().allow(""), minimum_cart_value: Joi.number(), + start_date: Joi.string().allow("").allow(null), sub_title: Joi.string().allow(""), title: Joi.string().allow(""), }); @@ -2957,6 +2998,7 @@ class CartPlatformModel { static OverrideCartItemPromo() { return Joi.object({ item_list: Joi.array().items(Joi.any().allow(null)), + parent_promo_id: Joi.string().allow(""), promo_amount: Joi.string().allow("").required(), promo_desc: Joi.string().allow(""), promo_id: Joi.string().allow("").required(), @@ -3142,6 +3184,7 @@ class CartPlatformModel { /** @returns {PlatformAddress} */ static PlatformAddress() { return Joi.object({ + _custom_json: Joi.any(), address: Joi.string().allow(""), address_type: Joi.string().allow(""), area: Joi.string().allow(""), @@ -3152,6 +3195,8 @@ class CartPlatformModel { city: Joi.string().allow(""), country: Joi.string().allow(""), country_code: Joi.string().allow(""), + country_iso_code: Joi.string().allow(""), + country_phone_code: Joi.string().allow(""), created_by_user_id: Joi.string().allow(""), email: Joi.string().allow(""), geo_location: CartPlatformModel.GeoLocation(), @@ -3163,7 +3208,9 @@ class CartPlatformModel { meta: Joi.any(), name: Joi.string().allow(""), phone: Joi.string().allow(""), + sector: Joi.string().allow(""), state: Joi.string().allow(""), + state_code: Joi.string().allow(""), tags: Joi.array().items(Joi.string().allow("")), user_id: Joi.string().allow(""), }); @@ -3357,6 +3404,7 @@ class CartPlatformModel { is_authenticated: Joi.boolean().required(), message: Joi.string().allow("").required(), meta: Joi.any(), + restrictions: CartPlatformModel.PriceAdjustmentRestrictions(), type: Joi.string().allow("").required(), value: Joi.number().required(), }); @@ -3375,6 +3423,7 @@ class CartPlatformModel { is_authenticated: Joi.boolean().required(), message: Joi.string().allow("").required(), meta: Joi.any(), + restrictions: CartPlatformModel.PriceAdjustmentRestrictions(), type: Joi.string().allow("").required(), value: Joi.number().required(), }); @@ -3387,6 +3436,13 @@ class CartPlatformModel { }); } + /** @returns {PriceAdjustmentRestrictions} */ + static PriceAdjustmentRestrictions() { + return Joi.object({ + post_order: Joi.any(), + }); + } + /** @returns {PriceAdjustmentUpdate} */ static PriceAdjustmentUpdate() { return Joi.object({ @@ -3400,6 +3456,7 @@ class CartPlatformModel { message: Joi.string().allow("").required(), meta: Joi.any(), modified_by: Joi.string().allow(""), + restrictions: CartPlatformModel.PriceAdjustmentRestrictions(), type: Joi.string().allow("").required(), value: Joi.number().required(), }); @@ -3441,6 +3498,7 @@ class CartPlatformModel { seller_identifier: Joi.string().allow(""), size: Joi.string().allow(""), store: CartPlatformModel.StoreInfo(), + tags: Joi.array().items(Joi.string().allow("")), type: Joi.string().allow(""), uid: Joi.string().allow(""), }); @@ -3506,6 +3564,14 @@ class CartPlatformModel { }); } + /** @returns {PromiseISOFormat} */ + static PromiseISOFormat() { + return Joi.object({ + max: Joi.string().allow(""), + min: Joi.string().allow(""), + }); + } + /** @returns {PromiseTimestamp} */ static PromiseTimestamp() { return Joi.object({ @@ -3720,12 +3786,12 @@ class CartPlatformModel { anonymous_users: Joi.boolean(), order_quantity: Joi.number(), ordering_stores: Joi.array().items(Joi.number()), - payments: Joi.array().items(CartPlatformModel.PromotionPaymentModes()), + payments: Joi.any(), platforms: Joi.array().items(Joi.string().allow("")), post_order: CartPlatformModel.PostOrder1(), user_groups: Joi.array().items(Joi.number()), user_id: Joi.array().items(Joi.string().allow("")), - user_registered: Joi.any().allow(null), + user_registered: CartPlatformModel.UserRegistered(), uses: CartPlatformModel.UsesRestriction1().required(), }); } @@ -3821,6 +3887,7 @@ class CartPlatformModel { static ShipmentPromise() { return Joi.object({ formatted: CartPlatformModel.PromiseFormatted(), + iso: CartPlatformModel.PromiseISOFormat(), timestamp: CartPlatformModel.PromiseTimestamp(), }); } diff --git a/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts b/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts index c5eb9ff46..de0b9434b 100644 --- a/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts @@ -168,12 +168,14 @@ declare class Catalog { * @param {CatalogPlatformApplicationValidator.DeleteCollectionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name deleteCollection * @summary: Delete a Collection * @description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteCollection/). */ - deleteCollection({ id, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteCollectionParam, { responseHeaders }?: object): Promise; + deleteCollection({ id, requestHeaders }?: CatalogPlatformApplicationValidator.DeleteCollectionParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.DeleteGroupConfigurationParam} arg * - Arg object @@ -282,7 +284,7 @@ declare class Catalog { * @summary: Get list of locations * @description: This API allows to view all the locations asscoiated to a application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppLocations/). */ - getAppLocations({ storeType, uid, q, stage, pageNo, pageSize, 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 {string} arg.companyId - Id of the company whose locations are to fetched @@ -297,11 +299,13 @@ declare class Catalog { * unverified companies. * @param {number} [arg.pageSize] - Number of items to retrieve in each * 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} * @summary: Get list of locations * @description: This API allows to view all the locations asscoiated to a application. */ - getAppLocationsPaginator({ companyId, applicationId, storeType, uid, q, stage, pageSize, }?: { + getAppLocationsPaginator({ companyId, applicationId, storeType, uid, q, stage, pageSize, tags, storeTypes, }?: { companyId: string; applicationId: string; storeType?: string; @@ -309,6 +313,8 @@ declare class Catalog { q?: string; stage?: string; pageSize?: number; + tags?: string[]; + storeTypes?: string[]; }): Paginator; /** * @param {CatalogPlatformApplicationValidator.GetAppProductParam} arg - Arg object @@ -608,13 +614,13 @@ declare class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getCollectionDetail * @summary: Get a particular collection * @description: Get the details of a collection by its `slug`. If successful, returns a Collection resource in the response body specified in `CollectionDetailResponse` - 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 @@ -654,7 +660,7 @@ declare class Catalog { * @summary: Get configuration metadata details for catalog for admin panel * @description: Get the configuraion metadata details for catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getConfigurationMetadata/). */ - getConfigurationMetadata({ configType, templateSlug, requestHeaders }?: CatalogPlatformApplicationValidator.GetConfigurationMetadataParam, { responseHeaders }?: object): Promise; + getConfigurationMetadata({ configType, templateSlug, pageNo, pageSize, q, requestHeaders }?: CatalogPlatformApplicationValidator.GetConfigurationMetadataParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformApplicationValidator.GetConfigurationsParam} arg * - Arg object @@ -732,14 +738,12 @@ 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 query filters to configure a collection * @description: Get query filters to configure a collection - 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 diff --git a/sdk/platform/Catalog/CatalogPlatformApplicationClient.js b/sdk/platform/Catalog/CatalogPlatformApplicationClient.js index e6dd3e6e1..dc290eb3e 100644 --- a/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +++ b/sdk/platform/Catalog/CatalogPlatformApplicationClient.js @@ -1082,7 +1082,9 @@ class Catalog { * @param {CatalogPlatformApplicationValidator.DeleteCollectionParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} + * - Success response + * * @name deleteCollection * @summary: Delete a Collection * @description: Delete a collection by it's id. Returns an object that tells whether the collection was deleted successfully - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/deleteCollection/). @@ -1138,10 +1140,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.DeleteResponse().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = CatalogPlatformModel.CommonResponseSchemaCollection().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1866,9 +1868,17 @@ class Catalog { * @description: This API allows to view all the locations asscoiated to a application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppLocations/). */ async getAppLocations( - { storeType, uid, q, stage, pageNo, pageSize, requestHeaders } = { - requestHeaders: {}, - }, + { + storeType, + uid, + q, + stage, + pageNo, + pageSize, + tags, + storeTypes, + requestHeaders, + } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -1881,6 +1891,8 @@ class Catalog { stage, pageNo, pageSize, + tags, + storeTypes, }, { abortEarly: false, allowUnknown: true } ); @@ -1899,6 +1911,8 @@ class Catalog { stage, pageNo, pageSize, + tags, + storeTypes, }, { abortEarly: false, allowUnknown: false } ); @@ -1916,6 +1930,8 @@ class Catalog { query_params["stage"] = stage; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; + query_params["tags"] = tags; + query_params["store_types"] = storeTypes; const response = await PlatformAPIClient.execute( this.config, @@ -1967,6 +1983,8 @@ class Catalog { * unverified companies. * @param {number} [arg.pageSize] - Number of items to retrieve in each * 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} * @summary: Get list of locations * @description: This API allows to view all the locations asscoiated to a application. @@ -1979,6 +1997,8 @@ class Catalog { q, stage, pageSize, + tags, + storeTypes, } = {}) { const paginator = new Paginator(); const callback = async () => { @@ -1994,6 +2014,8 @@ class Catalog { stage: stage, pageNo: pageNo, pageSize: pageSize, + tags: tags, + storeTypes: storeTypes, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, @@ -3428,7 +3450,7 @@ class Catalog { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response * @name getCollectionDetail * @summary: Get a particular collection @@ -3485,10 +3507,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.CollectionDetailResponse().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = CatalogPlatformModel.GetCollectionDetailResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3691,7 +3713,9 @@ class Catalog { * @description: Get the configuraion metadata details for catalog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getConfigurationMetadata/). */ async getConfigurationMetadata( - { configType, templateSlug, requestHeaders } = { requestHeaders: {} }, + { configType, templateSlug, pageNo, pageSize, q, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -3700,6 +3724,9 @@ class Catalog { { configType, templateSlug, + pageNo, + pageSize, + q, }, { abortEarly: false, allowUnknown: true } ); @@ -3714,6 +3741,9 @@ class Catalog { { configType, templateSlug, + pageNo, + pageSize, + q, }, { abortEarly: false, allowUnknown: false } ); @@ -3726,6 +3756,9 @@ class Catalog { const query_params = {}; query_params["template_slug"] = templateSlug; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["q"] = q; const response = await PlatformAPIClient.execute( this.config, @@ -4293,9 +4326,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 query filters to configure a collection * @description: Get query filters to configure a collection - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getQueryFilters/). @@ -4347,10 +4378,10 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.GetCollectionQueryOptionResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = CatalogPlatformModel.GetQueryFiltersResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { diff --git a/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts b/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts index badff92d5..943885d92 100644 --- a/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts @@ -119,6 +119,8 @@ export = CatalogPlatformApplicationValidator; * set of results * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 20. + * @property {string[]} [tags] - Get locations filtered by tags. + * @property {string[]} [storeTypes] - Get locations filtered by store types. */ /** * @typedef GetAppProductParam @@ -254,6 +256,10 @@ export = CatalogPlatformApplicationValidator; * a specific type of configuration. * @property {string} [templateSlug] - Get configuration list filtered by * `template_slug` string. This is for the details and comparision groups. + * @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. + * @property {string} [q] - Get configuration list filtered by `q` string. */ /** @typedef GetConfigurationsParam */ /** @typedef GetDepartmentsParam */ @@ -706,6 +712,14 @@ type GetAppLocationsParam = { * Default is 20. */ pageSize?: number; + /** + * - Get locations filtered by tags. + */ + tags?: string[]; + /** + * - Get locations filtered by store types. + */ + storeTypes?: string[]; }; type GetAppProductParam = { /** @@ -962,6 +976,19 @@ type GetConfigurationMetadataParam = { * `template_slug` string. This is for the details and comparision groups. */ templateSlug?: string; + /** + * - The page number to navigate through the given + * set of results. + */ + pageNo?: number; + /** + * - Number of items to retrieve in each page. + */ + pageSize?: number; + /** + * - Get configuration list filtered by `q` string. + */ + q?: string; }; type GetDiscountedInventoryBySizeIdentifierParam = { /** diff --git a/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js b/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js index 230779123..cf080007f 100644 --- a/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +++ b/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js @@ -144,6 +144,8 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); * set of results * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 20. + * @property {string[]} [tags] - Get locations filtered by tags. + * @property {string[]} [storeTypes] - Get locations filtered by store types. */ /** @@ -296,6 +298,10 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); * a specific type of configuration. * @property {string} [templateSlug] - Get configuration list filtered by * `template_slug` string. This is for the details and comparision groups. + * @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. + * @property {string} [q] - Get configuration list filtered by `q` string. */ /** @typedef GetConfigurationsParam */ @@ -626,6 +632,8 @@ class CatalogPlatformApplicationValidator { stage: Joi.string().allow(""), pageNo: Joi.number(), pageSize: Joi.number(), + tags: Joi.array().items(Joi.string().allow("")), + storeTypes: Joi.array().items(Joi.string().allow("")), }).required(); } @@ -771,6 +779,9 @@ class CatalogPlatformApplicationValidator { return Joi.object({ configType: Joi.string().allow("").required(), templateSlug: Joi.string().allow(""), + pageNo: Joi.number(), + pageSize: Joi.number(), + q: Joi.string().allow(""), }).required(); } diff --git a/sdk/platform/Catalog/CatalogPlatformClient.d.ts b/sdk/platform/Catalog/CatalogPlatformClient.d.ts index e492fcae1..ed956583e 100644 --- a/sdk/platform/Catalog/CatalogPlatformClient.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformClient.d.ts @@ -117,12 +117,12 @@ declare class Catalog { * @param {CatalogPlatformValidator.CreateProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createProduct * @summary: Create a product. * @description: This API allows to create product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProduct/). */ - createProduct({ body, requestHeaders }?: CatalogPlatformValidator.CreateProductParam, { responseHeaders }?: object): Promise; + createProduct({ body, requestHeaders }?: CatalogPlatformValidator.CreateProductParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.CreateProductAssetsInBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -431,6 +431,16 @@ declare class Catalog { * @description: Use this API to fetch opt-in information for all the platforms. If successful, returns a logs in the response body as specified in `GetOptInPlatformSchema` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getMarketplaceOptinDetail/). */ getMarketplaceOptinDetail({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {CatalogPlatformValidator.GetMarketplacesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getMarketplaces + * @summary: List all marketplaces + * @description: This API allows to get marketplace information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getMarketplaces/). + */ + getMarketplaces({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetOptimalLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -596,7 +606,7 @@ declare class Catalog { * @summary: Get list of size guides * @description: This API allows to view all the size guides associated to the seller. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSizeGuides/). */ - getSizeGuides({ active, q, tag, pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.GetSizeGuidesParam, { responseHeaders }?: object): Promise; + getSizeGuides({ active, q, tag, pageNo, pageSize, brandId, requestHeaders }?: CatalogPlatformValidator.GetSizeGuidesParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.GetStoreDetailParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -626,7 +636,7 @@ declare class Catalog { * @summary: Get product categories list * @description: This API gets meta associated to product categories. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listCategories/). */ - listCategories({ level, departments, q, pageNo, pageSize, requestHeaders }?: CatalogPlatformValidator.ListCategoriesParam, { responseHeaders }?: object): Promise; + listCategories({ level, department, q, pageNo, pageSize, uids, requestHeaders }?: CatalogPlatformValidator.ListCategoriesParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.ListDepartmentsDataParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -747,6 +757,18 @@ declare class Catalog { * @description: This API allows add Inventory for particular size and store. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateInventories/). */ 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} + * - Success response + * + * @name updateMarketplaceOptin + * @summary: Update marketplace optin + * @description: This API allows to update marketplace optin for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateMarketplaceOptin/). + */ + updateMarketplaceOptin({ marketplaceSlug, body, requestHeaders }?: CatalogPlatformValidator.UpdateMarketplaceOptinParam, { responseHeaders }?: object): Promise; /** * @param {CatalogPlatformValidator.UpdateProductBundleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Catalog/CatalogPlatformClient.js b/sdk/platform/Catalog/CatalogPlatformClient.js index 621573755..f467e0712 100644 --- a/sdk/platform/Catalog/CatalogPlatformClient.js +++ b/sdk/platform/Catalog/CatalogPlatformClient.js @@ -900,7 +900,7 @@ class Catalog { * @param {CatalogPlatformValidator.CreateProductParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name createProduct * @summary: Create a product. * @description: This API allows to create product. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/createProduct/). @@ -956,7 +956,7 @@ class Catalog { const { error: res_error, - } = CatalogPlatformModel.SuccessResponse().validate(responseData, { + } = CatalogPlatformModel.SuccessResponse1().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3395,6 +3395,81 @@ class Catalog { return response; } + /** + * @param {CatalogPlatformValidator.GetMarketplacesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getMarketplaces + * @summary: List all marketplaces + * @description: This API allows to get marketplace information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getMarketplaces/). + */ + async getMarketplaces( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = CatalogPlatformValidator.getMarketplaces().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = CatalogPlatformValidator.getMarketplaces().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Catalog > getMarketplaces \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/catalog/v1.0/company/${this.config.companyId}/channel`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CatalogPlatformModel.GetAllMarketplaces().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 > getMarketplaces \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {CatalogPlatformValidator.GetOptimalLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -4670,7 +4745,7 @@ class Catalog { * @description: This API allows to view all the size guides associated to the seller. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getSizeGuides/). */ async getSizeGuides( - { active, q, tag, pageNo, pageSize, requestHeaders } = { + { active, q, tag, pageNo, pageSize, brandId, requestHeaders } = { requestHeaders: {}, }, { responseHeaders } = { responseHeaders: false } @@ -4682,6 +4757,7 @@ class Catalog { tag, pageNo, pageSize, + brandId, }, { abortEarly: false, allowUnknown: true } ); @@ -4699,6 +4775,7 @@ class Catalog { tag, pageNo, pageSize, + brandId, }, { abortEarly: false, allowUnknown: false } ); @@ -4715,6 +4792,7 @@ class Catalog { query_params["tag"] = tag; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; + query_params["brand_id"] = brandId; const xHeaders = {}; @@ -4939,7 +5017,7 @@ class Catalog { * @description: This API gets meta associated to product categories. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/listCategories/). */ async listCategories( - { level, departments, q, pageNo, pageSize, requestHeaders } = { + { level, department, q, pageNo, pageSize, uids, requestHeaders } = { requestHeaders: {}, }, { responseHeaders } = { responseHeaders: false } @@ -4947,10 +5025,11 @@ class Catalog { const { error } = CatalogPlatformValidator.listCategories().validate( { level, - departments, + department, q, pageNo, pageSize, + uids, }, { abortEarly: false, allowUnknown: true } ); @@ -4964,10 +5043,11 @@ class Catalog { } = CatalogPlatformValidator.listCategories().validate( { level, - departments, + department, q, pageNo, pageSize, + uids, }, { abortEarly: false, allowUnknown: false } ); @@ -4980,10 +5060,11 @@ class Catalog { const query_params = {}; query_params["level"] = level; - query_params["departments"] = departments; + query_params["department"] = department; query_params["q"] = q; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; + query_params["uids"] = uids; const xHeaders = {}; @@ -5946,6 +6027,91 @@ class Catalog { return response; } + /** + * @param {CatalogPlatformValidator.UpdateMarketplaceOptinParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name updateMarketplaceOptin + * @summary: Update marketplace optin + * @description: This API allows to update marketplace optin for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/updateMarketplaceOptin/). + */ + async updateMarketplaceOptin( + { marketplaceSlug, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CatalogPlatformValidator.updateMarketplaceOptin().validate( + { + marketplaceSlug, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = CatalogPlatformValidator.updateMarketplaceOptin().validate( + { + marketplaceSlug, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Catalog > updateMarketplaceOptin \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/catalog/v1.0/company/${this.config.companyId}/channel/${marketplaceSlug}/opt-in`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CatalogPlatformModel.UpdateMarketplaceOptinResponse().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 > updateMarketplaceOptin \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {CatalogPlatformValidator.UpdateProductBundleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Catalog/CatalogPlatformModel.d.ts b/sdk/platform/Catalog/CatalogPlatformModel.d.ts index 197009259..042cf5535 100644 --- a/sdk/platform/Catalog/CatalogPlatformModel.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformModel.d.ts @@ -633,6 +633,12 @@ export = CatalogPlatformModel; * @property {number} item_id * @property {number} [priority] */ +/** + * @typedef CollectionItemSchemaV2 + * @property {string} action + * @property {number} item_id + * @property {number} [priority] + */ /** * @typedef CollectionItemUpdate * @property {boolean} [allow_facets] @@ -642,6 +648,15 @@ export = CatalogPlatformModel; * @property {string} [type] * @property {string[]} [visible_facets_keys] */ +/** + * @typedef CollectionItemUpdateSchemaV2 + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] + * @property {CollectionItemSchemaV2[]} [items] + * @property {CollectionQuerySchemaV2[]} [query] + * @property {string} type + * @property {string[]} [visible_facets_keys] + */ /** * @typedef CollectionListingFilter * @property {CollectionListingFilterTag[]} [tags] @@ -666,6 +681,13 @@ export = CatalogPlatformModel; * collection query * @property {Object[]} value - The value of the attribute of the collection query */ +/** + * @typedef CollectionQuerySchemaV2 + * @property {string} attribute - The attribute of the collection query + * @property {string} op - The operation to be performed on the attribute of the + * collection query + * @property {Object[]} value - The value of the attribute of the collection query + */ /** * @typedef CollectionSchedule * @property {string} [cron] @@ -674,6 +696,10 @@ export = CatalogPlatformModel; * @property {NextSchedule[]} [next_schedule] * @property {string} [start] */ +/** + * @typedef CommonResponseSchemaCollection + * @property {string} [message] + */ /** * @typedef CompanyBrandDetail * @property {number} [brand_id] @@ -836,6 +862,11 @@ export = CatalogPlatformModel; * @property {string} type * @property {string[]} [visible_facets_keys] */ +/** + * @typedef CreatedBy + * @property {string} [user_id] + * @property {string} [username] + */ /** * @typedef CreateSearchConfigurationRequest * @property {string} application_id - The application id where custom search @@ -1069,6 +1100,11 @@ export = CatalogPlatformModel; * @property {number} [pincode] * @property {string} [state] */ +/** + * @typedef GetAllMarketplaces + * @property {Marketplaces[]} [items] + * @property {Page} [page] + */ /** * @typedef GetAllSizes * @property {AllSizes[]} [all_sizes] @@ -1136,6 +1172,34 @@ export = CatalogPlatformModel; * @property {string} [uid] * @property {string[]} [visible_facets_keys] */ +/** + * @typedef GetCollectionDetailResponse + * @property {Object} [_custom_json] + * @property {Object} [_locale_language] + * @property {CollectionSchedule} [_schedule] + * @property {Object} [action] + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] + * @property {string} [app_id] + * @property {CollectionBadge} [badge] + * @property {ImageUrls} [banners] + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_visible] + * @property {Media} [logo] + * @property {Object} [meta] + * @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} [uid] + * @property {string[]} [visible_facets_keys] + */ /** * @typedef GetCollectionItemsResponse * @property {ProductFilters[]} [filters] @@ -1143,6 +1207,11 @@ export = CatalogPlatformModel; * @property {Page} [page] * @property {ProductSortOn[]} [sort_on] */ +/** + * @typedef GetCollectionItemsResponseSchemaV2 + * @property {ProductDetailV2[]} [items] + * @property {Page1} [page] + */ /** * @typedef GetCollectionListingResponse * @property {CollectionListingFilter} [filters] @@ -1175,6 +1244,7 @@ export = CatalogPlatformModel; * @typedef GetConfigMetadataResponse * @property {Object[]} [condition] * @property {Object[]} data + * @property {Page} [page] * @property {Object[]} [values] */ /** @@ -1319,6 +1389,12 @@ export = CatalogPlatformModel; * @property {number} [product_uid] * @property {Size[]} [sizes] */ +/** + * @typedef GetQueryFiltersResponse + * @property {ProductFilters[]} [filters] + * @property {Object} operators + * @property {ProductSortOn[]} [sort_on] + */ /** * @typedef GetSearchConfigurationResponse * @property {string} application_id - The application id where custom search @@ -1849,6 +1925,21 @@ export = CatalogPlatformModel; * @property {boolean} [is_default] * @property {string} [name] */ +/** + * @typedef Marketplaces + * @property {string} [_id] + * @property {string} [app_id] + * @property {number[]} [brand_ids] + * @property {number} [company_id] + * @property {CreatedBy} [created_by] + * @property {Object} [created_on] + * @property {boolean} [enabled] + * @property {CreatedBy} [modified_by] + * @property {Object} [modified_on] + * @property {string} [opt_level] + * @property {string} [platforms] + * @property {number[]} [store_ids] + */ /** * @typedef Media * @property {Object} [meta] @@ -1982,6 +2073,18 @@ export = CatalogPlatformModel; * @property {number} [size] * @property {string} type */ +/** + * @typedef Page1 + * @property {boolean} [ca] + * @property {string} [department] + * @property {number} [page_no] + * @property {number} [page_size] + * @property {string} [q] + * @property {string} [sort] + * @property {string} [sort_on] + * @property {string} [type] + * @property {string} [variant] + */ /** * @typedef PageResponse * @property {string} [current] - It is the current page of the page response schema. @@ -2280,6 +2383,20 @@ export = CatalogPlatformModel; * @property {ProductDetailAttribute[]} [details] * @property {string} [title] */ +/** + * @typedef ProductDetailV2 + * @property {ProductBrand} [brand] + * @property {boolean} [is_excluded] + * @property {boolean} [is_pinned] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {Media[]} [medias] + * @property {string} [name] + * @property {number} [priority] + * @property {string} [short_description] + * @property {string} slug + * @property {number} [uid] + */ /** * @typedef ProductDownloadsResponse * @property {ProductTemplateExportResponse[]} [items] - The items of the job. @@ -2727,6 +2844,7 @@ export = CatalogPlatformModel; /** * @typedef SEOData * @property {ApplicationItemSeoBreadcrumbs[]} [breadcrumbs] + * @property {string} [canonical_url] * @property {string} [description] * @property {Metatags[]} [meta_tags] * @property {Sitemap} [sitemap] @@ -2735,6 +2853,7 @@ export = CatalogPlatformModel; /** * @typedef SeoDetail * @property {ApplicationItemSeoBreadcrumbs[]} [breadcrumbs] + * @property {string} [canonical_url] * @property {string} [description] * @property {Metatags[]} [meta_tags] * @property {Object} [sitemap] @@ -2947,6 +3066,27 @@ export = CatalogPlatformModel; * @property {number[]} [items_not_updated] * @property {string} [message] */ +/** + * @typedef UpdateMarketplaceOptinRequest + * @property {number[]} [brand_ids] + * @property {number} [company_id] + * @property {boolean} [enabled] + * @property {string} [opt_level] + * @property {string} [platform] + * @property {number[]} [store_ids] + */ +/** + * @typedef UpdateMarketplaceOptinResponse + * @property {string} [app_id] + * @property {number[]} [brand_ids] + * @property {number} [company_id] + * @property {CreatedBy} [created_by] + * @property {boolean} [enabled] + * @property {CreatedBy} [modified_by] + * @property {string} [opt_level] + * @property {string} [platform] + * @property {number[]} [store_ids] + */ /** * @typedef UpdateSearchConfigurationRequest * @property {string} application_id - The application id where custom search @@ -3124,7 +3264,7 @@ export = CatalogPlatformModel; declare class CatalogPlatformModel { } declare namespace CatalogPlatformModel { - export { Action, ActionPage, AllowSingleRequest, AllSizes, AppCatalogConfiguration, AppCategoryReturnConfig, AppCategoryReturnConfigResponse, AppConfiguration, AppConfigurationDetail, AppConfigurationsSort, ApplicationBrandJson, ApplicationCategoryJson, ApplicationDepartment, ApplicationDepartmentJson, ApplicationDepartmentListingResponse, ApplicationItemMeta, ApplicationItemMOQ, ApplicationItemSEO, ApplicationItemSeoAction, ApplicationItemSeoBreadcrumbs, ApplicationItemSeoMetaTagItem, ApplicationItemSeoMetaTags, ApplicationProductListingResponse, ApplicationStoreJson, AppReturnConfigResponse, ArticleAssignment, ArticleAssignment1, ArticleQuery, ArticleStoreResponse, AssignStore, AssignStoreArticle, AttributeDetailsGroup, AttributeMaster, AttributeMasterDetails, AttributeMasterFilter, AttributeMasterMandatoryDetails, AttributeMasterMeta, AttributeMasterSerializer, AttributeSchemaRange, AutocompleteAction, AutoCompleteMedia, AutocompletePageAction, AutocompleteResult, BannerImage, BaseAppCategoryReturnConfig, BaseAppCategoryReturnConfigResponse, Brand, BrandItem, BrandListingResponse, BrandMeta, BrandMeta1, BulkAssetResponse, BulkHsnResponse, BulkHsnUpsert, BulkInventoryGet, BulkInventoryGetItems, BulkJob, BulkProductRequest, BulkResponse, CatalogInsightBrand, CatalogInsightItem, CatalogInsightResponse, CategoriesResponse, Category, CategoryCreateResponse, CategoryItems, CategoryListingResponse, CategoryMapping, CategoryMappingValues, CategoryRequestBody, CategoryResponse, CategoryUpdateResponse, Child, CollectionBadge, CollectionBanner, CollectionCreateResponse, CollectionDetailResponse, CollectionImage, CollectionItem, CollectionItemUpdate, CollectionListingFilter, CollectionListingFilterTag, CollectionListingFilterType, CollectionQuery, CollectionSchedule, CompanyBrandDetail, CompanyMeta, CompanyMeta1, 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, DepartmentCreateErrorResponse, DepartmentCreateResponse, DepartmentCreateUpdate, DepartmentErrorResponse, DepartmentIdentifier, DepartmentModel, DepartmentResponse, DepartmentsResponse, DimensionResponse, DimensionResponse1, Document, EntityConfiguration, ErrorResponse, FilerList, GenderDetail, GetAddressSerializer, GetAllSizes, GetAppCatalogConfiguration, GetAppCatalogEntityConfiguration, GetAutocompleteWordsData, GetAutocompleteWordsResponse, GetCatalogConfigurationDetailsProduct, GetCatalogConfigurationDetailsSchemaListing, GetCatalogConfigurationMetaData, GetCollectionDetailNest, GetCollectionItemsResponse, GetCollectionListingResponse, GetCollectionQueryOptionResponse, GetCompanySerializer, GetConfigMetadataResponse, GetConfigResponse, GetDepartment, GetInventories, GetInventoriesResponse, GetLocationSerializer, GetOptInPlatform, GetProductBundleCreateResponse, GetProductBundleListingResponse, GetProductBundleResponse, GetProducts, GetSearchConfigurationResponse, GetSearchWordsData, GetSearchWordsDetailResponse, GetSearchWordsResponse, GlobalValidation, GTIN, Guide, Hierarchy, HsnCode, HsnCodesListingResponseSchemaV2, HsnCodesObject, HSNCodesResponse, HSNData, HSNDataInsertV2, HsnUpsert, Image, ImageUrls, 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, InvSize, ItemQuery, Items, LimitedProductData, ListSizeGuide, LocationDayWiseSerializer, LocationIntegrationType, LocationListSerializer, LocationManagerSerializer, LocationTimingSerializer, Logo, ManufacturerResponse, ManufacturerResponse1, Media, Media1, Media2, Meta, MetaDataListingFilterMetaResponse, MetaDataListingFilterResponse, MetaDataListingResponse, MetaDataListingSortMetaResponse, MetaDataListingSortResponse, MetaFields, Metatags, MOQData, NetQuantity, NetQuantityResponse, NextSchedule, OptinCompanyBrandDetailsView, OptinCompanyDetail, OptinCompanyMetrics, OptInPostRequest, OptinStoreDetails, OwnerAppItemResponse, Page, PageResponse, PageResponse1, PageResponseType, Price, Price1, PriceArticle, PriceMeta, ProdcutTemplateCategoriesResponse, Product, ProductAttributesResponse, ProductBrand, ProductBulkAssets, ProductBulkRequest, ProductBulkRequestList, ProductBundleItem, ProductBundleRequest, ProductBundleUpdateRequest, ProductConfigurationDownloads, ProductCreateUpdateSchemaV2, ProductDetail, ProductDetailAttribute, ProductDetailGroupedAttribute, ProductDownloadsResponse, ProductFilters, ProductFiltersKey, ProductFiltersValue, ProductListingDetail, ProductListingPrice, ProductListingResponse, ProductListingResponseV2, ProductPublish, ProductPublish1, ProductPublished, ProductReturnConfigBaseSerializer, ProductReturnConfigSerializer, ProductSchemaV2, ProductSize, ProductSizeDeleteDataResponse, ProductSizeDeleteResponse, ProductSortOn, ProductTagsViewResponse, ProductTemplate, ProductTemplateDownloadsExport, ProductTemplateExportFilterRequest, ProductTemplateExportResponse, ProductVariants, ProductVariantsResponse, Properties, PTErrorResponse, Quantities, QuantitiesArticle, Quantity, QuantityBase, RawProduct, RawProductListingResponse, ReturnConfig, ReturnConfig1, ReturnConfig2, ReturnConfigResponse, SearchableAttribute, SearchKeywordResult, SecondLevelChild, SellerPhoneNumber, SEOData, SeoDetail, SetSize, SingleCategoryResponse, SingleProductResponse, Sitemap, Size, SizeDistribution, SizeGuideResponse, SizePromotionThreshold, StoreAssignResponse, StoreDetail, StoreMeta, SuccessResponse, SuccessResponse1, TaxIdentifier, TaxSlab, TeaserTag, TemplateDetails, TemplatesResponse, TemplatesValidationResponse, TemplateValidationData, ThirdLevelChild, Trader, Trader1, Trader2, UpdateCollection, UpdatedResponse, UpdateSearchConfigurationRequest, UpdateSearchConfigurationResponse, UserCommon, UserDetail, UserDetail1, UserInfo, UserInfo1, UserSerializer, UserSerializer1, UserSerializer2, UserSerializer3, ValidateIdentifier, ValidateProduct, ValidateSizeGuide, VerifiedBy, WeightResponse, WeightResponse1, PageType }; + export { Action, ActionPage, AllowSingleRequest, AllSizes, AppCatalogConfiguration, AppCategoryReturnConfig, AppCategoryReturnConfigResponse, AppConfiguration, AppConfigurationDetail, AppConfigurationsSort, ApplicationBrandJson, ApplicationCategoryJson, ApplicationDepartment, ApplicationDepartmentJson, ApplicationDepartmentListingResponse, ApplicationItemMeta, ApplicationItemMOQ, ApplicationItemSEO, ApplicationItemSeoAction, ApplicationItemSeoBreadcrumbs, ApplicationItemSeoMetaTagItem, ApplicationItemSeoMetaTags, ApplicationProductListingResponse, ApplicationStoreJson, AppReturnConfigResponse, ArticleAssignment, ArticleAssignment1, ArticleQuery, ArticleStoreResponse, AssignStore, AssignStoreArticle, AttributeDetailsGroup, AttributeMaster, AttributeMasterDetails, AttributeMasterFilter, AttributeMasterMandatoryDetails, AttributeMasterMeta, AttributeMasterSerializer, AttributeSchemaRange, AutocompleteAction, AutoCompleteMedia, AutocompletePageAction, AutocompleteResult, BannerImage, BaseAppCategoryReturnConfig, BaseAppCategoryReturnConfigResponse, Brand, BrandItem, BrandListingResponse, BrandMeta, BrandMeta1, BulkAssetResponse, BulkHsnResponse, BulkHsnUpsert, BulkInventoryGet, BulkInventoryGetItems, BulkJob, BulkProductRequest, BulkResponse, CatalogInsightBrand, CatalogInsightItem, CatalogInsightResponse, CategoriesResponse, Category, CategoryCreateResponse, CategoryItems, CategoryListingResponse, CategoryMapping, CategoryMappingValues, CategoryRequestBody, CategoryResponse, CategoryUpdateResponse, Child, CollectionBadge, CollectionBanner, CollectionCreateResponse, CollectionDetailResponse, CollectionImage, CollectionItem, CollectionItemSchemaV2, CollectionItemUpdate, CollectionItemUpdateSchemaV2, CollectionListingFilter, CollectionListingFilterTag, CollectionListingFilterType, CollectionQuery, CollectionQuerySchemaV2, CollectionSchedule, CommonResponseSchemaCollection, CompanyBrandDetail, CompanyMeta, CompanyMeta1, CompanyOptIn, ConfigErrorResponse, ConfigSuccessResponse, ConfigurationBucketPoints, ConfigurationListing, ConfigurationListingFilter, ConfigurationListingFilterConfig, ConfigurationListingFilterValue, ConfigurationListingSort, ConfigurationListingSortConfig, ConfigurationProduct, ConfigurationProductConfig, ConfigurationProductSimilar, ConfigurationProductVariant, ConfigurationProductVariantConfig, CreateAutocompleteKeyword, CreateAutocompleteWordsResponse, CreateCollection, CreatedBy, CreateSearchConfigurationRequest, CreateSearchConfigurationResponse, CreateSearchKeyword, CreateUpdateAppReturnConfig, CrossSellingData, CrossSellingResponse, CustomOrder, DateMeta, DefaultKeyRequest, DeleteAppCategoryReturnConfig, DeleteResponse, DeleteSearchConfigurationResponse, Department, DepartmentCategoryTree, DepartmentCreateErrorResponse, DepartmentCreateResponse, DepartmentCreateUpdate, DepartmentErrorResponse, DepartmentIdentifier, DepartmentModel, DepartmentResponse, DepartmentsResponse, DimensionResponse, DimensionResponse1, Document, EntityConfiguration, ErrorResponse, FilerList, GenderDetail, GetAddressSerializer, GetAllMarketplaces, GetAllSizes, GetAppCatalogConfiguration, GetAppCatalogEntityConfiguration, GetAutocompleteWordsData, GetAutocompleteWordsResponse, GetCatalogConfigurationDetailsProduct, GetCatalogConfigurationDetailsSchemaListing, GetCatalogConfigurationMetaData, GetCollectionDetailNest, GetCollectionDetailResponse, GetCollectionItemsResponse, GetCollectionItemsResponseSchemaV2, GetCollectionListingResponse, GetCollectionQueryOptionResponse, GetCompanySerializer, GetConfigMetadataResponse, GetConfigResponse, GetDepartment, GetInventories, GetInventoriesResponse, GetLocationSerializer, GetOptInPlatform, GetProductBundleCreateResponse, GetProductBundleListingResponse, GetProductBundleResponse, GetProducts, GetQueryFiltersResponse, GetSearchConfigurationResponse, GetSearchWordsData, GetSearchWordsDetailResponse, GetSearchWordsResponse, GlobalValidation, GTIN, Guide, Hierarchy, HsnCode, HsnCodesListingResponseSchemaV2, HsnCodesObject, HSNCodesResponse, HSNData, HSNDataInsertV2, HsnUpsert, Image, ImageUrls, 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, InvSize, ItemQuery, Items, LimitedProductData, ListSizeGuide, LocationDayWiseSerializer, LocationIntegrationType, LocationListSerializer, LocationManagerSerializer, LocationTimingSerializer, Logo, ManufacturerResponse, ManufacturerResponse1, Marketplaces, Media, Media1, Media2, Meta, MetaDataListingFilterMetaResponse, MetaDataListingFilterResponse, MetaDataListingResponse, MetaDataListingSortMetaResponse, MetaDataListingSortResponse, MetaFields, Metatags, MOQData, NetQuantity, NetQuantityResponse, NextSchedule, OptinCompanyBrandDetailsView, OptinCompanyDetail, OptinCompanyMetrics, OptInPostRequest, OptinStoreDetails, OwnerAppItemResponse, Page, Page1, PageResponse, PageResponse1, PageResponseType, Price, Price1, PriceArticle, PriceMeta, ProdcutTemplateCategoriesResponse, Product, ProductAttributesResponse, ProductBrand, ProductBulkAssets, ProductBulkRequest, ProductBulkRequestList, ProductBundleItem, ProductBundleRequest, ProductBundleUpdateRequest, ProductConfigurationDownloads, ProductCreateUpdateSchemaV2, ProductDetail, ProductDetailAttribute, ProductDetailGroupedAttribute, ProductDetailV2, ProductDownloadsResponse, ProductFilters, ProductFiltersKey, ProductFiltersValue, ProductListingDetail, ProductListingPrice, ProductListingResponse, ProductListingResponseV2, ProductPublish, ProductPublish1, ProductPublished, ProductReturnConfigBaseSerializer, ProductReturnConfigSerializer, ProductSchemaV2, ProductSize, ProductSizeDeleteDataResponse, ProductSizeDeleteResponse, ProductSortOn, ProductTagsViewResponse, ProductTemplate, ProductTemplateDownloadsExport, ProductTemplateExportFilterRequest, ProductTemplateExportResponse, ProductVariants, ProductVariantsResponse, Properties, PTErrorResponse, Quantities, QuantitiesArticle, Quantity, QuantityBase, RawProduct, RawProductListingResponse, ReturnConfig, ReturnConfig1, ReturnConfig2, ReturnConfigResponse, SearchableAttribute, SearchKeywordResult, SecondLevelChild, SellerPhoneNumber, SEOData, SeoDetail, SetSize, SingleCategoryResponse, SingleProductResponse, Sitemap, Size, SizeDistribution, SizeGuideResponse, SizePromotionThreshold, StoreAssignResponse, StoreDetail, StoreMeta, SuccessResponse, SuccessResponse1, TaxIdentifier, TaxSlab, TeaserTag, TemplateDetails, TemplatesResponse, TemplatesValidationResponse, TemplateValidationData, ThirdLevelChild, Trader, Trader1, Trader2, UpdateCollection, UpdatedResponse, UpdateMarketplaceOptinRequest, UpdateMarketplaceOptinResponse, UpdateSearchConfigurationRequest, UpdateSearchConfigurationResponse, UserCommon, UserDetail, UserDetail1, UserInfo, UserInfo1, UserSerializer, UserSerializer1, UserSerializer2, UserSerializer3, ValidateIdentifier, ValidateProduct, ValidateSizeGuide, VerifiedBy, WeightResponse, WeightResponse1, PageType }; } /** @returns {Action} */ declare function Action(): Action; @@ -4067,6 +4207,13 @@ type CollectionItem = { item_id: number; priority?: number; }; +/** @returns {CollectionItemSchemaV2} */ +declare function CollectionItemSchemaV2(): CollectionItemSchemaV2; +type CollectionItemSchemaV2 = { + action: string; + item_id: number; + priority?: number; +}; /** @returns {CollectionItemUpdate} */ declare function CollectionItemUpdate(): CollectionItemUpdate; type CollectionItemUpdate = { @@ -4077,6 +4224,16 @@ type CollectionItemUpdate = { type?: string; visible_facets_keys?: string[]; }; +/** @returns {CollectionItemUpdateSchemaV2} */ +declare function CollectionItemUpdateSchemaV2(): CollectionItemUpdateSchemaV2; +type CollectionItemUpdateSchemaV2 = { + allow_facets?: boolean; + allow_sort?: boolean; + items?: CollectionItemSchemaV2[]; + query?: CollectionQuerySchemaV2[]; + type: string; + visible_facets_keys?: string[]; +}; /** @returns {CollectionListingFilter} */ declare function CollectionListingFilter(): CollectionListingFilter; type CollectionListingFilter = { @@ -4114,6 +4271,23 @@ type CollectionQuery = { */ value: any[]; }; +/** @returns {CollectionQuerySchemaV2} */ +declare function CollectionQuerySchemaV2(): CollectionQuerySchemaV2; +type CollectionQuerySchemaV2 = { + /** + * - The attribute of the collection query + */ + attribute: string; + /** + * - The operation to be performed on the attribute of the + * collection query + */ + op: string; + /** + * - The value of the attribute of the collection query + */ + value: any[]; +}; /** @returns {CollectionSchedule} */ declare function CollectionSchedule(): CollectionSchedule; type CollectionSchedule = { @@ -4123,6 +4297,11 @@ type CollectionSchedule = { next_schedule?: NextSchedule[]; start?: string; }; +/** @returns {CommonResponseSchemaCollection} */ +declare function CommonResponseSchemaCollection(): CommonResponseSchemaCollection; +type CommonResponseSchemaCollection = { + message?: string; +}; /** @returns {CompanyBrandDetail} */ declare function CompanyBrandDetail(): CompanyBrandDetail; type CompanyBrandDetail = { @@ -4306,6 +4485,12 @@ type CreateCollection = { type: string; visible_facets_keys?: string[]; }; +/** @returns {CreatedBy} */ +declare function CreatedBy(): CreatedBy; +type CreatedBy = { + user_id?: string; + username?: string; +}; /** @returns {CreateSearchConfigurationRequest} */ declare function CreateSearchConfigurationRequest(): CreateSearchConfigurationRequest; type CreateSearchConfigurationRequest = { @@ -4668,6 +4853,12 @@ type GetAddressSerializer = { pincode?: number; state?: string; }; +/** @returns {GetAllMarketplaces} */ +declare function GetAllMarketplaces(): GetAllMarketplaces; +type GetAllMarketplaces = { + items?: Marketplaces[]; + page?: Page; +}; /** @returns {GetAllSizes} */ declare function GetAllSizes(): GetAllSizes; type GetAllSizes = { @@ -4744,6 +4935,35 @@ type GetCollectionDetailNest = { uid?: string; visible_facets_keys?: string[]; }; +/** @returns {GetCollectionDetailResponse} */ +declare function GetCollectionDetailResponse(): GetCollectionDetailResponse; +type GetCollectionDetailResponse = { + _custom_json?: any; + _locale_language?: any; + _schedule?: CollectionSchedule; + action?: any; + allow_facets?: boolean; + allow_sort?: boolean; + app_id?: string; + badge?: CollectionBadge; + banners?: ImageUrls; + description?: string; + is_active?: boolean; + is_visible?: boolean; + logo?: Media; + meta?: any; + name?: string; + priority?: number; + published?: boolean; + query?: CollectionQuery[]; + seo?: SeoDetail; + slug?: string; + sort_on?: string; + tags?: string[]; + type?: string; + uid?: string; + visible_facets_keys?: string[]; +}; /** @returns {GetCollectionItemsResponse} */ declare function GetCollectionItemsResponse(): GetCollectionItemsResponse; type GetCollectionItemsResponse = { @@ -4752,6 +4972,12 @@ type GetCollectionItemsResponse = { page?: Page; sort_on?: ProductSortOn[]; }; +/** @returns {GetCollectionItemsResponseSchemaV2} */ +declare function GetCollectionItemsResponseSchemaV2(): GetCollectionItemsResponseSchemaV2; +type GetCollectionItemsResponseSchemaV2 = { + items?: ProductDetailV2[]; + page?: Page1; +}; /** @returns {GetCollectionListingResponse} */ declare function GetCollectionListingResponse(): GetCollectionListingResponse; type GetCollectionListingResponse = { @@ -4788,6 +5014,7 @@ declare function GetConfigMetadataResponse(): GetConfigMetadataResponse; type GetConfigMetadataResponse = { condition?: any[]; data: any[]; + page?: Page; values?: any[]; }; /** @returns {GetConfigResponse} */ @@ -4942,6 +5169,13 @@ type GetProducts = { product_uid?: number; sizes?: Size[]; }; +/** @returns {GetQueryFiltersResponse} */ +declare function GetQueryFiltersResponse(): GetQueryFiltersResponse; +type GetQueryFiltersResponse = { + filters?: ProductFilters[]; + operators: any; + sort_on?: ProductSortOn[]; +}; /** @returns {GetSearchConfigurationResponse} */ declare function GetSearchConfigurationResponse(): GetSearchConfigurationResponse; type GetSearchConfigurationResponse = { @@ -6026,6 +6260,22 @@ type ManufacturerResponse1 = { is_default?: boolean; name?: string; }; +/** @returns {Marketplaces} */ +declare function Marketplaces(): Marketplaces; +type Marketplaces = { + _id?: string; + app_id?: string; + brand_ids?: number[]; + company_id?: number; + created_by?: CreatedBy; + created_on?: any; + enabled?: boolean; + modified_by?: CreatedBy; + modified_on?: any; + opt_level?: string; + platforms?: string; + store_ids?: number[]; +}; /** @returns {Media} */ declare function Media(): Media; type Media = { @@ -6202,6 +6452,19 @@ type Page = { size?: number; type: string; }; +/** @returns {Page1} */ +declare function Page1(): Page1; +type Page1 = { + ca?: boolean; + department?: string; + page_no?: number; + page_size?: number; + q?: string; + sort?: string; + sort_on?: string; + type?: string; + variant?: string; +}; /** @returns {PageResponse} */ declare function PageResponse(): PageResponse; type PageResponse = { @@ -6555,6 +6818,21 @@ type ProductDetailGroupedAttribute = { details?: ProductDetailAttribute[]; title?: string; }; +/** @returns {ProductDetailV2} */ +declare function ProductDetailV2(): ProductDetailV2; +type ProductDetailV2 = { + brand?: ProductBrand; + is_excluded?: boolean; + is_pinned?: boolean; + item_code?: string; + item_type?: string; + medias?: Media[]; + name?: string; + priority?: number; + short_description?: string; + slug: string; + uid?: number; +}; /** @returns {ProductDownloadsResponse} */ declare function ProductDownloadsResponse(): ProductDownloadsResponse; type ProductDownloadsResponse = { @@ -7128,6 +7406,7 @@ type SellerPhoneNumber = { declare function SEOData(): SEOData; type SEOData = { breadcrumbs?: ApplicationItemSeoBreadcrumbs[]; + canonical_url?: string; description?: string; meta_tags?: Metatags[]; sitemap?: Sitemap; @@ -7137,6 +7416,7 @@ type SEOData = { declare function SeoDetail(): SeoDetail; type SeoDetail = { breadcrumbs?: ApplicationItemSeoBreadcrumbs[]; + canonical_url?: string; description?: string; meta_tags?: Metatags[]; sitemap?: any; @@ -7378,6 +7658,29 @@ type UpdatedResponse = { items_not_updated?: number[]; message?: string; }; +/** @returns {UpdateMarketplaceOptinRequest} */ +declare function UpdateMarketplaceOptinRequest(): UpdateMarketplaceOptinRequest; +type UpdateMarketplaceOptinRequest = { + brand_ids?: number[]; + company_id?: number; + enabled?: boolean; + opt_level?: string; + platform?: string; + store_ids?: number[]; +}; +/** @returns {UpdateMarketplaceOptinResponse} */ +declare function UpdateMarketplaceOptinResponse(): UpdateMarketplaceOptinResponse; +type UpdateMarketplaceOptinResponse = { + app_id?: string; + brand_ids?: number[]; + company_id?: number; + created_by?: CreatedBy; + enabled?: boolean; + modified_by?: CreatedBy; + opt_level?: string; + platform?: string; + store_ids?: number[]; +}; /** @returns {UpdateSearchConfigurationRequest} */ declare function UpdateSearchConfigurationRequest(): UpdateSearchConfigurationRequest; type UpdateSearchConfigurationRequest = { diff --git a/sdk/platform/Catalog/CatalogPlatformModel.js b/sdk/platform/Catalog/CatalogPlatformModel.js index c1b8dfb17..4b97596ef 100644 --- a/sdk/platform/Catalog/CatalogPlatformModel.js +++ b/sdk/platform/Catalog/CatalogPlatformModel.js @@ -713,6 +713,13 @@ const Joi = require("joi"); * @property {number} [priority] */ +/** + * @typedef CollectionItemSchemaV2 + * @property {string} action + * @property {number} item_id + * @property {number} [priority] + */ + /** * @typedef CollectionItemUpdate * @property {boolean} [allow_facets] @@ -723,6 +730,16 @@ const Joi = require("joi"); * @property {string[]} [visible_facets_keys] */ +/** + * @typedef CollectionItemUpdateSchemaV2 + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] + * @property {CollectionItemSchemaV2[]} [items] + * @property {CollectionQuerySchemaV2[]} [query] + * @property {string} type + * @property {string[]} [visible_facets_keys] + */ + /** * @typedef CollectionListingFilter * @property {CollectionListingFilterTag[]} [tags] @@ -751,6 +768,14 @@ const Joi = require("joi"); * @property {Object[]} value - The value of the attribute of the collection query */ +/** + * @typedef CollectionQuerySchemaV2 + * @property {string} attribute - The attribute of the collection query + * @property {string} op - The operation to be performed on the attribute of the + * collection query + * @property {Object[]} value - The value of the attribute of the collection query + */ + /** * @typedef CollectionSchedule * @property {string} [cron] @@ -760,6 +785,11 @@ const Joi = require("joi"); * @property {string} [start] */ +/** + * @typedef CommonResponseSchemaCollection + * @property {string} [message] + */ + /** * @typedef CompanyBrandDetail * @property {number} [brand_id] @@ -943,6 +973,12 @@ const Joi = require("joi"); * @property {string[]} [visible_facets_keys] */ +/** + * @typedef CreatedBy + * @property {string} [user_id] + * @property {string} [username] + */ + /** * @typedef CreateSearchConfigurationRequest * @property {string} application_id - The application id where custom search @@ -1206,6 +1242,12 @@ const Joi = require("joi"); * @property {string} [state] */ +/** + * @typedef GetAllMarketplaces + * @property {Marketplaces[]} [items] + * @property {Page} [page] + */ + /** * @typedef GetAllSizes * @property {AllSizes[]} [all_sizes] @@ -1282,6 +1324,35 @@ const Joi = require("joi"); * @property {string[]} [visible_facets_keys] */ +/** + * @typedef GetCollectionDetailResponse + * @property {Object} [_custom_json] + * @property {Object} [_locale_language] + * @property {CollectionSchedule} [_schedule] + * @property {Object} [action] + * @property {boolean} [allow_facets] + * @property {boolean} [allow_sort] + * @property {string} [app_id] + * @property {CollectionBadge} [badge] + * @property {ImageUrls} [banners] + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_visible] + * @property {Media} [logo] + * @property {Object} [meta] + * @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} [uid] + * @property {string[]} [visible_facets_keys] + */ + /** * @typedef GetCollectionItemsResponse * @property {ProductFilters[]} [filters] @@ -1290,6 +1361,12 @@ const Joi = require("joi"); * @property {ProductSortOn[]} [sort_on] */ +/** + * @typedef GetCollectionItemsResponseSchemaV2 + * @property {ProductDetailV2[]} [items] + * @property {Page1} [page] + */ + /** * @typedef GetCollectionListingResponse * @property {CollectionListingFilter} [filters] @@ -1325,6 +1402,7 @@ const Joi = require("joi"); * @typedef GetConfigMetadataResponse * @property {Object[]} [condition] * @property {Object[]} data + * @property {Page} [page] * @property {Object[]} [values] */ @@ -1480,6 +1558,13 @@ const Joi = require("joi"); * @property {Size[]} [sizes] */ +/** + * @typedef GetQueryFiltersResponse + * @property {ProductFilters[]} [filters] + * @property {Object} operators + * @property {ProductSortOn[]} [sort_on] + */ + /** * @typedef GetSearchConfigurationResponse * @property {string} application_id - The application id where custom search @@ -2069,6 +2154,22 @@ const Joi = require("joi"); * @property {string} [name] */ +/** + * @typedef Marketplaces + * @property {string} [_id] + * @property {string} [app_id] + * @property {number[]} [brand_ids] + * @property {number} [company_id] + * @property {CreatedBy} [created_by] + * @property {Object} [created_on] + * @property {boolean} [enabled] + * @property {CreatedBy} [modified_by] + * @property {Object} [modified_on] + * @property {string} [opt_level] + * @property {string} [platforms] + * @property {number[]} [store_ids] + */ + /** * @typedef Media * @property {Object} [meta] @@ -2224,6 +2325,19 @@ const Joi = require("joi"); * @property {string} type */ +/** + * @typedef Page1 + * @property {boolean} [ca] + * @property {string} [department] + * @property {number} [page_no] + * @property {number} [page_size] + * @property {string} [q] + * @property {string} [sort] + * @property {string} [sort_on] + * @property {string} [type] + * @property {string} [variant] + */ + /** * @typedef PageResponse * @property {string} [current] - It is the current page of the page response schema. @@ -2544,6 +2658,21 @@ const Joi = require("joi"); * @property {string} [title] */ +/** + * @typedef ProductDetailV2 + * @property {ProductBrand} [brand] + * @property {boolean} [is_excluded] + * @property {boolean} [is_pinned] + * @property {string} [item_code] + * @property {string} [item_type] + * @property {Media[]} [medias] + * @property {string} [name] + * @property {number} [priority] + * @property {string} [short_description] + * @property {string} slug + * @property {number} [uid] + */ + /** * @typedef ProductDownloadsResponse * @property {ProductTemplateExportResponse[]} [items] - The items of the job. @@ -3032,6 +3161,7 @@ const Joi = require("joi"); /** * @typedef SEOData * @property {ApplicationItemSeoBreadcrumbs[]} [breadcrumbs] + * @property {string} [canonical_url] * @property {string} [description] * @property {Metatags[]} [meta_tags] * @property {Sitemap} [sitemap] @@ -3041,6 +3171,7 @@ const Joi = require("joi"); /** * @typedef SeoDetail * @property {ApplicationItemSeoBreadcrumbs[]} [breadcrumbs] + * @property {string} [canonical_url] * @property {string} [description] * @property {Metatags[]} [meta_tags] * @property {Object} [sitemap] @@ -3280,6 +3411,29 @@ const Joi = require("joi"); * @property {string} [message] */ +/** + * @typedef UpdateMarketplaceOptinRequest + * @property {number[]} [brand_ids] + * @property {number} [company_id] + * @property {boolean} [enabled] + * @property {string} [opt_level] + * @property {string} [platform] + * @property {number[]} [store_ids] + */ + +/** + * @typedef UpdateMarketplaceOptinResponse + * @property {string} [app_id] + * @property {number[]} [brand_ids] + * @property {number} [company_id] + * @property {CreatedBy} [created_by] + * @property {boolean} [enabled] + * @property {CreatedBy} [modified_by] + * @property {string} [opt_level] + * @property {string} [platform] + * @property {number[]} [store_ids] + */ + /** * @typedef UpdateSearchConfigurationRequest * @property {string} application_id - The application id where custom search @@ -4343,6 +4497,15 @@ class CatalogPlatformModel { }); } + /** @returns {CollectionItemSchemaV2} */ + static CollectionItemSchemaV2() { + return Joi.object({ + action: Joi.string().allow("").required(), + item_id: Joi.number().required(), + priority: Joi.number(), + }); + } + /** @returns {CollectionItemUpdate} */ static CollectionItemUpdate() { return Joi.object({ @@ -4355,6 +4518,18 @@ class CatalogPlatformModel { }); } + /** @returns {CollectionItemUpdateSchemaV2} */ + static CollectionItemUpdateSchemaV2() { + return Joi.object({ + allow_facets: Joi.boolean(), + allow_sort: Joi.boolean(), + items: Joi.array().items(CatalogPlatformModel.CollectionItemSchemaV2()), + query: Joi.array().items(CatalogPlatformModel.CollectionQuerySchemaV2()), + type: Joi.string().allow("").required(), + visible_facets_keys: Joi.array().items(Joi.string().allow("")), + }); + } + /** @returns {CollectionListingFilter} */ static CollectionListingFilter() { return Joi.object({ @@ -4394,6 +4569,15 @@ class CatalogPlatformModel { }); } + /** @returns {CollectionQuerySchemaV2} */ + static CollectionQuerySchemaV2() { + return Joi.object({ + attribute: Joi.string().allow("").required(), + op: Joi.string().allow("").required(), + value: Joi.array().items(Joi.any()).required(), + }); + } + /** @returns {CollectionSchedule} */ static CollectionSchedule() { return Joi.object({ @@ -4405,6 +4589,13 @@ class CatalogPlatformModel { }); } + /** @returns {CommonResponseSchemaCollection} */ + static CommonResponseSchemaCollection() { + return Joi.object({ + message: Joi.string().allow(""), + }); + } + /** @returns {CompanyBrandDetail} */ static CompanyBrandDetail() { return Joi.object({ @@ -4640,6 +4831,14 @@ class CatalogPlatformModel { }); } + /** @returns {CreatedBy} */ + static CreatedBy() { + return Joi.object({ + user_id: Joi.string().allow(""), + username: Joi.string().allow(""), + }); + } + /** @returns {CreateSearchConfigurationRequest} */ static CreateSearchConfigurationRequest() { return Joi.object({ @@ -4954,6 +5153,14 @@ class CatalogPlatformModel { }); } + /** @returns {GetAllMarketplaces} */ + static GetAllMarketplaces() { + return Joi.object({ + items: Joi.array().items(CatalogPlatformModel.Marketplaces()), + page: CatalogPlatformModel.Page(), + }); + } + /** @returns {GetAllSizes} */ static GetAllSizes() { return Joi.object({ @@ -5048,6 +5255,37 @@ class CatalogPlatformModel { }); } + /** @returns {GetCollectionDetailResponse} */ + static GetCollectionDetailResponse() { + return Joi.object({ + _custom_json: Joi.any(), + _locale_language: Joi.any(), + _schedule: CatalogPlatformModel.CollectionSchedule(), + action: Joi.any(), + allow_facets: Joi.boolean(), + allow_sort: Joi.boolean(), + app_id: Joi.string().allow(""), + badge: CatalogPlatformModel.CollectionBadge(), + banners: CatalogPlatformModel.ImageUrls(), + description: Joi.string().allow(""), + is_active: Joi.boolean(), + is_visible: Joi.boolean(), + logo: CatalogPlatformModel.Media(), + meta: Joi.any(), + name: Joi.string().allow(""), + priority: Joi.number(), + published: Joi.boolean(), + query: Joi.array().items(CatalogPlatformModel.CollectionQuery()), + seo: CatalogPlatformModel.SeoDetail(), + slug: Joi.string().allow(""), + sort_on: Joi.string().allow(""), + tags: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + uid: Joi.string().allow(""), + visible_facets_keys: Joi.array().items(Joi.string().allow("")), + }); + } + /** @returns {GetCollectionItemsResponse} */ static GetCollectionItemsResponse() { return Joi.object({ @@ -5058,6 +5296,14 @@ class CatalogPlatformModel { }); } + /** @returns {GetCollectionItemsResponseSchemaV2} */ + static GetCollectionItemsResponseSchemaV2() { + return Joi.object({ + items: Joi.array().items(CatalogPlatformModel.ProductDetailV2()), + page: CatalogPlatformModel.Page1(), + }); + } + /** @returns {GetCollectionListingResponse} */ static GetCollectionListingResponse() { return Joi.object({ @@ -5100,6 +5346,7 @@ class CatalogPlatformModel { return Joi.object({ condition: Joi.array().items(Joi.any()), data: Joi.array().items(Joi.any()).required(), + page: CatalogPlatformModel.Page(), values: Joi.array().items(Joi.any()), }); } @@ -5284,6 +5531,15 @@ class CatalogPlatformModel { }); } + /** @returns {GetQueryFiltersResponse} */ + static GetQueryFiltersResponse() { + return Joi.object({ + filters: Joi.array().items(CatalogPlatformModel.ProductFilters()), + operators: Joi.object().pattern(/\S/, Joi.string().allow("")).required(), + sort_on: Joi.array().items(CatalogPlatformModel.ProductSortOn()), + }); + } + /** @returns {GetSearchConfigurationResponse} */ static GetSearchConfigurationResponse() { return Joi.object({ @@ -5960,6 +6216,24 @@ class CatalogPlatformModel { }); } + /** @returns {Marketplaces} */ + static Marketplaces() { + return Joi.object({ + _id: Joi.string().allow(""), + app_id: Joi.string().allow(""), + brand_ids: Joi.array().items(Joi.number()), + company_id: Joi.number(), + created_by: CatalogPlatformModel.CreatedBy(), + created_on: Joi.any(), + enabled: Joi.boolean(), + modified_by: CatalogPlatformModel.CreatedBy(), + modified_on: Joi.any(), + opt_level: Joi.string().allow(""), + platforms: Joi.string().allow(""), + store_ids: Joi.array().items(Joi.number()), + }); + } + /** @returns {Media} */ static Media() { return Joi.object({ @@ -6162,6 +6436,21 @@ class CatalogPlatformModel { }); } + /** @returns {Page1} */ + static Page1() { + return Joi.object({ + ca: Joi.boolean(), + department: Joi.string().allow(""), + page_no: Joi.number(), + page_size: Joi.number(), + q: Joi.string().allow(""), + sort: Joi.string().allow(""), + sort_on: Joi.string().allow(""), + type: Joi.string().allow(""), + variant: Joi.string().allow(""), + }); + } + /** @returns {PageResponse} */ static PageResponse() { return Joi.object({ @@ -6532,6 +6821,23 @@ class CatalogPlatformModel { }); } + /** @returns {ProductDetailV2} */ + static ProductDetailV2() { + return Joi.object({ + brand: CatalogPlatformModel.ProductBrand(), + is_excluded: Joi.boolean(), + is_pinned: Joi.boolean(), + item_code: Joi.string().allow(""), + item_type: Joi.string().allow(""), + medias: Joi.array().items(CatalogPlatformModel.Media()), + name: Joi.string().allow(""), + priority: Joi.number(), + short_description: Joi.string().allow(""), + slug: Joi.string().allow("").required(), + uid: Joi.number(), + }); + } + /** @returns {ProductDownloadsResponse} */ static ProductDownloadsResponse() { return Joi.object({ @@ -7103,6 +7409,7 @@ class CatalogPlatformModel { breadcrumbs: Joi.array().items( CatalogPlatformModel.ApplicationItemSeoBreadcrumbs() ), + canonical_url: Joi.string().allow(""), description: Joi.string().allow(""), meta_tags: Joi.array().items(CatalogPlatformModel.Metatags()), sitemap: CatalogPlatformModel.Sitemap(), @@ -7116,6 +7423,7 @@ class CatalogPlatformModel { breadcrumbs: Joi.array().items( CatalogPlatformModel.ApplicationItemSeoBreadcrumbs() ), + canonical_url: Joi.string().allow(""), description: Joi.string().allow(""), meta_tags: Joi.array().items(CatalogPlatformModel.Metatags()), sitemap: Joi.any(), @@ -7408,6 +7716,33 @@ class CatalogPlatformModel { }); } + /** @returns {UpdateMarketplaceOptinRequest} */ + static UpdateMarketplaceOptinRequest() { + return Joi.object({ + brand_ids: Joi.array().items(Joi.number()), + company_id: Joi.number(), + enabled: Joi.boolean(), + opt_level: Joi.string().allow(""), + platform: Joi.string().allow(""), + store_ids: Joi.array().items(Joi.number()), + }); + } + + /** @returns {UpdateMarketplaceOptinResponse} */ + static UpdateMarketplaceOptinResponse() { + return Joi.object({ + app_id: Joi.string().allow(""), + brand_ids: Joi.array().items(Joi.number()), + company_id: Joi.number(), + created_by: CatalogPlatformModel.CreatedBy(), + enabled: Joi.boolean(), + modified_by: CatalogPlatformModel.CreatedBy(), + opt_level: Joi.string().allow(""), + platform: Joi.string().allow(""), + store_ids: Joi.array().items(Joi.number()), + }); + } + /** @returns {UpdateSearchConfigurationRequest} */ static UpdateSearchConfigurationRequest() { return Joi.object({ diff --git a/sdk/platform/Catalog/CatalogPlatformValidator.d.ts b/sdk/platform/Catalog/CatalogPlatformValidator.d.ts index 661648239..eaa3deb34 100644 --- a/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +++ b/sdk/platform/Catalog/CatalogPlatformValidator.d.ts @@ -207,6 +207,7 @@ export = CatalogPlatformValidator; */ /** @typedef GetInventoryExportParam */ /** @typedef GetMarketplaceOptinDetailParam */ +/** @typedef GetMarketplacesParam */ /** * @typedef GetOptimalLocationsParam * @property {CatalogPlatformModel.AssignStore} body @@ -304,6 +305,7 @@ export = CatalogPlatformValidator; * set of results * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 10. + * @property {number} [brandId] - Brand id that is to be searched. */ /** * @typedef GetStoreDetailParam @@ -324,12 +326,13 @@ export = CatalogPlatformValidator; /** * @typedef ListCategoriesParam * @property {string} [level] - Get category for multiple levels - * @property {string} [departments] - Get category for multiple departments filtered + * @property {number} [department] - Get category for multiple departments filtered * @property {string} [q] - Get multiple categories filtered by search string * @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 {number[]} [uids] - Get multiple categories filtered by category uids. */ /** * @typedef ListDepartmentsDataParam @@ -394,6 +397,11 @@ export = CatalogPlatformValidator; * @typedef UpdateInventoriesParam * @property {CatalogPlatformModel.InventoryRequestSchemaV2} body */ +/** + * @typedef UpdateMarketplaceOptinParam + * @property {string} marketplaceSlug - Slug of the marketplace . + * @property {CatalogPlatformModel.UpdateMarketplaceOptinRequest} body + */ /** * @typedef UpdateProductBundleParam * @property {string} id - A `id` is a unique identifier for a particular @@ -517,6 +525,8 @@ declare class CatalogPlatformValidator { static getInventoryExport(): any; /** @returns {GetMarketplaceOptinDetailParam} */ static getMarketplaceOptinDetail(): any; + /** @returns {GetMarketplacesParam} */ + static getMarketplaces(): any; /** @returns {GetOptimalLocationsParam} */ static getOptimalLocations(): GetOptimalLocationsParam; /** @returns {GetProductParam} */ @@ -577,6 +587,8 @@ declare class CatalogPlatformValidator { static updateHsnCode(): UpdateHsnCodeParam; /** @returns {UpdateInventoriesParam} */ static updateInventories(): UpdateInventoriesParam; + /** @returns {UpdateMarketplaceOptinParam} */ + static updateMarketplaceOptin(): UpdateMarketplaceOptinParam; /** @returns {UpdateProductBundleParam} */ static updateProductBundle(): UpdateProductBundleParam; /** @returns {UpdateRealtimeInventoryParam} */ @@ -591,7 +603,7 @@ declare class CatalogPlatformValidator { static validateProductTemplateSchema(): ValidateProductTemplateSchemaParam; } declare namespace CatalogPlatformValidator { - export { AddInventoryParam, AllSizesParam, BulkHsnCodeParam, CreateBulkInventoryParam, CreateBulkInventoryJobParam, CreateBulkProductUploadJobParam, CreateCategoriesParam, CreateDepartmentsParam, CreateInventoryExportParam, CreateInventoryExportJobParam, CreateMarketplaceOptinParam, CreateProductParam, CreateProductAssetsInBulkParam, CreateProductBundleParam, CreateProductExportJobParam, CreateProductsInBulkParam, CreateSizeGuideParam, DeleteBulkInventoryJobParam, DeleteInventoryParam, DeleteProductParam, DeleteProductBulkJobParam, DeleteRealtimeInventoryParam, DeleteSizeParam, DownloadInventoryTemplateViewParam, DownloadProductTemplateViewsParam, EditProductParam, ExportInventoryConfigParam, GetAllProductHsnCodesParam, GetCategoryDataParam, GetCompanyBrandDetailParam, GetCompanyDetailParam, GetCompanyMetricsParam, GetDepartmentDataParam, GetGenderAttributeParam, GetHsnCodeParam, GetInventoriesParam, GetInventoryBulkUploadHistoryParam, GetInventoryBySizeParam, GetInventoryBySizeIdentifierParam, GetInventoryExportParam, GetMarketplaceOptinDetailParam, 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, UpdateCategoryParam, UpdateDepartmentParam, UpdateHsnCodeParam, UpdateInventoriesParam, UpdateProductBundleParam, UpdateRealtimeInventoryParam, UpdateSizeGuideParam, UploadBulkProductsParam, ValidateProductTemplateParam, ValidateProductTemplateSchemaParam }; + export { AddInventoryParam, AllSizesParam, BulkHsnCodeParam, CreateBulkInventoryParam, CreateBulkInventoryJobParam, CreateBulkProductUploadJobParam, CreateCategoriesParam, CreateDepartmentsParam, CreateInventoryExportParam, CreateInventoryExportJobParam, CreateMarketplaceOptinParam, CreateProductParam, CreateProductAssetsInBulkParam, CreateProductBundleParam, CreateProductExportJobParam, CreateProductsInBulkParam, CreateSizeGuideParam, DeleteBulkInventoryJobParam, DeleteInventoryParam, DeleteProductParam, DeleteProductBulkJobParam, DeleteRealtimeInventoryParam, DeleteSizeParam, DownloadInventoryTemplateViewParam, DownloadProductTemplateViewsParam, EditProductParam, ExportInventoryConfigParam, GetAllProductHsnCodesParam, GetCategoryDataParam, GetCompanyBrandDetailParam, GetCompanyDetailParam, GetCompanyMetricsParam, GetDepartmentDataParam, GetGenderAttributeParam, 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, UpdateCategoryParam, UpdateDepartmentParam, UpdateHsnCodeParam, UpdateInventoriesParam, UpdateMarketplaceOptinParam, UpdateProductBundleParam, UpdateRealtimeInventoryParam, UpdateSizeGuideParam, UploadBulkProductsParam, ValidateProductTemplateParam, ValidateProductTemplateSchemaParam }; } type AddInventoryParam = { /** @@ -1126,6 +1138,10 @@ type GetSizeGuidesParam = { * Default is 10. */ pageSize?: number; + /** + * - Brand id that is to be searched. + */ + brandId?: number; }; type GetStoreDetailParam = { /** @@ -1170,7 +1186,7 @@ type ListCategoriesParam = { /** * - Get category for multiple departments filtered */ - departments?: string; + department?: number; /** * - Get multiple categories filtered by search string */ @@ -1185,6 +1201,10 @@ type ListCategoriesParam = { * Default is 10. */ pageSize?: number; + /** + * - Get multiple categories filtered by category uids. + */ + uids?: number[]; }; type ListDepartmentsDataParam = { /** @@ -1295,6 +1315,13 @@ type UpdateHsnCodeParam = { type UpdateInventoriesParam = { body: CatalogPlatformModel.InventoryRequestSchemaV2; }; +type UpdateMarketplaceOptinParam = { + /** + * - Slug of the marketplace . + */ + marketplaceSlug: string; + body: CatalogPlatformModel.UpdateMarketplaceOptinRequest; +}; type UpdateProductBundleParam = { /** * - A `id` is a unique identifier for a particular @@ -1363,6 +1390,7 @@ type GetCompanyDetailParam = any; type GetCompanyMetricsParam = any; type GetInventoryExportParam = any; type GetMarketplaceOptinDetailParam = any; +type GetMarketplacesParam = any; type GetProductTagsParam = any; type GetProductValidationParam = any; type ListHSNCodesParam = any; diff --git a/sdk/platform/Catalog/CatalogPlatformValidator.js b/sdk/platform/Catalog/CatalogPlatformValidator.js index f5ebca3c7..804430357 100644 --- a/sdk/platform/Catalog/CatalogPlatformValidator.js +++ b/sdk/platform/Catalog/CatalogPlatformValidator.js @@ -251,6 +251,8 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** @typedef GetMarketplaceOptinDetailParam */ +/** @typedef GetMarketplacesParam */ + /** * @typedef GetOptimalLocationsParam * @property {CatalogPlatformModel.AssignStore} body @@ -363,6 +365,7 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); * set of results * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 10. + * @property {number} [brandId] - Brand id that is to be searched. */ /** @@ -386,12 +389,13 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); /** * @typedef ListCategoriesParam * @property {string} [level] - Get category for multiple levels - * @property {string} [departments] - Get category for multiple departments filtered + * @property {number} [department] - Get category for multiple departments filtered * @property {string} [q] - Get multiple categories filtered by search string * @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 {number[]} [uids] - Get multiple categories filtered by category uids. */ /** @@ -468,6 +472,12 @@ const CatalogPlatformModel = require("./CatalogPlatformModel"); * @property {CatalogPlatformModel.InventoryRequestSchemaV2} body */ +/** + * @typedef UpdateMarketplaceOptinParam + * @property {string} marketplaceSlug - Slug of the marketplace . + * @property {CatalogPlatformModel.UpdateMarketplaceOptinRequest} body + */ + /** * @typedef UpdateProductBundleParam * @property {string} id - A `id` is a unique identifier for a particular @@ -832,6 +842,11 @@ class CatalogPlatformValidator { return Joi.object({}).required(); } + /** @returns {GetMarketplacesParam} */ + static getMarketplaces() { + return Joi.object({}).required(); + } + /** @returns {GetOptimalLocationsParam} */ static getOptimalLocations() { return Joi.object({ @@ -962,6 +977,7 @@ class CatalogPlatformValidator { tag: Joi.string().allow(""), pageNo: Joi.number(), pageSize: Joi.number(), + brandId: Joi.number(), }).required(); } @@ -988,10 +1004,11 @@ class CatalogPlatformValidator { static listCategories() { return Joi.object({ level: Joi.string().allow(""), - departments: Joi.string().allow(""), + department: Joi.number(), q: Joi.string().allow(""), pageNo: Joi.number(), pageSize: Joi.number(), + uids: Joi.array().items(Joi.number()), }).required(); } @@ -1082,6 +1099,14 @@ class CatalogPlatformValidator { }).required(); } + /** @returns {UpdateMarketplaceOptinParam} */ + static updateMarketplaceOptin() { + return Joi.object({ + marketplaceSlug: Joi.string().allow("").required(), + body: CatalogPlatformModel.UpdateMarketplaceOptinRequest().required(), + }).required(); + } + /** @returns {UpdateProductBundleParam} */ static updateProductBundle() { return Joi.object({ diff --git a/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts b/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts index 2a57726c8..e61fd97e1 100644 --- a/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +++ b/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts @@ -87,6 +87,46 @@ declare class Communication { * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to create an email template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEmailTemplate/). */ createEmailTemplate({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.CreateEmailTemplateParam, { responseHeaders }?: object): Promise; + /** + * @param {CommunicationPlatformApplicationValidator.CreateEventSubscriptionsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createEventSubscriptions + * @summary: Create event subscriptions + * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptions/). + */ + createEventSubscriptions({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.CreateEventSubscriptionsParam, { responseHeaders }?: object): Promise; + /** + * @param {CommunicationPlatformApplicationValidator.CreateEventSubscriptionsByBulkParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise< + * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse[] + * >} + * - Success response + * + * @name createEventSubscriptionsByBulk + * @summary: Create event subscriptions by bulk + * @description: Create event subscriptions by bulk - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptionsByBulk/). + */ + createEventSubscriptionsByBulk({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.CreateEventSubscriptionsByBulkParam, { responseHeaders }?: object): Promise; + /** + * @param {CommunicationPlatformApplicationValidator.CreateJobsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createJobs + * @summary: Create jobs + * @description: Create jobs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createJobs/). + */ + createJobs({ body, requestHeaders }?: CommunicationPlatformApplicationValidator.CreateJobsParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.CreateSmsProviderParam} arg * - Arg object @@ -117,12 +157,12 @@ 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 deleteAudienceById * @summary: Delete audience by id * @description: Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. Use this API to delete audience by id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteAudienceById/). */ - deleteAudienceById({ id, requestHeaders }?: CommunicationPlatformApplicationValidator.DeleteAudienceByIdParam, { responseHeaders }?: object): Promise; + deleteAudienceById({ id, body, requestHeaders }?: CommunicationPlatformApplicationValidator.DeleteAudienceByIdParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.DeleteEmailProviderByIdParam} arg * - Arg object @@ -147,6 +187,18 @@ declare class Communication { * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to delete an email template by id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEmailTemplateById/). */ deleteEmailTemplateById({ id, requestHeaders }?: CommunicationPlatformApplicationValidator.DeleteEmailTemplateByIdParam, { responseHeaders }?: object): Promise; + /** + * @param {CommunicationPlatformApplicationValidator.DeleteEventSubscriptionsByIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteEventSubscriptionsById + * @summary: Create event subscriptions + * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEventSubscriptionsById/). + */ + deleteEventSubscriptionsById({ id, requestHeaders }?: CommunicationPlatformApplicationValidator.DeleteEventSubscriptionsByIdParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.DeleteSmsProviderByIdParam} arg * - Arg object @@ -171,6 +223,20 @@ declare class Communication { * @description: SMS templates are predefined message formats linked to various events for delivering messages to users. Use this API to delete an sms template by ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteSmsTemplateById/). */ deleteSmsTemplateById({ id, requestHeaders }?: CommunicationPlatformApplicationValidator.DeleteSmsTemplateByIdParam, { responseHeaders }?: object): Promise; + /** + * @param {CommunicationPlatformApplicationValidator.EditEventSubscriptionsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name editEventSubscriptions + * @summary: Create event subscriptions + * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/editEventSubscriptions/). + */ + editEventSubscriptions({ id, body, requestHeaders }?: CommunicationPlatformApplicationValidator.EditEventSubscriptionsParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.GetAppProvidersParam} arg * - Arg object @@ -206,22 +272,24 @@ declare class Communication { * @summary: Get audiences * @description: Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. Use this API to get audiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getAudiences/). */ - getAudiences({ pageNo, pageSize, sort, requestHeaders }?: CommunicationPlatformApplicationValidator.GetAudiencesParam, { responseHeaders }?: object): Promise; + getAudiences({ pageNo, pageSize, sort, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetAudiencesParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get audiences * @description: Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. Use this API to get audiences. */ - getAudiencesPaginator({ companyId, applicationId, pageSize, sort }?: { + getAudiencesPaginator({ companyId, applicationId, pageSize, sort, query, }?: { companyId: string; applicationId: string; pageSize?: number; sort?: any; + query?: any; }): Paginator; /** * @param {CommunicationPlatformApplicationValidator.GetBigQueryHeadersByIdParam} arg @@ -270,23 +338,7 @@ declare class Communication { * @summary: Get campaigns * @description: Get campaigns - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getCampaigns/). */ - getCampaigns({ pageNo, pageSize, sort, requestHeaders }?: CommunicationPlatformApplicationValidator.GetCampaignsParam, { responseHeaders }?: object): Promise; - /** - * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Company id - * @param {string} arg.applicationId - Application id - * @param {number} [arg.pageSize] - Current request items count - * @param {Object} [arg.sort] - To sort based on created_at - * @returns {Paginator} - * @summary: Get campaigns - * @description: Get campaigns - */ - getCampaignsPaginator({ companyId, applicationId, pageSize, sort }?: { - companyId: string; - applicationId: string; - pageSize?: number; - sort?: any; - }): Paginator; + getCampaigns({ query, pageNo, pageSize, sort, requestHeaders }?: CommunicationPlatformApplicationValidator.GetCampaignsParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.GetCommunicationLogsParam} arg * - Arg object @@ -379,22 +431,24 @@ declare class Communication { * @summary: Get email providers * @description: Get email providers - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailProviders/). */ - getEmailProviders({ pageNo, pageSize, sort, requestHeaders }?: CommunicationPlatformApplicationValidator.GetEmailProvidersParam, { responseHeaders }?: object): Promise; + getEmailProviders({ pageNo, pageSize, sort, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetEmailProvidersParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get email providers * @description: Get email providers */ - getEmailProvidersPaginator({ companyId, applicationId, pageSize, sort, }?: { + getEmailProvidersPaginator({ companyId, applicationId, pageSize, sort, query, }?: { companyId: string; applicationId: string; pageSize?: number; sort?: any; + query?: any; }): Paginator; /** * @param {CommunicationPlatformApplicationValidator.GetEmailTemplateByIdParam} arg @@ -419,22 +473,24 @@ declare class Communication { * @summary: Get email templates * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to get all email templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailTemplates/). */ - getEmailTemplates({ pageNo, pageSize, sort, requestHeaders }?: CommunicationPlatformApplicationValidator.GetEmailTemplatesParam, { responseHeaders }?: object): Promise; + getEmailTemplates({ pageNo, pageSize, sort, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetEmailTemplatesParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get email templates * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to get all email templates. */ - getEmailTemplatesPaginator({ companyId, applicationId, pageSize, sort, }?: { + getEmailTemplatesPaginator({ companyId, applicationId, pageSize, sort, query, }?: { companyId: string; applicationId: string; pageSize?: number; sort?: any; + query?: any; }): Paginator; /** * @param {CommunicationPlatformApplicationValidator.GetEventSubscriptionsParam} arg @@ -454,7 +510,7 @@ declare class Communication { * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count - * @param {string} [arg.populate] - Populate fields + * @param {string} [arg.populate] - Populate Fields * @returns {Paginator} * @summary: Get event subscriptions * @description: Get event subscriptions @@ -465,6 +521,18 @@ declare class Communication { pageSize?: number; populate?: string; }): Paginator; + /** + * @param {CommunicationPlatformApplicationValidator.GetEventSubscriptionsByIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getEventSubscriptionsById + * @summary: Get event subscriptions by id + * @description: Get event subscriptions by id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEventSubscriptionsById/). + */ + getEventSubscriptionsById({ id, populate, requestHeaders }?: CommunicationPlatformApplicationValidator.GetEventSubscriptionsByIdParam, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.GetGlobalProvidersParam} arg * - Arg object @@ -500,22 +568,24 @@ declare class Communication { * @summary: Get job logs * @description: Get job logs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getJobLogs/). */ - getJobLogs({ pageNo, pageSize, sort, requestHeaders }?: CommunicationPlatformApplicationValidator.GetJobLogsParam, { responseHeaders }?: object): Promise; + getJobLogs({ pageNo, pageSize, sort, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetJobLogsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get job logs * @description: Get job logs */ - getJobLogsPaginator({ companyId, applicationId, pageSize, sort }?: { + getJobLogsPaginator({ companyId, applicationId, pageSize, sort, query, }?: { companyId: string; applicationId: string; pageSize?: number; sort?: any; + query?: any; }): Paginator; /** * @param {CommunicationPlatformApplicationValidator.GetJobsParam} arg - Arg object @@ -526,22 +596,24 @@ declare class Communication { * @summary: Get jobs * @description: Get jobs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getJobs/). */ - getJobs({ pageNo, pageSize, sort, requestHeaders }?: CommunicationPlatformApplicationValidator.GetJobsParam, { responseHeaders }?: object): Promise; + getJobs({ pageNo, pageSize, sort, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetJobsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get jobs * @description: Get jobs */ - getJobsPaginator({ companyId, applicationId, pageSize, sort }?: { + getJobsPaginator({ companyId, applicationId, pageSize, sort, query }?: { companyId: string; applicationId: string; pageSize?: number; sort?: any; + query?: any; }): Paginator; /** * @param {CommunicationPlatformApplicationValidator.GetNSampleRecordsFromCsvParam} arg @@ -567,6 +639,18 @@ declare class Communication { * @description: Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. Use this API to get n sample records from csv. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getNSampleRecordsFromCsvByGet/). */ getNSampleRecordsFromCsvByGet({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {CommunicationPlatformApplicationValidator.GetOtpConfigurationParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getOtpConfiguration + * @summary: Get otp-configuration, if not present in db then return default settings + * @description: Get otp-configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getOtpConfiguration/). + */ + getOtpConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.GetSmsProviderByIdParam} arg * - Arg object @@ -614,22 +698,24 @@ declare class Communication { * @summary: Get sms templates * @description: SMS templates are predefined message formats linked to various events for delivering messages to users. Use this API to get all sms templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsTemplates/). */ - getSmsTemplates({ pageNo, pageSize, sort, requestHeaders }?: CommunicationPlatformApplicationValidator.GetSmsTemplatesParam, { responseHeaders }?: object): Promise; + getSmsTemplates({ pageNo, pageSize, sort, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetSmsTemplatesParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get sms templates * @description: SMS templates are predefined message formats linked to various events for delivering messages to users. Use this API to get all sms templates. */ - getSmsTemplatesPaginator({ companyId, applicationId, pageSize, sort }?: { + getSmsTemplatesPaginator({ companyId, applicationId, pageSize, sort, query, }?: { companyId: string; applicationId: string; pageSize?: number; sort?: any; + query?: any; }): Paginator; /** * @param {CommunicationPlatformApplicationValidator.GetStatsOfCampaignByIdParam} arg @@ -654,20 +740,22 @@ declare class Communication { * @summary: Get subscribed email templates * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to get all subscribed email templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSubscribedEmailTemplates/). */ - getSubscribedEmailTemplates({ pageNo, pageSize, requestHeaders }?: CommunicationPlatformApplicationValidator.GetSubscribedEmailTemplatesParam, { responseHeaders }?: object): Promise; + getSubscribedEmailTemplates({ pageNo, pageSize, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetSubscribedEmailTemplatesParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get subscribed email templates * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to get all subscribed email templates. */ - getSubscribedEmailTemplatesPaginator({ companyId, applicationId, pageSize, }?: { + getSubscribedEmailTemplatesPaginator({ companyId, applicationId, pageSize, query, }?: { companyId: string; applicationId: string; pageSize?: number; + query?: any; }): Paginator; /** * @param {CommunicationPlatformApplicationValidator.GetSubscribedSmsTemplatesParam} arg @@ -680,20 +768,22 @@ declare class Communication { * @summary: Get subscribed sms templates * @description: SMS templates are predefined message formats linked to various events for delivering messages to users. Use this API to get all subscribed sms templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSubscribedSmsTemplates/). */ - getSubscribedSmsTemplates({ pageNo, pageSize, requestHeaders }?: CommunicationPlatformApplicationValidator.GetSubscribedSmsTemplatesParam, { responseHeaders }?: object): Promise; + getSubscribedSmsTemplates({ pageNo, pageSize, query, requestHeaders }?: CommunicationPlatformApplicationValidator.GetSubscribedSmsTemplatesParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get subscribed sms templates * @description: SMS templates are predefined message formats linked to various events for delivering messages to users. Use this API to get all subscribed sms templates. */ - getSubscribedSmsTemplatesPaginator({ companyId, applicationId, pageSize, }?: { + getSubscribedSmsTemplatesPaginator({ companyId, applicationId, pageSize, query, }?: { companyId: string; applicationId: string; pageSize?: number; + query?: any; }): Paginator; /** * @param {CommunicationPlatformApplicationValidator.GetSystemAudiencesParam} arg @@ -854,6 +944,18 @@ declare class Communication { * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to update an email template by id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateEmailTemplateById/). */ updateEmailTemplateById({ id, body, requestHeaders }?: CommunicationPlatformApplicationValidator.UpdateEmailTemplateByIdParam, { responseHeaders }?: object): Promise; + /** + * @param {CommunicationPlatformApplicationValidator.UpdateOtpConfigurationParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name updateOtpConfiguration + * @summary: Update/insert otp configurations + * @description: Update otp-configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateOtpConfiguration/). + */ + updateOtpConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {CommunicationPlatformApplicationValidator.UpdateSmsProviderByIdParam} arg * - Arg object diff --git a/sdk/platform/Communication/CommunicationPlatformApplicationClient.js b/sdk/platform/Communication/CommunicationPlatformApplicationClient.js index 4a30088a2..e34dbb4ac 100644 --- a/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +++ b/sdk/platform/Communication/CommunicationPlatformApplicationClient.js @@ -561,6 +561,250 @@ class Communication { return response; } + /** + * @param {CommunicationPlatformApplicationValidator.CreateEventSubscriptionsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createEventSubscriptions + * @summary: Create event subscriptions + * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptions/). + */ + async createEventSubscriptions( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CommunicationPlatformApplicationValidator.createEventSubscriptions().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, + } = CommunicationPlatformApplicationValidator.createEventSubscriptions().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Communication > createEventSubscriptions \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/event/event-subscriptions`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse().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 > Communication > createEventSubscriptions \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {CommunicationPlatformApplicationValidator.CreateEventSubscriptionsByBulkParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise< + * CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse[] + * >} + * - Success response + * + * @name createEventSubscriptionsByBulk + * @summary: Create event subscriptions by bulk + * @description: Create event subscriptions by bulk - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createEventSubscriptionsByBulk/). + */ + async createEventSubscriptionsByBulk( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CommunicationPlatformApplicationValidator.createEventSubscriptionsByBulk().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, + } = CommunicationPlatformApplicationValidator.createEventSubscriptionsByBulk().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Communication > createEventSubscriptionsByBulk \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/event/event-subscriptions/bulkUpdate`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { error: res_error } = Joi.array() + .items(CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse()) + .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 > Communication > createEventSubscriptionsByBulk \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {CommunicationPlatformApplicationValidator.CreateJobsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createJobs + * @summary: Create jobs + * @description: Create jobs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/createJobs/). + */ + async createJobs( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CommunicationPlatformApplicationValidator.createJobs().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, + } = CommunicationPlatformApplicationValidator.createJobs().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Communication > createJobs \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/jobs/jobs`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CommunicationPlatformModel.CreateJobsRes().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 > Communication > createJobs \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {CommunicationPlatformApplicationValidator.CreateSmsProviderParam} arg * - Arg object @@ -727,13 +971,13 @@ class Communication { * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name deleteAudienceById * @summary: Delete audience by id * @description: Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. Use this API to delete audience by id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteAudienceById/). */ async deleteAudienceById( - { id, requestHeaders } = { requestHeaders: {} }, + { id, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -741,6 +985,7 @@ class Communication { } = CommunicationPlatformApplicationValidator.deleteAudienceById().validate( { id, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -754,6 +999,7 @@ class Communication { } = CommunicationPlatformApplicationValidator.deleteAudienceById().validate( { id, + body, }, { abortEarly: false, allowUnknown: false } ); @@ -771,7 +1017,7 @@ class Communication { "delete", `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/sources/datasources/${id}`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -783,7 +1029,7 @@ class Communication { const { error: res_error, - } = CommunicationPlatformModel.GenericDelete().validate(responseData, { + } = CommunicationPlatformModel.Audience().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -964,6 +1210,87 @@ class Communication { return response; } + /** + * @param {CommunicationPlatformApplicationValidator.DeleteEventSubscriptionsByIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteEventSubscriptionsById + * @summary: Create event subscriptions + * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/deleteEventSubscriptionsById/). + */ + async deleteEventSubscriptionsById( + { id, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CommunicationPlatformApplicationValidator.deleteEventSubscriptionsById().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, + } = CommunicationPlatformApplicationValidator.deleteEventSubscriptionsById().validate( + { + id, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Communication > deleteEventSubscriptionsById \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/event/event-subscriptions/${id}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CommunicationPlatformModel.GenericDelete().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 > Communication > deleteEventSubscriptionsById \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {CommunicationPlatformApplicationValidator.DeleteSmsProviderByIdParam} arg * - Arg object @@ -1126,6 +1453,91 @@ class Communication { return response; } + /** + * @param {CommunicationPlatformApplicationValidator.EditEventSubscriptionsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name editEventSubscriptions + * @summary: Create event subscriptions + * @description: Create event subscriptions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/editEventSubscriptions/). + */ + async editEventSubscriptions( + { id, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CommunicationPlatformApplicationValidator.editEventSubscriptions().validate( + { + 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, + } = CommunicationPlatformApplicationValidator.editEventSubscriptions().validate( + { + id, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Communication > editEventSubscriptions \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/event/event-subscriptions/${id}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CommunicationPlatformModel.EventSubscriptionsBulkUpdateResponse().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 > Communication > editEventSubscriptions \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {CommunicationPlatformApplicationValidator.GetAppProvidersParam} arg * - Arg object @@ -1296,7 +1708,7 @@ class Communication { * @description: Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. Use this API to get audiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getAudiences/). */ async getAudiences( - { pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} }, + { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -1306,6 +1718,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: true } ); @@ -1321,6 +1734,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: false } ); @@ -1335,6 +1749,7 @@ class Communication { query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["sort"] = sort; + query_params["query"] = query; const response = await PlatformAPIClient.execute( this.config, @@ -1378,11 +1793,18 @@ class Communication { * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get audiences * @description: Audience is used to import CSV files containing emails, phone numbers, and other variables in order to populate email/SMS templates for bulk delivery via a Campaign. Use this API to get audiences. */ - getAudiencesPaginator({ companyId, applicationId, pageSize, sort } = {}) { + getAudiencesPaginator({ + companyId, + applicationId, + pageSize, + sort, + query, + } = {}) { const paginator = new Paginator(); const callback = async () => { const pageId = paginator.nextId; @@ -1394,6 +1816,7 @@ class Communication { pageNo: pageNo, pageSize: pageSize, sort: sort, + query: query, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, @@ -1656,13 +2079,14 @@ class Communication { * @description: Get campaigns - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getCampaigns/). */ async getCampaigns( - { pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} }, + { query, pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, } = CommunicationPlatformApplicationValidator.getCampaigns().validate( { + query, pageNo, pageSize, sort, @@ -1678,6 +2102,7 @@ class Communication { error: warrning, } = CommunicationPlatformApplicationValidator.getCampaigns().validate( { + query, pageNo, pageSize, sort, @@ -1692,6 +2117,7 @@ class Communication { } const query_params = {}; + query_params["query"] = query; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["sort"] = sort; @@ -1724,45 +2150,12 @@ class Communication { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Communication > getCampaigns \n ${res_error}`, - }); - } - } - - return response; - } - - /** - * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Company id - * @param {string} arg.applicationId - Application id - * @param {number} [arg.pageSize] - Current request items count - * @param {Object} [arg.sort] - To sort based on created_at - * @returns {Paginator} - * @summary: Get campaigns - * @description: Get campaigns - */ - getCampaignsPaginator({ companyId, applicationId, pageSize, sort } = {}) { - const paginator = new Paginator(); - const callback = async () => { - const pageId = paginator.nextId; - const pageNo = paginator.pageNo; - const pageType = "number"; - const data = await this.getCampaigns({ - companyId: companyId, - applicationId: applicationId, - pageNo: pageNo, - pageSize: pageSize, - sort: sort, - }); - paginator.setPaginator({ - hasNext: data.page.has_next ? true : false, - nextId: data.page.next_id, - }); - return data; - }; - paginator.setCallback(callback.bind(this)); - return paginator; + message: `Response Validation Warnings for platform > Communication > getCampaigns \n ${res_error}`, + }); + } + } + + return response; } /** @@ -2222,7 +2615,7 @@ class Communication { * @description: Get email providers - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailProviders/). */ async getEmailProviders( - { pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} }, + { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -2232,6 +2625,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: true } ); @@ -2247,6 +2641,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: false } ); @@ -2261,6 +2656,7 @@ class Communication { query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["sort"] = sort; + query_params["query"] = query; const response = await PlatformAPIClient.execute( this.config, @@ -2304,6 +2700,7 @@ class Communication { * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get email providers * @description: Get email providers @@ -2313,6 +2710,7 @@ class Communication { applicationId, pageSize, sort, + query, } = {}) { const paginator = new Paginator(); const callback = async () => { @@ -2325,6 +2723,7 @@ class Communication { pageNo: pageNo, pageSize: pageSize, sort: sort, + query: query, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, @@ -2429,7 +2828,7 @@ class Communication { * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to get all email templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEmailTemplates/). */ async getEmailTemplates( - { pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} }, + { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -2439,6 +2838,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: true } ); @@ -2454,6 +2854,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: false } ); @@ -2468,6 +2869,7 @@ class Communication { query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["sort"] = sort; + query_params["query"] = query; const response = await PlatformAPIClient.execute( this.config, @@ -2511,6 +2913,7 @@ class Communication { * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get email templates * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to get all email templates. @@ -2520,6 +2923,7 @@ class Communication { applicationId, pageSize, sort, + query, } = {}) { const paginator = new Paginator(); const callback = async () => { @@ -2532,6 +2936,7 @@ class Communication { pageNo: pageNo, pageSize: pageSize, sort: sort, + query: query, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, @@ -2637,7 +3042,7 @@ class Communication { * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count - * @param {string} [arg.populate] - Populate fields + * @param {string} [arg.populate] - Populate Fields * @returns {Paginator} * @summary: Get event subscriptions * @description: Get event subscriptions @@ -2670,6 +3075,90 @@ class Communication { return paginator; } + /** + * @param {CommunicationPlatformApplicationValidator.GetEventSubscriptionsByIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getEventSubscriptionsById + * @summary: Get event subscriptions by id + * @description: Get event subscriptions by id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getEventSubscriptionsById/). + */ + async getEventSubscriptionsById( + { id, populate, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CommunicationPlatformApplicationValidator.getEventSubscriptionsById().validate( + { + id, + populate, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = CommunicationPlatformApplicationValidator.getEventSubscriptionsById().validate( + { + id, + populate, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Communication > getEventSubscriptionsById \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["populate"] = populate; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/event/event-subscriptions/${id}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CommunicationPlatformModel.EventSubscription().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 > Communication > getEventSubscriptionsById \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {CommunicationPlatformApplicationValidator.GetGlobalProvidersParam} arg * - Arg object @@ -2836,7 +3325,7 @@ class Communication { * @description: Get job logs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getJobLogs/). */ async getJobLogs( - { pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} }, + { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -2846,6 +3335,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: true } ); @@ -2861,6 +3351,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: false } ); @@ -2875,6 +3366,7 @@ class Communication { query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["sort"] = sort; + query_params["query"] = query; const response = await PlatformAPIClient.execute( this.config, @@ -2918,11 +3410,18 @@ class Communication { * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get job logs * @description: Get job logs */ - getJobLogsPaginator({ companyId, applicationId, pageSize, sort } = {}) { + getJobLogsPaginator({ + companyId, + applicationId, + pageSize, + sort, + query, + } = {}) { const paginator = new Paginator(); const callback = async () => { const pageId = paginator.nextId; @@ -2934,6 +3433,7 @@ class Communication { pageNo: pageNo, pageSize: pageSize, sort: sort, + query: query, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, @@ -2955,7 +3455,7 @@ class Communication { * @description: Get jobs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getJobs/). */ async getJobs( - { pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} }, + { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -2965,6 +3465,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: true } ); @@ -2980,6 +3481,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: false } ); @@ -2994,6 +3496,7 @@ class Communication { query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["sort"] = sort; + query_params["query"] = query; const response = await PlatformAPIClient.execute( this.config, @@ -3037,11 +3540,12 @@ class Communication { * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get jobs * @description: Get jobs */ - getJobsPaginator({ companyId, applicationId, pageSize, sort } = {}) { + getJobsPaginator({ companyId, applicationId, pageSize, sort, query } = {}) { const paginator = new Paginator(); const callback = async () => { const pageId = paginator.nextId; @@ -3053,6 +3557,7 @@ class Communication { pageNo: pageNo, pageSize: pageSize, sort: sort, + query: query, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, @@ -3222,6 +3727,83 @@ class Communication { return response; } + /** + * @param {CommunicationPlatformApplicationValidator.GetOtpConfigurationParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getOtpConfiguration + * @summary: Get otp-configuration, if not present in db then return default settings + * @description: Get otp-configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getOtpConfiguration/). + */ + async getOtpConfiguration( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CommunicationPlatformApplicationValidator.getOtpConfiguration().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = CommunicationPlatformApplicationValidator.getOtpConfiguration().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Communication > getOtpConfiguration \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/otp/otp-configuration`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CommunicationPlatformModel.OtpConfiguration().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 > Communication > getOtpConfiguration \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {CommunicationPlatformApplicationValidator.GetSmsProviderByIdParam} arg * - Arg object @@ -3480,7 +4062,7 @@ class Communication { * @description: SMS templates are predefined message formats linked to various events for delivering messages to users. Use this API to get all sms templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSmsTemplates/). */ async getSmsTemplates( - { pageNo, pageSize, sort, requestHeaders } = { requestHeaders: {} }, + { pageNo, pageSize, sort, query, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -3490,6 +4072,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: true } ); @@ -3505,6 +4088,7 @@ class Communication { pageNo, pageSize, sort, + query, }, { abortEarly: false, allowUnknown: false } ); @@ -3519,6 +4103,7 @@ class Communication { query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["sort"] = sort; + query_params["query"] = query; const response = await PlatformAPIClient.execute( this.config, @@ -3562,11 +4147,18 @@ class Communication { * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count * @param {Object} [arg.sort] - To sort based on created_at + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get sms templates * @description: SMS templates are predefined message formats linked to various events for delivering messages to users. Use this API to get all sms templates. */ - getSmsTemplatesPaginator({ companyId, applicationId, pageSize, sort } = {}) { + getSmsTemplatesPaginator({ + companyId, + applicationId, + pageSize, + sort, + query, + } = {}) { const paginator = new Paginator(); const callback = async () => { const pageId = paginator.nextId; @@ -3578,6 +4170,7 @@ class Communication { pageNo: pageNo, pageSize: pageSize, sort: sort, + query: query, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, @@ -3682,7 +4275,7 @@ class Communication { * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to get all subscribed email templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSubscribedEmailTemplates/). */ async getSubscribedEmailTemplates( - { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + { pageNo, pageSize, query, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -3691,6 +4284,7 @@ class Communication { { pageNo, pageSize, + query, }, { abortEarly: false, allowUnknown: true } ); @@ -3705,6 +4299,7 @@ class Communication { { pageNo, pageSize, + query, }, { abortEarly: false, allowUnknown: false } ); @@ -3718,6 +4313,7 @@ class Communication { const query_params = {}; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; + query_params["query"] = query; const response = await PlatformAPIClient.execute( this.config, @@ -3760,6 +4356,7 @@ class Communication { * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get subscribed email templates * @description: Email templates are predefined formats linked to various events for delivering messages to users. Use this API to get all subscribed email templates. @@ -3768,6 +4365,7 @@ class Communication { companyId, applicationId, pageSize, + query, } = {}) { const paginator = new Paginator(); const callback = async () => { @@ -3779,6 +4377,7 @@ class Communication { applicationId: applicationId, pageNo: pageNo, pageSize: pageSize, + query: query, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, @@ -3802,7 +4401,7 @@ class Communication { * @description: SMS templates are predefined message formats linked to various events for delivering messages to users. Use this API to get all subscribed sms templates. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/getSubscribedSmsTemplates/). */ async getSubscribedSmsTemplates( - { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + { pageNo, pageSize, query, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -3811,6 +4410,7 @@ class Communication { { pageNo, pageSize, + query, }, { abortEarly: false, allowUnknown: true } ); @@ -3825,6 +4425,7 @@ class Communication { { pageNo, pageSize, + query, }, { abortEarly: false, allowUnknown: false } ); @@ -3838,6 +4439,7 @@ class Communication { const query_params = {}; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; + query_params["query"] = query; const response = await PlatformAPIClient.execute( this.config, @@ -3880,6 +4482,7 @@ class Communication { * @param {string} arg.companyId - Company id * @param {string} arg.applicationId - Application id * @param {number} [arg.pageSize] - Current request items count + * @param {Object} [arg.query] - To search based on plain text * @returns {Paginator} * @summary: Get subscribed sms templates * @description: SMS templates are predefined message formats linked to various events for delivering messages to users. Use this API to get all subscribed sms templates. @@ -3888,6 +4491,7 @@ class Communication { companyId, applicationId, pageSize, + query, } = {}) { const paginator = new Paginator(); const callback = async () => { @@ -3899,6 +4503,7 @@ class Communication { applicationId: applicationId, pageNo: pageNo, pageSize: pageSize, + query: query, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, @@ -4957,6 +5562,83 @@ class Communication { return response; } + /** + * @param {CommunicationPlatformApplicationValidator.UpdateOtpConfigurationParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name updateOtpConfiguration + * @summary: Update/insert otp configurations + * @description: Update otp-configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/communication/updateOtpConfiguration/). + */ + async updateOtpConfiguration( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = CommunicationPlatformApplicationValidator.updateOtpConfiguration().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = CommunicationPlatformApplicationValidator.updateOtpConfiguration().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Communication > updateOtpConfiguration \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/communication/v1.0/company/${this.config.companyId}/application/${this.applicationId}/otp/otp-configuration`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = CommunicationPlatformModel.OtpConfiguration().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 > Communication > updateOtpConfiguration \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {CommunicationPlatformApplicationValidator.UpdateSmsProviderByIdParam} arg * - Arg object diff --git a/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts b/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts index 0e65dcd2c..d438054b2 100644 --- a/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +++ b/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts @@ -18,6 +18,18 @@ export = CommunicationPlatformApplicationValidator; * @typedef CreateEmailTemplateParam * @property {CommunicationPlatformModel.EmailTemplateReq} body */ +/** + * @typedef CreateEventSubscriptionsParam + * @property {CommunicationPlatformModel.SubscriptionsObject} body + */ +/** + * @typedef CreateEventSubscriptionsByBulkParam + * @property {CommunicationPlatformModel.EventSubscriptionsBulkUpdateRequest} body + */ +/** + * @typedef CreateJobsParam + * @property {CommunicationPlatformModel.CreateJobsReq} body + */ /** * @typedef CreateSmsProviderParam * @property {CommunicationPlatformModel.SmsProviderReq} body @@ -29,6 +41,7 @@ export = CommunicationPlatformApplicationValidator; /** * @typedef DeleteAudienceByIdParam * @property {string} id - Audience id + * @property {CommunicationPlatformModel.AudienceReq} body */ /** * @typedef DeleteEmailProviderByIdParam @@ -38,6 +51,10 @@ export = CommunicationPlatformApplicationValidator; * @typedef DeleteEmailTemplateByIdParam * @property {string} id - Email template id */ +/** + * @typedef DeleteEventSubscriptionsByIdParam + * @property {string} id - Event subscription id + */ /** * @typedef DeleteSmsProviderByIdParam * @property {string} id - Sms provider id @@ -46,6 +63,11 @@ export = CommunicationPlatformApplicationValidator; * @typedef DeleteSmsTemplateByIdParam * @property {string} id - Sms template id */ +/** + * @typedef EditEventSubscriptionsParam + * @property {string} id - Event subscription id + * @property {CommunicationPlatformModel.SubscriptionsObject} body + */ /** @typedef GetAppProvidersParam */ /** * @typedef GetAudienceByIdParam @@ -56,6 +78,7 @@ export = CommunicationPlatformApplicationValidator; * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** * @typedef GetBigQueryHeadersByIdParam @@ -71,6 +94,7 @@ export = CommunicationPlatformApplicationValidator; */ /** * @typedef GetCampaignsParam + * @property {Object} [query] - To search based on plain text * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at @@ -97,6 +121,7 @@ export = CommunicationPlatformApplicationValidator; * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** * @typedef GetEmailTemplateByIdParam @@ -107,12 +132,18 @@ export = CommunicationPlatformApplicationValidator; * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** * @typedef GetEventSubscriptionsParam * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count - * @property {string} [populate] - Populate fields + * @property {string} [populate] - Populate Fields + */ +/** + * @typedef GetEventSubscriptionsByIdParam + * @property {string} id - Event subscription id + * @property {string} [populate] - Populate Fields */ /** @typedef GetGlobalProvidersParam */ /** @typedef GetGlobalVariablesParam */ @@ -121,18 +152,21 @@ export = CommunicationPlatformApplicationValidator; * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** * @typedef GetJobsParam * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** * @typedef GetNSampleRecordsFromCsvParam * @property {CommunicationPlatformModel.GetNRecordsCsvReq} body */ /** @typedef GetNSampleRecordsFromCsvByGetParam */ +/** @typedef GetOtpConfigurationParam */ /** * @typedef GetSmsProviderByIdParam * @property {string} id - Sms provider id @@ -152,6 +186,7 @@ export = CommunicationPlatformApplicationValidator; * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** * @typedef GetStatsOfCampaignByIdParam @@ -161,11 +196,13 @@ export = CommunicationPlatformApplicationValidator; * @typedef GetSubscribedEmailTemplatesParam * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count + * @property {Object} [query] - To search based on plain text */ /** * @typedef GetSubscribedSmsTemplatesParam * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count + * @property {Object} [query] - To search based on plain text */ /** @typedef GetSystemAudiencesParam */ /** @typedef GetSystemEmailTemplatesParam */ @@ -214,6 +251,7 @@ export = CommunicationPlatformApplicationValidator; * @property {string} id - Email template id * @property {CommunicationPlatformModel.EmailTemplateReq} body */ +/** @typedef UpdateOtpConfigurationParam */ /** * @typedef UpdateSmsProviderByIdParam * @property {string} id - Sms provider id @@ -243,6 +281,12 @@ declare class CommunicationPlatformApplicationValidator { static createEmailProvider(): CreateEmailProviderParam; /** @returns {CreateEmailTemplateParam} */ static createEmailTemplate(): CreateEmailTemplateParam; + /** @returns {CreateEventSubscriptionsParam} */ + static createEventSubscriptions(): CreateEventSubscriptionsParam; + /** @returns {CreateEventSubscriptionsByBulkParam} */ + static createEventSubscriptionsByBulk(): CreateEventSubscriptionsByBulkParam; + /** @returns {CreateJobsParam} */ + static createJobs(): CreateJobsParam; /** @returns {CreateSmsProviderParam} */ static createSmsProvider(): CreateSmsProviderParam; /** @returns {CreateSmsTemplateParam} */ @@ -253,10 +297,14 @@ declare class CommunicationPlatformApplicationValidator { static deleteEmailProviderById(): DeleteEmailProviderByIdParam; /** @returns {DeleteEmailTemplateByIdParam} */ static deleteEmailTemplateById(): DeleteEmailTemplateByIdParam; + /** @returns {DeleteEventSubscriptionsByIdParam} */ + static deleteEventSubscriptionsById(): DeleteEventSubscriptionsByIdParam; /** @returns {DeleteSmsProviderByIdParam} */ static deleteSmsProviderById(): DeleteSmsProviderByIdParam; /** @returns {DeleteSmsTemplateByIdParam} */ static deleteSmsTemplateById(): DeleteSmsTemplateByIdParam; + /** @returns {EditEventSubscriptionsParam} */ + static editEventSubscriptions(): EditEventSubscriptionsParam; /** @returns {GetAppProvidersParam} */ static getAppProviders(): any; /** @returns {GetAudienceByIdParam} */ @@ -289,6 +337,8 @@ declare class CommunicationPlatformApplicationValidator { static getEmailTemplates(): GetEmailTemplatesParam; /** @returns {GetEventSubscriptionsParam} */ static getEventSubscriptions(): GetEventSubscriptionsParam; + /** @returns {GetEventSubscriptionsByIdParam} */ + static getEventSubscriptionsById(): GetEventSubscriptionsByIdParam; /** @returns {GetGlobalProvidersParam} */ static getGlobalProviders(): any; /** @returns {GetGlobalVariablesParam} */ @@ -301,6 +351,8 @@ declare class CommunicationPlatformApplicationValidator { static getNSampleRecordsFromCsv(): GetNSampleRecordsFromCsvParam; /** @returns {GetNSampleRecordsFromCsvByGetParam} */ static getNSampleRecordsFromCsvByGet(): any; + /** @returns {GetOtpConfigurationParam} */ + static getOtpConfiguration(): any; /** @returns {GetSmsProviderByIdParam} */ static getSmsProviderById(): GetSmsProviderByIdParam; /** @returns {GetSmsProvidersParam} */ @@ -341,6 +393,8 @@ declare class CommunicationPlatformApplicationValidator { static updateEmailProviderById(): UpdateEmailProviderByIdParam; /** @returns {UpdateEmailTemplateByIdParam} */ static updateEmailTemplateById(): UpdateEmailTemplateByIdParam; + /** @returns {UpdateOtpConfigurationParam} */ + static updateOtpConfiguration(): any; /** @returns {UpdateSmsProviderByIdParam} */ static updateSmsProviderById(): UpdateSmsProviderByIdParam; /** @returns {UpdateSmsTemplateByIdParam} */ @@ -349,7 +403,7 @@ declare class CommunicationPlatformApplicationValidator { static verfiyOtp(): VerfiyOtpParam; } declare namespace CommunicationPlatformApplicationValidator { - export { CreateAudienceParam, CreateBigQueryHeadersParam, CreateBigQueryNCountParam, CreateBigQueryRowCountParam, CreateCampaignParam, CreateEmailProviderParam, CreateEmailTemplateParam, CreateSmsProviderParam, CreateSmsTemplateParam, DeleteAudienceByIdParam, DeleteEmailProviderByIdParam, DeleteEmailTemplateByIdParam, DeleteSmsProviderByIdParam, DeleteSmsTemplateByIdParam, GetAppProvidersParam, GetAudienceByIdParam, GetAudiencesParam, GetBigQueryHeadersByIdParam, GetBigQueryRowCountByIdParam, GetCampaignByIdParam, GetCampaignsParam, GetCommunicationLogsParam, GetDefaultSmsProvidersParam, GetDummyDatasourcesParam, GetDummyDatasourcesMetaParam, GetEmailProviderByIdParam, GetEmailProvidersParam, GetEmailTemplateByIdParam, GetEmailTemplatesParam, GetEventSubscriptionsParam, GetGlobalProvidersParam, GetGlobalVariablesParam, GetJobLogsParam, GetJobsParam, GetNSampleRecordsFromCsvParam, GetNSampleRecordsFromCsvByGetParam, GetSmsProviderByIdParam, GetSmsProvidersParam, GetSmsTemplateByIdParam, GetSmsTemplatesParam, GetStatsOfCampaignByIdParam, GetSubscribedEmailTemplatesParam, GetSubscribedSmsTemplatesParam, GetSystemAudiencesParam, GetSystemEmailTemplatesParam, GetSystemSmsTemplatesParam, PostGlobalVariablesParam, SendCommunicationAsynchronouslyParam, SendCommunicationSynchronouslyParam, SendOtpParam, TriggerCampaignJobParam, UpdateAppProvidersParam, UpdateAudienceByIdParam, UpdateCampaignByIdParam, UpdateEmailProviderByIdParam, UpdateEmailTemplateByIdParam, UpdateSmsProviderByIdParam, UpdateSmsTemplateByIdParam, VerfiyOtpParam }; + export { CreateAudienceParam, CreateBigQueryHeadersParam, CreateBigQueryNCountParam, CreateBigQueryRowCountParam, CreateCampaignParam, CreateEmailProviderParam, CreateEmailTemplateParam, CreateEventSubscriptionsParam, CreateEventSubscriptionsByBulkParam, CreateJobsParam, CreateSmsProviderParam, CreateSmsTemplateParam, DeleteAudienceByIdParam, DeleteEmailProviderByIdParam, DeleteEmailTemplateByIdParam, DeleteEventSubscriptionsByIdParam, DeleteSmsProviderByIdParam, DeleteSmsTemplateByIdParam, EditEventSubscriptionsParam, GetAppProvidersParam, GetAudienceByIdParam, GetAudiencesParam, GetBigQueryHeadersByIdParam, GetBigQueryRowCountByIdParam, GetCampaignByIdParam, GetCampaignsParam, GetCommunicationLogsParam, GetDefaultSmsProvidersParam, GetDummyDatasourcesParam, GetDummyDatasourcesMetaParam, GetEmailProviderByIdParam, GetEmailProvidersParam, GetEmailTemplateByIdParam, GetEmailTemplatesParam, GetEventSubscriptionsParam, GetEventSubscriptionsByIdParam, GetGlobalProvidersParam, GetGlobalVariablesParam, GetJobLogsParam, GetJobsParam, GetNSampleRecordsFromCsvParam, GetNSampleRecordsFromCsvByGetParam, GetOtpConfigurationParam, GetSmsProviderByIdParam, GetSmsProvidersParam, GetSmsTemplateByIdParam, GetSmsTemplatesParam, GetStatsOfCampaignByIdParam, GetSubscribedEmailTemplatesParam, GetSubscribedSmsTemplatesParam, GetSystemAudiencesParam, GetSystemEmailTemplatesParam, GetSystemSmsTemplatesParam, PostGlobalVariablesParam, SendCommunicationAsynchronouslyParam, SendCommunicationSynchronouslyParam, SendOtpParam, TriggerCampaignJobParam, UpdateAppProvidersParam, UpdateAudienceByIdParam, UpdateCampaignByIdParam, UpdateEmailProviderByIdParam, UpdateEmailTemplateByIdParam, UpdateOtpConfigurationParam, UpdateSmsProviderByIdParam, UpdateSmsTemplateByIdParam, VerfiyOtpParam }; } type CreateAudienceParam = { body: CommunicationPlatformModel.AudienceReq; @@ -363,6 +417,15 @@ type CreateEmailProviderParam = { type CreateEmailTemplateParam = { body: CommunicationPlatformModel.EmailTemplateReq; }; +type CreateEventSubscriptionsParam = { + body: CommunicationPlatformModel.SubscriptionsObject; +}; +type CreateEventSubscriptionsByBulkParam = { + body: CommunicationPlatformModel.EventSubscriptionsBulkUpdateRequest; +}; +type CreateJobsParam = { + body: CommunicationPlatformModel.CreateJobsReq; +}; type CreateSmsProviderParam = { body: CommunicationPlatformModel.SmsProviderReq; }; @@ -374,6 +437,7 @@ type DeleteAudienceByIdParam = { * - Audience id */ id: string; + body: CommunicationPlatformModel.AudienceReq; }; type DeleteEmailProviderByIdParam = { /** @@ -387,6 +451,12 @@ type DeleteEmailTemplateByIdParam = { */ id: string; }; +type DeleteEventSubscriptionsByIdParam = { + /** + * - Event subscription id + */ + id: string; +}; type DeleteSmsProviderByIdParam = { /** * - Sms provider id @@ -399,6 +469,13 @@ type DeleteSmsTemplateByIdParam = { */ id: string; }; +type EditEventSubscriptionsParam = { + /** + * - Event subscription id + */ + id: string; + body: CommunicationPlatformModel.SubscriptionsObject; +}; type GetAudienceByIdParam = { /** * - Audience id @@ -418,6 +495,10 @@ type GetAudiencesParam = { * - To sort based on created_at */ sort?: any; + /** + * - To search based on plain text + */ + query?: any; }; type GetBigQueryHeadersByIdParam = { /** @@ -438,6 +519,10 @@ type GetCampaignByIdParam = { id: string; }; type GetCampaignsParam = { + /** + * - To search based on plain text + */ + query?: any; /** * - Current page no */ @@ -491,6 +576,10 @@ type GetEmailProvidersParam = { * - To sort based on created_at */ sort?: any; + /** + * - To search based on plain text + */ + query?: any; }; type GetEmailTemplateByIdParam = { /** @@ -511,6 +600,10 @@ type GetEmailTemplatesParam = { * - To sort based on created_at */ sort?: any; + /** + * - To search based on plain text + */ + query?: any; }; type GetEventSubscriptionsParam = { /** @@ -522,7 +615,17 @@ type GetEventSubscriptionsParam = { */ pageSize?: number; /** - * - Populate fields + * - Populate Fields + */ + populate?: string; +}; +type GetEventSubscriptionsByIdParam = { + /** + * - Event subscription id + */ + id: string; + /** + * - Populate Fields */ populate?: string; }; @@ -539,6 +642,10 @@ type GetJobLogsParam = { * - To sort based on created_at */ sort?: any; + /** + * - To search based on plain text + */ + query?: any; }; type GetJobsParam = { /** @@ -553,6 +660,10 @@ type GetJobsParam = { * - To sort based on created_at */ sort?: any; + /** + * - To search based on plain text + */ + query?: any; }; type GetNSampleRecordsFromCsvParam = { body: CommunicationPlatformModel.GetNRecordsCsvReq; @@ -596,6 +707,10 @@ type GetSmsTemplatesParam = { * - To sort based on created_at */ sort?: any; + /** + * - To search based on plain text + */ + query?: any; }; type GetStatsOfCampaignByIdParam = { /** @@ -612,6 +727,10 @@ type GetSubscribedEmailTemplatesParam = { * - Current request items count */ pageSize?: number; + /** + * - To search based on plain text + */ + query?: any; }; type GetSubscribedSmsTemplatesParam = { /** @@ -622,6 +741,10 @@ type GetSubscribedSmsTemplatesParam = { * - Current request items count */ pageSize?: number; + /** + * - To search based on plain text + */ + query?: any; }; type PostGlobalVariablesParam = { body: CommunicationPlatformModel.GlobalVariablesReq; @@ -695,7 +818,9 @@ type GetDummyDatasourcesParam = any; type GetGlobalProvidersParam = any; type GetGlobalVariablesParam = any; type GetNSampleRecordsFromCsvByGetParam = any; +type GetOtpConfigurationParam = any; type GetSystemAudiencesParam = any; type GetSystemEmailTemplatesParam = any; type GetSystemSmsTemplatesParam = any; +type UpdateOtpConfigurationParam = any; import CommunicationPlatformModel = require("./CommunicationPlatformModel"); diff --git a/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js b/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js index dfb62095d..e3cf4a58f 100644 --- a/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +++ b/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js @@ -28,6 +28,21 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {CommunicationPlatformModel.EmailTemplateReq} body */ +/** + * @typedef CreateEventSubscriptionsParam + * @property {CommunicationPlatformModel.SubscriptionsObject} body + */ + +/** + * @typedef CreateEventSubscriptionsByBulkParam + * @property {CommunicationPlatformModel.EventSubscriptionsBulkUpdateRequest} body + */ + +/** + * @typedef CreateJobsParam + * @property {CommunicationPlatformModel.CreateJobsReq} body + */ + /** * @typedef CreateSmsProviderParam * @property {CommunicationPlatformModel.SmsProviderReq} body @@ -41,6 +56,7 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); /** * @typedef DeleteAudienceByIdParam * @property {string} id - Audience id + * @property {CommunicationPlatformModel.AudienceReq} body */ /** @@ -53,6 +69,11 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {string} id - Email template id */ +/** + * @typedef DeleteEventSubscriptionsByIdParam + * @property {string} id - Event subscription id + */ + /** * @typedef DeleteSmsProviderByIdParam * @property {string} id - Sms provider id @@ -63,6 +84,12 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {string} id - Sms template id */ +/** + * @typedef EditEventSubscriptionsParam + * @property {string} id - Event subscription id + * @property {CommunicationPlatformModel.SubscriptionsObject} body + */ + /** @typedef GetAppProvidersParam */ /** @@ -75,6 +102,7 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** @@ -94,6 +122,7 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); /** * @typedef GetCampaignsParam + * @property {Object} [query] - To search based on plain text * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at @@ -126,6 +155,7 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** @@ -138,13 +168,20 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** * @typedef GetEventSubscriptionsParam * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count - * @property {string} [populate] - Populate fields + * @property {string} [populate] - Populate Fields + */ + +/** + * @typedef GetEventSubscriptionsByIdParam + * @property {string} id - Event subscription id + * @property {string} [populate] - Populate Fields */ /** @typedef GetGlobalProvidersParam */ @@ -156,6 +193,7 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** @@ -163,6 +201,7 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** @@ -172,6 +211,8 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); /** @typedef GetNSampleRecordsFromCsvByGetParam */ +/** @typedef GetOtpConfigurationParam */ + /** * @typedef GetSmsProviderByIdParam * @property {string} id - Sms provider id @@ -194,6 +235,7 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count * @property {Object} [sort] - To sort based on created_at + * @property {Object} [query] - To search based on plain text */ /** @@ -205,12 +247,14 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @typedef GetSubscribedEmailTemplatesParam * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count + * @property {Object} [query] - To search based on plain text */ /** * @typedef GetSubscribedSmsTemplatesParam * @property {number} [pageNo] - Current page no * @property {number} [pageSize] - Current request items count + * @property {Object} [query] - To search based on plain text */ /** @typedef GetSystemAudiencesParam */ @@ -273,6 +317,8 @@ const CommunicationPlatformModel = require("./CommunicationPlatformModel"); * @property {CommunicationPlatformModel.EmailTemplateReq} body */ +/** @typedef UpdateOtpConfigurationParam */ + /** * @typedef UpdateSmsProviderByIdParam * @property {string} id - Sms provider id @@ -334,6 +380,27 @@ class CommunicationPlatformApplicationValidator { }).required(); } + /** @returns {CreateEventSubscriptionsParam} */ + static createEventSubscriptions() { + return Joi.object({ + body: CommunicationPlatformModel.SubscriptionsObject().required(), + }).required(); + } + + /** @returns {CreateEventSubscriptionsByBulkParam} */ + static createEventSubscriptionsByBulk() { + return Joi.object({ + body: CommunicationPlatformModel.EventSubscriptionsBulkUpdateRequest().required(), + }).required(); + } + + /** @returns {CreateJobsParam} */ + static createJobs() { + return Joi.object({ + body: CommunicationPlatformModel.CreateJobsReq().required(), + }).required(); + } + /** @returns {CreateSmsProviderParam} */ static createSmsProvider() { return Joi.object({ @@ -352,6 +419,7 @@ class CommunicationPlatformApplicationValidator { static deleteAudienceById() { return Joi.object({ id: Joi.string().allow("").required(), + body: CommunicationPlatformModel.AudienceReq().required(), }).required(); } @@ -369,6 +437,13 @@ class CommunicationPlatformApplicationValidator { }).required(); } + /** @returns {DeleteEventSubscriptionsByIdParam} */ + static deleteEventSubscriptionsById() { + return Joi.object({ + id: Joi.string().allow("").required(), + }).required(); + } + /** @returns {DeleteSmsProviderByIdParam} */ static deleteSmsProviderById() { return Joi.object({ @@ -383,6 +458,14 @@ class CommunicationPlatformApplicationValidator { }).required(); } + /** @returns {EditEventSubscriptionsParam} */ + static editEventSubscriptions() { + return Joi.object({ + id: Joi.string().allow("").required(), + body: CommunicationPlatformModel.SubscriptionsObject().required(), + }).required(); + } + /** @returns {GetAppProvidersParam} */ static getAppProviders() { return Joi.object({}).required(); @@ -401,6 +484,7 @@ class CommunicationPlatformApplicationValidator { pageNo: Joi.number(), pageSize: Joi.number(), sort: Joi.any(), + query: Joi.any(), }).required(); } @@ -428,6 +512,7 @@ class CommunicationPlatformApplicationValidator { /** @returns {GetCampaignsParam} */ static getCampaigns() { return Joi.object({ + query: Joi.any(), pageNo: Joi.number(), pageSize: Joi.number(), sort: Joi.any(), @@ -474,6 +559,7 @@ class CommunicationPlatformApplicationValidator { pageNo: Joi.number(), pageSize: Joi.number(), sort: Joi.any(), + query: Joi.any(), }).required(); } @@ -490,6 +576,7 @@ class CommunicationPlatformApplicationValidator { pageNo: Joi.number(), pageSize: Joi.number(), sort: Joi.any(), + query: Joi.any(), }).required(); } @@ -502,6 +589,14 @@ class CommunicationPlatformApplicationValidator { }).required(); } + /** @returns {GetEventSubscriptionsByIdParam} */ + static getEventSubscriptionsById() { + return Joi.object({ + id: Joi.string().allow("").required(), + populate: Joi.string().allow(""), + }).required(); + } + /** @returns {GetGlobalProvidersParam} */ static getGlobalProviders() { return Joi.object({}).required(); @@ -518,6 +613,7 @@ class CommunicationPlatformApplicationValidator { pageNo: Joi.number(), pageSize: Joi.number(), sort: Joi.any(), + query: Joi.any(), }).required(); } @@ -527,6 +623,7 @@ class CommunicationPlatformApplicationValidator { pageNo: Joi.number(), pageSize: Joi.number(), sort: Joi.any(), + query: Joi.any(), }).required(); } @@ -542,6 +639,11 @@ class CommunicationPlatformApplicationValidator { return Joi.object({}).required(); } + /** @returns {GetOtpConfigurationParam} */ + static getOtpConfiguration() { + return Joi.object({}).required(); + } + /** @returns {GetSmsProviderByIdParam} */ static getSmsProviderById() { return Joi.object({ @@ -571,6 +673,7 @@ class CommunicationPlatformApplicationValidator { pageNo: Joi.number(), pageSize: Joi.number(), sort: Joi.any(), + query: Joi.any(), }).required(); } @@ -586,6 +689,7 @@ class CommunicationPlatformApplicationValidator { return Joi.object({ pageNo: Joi.number(), pageSize: Joi.number(), + query: Joi.any(), }).required(); } @@ -594,6 +698,7 @@ class CommunicationPlatformApplicationValidator { return Joi.object({ pageNo: Joi.number(), pageSize: Joi.number(), + query: Joi.any(), }).required(); } @@ -686,6 +791,11 @@ class CommunicationPlatformApplicationValidator { }).required(); } + /** @returns {UpdateOtpConfigurationParam} */ + static updateOtpConfiguration() { + return Joi.object({}).required(); + } + /** @returns {UpdateSmsProviderByIdParam} */ static updateSmsProviderById() { return Joi.object({ diff --git a/sdk/platform/Communication/CommunicationPlatformModel.d.ts b/sdk/platform/Communication/CommunicationPlatformModel.d.ts index 5554b2408..387710572 100644 --- a/sdk/platform/Communication/CommunicationPlatformModel.d.ts +++ b/sdk/platform/Communication/CommunicationPlatformModel.d.ts @@ -118,6 +118,26 @@ export = CommunicationPlatformModel; * @property {string} [from_email] * @property {string} [from_name] */ +/** + * @typedef CommunicationTemplate + * @property {boolean} [subscribed] - Whether the user is subscribed or not + * @property {string} [template] - Template ID + */ +/** + * @typedef CreateJobsReq + * @property {string} [campaign] + */ +/** + * @typedef CreateJobsRes + * @property {number} [__v] + * @property {string} [_id] + * @property {string} [application] + * @property {string} [campaign] + * @property {boolean} [completed] + * @property {string} [created_at] + * @property {boolean} [is_active] + * @property {string} [updated_at] + */ /** * @typedef DefaultSmsProviders * @property {string} [_id] @@ -272,6 +292,22 @@ export = CommunicationPlatformModel; * @property {EventSubscription[]} [items] * @property {Page} [page] */ +/** + * @typedef EventSubscriptionsBulkUpdateRequest + * @property {SubscriptionsObject[]} [subscriptions] + */ +/** + * @typedef EventSubscriptionsBulkUpdateResponse + * @property {number} [__v] + * @property {string} [_id] + * @property {string} [application] + * @property {string} [category] + * @property {string} [created_at] + * @property {string} [event] + * @property {string} [slug] + * @property {EventSubscriptionTemplate} [template] + * @property {string} [updated_at] + */ /** * @typedef EventSubscriptionTemplate * @property {EventSubscriptionTemplateEmail} [email] @@ -450,6 +486,24 @@ export = CommunicationPlatformModel; * @property {string} [subtitle] * @property {string} [title] */ +/** + * @typedef OtpConfiguration + * @property {string} [application_id] + * @property {string} [company_id] + * @property {OtpConfigurationExpiry} expiry + * @property {number} otp_length + * @property {string} type + */ +/** + * @typedef OtpConfigurationExpiry + * @property {OtpConfigurationExpiryDuration} duration + * @property {string} type + */ +/** + * @typedef OtpConfigurationExpiryDuration + * @property {string} denomination + * @property {number} time + */ /** * @typedef Page * @property {number} [current] @@ -682,6 +736,11 @@ export = CommunicationPlatformModel; * @property {number} [success] * @property {number} [suppressed] */ +/** + * @typedef SubscriptionsObject + * @property {string} [_id] - Subscription ID + * @property {TemplateObject} [template] + */ /** * @typedef SystemEmailTemplate * @property {number} [__v] @@ -757,6 +816,12 @@ export = CommunicationPlatformModel; * @property {string} [template] * @property {string} [template_type] */ +/** + * @typedef TemplateObject + * @property {CommunicationTemplate} [email] + * @property {CommunicationTemplate} [pushnotification] + * @property {CommunicationTemplate} [sms] + */ /** * @typedef TriggerJobRequest * @property {string} [job_id] @@ -785,7 +850,7 @@ export = CommunicationPlatformModel; declare class CommunicationPlatformModel { } declare namespace CommunicationPlatformModel { - export { AppProvider, AppProviderReq, AppProviderRes, AppProviderResObj, AppProviderResVoice, Audience, AudienceReq, Audiences, BadRequestSchema, Campaign, CampaignEmail, CampaignEmailTemplate, CampaignReq, Campaigns, CampignEmailProvider, DefaultSmsProviders, DummyDatasources, DummyDatasourcesMeta, DummyDatasourcesMetaObj, EmailProvider, EmailProviderReq, EmailProviderReqFrom, EmailProviders, EmailTemplate, EmailTemplateHeaders, EmailTemplateKeys, EmailTemplateReq, EmailTemplates, EnabledObj, EngineRequest, EngineResponse, EventSubscription, EventSubscriptions, EventSubscriptionTemplate, EventSubscriptionTemplateEmail, EventSubscriptionTemplateSms, GenericDelete, GenericError, GetNRecordsCsvReq, GetNRecordsCsvRes, GetNRecordsCsvResItems, GetStats, GlobalProviders, GlobalProvidersResObj, GlobalVariablesGetResponse, GlobalVariablesPostResponse, GlobalVariablesReq, Job, JobLog, JobLogs, Jobs, Log, LogEmail, LogMeta, LogPushnotification, Logs, Message, metaObj, MetaStructure, NotFound, Notification, Page, PayloadEmailProviderStructure, PayloadEmailStructure, PayloadEmailTemplateStructure, PayloadSmsProviderStructure, PayloadSmsStructure, PayloadSmsTemplateStructure, PayloadStructure, RecipientHeaders, SendOtpCommsReq, SendOtpCommsReqData, SendOtpCommsReqEmail, SendOtpCommsReqSms, SendOtpCommsRes, SendOtpCommsResEmail, SendOtpCommsResSms, SendOtpEmailCommsProvider, SendOtpEmailCommsTemplate, SendOtpSmsCommsProvider, SendOtpSmsCommsTemplate, SmsProvider, SmsProviderReq, SmsProviders, SmsTemplate, SmsTemplateMessage, SmsTemplateReq, SmsTemplates, Stats, StatsImported, StatsProcessed, StatsProcessedEmail, StatsProcessedSms, SystemEmailTemplate, SystemEmailTemplates, SystemNotification, SystemNotifications, SystemNotificationUser, SystemSmsTemplates, TemplateAndType, TriggerJobRequest, TriggerJobResponse, VerifyOtpCommsErrorRes, VerifyOtpCommsReq, VerifyOtpCommsSuccessRes }; + export { AppProvider, AppProviderReq, AppProviderRes, AppProviderResObj, AppProviderResVoice, Audience, AudienceReq, Audiences, BadRequestSchema, Campaign, CampaignEmail, CampaignEmailTemplate, CampaignReq, Campaigns, CampignEmailProvider, CommunicationTemplate, CreateJobsReq, CreateJobsRes, DefaultSmsProviders, DummyDatasources, DummyDatasourcesMeta, DummyDatasourcesMetaObj, EmailProvider, EmailProviderReq, EmailProviderReqFrom, EmailProviders, EmailTemplate, EmailTemplateHeaders, EmailTemplateKeys, EmailTemplateReq, EmailTemplates, EnabledObj, EngineRequest, EngineResponse, EventSubscription, EventSubscriptions, EventSubscriptionsBulkUpdateRequest, EventSubscriptionsBulkUpdateResponse, EventSubscriptionTemplate, EventSubscriptionTemplateEmail, EventSubscriptionTemplateSms, GenericDelete, GenericError, GetNRecordsCsvReq, GetNRecordsCsvRes, GetNRecordsCsvResItems, GetStats, GlobalProviders, GlobalProvidersResObj, GlobalVariablesGetResponse, GlobalVariablesPostResponse, GlobalVariablesReq, Job, JobLog, JobLogs, Jobs, Log, LogEmail, LogMeta, LogPushnotification, Logs, Message, metaObj, MetaStructure, NotFound, Notification, OtpConfiguration, OtpConfigurationExpiry, OtpConfigurationExpiryDuration, Page, PayloadEmailProviderStructure, PayloadEmailStructure, PayloadEmailTemplateStructure, PayloadSmsProviderStructure, PayloadSmsStructure, PayloadSmsTemplateStructure, PayloadStructure, RecipientHeaders, SendOtpCommsReq, SendOtpCommsReqData, SendOtpCommsReqEmail, SendOtpCommsReqSms, SendOtpCommsRes, SendOtpCommsResEmail, SendOtpCommsResSms, SendOtpEmailCommsProvider, SendOtpEmailCommsTemplate, SendOtpSmsCommsProvider, SendOtpSmsCommsTemplate, SmsProvider, SmsProviderReq, SmsProviders, SmsTemplate, SmsTemplateMessage, SmsTemplateReq, SmsTemplates, Stats, StatsImported, StatsProcessed, StatsProcessedEmail, StatsProcessedSms, SubscriptionsObject, SystemEmailTemplate, SystemEmailTemplates, SystemNotification, SystemNotifications, SystemNotificationUser, SystemSmsTemplates, TemplateAndType, TemplateObject, TriggerJobRequest, TriggerJobResponse, VerifyOtpCommsErrorRes, VerifyOtpCommsReq, VerifyOtpCommsSuccessRes }; } /** @returns {AppProvider} */ declare function AppProvider(): AppProvider; @@ -927,6 +992,35 @@ type CampignEmailProvider = { from_email?: string; from_name?: string; }; +/** @returns {CommunicationTemplate} */ +declare function CommunicationTemplate(): CommunicationTemplate; +type CommunicationTemplate = { + /** + * - Whether the user is subscribed or not + */ + subscribed?: boolean; + /** + * - Template ID + */ + template?: string; +}; +/** @returns {CreateJobsReq} */ +declare function CreateJobsReq(): CreateJobsReq; +type CreateJobsReq = { + campaign?: string; +}; +/** @returns {CreateJobsRes} */ +declare function CreateJobsRes(): CreateJobsRes; +type CreateJobsRes = { + __v?: number; + _id?: string; + application?: string; + campaign?: string; + completed?: boolean; + created_at?: string; + is_active?: boolean; + updated_at?: string; +}; /** @returns {DefaultSmsProviders} */ declare function DefaultSmsProviders(): DefaultSmsProviders; type DefaultSmsProviders = { @@ -1099,6 +1193,24 @@ type EventSubscriptions = { items?: EventSubscription[]; page?: Page; }; +/** @returns {EventSubscriptionsBulkUpdateRequest} */ +declare function EventSubscriptionsBulkUpdateRequest(): EventSubscriptionsBulkUpdateRequest; +type EventSubscriptionsBulkUpdateRequest = { + subscriptions?: SubscriptionsObject[]; +}; +/** @returns {EventSubscriptionsBulkUpdateResponse} */ +declare function EventSubscriptionsBulkUpdateResponse(): EventSubscriptionsBulkUpdateResponse; +type EventSubscriptionsBulkUpdateResponse = { + __v?: number; + _id?: string; + application?: string; + category?: string; + created_at?: string; + event?: string; + slug?: string; + template?: EventSubscriptionTemplate; + updated_at?: string; +}; /** @returns {EventSubscriptionTemplate} */ declare function EventSubscriptionTemplate(): EventSubscriptionTemplate; type EventSubscriptionTemplate = { @@ -1308,6 +1420,27 @@ type Notification = { subtitle?: string; title?: string; }; +/** @returns {OtpConfiguration} */ +declare function OtpConfiguration(): OtpConfiguration; +type OtpConfiguration = { + application_id?: string; + company_id?: string; + expiry: OtpConfigurationExpiry; + otp_length: number; + type: string; +}; +/** @returns {OtpConfigurationExpiry} */ +declare function OtpConfigurationExpiry(): OtpConfigurationExpiry; +type OtpConfigurationExpiry = { + duration: OtpConfigurationExpiryDuration; + type: string; +}; +/** @returns {OtpConfigurationExpiryDuration} */ +declare function OtpConfigurationExpiryDuration(): OtpConfigurationExpiryDuration; +type OtpConfigurationExpiryDuration = { + denomination: string; + time: number; +}; /** @returns {Page} */ declare function Page(): Page; type Page = { @@ -1608,6 +1741,15 @@ type StatsProcessedSms = { success?: number; suppressed?: number; }; +/** @returns {SubscriptionsObject} */ +declare function SubscriptionsObject(): SubscriptionsObject; +type SubscriptionsObject = { + /** + * - Subscription ID + */ + _id?: string; + template?: TemplateObject; +}; /** @returns {SystemEmailTemplate} */ declare function SystemEmailTemplate(): SystemEmailTemplate; type SystemEmailTemplate = { @@ -1690,6 +1832,13 @@ type TemplateAndType = { template?: string; template_type?: string; }; +/** @returns {TemplateObject} */ +declare function TemplateObject(): TemplateObject; +type TemplateObject = { + email?: CommunicationTemplate; + pushnotification?: CommunicationTemplate; + sms?: CommunicationTemplate; +}; /** @returns {TriggerJobRequest} */ declare function TriggerJobRequest(): TriggerJobRequest; type TriggerJobRequest = { diff --git a/sdk/platform/Communication/CommunicationPlatformModel.js b/sdk/platform/Communication/CommunicationPlatformModel.js index f19d04b56..89456c3a0 100644 --- a/sdk/platform/Communication/CommunicationPlatformModel.js +++ b/sdk/platform/Communication/CommunicationPlatformModel.js @@ -134,6 +134,29 @@ const Joi = require("joi"); * @property {string} [from_name] */ +/** + * @typedef CommunicationTemplate + * @property {boolean} [subscribed] - Whether the user is subscribed or not + * @property {string} [template] - Template ID + */ + +/** + * @typedef CreateJobsReq + * @property {string} [campaign] + */ + +/** + * @typedef CreateJobsRes + * @property {number} [__v] + * @property {string} [_id] + * @property {string} [application] + * @property {string} [campaign] + * @property {boolean} [completed] + * @property {string} [created_at] + * @property {boolean} [is_active] + * @property {string} [updated_at] + */ + /** * @typedef DefaultSmsProviders * @property {string} [_id] @@ -306,6 +329,24 @@ const Joi = require("joi"); * @property {Page} [page] */ +/** + * @typedef EventSubscriptionsBulkUpdateRequest + * @property {SubscriptionsObject[]} [subscriptions] + */ + +/** + * @typedef EventSubscriptionsBulkUpdateResponse + * @property {number} [__v] + * @property {string} [_id] + * @property {string} [application] + * @property {string} [category] + * @property {string} [created_at] + * @property {string} [event] + * @property {string} [slug] + * @property {EventSubscriptionTemplate} [template] + * @property {string} [updated_at] + */ + /** * @typedef EventSubscriptionTemplate * @property {EventSubscriptionTemplateEmail} [email] @@ -512,6 +553,27 @@ const Joi = require("joi"); * @property {string} [title] */ +/** + * @typedef OtpConfiguration + * @property {string} [application_id] + * @property {string} [company_id] + * @property {OtpConfigurationExpiry} expiry + * @property {number} otp_length + * @property {string} type + */ + +/** + * @typedef OtpConfigurationExpiry + * @property {OtpConfigurationExpiryDuration} duration + * @property {string} type + */ + +/** + * @typedef OtpConfigurationExpiryDuration + * @property {string} denomination + * @property {number} time + */ + /** * @typedef Page * @property {number} [current] @@ -776,6 +838,12 @@ const Joi = require("joi"); * @property {number} [suppressed] */ +/** + * @typedef SubscriptionsObject + * @property {string} [_id] - Subscription ID + * @property {TemplateObject} [template] + */ + /** * @typedef SystemEmailTemplate * @property {number} [__v] @@ -858,6 +926,13 @@ const Joi = require("joi"); * @property {string} [template_type] */ +/** + * @typedef TemplateObject + * @property {CommunicationTemplate} [email] + * @property {CommunicationTemplate} [pushnotification] + * @property {CommunicationTemplate} [sms] + */ + /** * @typedef TriggerJobRequest * @property {string} [job_id] @@ -1053,6 +1128,35 @@ class CommunicationPlatformModel { }); } + /** @returns {CommunicationTemplate} */ + static CommunicationTemplate() { + return Joi.object({ + subscribed: Joi.boolean(), + template: Joi.string().allow(""), + }); + } + + /** @returns {CreateJobsReq} */ + static CreateJobsReq() { + return Joi.object({ + campaign: Joi.string().allow(""), + }); + } + + /** @returns {CreateJobsRes} */ + static CreateJobsRes() { + return Joi.object({ + __v: Joi.number(), + _id: Joi.string().allow(""), + application: Joi.string().allow(""), + campaign: Joi.string().allow(""), + completed: Joi.boolean(), + created_at: Joi.string().allow(""), + is_active: Joi.boolean(), + updated_at: Joi.string().allow(""), + }); + } + /** @returns {DefaultSmsProviders} */ static DefaultSmsProviders() { return Joi.object({ @@ -1269,6 +1373,30 @@ class CommunicationPlatformModel { }); } + /** @returns {EventSubscriptionsBulkUpdateRequest} */ + static EventSubscriptionsBulkUpdateRequest() { + return Joi.object({ + subscriptions: Joi.array().items( + CommunicationPlatformModel.SubscriptionsObject() + ), + }); + } + + /** @returns {EventSubscriptionsBulkUpdateResponse} */ + static EventSubscriptionsBulkUpdateResponse() { + return Joi.object({ + __v: Joi.number(), + _id: Joi.string().allow(""), + application: Joi.string().allow(""), + category: Joi.string().allow(""), + created_at: Joi.string().allow(""), + event: Joi.string().allow(""), + slug: Joi.string().allow(""), + template: CommunicationPlatformModel.EventSubscriptionTemplate(), + updated_at: Joi.string().allow(""), + }); + } + /** @returns {EventSubscriptionTemplate} */ static EventSubscriptionTemplate() { return Joi.object({ @@ -1539,6 +1667,33 @@ class CommunicationPlatformModel { }); } + /** @returns {OtpConfiguration} */ + static OtpConfiguration() { + return Joi.object({ + application_id: Joi.string().allow(""), + company_id: Joi.string().allow(""), + expiry: CommunicationPlatformModel.OtpConfigurationExpiry().required(), + otp_length: Joi.number().required(), + type: Joi.string().allow("").required(), + }); + } + + /** @returns {OtpConfigurationExpiry} */ + static OtpConfigurationExpiry() { + return Joi.object({ + duration: CommunicationPlatformModel.OtpConfigurationExpiryDuration().required(), + type: Joi.string().allow("").required(), + }); + } + + /** @returns {OtpConfigurationExpiryDuration} */ + static OtpConfigurationExpiryDuration() { + return Joi.object({ + denomination: Joi.string().allow("").required(), + time: Joi.number().required(), + }); + } + /** @returns {Page} */ static Page() { return Joi.object({ @@ -1867,6 +2022,14 @@ class CommunicationPlatformModel { }); } + /** @returns {SubscriptionsObject} */ + static SubscriptionsObject() { + return Joi.object({ + _id: Joi.string().allow(""), + template: CommunicationPlatformModel.TemplateObject(), + }); + } + /** @returns {SystemEmailTemplate} */ static SystemEmailTemplate() { return Joi.object({ @@ -1967,6 +2130,15 @@ class CommunicationPlatformModel { }); } + /** @returns {TemplateObject} */ + static TemplateObject() { + return Joi.object({ + email: CommunicationPlatformModel.CommunicationTemplate(), + pushnotification: CommunicationPlatformModel.CommunicationTemplate(), + sms: CommunicationPlatformModel.CommunicationTemplate(), + }); + } + /** @returns {TriggerJobRequest} */ static TriggerJobRequest() { return Joi.object({ diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts b/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts index ffdee2c28..31f1a9f33 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts @@ -152,7 +152,7 @@ declare class CompanyProfile { * @summary: Get list of locations * @description: This API allows to view all the locations associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocations/). */ - getLocations({ storeType, q, stage, pageNo, pageSize, locationIds, 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 @@ -163,16 +163,22 @@ declare class CompanyProfile { * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 10. * @param {number[]} [arg.locationIds] - Helps to filter stores on the basis of uids. + * @param {string[]} [arg.types] - Helps to get the location list on the + * basis of multiple location type. + * @param {string[]} [arg.tags] - Helps to get the location list on the + * basis of multiple location tag. * @returns {Paginator} * @summary: Get list of locations * @description: This API allows to view all the locations associated to a company. */ - getLocationsPaginator({ storeType, q, stage, pageSize, locationIds }?: { + getLocationsPaginator({ storeType, q, stage, pageSize, locationIds, types, tags, }?: { storeType?: string; q?: string; stage?: string; pageSize?: number; locationIds?: number[]; + types?: string[]; + tags?: string[]; }): Paginator; /** * @param {CompanyProfilePlatformValidator.UpdateCompanyParam} arg - Arg object diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js b/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js index fed0f5510..d8f17b969 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js @@ -948,9 +948,17 @@ class CompanyProfile { * @description: This API allows to view all the locations associated to a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/companyprofile/getLocations/). */ async getLocations( - { storeType, q, stage, pageNo, pageSize, locationIds, requestHeaders } = { - requestHeaders: {}, - }, + { + storeType, + q, + stage, + pageNo, + pageSize, + locationIds, + types, + tags, + requestHeaders, + } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = CompanyProfilePlatformValidator.getLocations().validate( @@ -961,6 +969,8 @@ class CompanyProfile { pageNo, pageSize, locationIds, + types, + tags, }, { abortEarly: false, allowUnknown: true } ); @@ -979,6 +989,8 @@ class CompanyProfile { pageNo, pageSize, locationIds, + types, + tags, }, { abortEarly: false, allowUnknown: false } ); @@ -996,6 +1008,8 @@ class CompanyProfile { query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["location_ids"] = locationIds; + query_params["types"] = types; + query_params["tags"] = tags; const xHeaders = {}; @@ -1045,11 +1059,23 @@ class CompanyProfile { * @param {number} [arg.pageSize] - Number of items to retrieve in each * page. Default is 10. * @param {number[]} [arg.locationIds] - Helps to filter stores on the basis of uids. + * @param {string[]} [arg.types] - Helps to get the location list on the + * basis of multiple location type. + * @param {string[]} [arg.tags] - Helps to get the location list on the + * basis of multiple location tag. * @returns {Paginator} * @summary: Get list of locations * @description: This API allows to view all the locations associated to a company. */ - getLocationsPaginator({ storeType, q, stage, pageSize, locationIds } = {}) { + getLocationsPaginator({ + storeType, + q, + stage, + pageSize, + locationIds, + types, + tags, + } = {}) { const paginator = new Paginator(); const callback = async () => { const pageId = paginator.nextId; @@ -1062,6 +1088,8 @@ class CompanyProfile { pageNo: pageNo, pageSize: pageSize, locationIds: locationIds, + types: types, + tags: tags, }); paginator.setPaginator({ hasNext: data.page.has_next ? true : false, diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts b/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts index 01eb549a8..bb2f223d2 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts @@ -6,12 +6,14 @@ export = CompanyProfilePlatformModel; * @property {string} [address2] * @property {string} [city] * @property {string} [country] - * @property {string} [country_code] + * @property {string} country_code * @property {string} [landmark] * @property {number} latitude * @property {number} longitude * @property {number} [pincode] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] */ /** * @typedef AverageOrderProcessingTime @@ -29,8 +31,10 @@ export = CompanyProfilePlatformModel; */ /** * @typedef BusinessCountryInfo - * @property {string} [country] - * @property {string} [country_code] + * @property {string} country + * @property {string} country_code + * @property {CountryCurrencyInfo} currency + * @property {string} timezone */ /** * @typedef BusinessDetails @@ -110,6 +114,12 @@ export = CompanyProfilePlatformModel; * @property {string[]} [emails] * @property {SellerPhoneNumber[]} [phone] */ +/** + * @typedef CountryCurrencyInfo + * @property {string} code + * @property {string} name + * @property {string} symbol + */ /** * @typedef CreateUpdateAddressSerializer * @property {string} address_type @@ -169,7 +179,9 @@ export = CompanyProfilePlatformModel; * @property {number} latitude * @property {number} longitude * @property {number} [pincode] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] */ /** * @typedef GetBrandResponseSerializer @@ -239,6 +251,7 @@ export = CompanyProfilePlatformModel; * @typedef GetLocationSerializer * @property {Object} [_custom_json] * @property {GetAddressSerializer} address + * @property {boolean} [auto_assign_courier_partner] * @property {boolean} [auto_invoice] * @property {AverageOrderProcessingTime} [avg_order_processing_time] * @property {boolean} [bulk_shipment] @@ -314,6 +327,7 @@ export = CompanyProfilePlatformModel; * @typedef LocationSerializer * @property {Object} [_custom_json] * @property {AddressSerializer} address + * @property {boolean} [auto_assign_courier_partner] * @property {boolean} [auto_invoice] * @property {AverageOrderProcessingTime} [avg_order_processing_time] * @property {boolean} [bulk_shipment] @@ -324,7 +338,7 @@ export = CompanyProfilePlatformModel; * @property {boolean} [default_order_acceptance_timing] - Flag to set * order_acceptance_timing as default timing * @property {string} display_name - * @property {Document[]} [documents] + * @property {Document[]} documents * @property {InvoiceDetailsSerializer} [gst_credentials] * @property {HolidaySchemaSerializer[]} [holiday] * @property {LocationManagerSerializer} [manager] @@ -416,7 +430,7 @@ export = CompanyProfilePlatformModel; declare class CompanyProfilePlatformModel { } declare namespace CompanyProfilePlatformModel { - export { AddressSerializer, AverageOrderProcessingTime, BrandBannerSerializer, BulkLocationSerializer, BusinessCountryInfo, BusinessDetails, CompanyBrandListSerializer, CompanyBrandPostRequestSerializer, CompanyBrandSerializer, CompanyDetails, CompanySerializer, CompanySocialAccounts, CompanyTaxesSerializer, CompanyTaxesSerializer1, ContactDetails, CreateUpdateAddressSerializer, CreateUpdateBrandRequestSerializer, Document, DocumentsObj, ErrorResponse, GetAddressSerializer, GetBrandResponseSerializer, GetCompanyProfileSerializerResponse, GetCompanySerializer, GetLocationSerializer, HolidayDateSerializer, HolidaySchemaSerializer, InvoiceCredSerializer, InvoiceDetailsSerializer, LocationDayWiseSerializer, LocationListSerializer, LocationManagerSerializer, LocationSerializer, LocationTimingSerializer, MetricsSerializer, Page, ProductReturnConfigSerializer, ProfileSuccessResponse, SellerPhoneNumber, StoreTagsResponseSchema, UpdateCompany, UserSerializer, Website }; + export { AddressSerializer, AverageOrderProcessingTime, BrandBannerSerializer, BulkLocationSerializer, BusinessCountryInfo, BusinessDetails, CompanyBrandListSerializer, CompanyBrandPostRequestSerializer, CompanyBrandSerializer, CompanyDetails, CompanySerializer, CompanySocialAccounts, CompanyTaxesSerializer, CompanyTaxesSerializer1, ContactDetails, CountryCurrencyInfo, CreateUpdateAddressSerializer, CreateUpdateBrandRequestSerializer, Document, DocumentsObj, ErrorResponse, GetAddressSerializer, GetBrandResponseSerializer, GetCompanyProfileSerializerResponse, GetCompanySerializer, GetLocationSerializer, HolidayDateSerializer, HolidaySchemaSerializer, InvoiceCredSerializer, InvoiceDetailsSerializer, LocationDayWiseSerializer, LocationListSerializer, LocationManagerSerializer, LocationSerializer, LocationTimingSerializer, MetricsSerializer, Page, ProductReturnConfigSerializer, ProfileSuccessResponse, SellerPhoneNumber, StoreTagsResponseSchema, UpdateCompany, UserSerializer, Website }; } /** @returns {AddressSerializer} */ declare function AddressSerializer(): AddressSerializer; @@ -426,12 +440,14 @@ type AddressSerializer = { address2?: string; city?: string; country?: string; - country_code?: string; + country_code: string; landmark?: string; latitude: number; longitude: number; pincode?: number; + sector?: string; state?: string; + state_code?: string; }; /** @returns {AverageOrderProcessingTime} */ declare function AverageOrderProcessingTime(): AverageOrderProcessingTime; @@ -453,8 +469,10 @@ type BulkLocationSerializer = { /** @returns {BusinessCountryInfo} */ declare function BusinessCountryInfo(): BusinessCountryInfo; type BusinessCountryInfo = { - country?: string; - country_code?: string; + country: string; + country_code: string; + currency: CountryCurrencyInfo; + timezone: string; }; /** @returns {BusinessDetails} */ declare function BusinessDetails(): BusinessDetails; @@ -544,6 +562,13 @@ type ContactDetails = { emails?: string[]; phone?: SellerPhoneNumber[]; }; +/** @returns {CountryCurrencyInfo} */ +declare function CountryCurrencyInfo(): CountryCurrencyInfo; +type CountryCurrencyInfo = { + code: string; + name: string; + symbol: string; +}; /** @returns {CreateUpdateAddressSerializer} */ declare function CreateUpdateAddressSerializer(): CreateUpdateAddressSerializer; type CreateUpdateAddressSerializer = { @@ -609,7 +634,9 @@ type GetAddressSerializer = { latitude: number; longitude: number; pincode?: number; + sector?: string; state?: string; + state_code?: string; }; /** @returns {GetBrandResponseSerializer} */ declare function GetBrandResponseSerializer(): GetBrandResponseSerializer; @@ -683,6 +710,7 @@ declare function GetLocationSerializer(): GetLocationSerializer; type GetLocationSerializer = { _custom_json?: any; address: GetAddressSerializer; + auto_assign_courier_partner?: boolean; auto_invoice?: boolean; avg_order_processing_time?: AverageOrderProcessingTime; bulk_shipment?: boolean; @@ -766,6 +794,7 @@ declare function LocationSerializer(): LocationSerializer; type LocationSerializer = { _custom_json?: any; address: AddressSerializer; + auto_assign_courier_partner?: boolean; auto_invoice?: boolean; avg_order_processing_time?: AverageOrderProcessingTime; bulk_shipment?: boolean; @@ -779,7 +808,7 @@ type LocationSerializer = { */ default_order_acceptance_timing?: boolean; display_name: string; - documents?: Document[]; + documents: Document[]; gst_credentials?: InvoiceDetailsSerializer; holiday?: HolidaySchemaSerializer[]; manager?: LocationManagerSerializer; diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js b/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js index adf863960..ec44aa5e7 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js @@ -7,12 +7,14 @@ const Joi = require("joi"); * @property {string} [address2] * @property {string} [city] * @property {string} [country] - * @property {string} [country_code] + * @property {string} country_code * @property {string} [landmark] * @property {number} latitude * @property {number} longitude * @property {number} [pincode] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] */ /** @@ -34,8 +36,10 @@ const Joi = require("joi"); /** * @typedef BusinessCountryInfo - * @property {string} [country] - * @property {string} [country_code] + * @property {string} country + * @property {string} country_code + * @property {CountryCurrencyInfo} currency + * @property {string} timezone */ /** @@ -126,6 +130,13 @@ const Joi = require("joi"); * @property {SellerPhoneNumber[]} [phone] */ +/** + * @typedef CountryCurrencyInfo + * @property {string} code + * @property {string} name + * @property {string} symbol + */ + /** * @typedef CreateUpdateAddressSerializer * @property {string} address_type @@ -190,7 +201,9 @@ const Joi = require("joi"); * @property {number} latitude * @property {number} longitude * @property {number} [pincode] + * @property {string} [sector] * @property {string} [state] + * @property {string} [state_code] */ /** @@ -264,6 +277,7 @@ const Joi = require("joi"); * @typedef GetLocationSerializer * @property {Object} [_custom_json] * @property {GetAddressSerializer} address + * @property {boolean} [auto_assign_courier_partner] * @property {boolean} [auto_invoice] * @property {AverageOrderProcessingTime} [avg_order_processing_time] * @property {boolean} [bulk_shipment] @@ -347,6 +361,7 @@ const Joi = require("joi"); * @typedef LocationSerializer * @property {Object} [_custom_json] * @property {AddressSerializer} address + * @property {boolean} [auto_assign_courier_partner] * @property {boolean} [auto_invoice] * @property {AverageOrderProcessingTime} [avg_order_processing_time] * @property {boolean} [bulk_shipment] @@ -357,7 +372,7 @@ const Joi = require("joi"); * @property {boolean} [default_order_acceptance_timing] - Flag to set * order_acceptance_timing as default timing * @property {string} display_name - * @property {Document[]} [documents] + * @property {Document[]} documents * @property {InvoiceDetailsSerializer} [gst_credentials] * @property {HolidaySchemaSerializer[]} [holiday] * @property {LocationManagerSerializer} [manager] @@ -466,12 +481,14 @@ class CompanyProfilePlatformModel { address2: Joi.string().allow(""), city: Joi.string().allow(""), country: Joi.string().allow(""), - country_code: Joi.string().allow(""), + country_code: Joi.string().allow("").required(), landmark: Joi.string().allow(""), latitude: Joi.number().required(), longitude: Joi.number().required(), pincode: Joi.number(), + sector: Joi.string().allow(""), state: Joi.string().allow(""), + state_code: Joi.string().allow(""), }); } @@ -501,8 +518,10 @@ class CompanyProfilePlatformModel { /** @returns {BusinessCountryInfo} */ static BusinessCountryInfo() { return Joi.object({ - country: Joi.string().allow(""), - country_code: Joi.string().allow(""), + country: Joi.string().allow("").required(), + country_code: Joi.string().allow("").required(), + currency: CompanyProfilePlatformModel.CountryCurrencyInfo().required(), + timezone: Joi.string().allow("").required(), }); } @@ -620,6 +639,15 @@ class CompanyProfilePlatformModel { }); } + /** @returns {CountryCurrencyInfo} */ + static CountryCurrencyInfo() { + return Joi.object({ + code: Joi.string().allow("").required(), + name: Joi.string().allow("").required(), + symbol: Joi.string().allow("").required(), + }); + } + /** @returns {CreateUpdateAddressSerializer} */ static CreateUpdateAddressSerializer() { return Joi.object({ @@ -695,7 +723,9 @@ class CompanyProfilePlatformModel { latitude: Joi.number().required(), longitude: Joi.number().required(), pincode: Joi.number(), + sector: Joi.string().allow(""), state: Joi.string().allow(""), + state_code: Joi.string().allow(""), }); } @@ -783,6 +813,7 @@ class CompanyProfilePlatformModel { return Joi.object({ _custom_json: Joi.any(), address: CompanyProfilePlatformModel.GetAddressSerializer().required(), + auto_assign_courier_partner: Joi.boolean(), auto_invoice: Joi.boolean(), avg_order_processing_time: CompanyProfilePlatformModel.AverageOrderProcessingTime(), bulk_shipment: Joi.boolean(), @@ -892,6 +923,7 @@ class CompanyProfilePlatformModel { return Joi.object({ _custom_json: Joi.any(), address: CompanyProfilePlatformModel.AddressSerializer().required(), + auto_assign_courier_partner: Joi.boolean(), auto_invoice: Joi.boolean(), avg_order_processing_time: CompanyProfilePlatformModel.AverageOrderProcessingTime(), bulk_shipment: Joi.boolean(), @@ -903,7 +935,9 @@ class CompanyProfilePlatformModel { credit_note: Joi.boolean(), default_order_acceptance_timing: Joi.boolean(), display_name: Joi.string().allow("").required(), - documents: Joi.array().items(CompanyProfilePlatformModel.Document()), + documents: Joi.array() + .items(CompanyProfilePlatformModel.Document()) + .required(), gst_credentials: CompanyProfilePlatformModel.InvoiceDetailsSerializer(), holiday: Joi.array().items( CompanyProfilePlatformModel.HolidaySchemaSerializer() diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts b/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts index 4ba0fb63f..601a7b6bd 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts @@ -51,6 +51,10 @@ export = CompanyProfilePlatformValidator; * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 10. * @property {number[]} [locationIds] - Helps to filter stores on the basis of uids. + * @property {string[]} [types] - Helps to get the location list on the basis of + * multiple location type. + * @property {string[]} [tags] - Helps to get the location list on the basis of + * multiple location tag. */ /** * @typedef UpdateCompanyParam @@ -170,6 +174,16 @@ type GetLocationsParam = { * - Helps to filter stores on the basis of uids. */ locationIds?: number[]; + /** + * - Helps to get the location list on the basis of + * multiple location type. + */ + types?: string[]; + /** + * - Helps to get the location list on the basis of + * multiple location tag. + */ + tags?: string[]; }; type UpdateCompanyParam = { body: CompanyProfilePlatformModel.UpdateCompany; diff --git a/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js b/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js index e51730d8c..400573021 100644 --- a/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +++ b/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js @@ -65,6 +65,10 @@ const CompanyProfilePlatformModel = require("./CompanyProfilePlatformModel"); * @property {number} [pageSize] - Number of items to retrieve in each page. * Default is 10. * @property {number[]} [locationIds] - Helps to filter stores on the basis of uids. + * @property {string[]} [types] - Helps to get the location list on the basis of + * multiple location type. + * @property {string[]} [tags] - Helps to get the location list on the basis of + * multiple location tag. */ /** @@ -162,6 +166,8 @@ class CompanyProfilePlatformValidator { pageNo: Joi.number(), pageSize: Joi.number(), locationIds: Joi.array().items(Joi.number()), + types: Joi.array().items(Joi.string().allow("")), + tags: Joi.array().items(Joi.string().allow("")), }).required(); } diff --git a/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts b/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts index a89dc33c8..d5a738323 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +++ b/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts @@ -63,7 +63,7 @@ declare class Configuration { getAppCompanies({ uid, pageNo, pageSize, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetAppCompaniesParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Numeric ID allotted to a business account + * @param {number} arg.companyId - Numeric ID allotted to a business account * on Fynd Platform * @param {string} arg.applicationId - Alphanumeric ID allotted to an * application (sales channel website) created within a business account @@ -75,7 +75,7 @@ declare class Configuration { * @description: Fetch info of all the companies (e.g. name, uid, and company type) whose inventory is fetched into the current sales channel application */ getAppCompaniesPaginator({ companyId, applicationId, uid, pageSize }?: { - companyId: string; + companyId: number; applicationId: string; uid?: number; pageSize?: number; @@ -133,7 +133,7 @@ declare class Configuration { getAppStores({ pageNo, pageSize, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetAppStoresParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Numeric ID allotted to a business account + * @param {number} arg.companyId - Numeric ID allotted to a business account * on Fynd Platform * @param {string} arg.applicationId - Alphanumeric ID allotted to an * application (sales channel website) created within a business account @@ -144,7 +144,7 @@ declare class Configuration { * @description: Fetch info 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 application */ getAppStoresPaginator({ companyId, applicationId, pageSize }?: { - companyId: string; + companyId: number; applicationId: string; pageSize?: number; }): Paginator; @@ -262,7 +262,7 @@ declare class Configuration { getOrderingStoresByFilter({ body, pageNo, pageSize, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetOrderingStoresByFilterParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Numeric ID allotted to a business account + * @param {number} arg.companyId - Numeric ID allotted to a business account * on Fynd Platform * @param {string} arg.applicationId - Alphanumeric ID allotted to an * application (sales channel website) created within a business account @@ -274,7 +274,7 @@ declare class Configuration { * @description: Use this API to use filters and retrieve the details of the deployment stores (the selling locations where the application will be utilised for placing orders). */ getOrderingStoresByFilterPaginator({ companyId, applicationId, pageSize, body, }?: { - companyId: string; + companyId: number; applicationId: string; pageSize?: number; body: ConfigurationPlatformModel.FilterOrderingStoreRequest; @@ -307,7 +307,7 @@ declare class Configuration { getStaffOrderingStores({ pageNo, pageSize, q, requestHeaders }?: ConfigurationPlatformApplicationValidator.GetStaffOrderingStoresParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Numeric ID allotted to a business account + * @param {number} arg.companyId - Numeric ID allotted to a business account * on Fynd Platform * @param {string} arg.applicationId - Alphanumeric ID allotted to an * application (sales channel website) created within a business account @@ -319,7 +319,7 @@ declare class Configuration { * @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders). */ getStaffOrderingStoresPaginator({ companyId, applicationId, pageSize, q, }?: { - companyId: string; + companyId: number; applicationId: string; pageSize?: number; q?: string; diff --git a/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js b/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js index c5182f554..6e5f717f7 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +++ b/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js @@ -416,7 +416,7 @@ class Configuration { /** * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Numeric ID allotted to a business account + * @param {number} arg.companyId - Numeric ID allotted to a business account * on Fynd Platform * @param {string} arg.applicationId - Alphanumeric ID allotted to an * application (sales channel website) created within a business account @@ -771,7 +771,7 @@ class Configuration { /** * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Numeric ID allotted to a business account + * @param {number} arg.companyId - Numeric ID allotted to a business account * on Fynd Platform * @param {string} arg.applicationId - Alphanumeric ID allotted to an * application (sales channel website) created within a business account @@ -1524,7 +1524,7 @@ class Configuration { /** * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Numeric ID allotted to a business account + * @param {number} arg.companyId - Numeric ID allotted to a business account * on Fynd Platform * @param {string} arg.applicationId - Alphanumeric ID allotted to an * application (sales channel website) created within a business account @@ -1736,7 +1736,7 @@ class Configuration { /** * @param {Object} arg - Arg object. - * @param {string} arg.companyId - Numeric ID allotted to a business account + * @param {number} arg.companyId - Numeric ID allotted to a business account * on Fynd Platform * @param {string} arg.applicationId - Alphanumeric ID allotted to an * application (sales channel website) created within a business account diff --git a/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts b/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts index daca394e4..5faeff06b 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +++ b/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts @@ -20,6 +20,7 @@ export = ConfigurationPlatformModel; * @property {boolean} [bulk_coupons] - Allow creation of bulk coupons * @property {DeliveryCharges} [delivery_charges] * @property {boolean} [enabled] - Shows whether cart configuration is enabled or not + * @property {InternationalDeliveryCharges} [international_delivery_charges] * @property {number} [max_cart_items] - Maximum number of items that can be * added to cart by the customer * @property {number} [min_cart_value] - Minimum cart value below which customer @@ -30,9 +31,15 @@ export = ConfigurationPlatformModel; */ /** * @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 * (sales channel website) created within a business account + * @property {string} [created_at] - ISO 8601 timestamp when currency was added + * in the list of currencies supported by the sales channel * @property {DefaultCurrency} [default_currency] + * @property {string} [modified_at] - ISO 8601 timestamp when currency was + * updated in the list of currencies supported by the sales channel * @property {Currency[]} [supported_currency] */ /** @@ -51,13 +58,13 @@ export = ConfigurationPlatformModel; * the features were configured * @property {HomePageFeature} [home_page] * @property {LandingPageFeature} [landing_page] + * @property {string} [modified_at] - ISO 8601 timestamp of last known + * modifications to the sales channel feature configuration * @property {OrderFeature} [order] * @property {PcrFeature} [pcr] * @property {ProductDetailFeature} [product_detail] * @property {QrFeature} [qr] * @property {RegistrationPageFeature} [registration_page] - * @property {string} [updated_at] - ISO 8601 timestamp of last known - * modifications to the sales channel feature configuration */ /** * @typedef AppFeatureRequest @@ -70,16 +77,8 @@ export = ConfigurationPlatformModel; /** * @typedef AppInventory * @property {InventoryArticleAssignment} [article_assignment] - * @property {InventoryBrandRule} [brand] - * @property {boolean} [franchise_enabled] - Allow other businesses (companies) - * to consume the current sales channel's inventory and sell products - * @property {string[]} [image] - * @property {boolean} [only_verified_products] - Show only verified products - * (the ones whose data have been verified by the admin) - * @property {boolean} [out_of_stock] - Indicates whether out of stock products - * are allowed to show up on the website. + * @property {InventoryConfig} [inventory] * @property {InventoryPaymentConfig} [payment] - * @property {InventoryStoreRule} [store] */ /** * @typedef AppInventoryCompanies @@ -92,6 +91,7 @@ export = ConfigurationPlatformModel; * @typedef AppInventoryConfig * @property {InventoryBrand} [brand] * @property {InventoryCategory} [category] + * @property {number} [company_id] * @property {Object[]} [company_store] - List of selling locations whose * inventory is available to the sales channel for displaying on the website * @property {InventoryDiscount} [discount] @@ -120,10 +120,12 @@ export = ConfigurationPlatformModel; * @typedef AppInventoryStores * @property {string} [_id] - The unique identifier of the store (24-digit Mongo * Object ID) in the sales channel inventory + * @property {Object} [address] * @property {number} [company_id] - Company ID of the selling location (store) * added to the sales channel's inventory * @property {string} [display_name] - Display name of the sales channel * inventory store (can be different than the actual store name), e.g. Reebok MUM + * @property {Object} [integration_type] * @property {string} [modified_on] - ISO 8601 timestamp of last known updation * to the stores in sales channel inventory * @property {string} [name] - Name of the store in the sales channel inventory, @@ -161,14 +163,18 @@ export = ConfigurationPlatformModel; * @property {SecureUrl} [logo] * @property {ApplicationMeta[]} [meta] * @property {SecureUrl} [mobile_logo] + * @property {string} [mode] + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel updation * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID) * of owner who owns the application * @property {ApplicationRedirections[]} [redirections] + * @property {string} [secret] * @property {string} [slug] + * @property {string} [status] * @property {string} [token] - Random generated fix length string for sales * channel. It is required and auto-generated. - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel updation + * @property {TokenSchema[]} [tokens] * @property {ApplicationWebsite} [website] */ /** @@ -184,6 +190,7 @@ export = ConfigurationPlatformModel; * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * for the sales channel details * @property {SecureUrl} [banner] + * @property {number} [company_id] * @property {string} [description] - It gives a detailed information about the * sales channel. It is required. * @property {Domain} [domain] @@ -192,6 +199,7 @@ export = ConfigurationPlatformModel; * @property {SecureUrl} [logo] * @property {SecureUrl} [mobile_logo] * @property {string} name - Name of the sales channel. It is required. + * @property {string} [slug] */ /** * @typedef ApplicationInformation @@ -201,19 +209,20 @@ export = ConfigurationPlatformModel; * @property {InformationAddress} [address] * @property {string} [application] - Alphanumeric ID allotted to a sales * channel application created within a business account - * @property {BusinessHighlights} [business_highlights] + * @property {BusinessHighlights[]} [business_highlights] * @property {string} [copyright_text] - Copyright statement usually seen at the * site's footer * @property {string} [created_at] - ISO 8601 timestamp of creation of the * application information * @property {Links[]} [links] + * @property {string} [modified_at] - ISO 8601 timestamp of updation of the + * application information * @property {SocialLinks} [social_links] * @property {InformationSupport} [support] - * @property {string} [updated_at] - ISO 8601 timestamp of updation of the - * application information */ /** * @typedef ApplicationInventory + * @property {number} [__v] * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the sales channel inventory * @property {string} [app] - Current sales channel ID @@ -230,14 +239,16 @@ export = ConfigurationPlatformModel; * @property {AppInventoryConfig} [inventory] * @property {AppLogisticsConfig} [logistics] * @property {LoyaltyPointsConfig} [loyalty_points] + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel + * inventory updation * @property {string} [modified_by] - User ID of the person who made the latest * changes in the sales channel inventory * @property {AppOrderConfig} [order] * @property {AppPaymentConfig} [payment] + * @property {PiiMasking} [pii_masking] * @property {string[]} [platforms] * @property {RewardPointsConfig} [reward_points] - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel - * inventory updation + * @property {string[]} [tags] */ /** * @typedef ApplicationMeta @@ -291,10 +302,11 @@ export = ConfigurationPlatformModel; * @property {PaymentSelectionLock} [payment_selection_lock] * @property {string} [source] - Source of the payment mode, e.g. 'ECOMM'. * Default value is FYND. + * @property {number} [user_cod_limit] */ /** * @typedef AppStoreRules - * @property {Object[]} [brands] - List of brands whose products will be shown + * @property {number[]} [brands] - List of brands whose products will be shown * on the website * @property {number[]} [companies] - List of companies whose inventory is * available to the sales channel for displaying on the website @@ -308,12 +320,13 @@ export = ConfigurationPlatformModel; * @property {string} [created_at] - ISO 8601 timestamp when currency was added * in the list of currencies supported by the sales channel * @property {DefaultCurrency} [default_currency] - * @property {string[]} [supported_currency] - * @property {string} [updated_at] - ISO 8601 timestamp when currency was + * @property {string} [modified_at] - ISO 8601 timestamp when currency was * updated in the list of currencies supported by the sales channel + * @property {string[]} [supported_currency] */ /** * @typedef ArticleAssignmentConfig + * @property {number[]} [enforced_stores] * @property {boolean} [post_order_reassignment] - Allow post order reassigment of article * @property {ArticleAssignmentRules} [rules] */ @@ -344,7 +357,7 @@ export = ConfigurationPlatformModel; */ /** * @typedef BrandsByCompanyResponse - * @property {CompanyBrandInfo} [brands] + * @property {CompanyBrandInfo[]} [brands] */ /** * @typedef BrandStoreInfo @@ -365,10 +378,11 @@ export = ConfigurationPlatformModel; * @property {string} [build_status] - Current progress of the mobile build, * e.g. pending, cancelled, failed, success * @property {string} [created_at] - ISO 8601 timestamp of app creation + * @property {LandingImage} [download_url] + * @property {string} [modified_at] - ISO 8601 timestamp of last known + * modifications to the app build * @property {string} [platform_type] - Device platform for which the mobile app * was built, e.g. android, ios. - * @property {string} [updated_at] - ISO 8601 timestamp of last known - * modifications to the app build * @property {number} [version_code] - A positive integer used as an internal * version number * @property {string} [version_name] - Version number of the mobile build, in @@ -378,7 +392,7 @@ export = ConfigurationPlatformModel; * @typedef BuildVersionHistory * @property {string} [latest_available_version_name] - Latest version number of * the mobile build, in dot-decimal notation - * @property {BuildVersion} [versions] + * @property {BuildVersion[]} [versions] */ /** * @typedef BusinessHighlights @@ -420,6 +434,8 @@ export = ConfigurationPlatformModel; * @property {CurrencyFeature} [currency] * @property {DeploymentStoreSelectionFeature} [deployment_store_selection] * @property {FeedbackFeature} [feedback] + * @property {InternationalShipping} [international_shipping] + * @property {ListingPageFeature} [listing_page] * @property {ListingPriceFeature} [listing_price] * @property {RevenueEngineFeature} [revenue_engine] * @property {RewardPointsConfig} [reward_points] @@ -440,7 +456,7 @@ export = ConfigurationPlatformModel; */ /** * @typedef CompaniesResponse - * @property {AppInventoryCompanies} [items] + * @property {AppInventoryCompanies[]} [items] * @property {Page} [page] */ /** @@ -475,7 +491,7 @@ export = ConfigurationPlatformModel; /** * @typedef CreateApplicationRequest * @property {App} [app] - * @property {AppInventory} [configuration] + * @property {ApplicationInventory} [configuration] * @property {AppDomain} [domain] */ /** @@ -510,6 +526,8 @@ export = ConfigurationPlatformModel; * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the current sales channel supported currency * @property {string} [code] - 3-character currency code, e.g. INR, USD, EUR. + * @property {string} [country_code] + * @property {string} [country_name] * @property {string} [created_at] - ISO 8601 timestamp of sales channel support * currency creation * @property {number} [decimal_digits] - Acceptable decimal limits for a given @@ -517,10 +535,10 @@ export = ConfigurationPlatformModel; * value of a currency. * @property {boolean} [is_active] - Shows currency is enabled or not in current * sales channel + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel + * support currency updation * @property {string} [name] - Name of the currency, e.g Indian Rupee * @property {string} [symbol] - Unique symbol for identifying the currency, e.g. ₹ - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel support - * currency updation */ /** * @typedef CurrencyFeature @@ -550,6 +568,7 @@ export = ConfigurationPlatformModel; */ /** * @typedef DeploymentMeta + * @property {number} [__v] * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the ordering stores * @property {boolean} [all_stores] - Allow all stores from the ordering store @@ -577,6 +596,7 @@ export = ConfigurationPlatformModel; * @property {boolean} [is_primary] - Domain is primary or not. Primary domain * is the default/main domain. * @property {boolean} [is_shortlink] - Shortlink is present or not for the domain + * @property {string} [message] * @property {string} [name] - Full domain name, e.g. newton.com * @property {boolean} [verified] - Domain is verified or not. TXT and A records * should propagate correctly. @@ -682,6 +702,7 @@ export = ConfigurationPlatformModel; */ /** * @typedef FyndRewardsCredentials + * @property {string} [private_key] - Public key for integrating with Fynd rewards. * @property {string} [public_key] - Public key for integrating with Fynd rewards. */ /** @@ -724,10 +745,15 @@ export = ConfigurationPlatformModel; * @property {string[]} [address_line] - Contact address of the sales channel * @property {string} [city] - Name of the city, e.g. Mumbai * @property {string} [country] - Name of the country, e.g. India - * @property {string} [loc] - Co-ordinates of the location + * @property {InformationLoc} [loc] * @property {InformationPhone[]} [phone] * @property {number} [pincode] - 6-digit PIN Code of the city, e.g. 400001 */ +/** + * @typedef InformationLoc + * @property {number[]} [coordinates] - 10-digit mobile number + * @property {string} [type] - Country code for contact number, e.g. +91 (for India) + */ /** * @typedef InformationPhone * @property {string} [code] - Country code for contact number, e.g. +91 (for India) @@ -735,10 +761,21 @@ export = ConfigurationPlatformModel; */ /** * @typedef InformationSupport - * @property {string[]} [email] - * @property {string[]} [phone] + * @property {InformationSupportEmail[]} [email] + * @property {InformationSupportPhone[]} [phone] * @property {string} [timing] - Working hours of support team, e.g. 9 AM to 9 PM */ +/** + * @typedef InformationSupportEmail + * @property {string} [key] + * @property {string} [value] - Value of email. + */ +/** + * @typedef InformationSupportPhone + * @property {string} [code] - Country code for contact number, e.g. +91 (for India) + * @property {string} [key] + * @property {string} [number] - 10-digit mobile number + */ /** * @typedef InstagramLink * @property {string} [icon] - Hosted URL of social icon image shown on the website @@ -750,22 +787,24 @@ export = ConfigurationPlatformModel; * @property {number} [__v] - Version key for tracking revisions. Default value is zero. * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the integration - * @property {Object[]} [companies] + * @property {string[]} [companies] * @property {Object} [constants] * @property {string} [created_at] - ISO 8601 timestamp of integration creation * @property {string} [description] - Basic description about the integration * @property {string} [description_html] - Basic HTML description about the integration + * @property {boolean} [hidden] * @property {string} [icon] - Hosted URL of the icon image * @property {IntegrationMeta[]} [meta] + * @property {string} [modified_at] - ISO 8601 timestamp of integration updation * @property {string} [name] - Name of the integration, e.g. SAP RBL Integration * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID) * of the user who created the integration * @property {string} [secret] - Randomly generated fixed-length string for * opted integration. It is auto-generated. It would never change once it is generated. + * @property {string} [slug] - Name of the integration, e.g. SAP RBL Integration * @property {string[]} [support] * @property {string} [token] - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. - * @property {string} [updated_at] - ISO 8601 timestamp of integration updation * @property {Validators} [validators] */ /** @@ -777,6 +816,7 @@ export = ConfigurationPlatformModel; * @property {number} [__v] - Version key for tracking revisions. Default value is zero. * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the integration config + * @property {number} [company_id] - Unique id of company. * @property {string} [created_at] - ISO 8601 timestamp of integration config creation * @property {Object} [data] - Schema data of the integration stored in key-value pairs * @property {string} [integration] - Integration id. Shows which integration @@ -784,15 +824,17 @@ export = ConfigurationPlatformModel; * @property {LastPatch[]} [last_patch] * @property {string} [level] - Shows for what level the integration is set up. * It can be company level or store level. + * @property {string} [message] * @property {IntegrationMeta[]} [meta] + * @property {string} [modified_at] - ISO 8601 timestamp of integration config updation * @property {boolean} [opted] - Shows this integration is opted or not opted * for the current company * @property {Object[]} [permissions] + * @property {boolean} [success] * @property {string} [token] - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. * @property {number} [uid] - It can be store uid or company uid. Depends on the * level of integration. - * @property {string} [updated_at] - ISO 8601 timestamp of integration config updation */ /** * @typedef IntegrationMeta @@ -807,28 +849,40 @@ export = ConfigurationPlatformModel; * @property {number} [__v] - Version key for tracking revisions. Default value is zero. * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the opted integration - * @property {Object[]} [companies] + * @property {string[]} [companies] * @property {string} [constants] * @property {string} [created_at] - ISO 8601 timestamp of integration creation * @property {string} [description] - Basic description about the opted integration * @property {string} [description_html] - Basic HTML description about the * opted integration + * @property {boolean} [hidden] * @property {string} [icon] - Hosted URL of the icon image * @property {IntegrationMeta[]} [meta] + * @property {string} [modified_at] - ISO 8601 timestamp of integration updation * @property {string} [name] - Nmae of the opted integration, e.g. SAP RBL Integration * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID) * of the user who created the integration * @property {string} [secret] - Randomly generated fixed-length string for * opted integration. It is auto-generated. It would never change once it is generated. + * @property {string} [slug] - Slug of the opted integration, e.g. ginesys * @property {string[]} [support] * @property {string} [token] - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. - * @property {string} [updated_at] - ISO 8601 timestamp of integration updation * @property {Validators} [validators] */ +/** + * @typedef InternationalDeliveryCharges + * @property {Charges[]} [charges] + * @property {boolean} [enabled] - Allow international delivery charges + */ +/** + * @typedef InternationalShipping + * @property {boolean} [enabled] - International shipping is enabled or not. + */ /** * @typedef InvalidPayloadRequest * @property {string} [message] - Error message when request body payload is improper + * @property {boolean} [success] - Flag for required not successfull. */ /** * @typedef InventoryArticleAssignment @@ -837,7 +891,7 @@ export = ConfigurationPlatformModel; */ /** * @typedef InventoryBrand - * @property {Object[]} [brands] - List of brands + * @property {number[]} [brands] - List of brands * @property {string} [criteria] - All brands or specific (explicit) brands to * be shown on the website */ @@ -853,6 +907,18 @@ export = ConfigurationPlatformModel; * shown on the website * @property {string} [criteria] */ +/** + * @typedef InventoryConfig + * @property {InventoryBrandRule} [brand] + * @property {boolean} [franchise_enabled] - Allow other businesses (companies) + * to consume the current sales channel's inventory and sell products + * @property {string[]} [image] + * @property {boolean} [only_verified_products] - Show only verified products + * (the ones whose data have been verified by the admin) + * @property {boolean} [out_of_stock] - Indicates whether out of stock products + * are allowed to show up on the website. + * @property {InventoryStoreRule} [store] + */ /** * @typedef InventoryDiscount * @property {number} [max] - Maximum inventory discount @@ -945,6 +1011,10 @@ export = ConfigurationPlatformModel; * @property {string} [link] - Web URL for redirecting to a related page * @property {string} [title] - Name of the related page or link */ +/** + * @typedef ListingPageFeature + * @property {string} [sort_on] + */ /** * @typedef ListingPriceFeature * @property {string} [sort] - Sorting of listing price with min or max value. @@ -998,13 +1068,13 @@ export = ConfigurationPlatformModel; * configuration creation * @property {boolean} [is_active] - Indicates the availability of the mobile build * @property {LandingImage} [landing_image] + * @property {string} [modified_at] - ISO 8601 timestamp of last known + * modifications to the app build * @property {string} [package_name] - Shows bundle identifier if device * platform is iOS, and directory of the app if device platform is Android * @property {string} [platform_type] - Device platform for which the mobile app * was built, e.g. android, ios. * @property {SplashImage} [splash_image] - * @property {string} [updated_at] - ISO 8601 timestamp of last known - * modifications to the app build */ /** * @typedef Moengage @@ -1021,6 +1091,7 @@ export = ConfigurationPlatformModel; /** * @typedef NotFound * @property {string} [message] - Response message for not found + * @property {boolean} [success] - Flag for required not successfull. */ /** * @typedef OptedApplicationResponse @@ -1035,6 +1106,7 @@ export = ConfigurationPlatformModel; */ /** * @typedef OptedCompany + * @property {number} [id] - The unique identifier of the opted inventory company * @property {string} [name] - Name of the company opted by the other seller's * sales channel in its inventory * @property {number} [uid] - Company UID opted by the other seller's sales @@ -1042,7 +1114,7 @@ export = ConfigurationPlatformModel; */ /** * @typedef OptedInventory - * @property {Object} [items] + * @property {Object[]} [items] * @property {OptType} [opt_type] */ /** @@ -1066,9 +1138,12 @@ export = ConfigurationPlatformModel; * @property {string} [address2] - Address of the opted store * @property {string} [city] - City of the opted store, e.g. Mumbai * @property {string} [country] - Country of the opted store, e.g. India + * @property {string} [country_code] - Country code of the selected country * @property {StoreLatLong} [lat_long] * @property {number} [pincode] - 6-digit PIN code of the opted store location + * @property {string} [sector] - Sector for the opted store. * @property {string} [state] - State of the opted store, e.g. Maharashtra + * @property {string} [state_code] - Selected state code */ /** * @typedef OptedStoreIntegration @@ -1159,14 +1234,14 @@ export = ConfigurationPlatformModel; * @property {string} [level] - Indicates integration level. It can be company * level or store level. * @property {Object[]} [meta] + * @property {string} [modified_at] - ISO 8601 timestamp of other entity + * updation for opted store integration * @property {boolean} [opted] - Allow other entity opted in integration * @property {string[]} [permissions] * @property {string} [token] - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. * @property {number} [uid] - It can be store uid or company uid. Depends on the * level of integration. - * @property {string} [updated_at] - ISO 8601 timestamp of other entity updation - * for opted store integration */ /** * @typedef OtherEntityData @@ -1228,6 +1303,10 @@ export = ConfigurationPlatformModel; * @typedef PcrFeature * @property {boolean} [staff_selection] - Allow staff selection. Default value is false. */ +/** + * @typedef PiiMasking + * @property {boolean} [enabled] + */ /** * @typedef PinterestLink * @property {string} [icon] - Hosted URL of social icon image shown on the website @@ -1350,7 +1429,7 @@ export = ConfigurationPlatformModel; */ /** * @typedef StoresResponse - * @property {AppInventoryStores} [items] + * @property {AppInventoryStores[]} [items] * @property {Page} [page] */ /** @@ -1371,8 +1450,8 @@ export = ConfigurationPlatformModel; * @property {string} [application] - Alphanumeric ID allotted to the current * application created within the current business account * @property {string} [created_at] - ISO 8601 timestamp of token creation + * @property {string} [modified_at] - ISO 8601 timestamp of token updation * @property {Tokens} [tokens] - * @property {string} [updated_at] - ISO 8601 timestamp of token updation */ /** * @typedef Tokens @@ -1385,6 +1464,12 @@ export = ConfigurationPlatformModel; * @property {Safetynet} [safetynet] * @property {Segment} [segment] */ +/** + * @typedef TokenSchema + * @property {string} [created_at] - ISO 8601 timestamp of when token created + * @property {Object} [created_by] + * @property {string} [token] + */ /** * @typedef TwitterLink * @property {string} [icon] - Hosted URL of social icon image shown on the website @@ -1439,7 +1524,7 @@ export = ConfigurationPlatformModel; declare class ConfigurationPlatformModel { } declare namespace ConfigurationPlatformModel { - export { Android, App, AppCartConfig, AppCurrencyResponse, AppDomain, AppFeature, AppFeatureRequest, AppFeatureResponse, AppInventory, AppInventoryCompanies, AppInventoryConfig, AppInventoryPartialUpdate, AppInventoryStores, Application, ApplicationAuth, ApplicationCors, ApplicationDetail, ApplicationInformation, ApplicationInventory, ApplicationMeta, ApplicationRedirections, ApplicationsResponse, ApplicationWebsite, AppLogisticsConfig, AppOrderConfig, AppPaymentConfig, AppStoreRules, AppSupportedCurrency, ArticleAssignmentConfig, ArticleAssignmentRule, ArticleAssignmentRules, AuthenticationConfig, BlogLink, BrandCompanyInfo, BrandsByCompanyResponse, BrandStoreInfo, BuildVersion, BuildVersionHistory, BusinessHighlights, CallbackUrl, CartFeature, Charges, CommonFeature, CommsConfig, CommunicationConfig, CommunicationOptinDialogFeature, CompaniesResponse, CompanyBrandInfo, CompanyByBrandsRequest, CompanyByBrandsResponse, CompanyValidator, CompareProductsFeature, CreateApplicationRequest, CreateAppResponse, Credentials, Credit, CurrenciesResponse, Currency, CurrencyFeature, Debit, DefaultCurrency, DeliveryCharges, DeploymentMeta, DeploymentStoreSelectionFeature, Domain, DomainAdd, DomainAddRequest, DomainsResponse, DomainStatus, DomainStatusRequest, DomainStatusResponse, DomainSuggestion, DomainSuggestionsRequest, DomainSuggestionsResponse, FacebookLink, FeedbackFeature, FilterOrderingStoreRequest, Firebase, Freshchat, FreshchatCredentials, FyndRewards, FyndRewardsCredentials, GetIntegrationsOptInsResponse, GoogleMap, GoogleMapCredentials, GooglePlusLink, Gtm, GtmCredentials, HomePageFeature, InformationAddress, InformationPhone, InformationSupport, InstagramLink, Integration, IntegrationConfigResponse, IntegrationLevel, IntegrationMeta, IntegrationOptIn, InvalidPayloadRequest, InventoryArticleAssignment, InventoryBrand, InventoryBrandRule, InventoryCategory, InventoryDiscount, InventoryPaymentConfig, InventoryPrice, InventoryStore, InventoryStoreRule, InventoryValidator, Ios, JsonSchema, LandingImage, LandingPageFeature, LastPatch, LaunchPage, LinkedInLink, Links, ListingPriceFeature, LoyaltyPointsConfig, Methods, MobileAppConfigRequest, MobileAppConfiguration, Moengage, MoengageCredentials, NotFound, OptedApplicationResponse, OptedCompany, OptedInventory, OptedStore, OptedStoreAddress, OptedStoreIntegration, OptOutInventory, OptType, OrderFeature, OrderingStore, OrderingStoreConfig, OrderingStores, OrderingStoreSelect, OrderingStoreSelectRequest, OrderingStoresResponse, OrderValidator, OtherEntity, OtherEntityData, OtherSellerApplication, OtherSellerApplications, OtherSellerCompany, Page, PanCardConfig, PaymentModeConfig, PaymentSelectionLock, PcrFeature, PinterestLink, ProductDetailFeature, QrFeature, RegistrationPageFeature, RevenueEngineFeature, RewardPointsConfig, Safetynet, SafetynetCredentials, SecureUrl, Segment, SegmentCredentials, SocialLinks, SplashImage, StoreByBrandsRequest, StoreByBrandsResponse, StoreCriteriaRule, StoreLatLong, StorePriority, StorePriorityRule, StoresResponse, StoreValidator, SuccessMessageResponse, TokenResponse, Tokens, TwitterLink, UpdateDomain, UpdateDomainTypeRequest, UpdateIntegrationLevelRequest, ValidationFailedResponse, Validators, VimeoLink, YoutubeLink }; + export { Android, App, AppCartConfig, AppCurrencyResponse, AppDomain, AppFeature, AppFeatureRequest, AppFeatureResponse, AppInventory, AppInventoryCompanies, AppInventoryConfig, AppInventoryPartialUpdate, AppInventoryStores, Application, ApplicationAuth, ApplicationCors, ApplicationDetail, ApplicationInformation, ApplicationInventory, ApplicationMeta, ApplicationRedirections, ApplicationsResponse, ApplicationWebsite, AppLogisticsConfig, AppOrderConfig, AppPaymentConfig, AppStoreRules, AppSupportedCurrency, ArticleAssignmentConfig, ArticleAssignmentRule, ArticleAssignmentRules, AuthenticationConfig, BlogLink, BrandCompanyInfo, BrandsByCompanyResponse, BrandStoreInfo, BuildVersion, BuildVersionHistory, BusinessHighlights, CallbackUrl, CartFeature, Charges, CommonFeature, CommsConfig, CommunicationConfig, CommunicationOptinDialogFeature, CompaniesResponse, CompanyBrandInfo, CompanyByBrandsRequest, CompanyByBrandsResponse, CompanyValidator, CompareProductsFeature, CreateApplicationRequest, CreateAppResponse, Credentials, Credit, CurrenciesResponse, Currency, CurrencyFeature, Debit, DefaultCurrency, DeliveryCharges, DeploymentMeta, DeploymentStoreSelectionFeature, Domain, DomainAdd, DomainAddRequest, DomainsResponse, DomainStatus, DomainStatusRequest, DomainStatusResponse, DomainSuggestion, DomainSuggestionsRequest, DomainSuggestionsResponse, FacebookLink, FeedbackFeature, FilterOrderingStoreRequest, Firebase, Freshchat, FreshchatCredentials, FyndRewards, FyndRewardsCredentials, GetIntegrationsOptInsResponse, GoogleMap, GoogleMapCredentials, GooglePlusLink, Gtm, GtmCredentials, HomePageFeature, InformationAddress, InformationLoc, InformationPhone, InformationSupport, InformationSupportEmail, InformationSupportPhone, InstagramLink, Integration, IntegrationConfigResponse, IntegrationLevel, IntegrationMeta, IntegrationOptIn, InternationalDeliveryCharges, InternationalShipping, InvalidPayloadRequest, InventoryArticleAssignment, InventoryBrand, InventoryBrandRule, InventoryCategory, InventoryConfig, InventoryDiscount, InventoryPaymentConfig, InventoryPrice, InventoryStore, InventoryStoreRule, InventoryValidator, Ios, JsonSchema, LandingImage, LandingPageFeature, LastPatch, LaunchPage, LinkedInLink, Links, ListingPageFeature, ListingPriceFeature, LoyaltyPointsConfig, Methods, MobileAppConfigRequest, MobileAppConfiguration, Moengage, MoengageCredentials, NotFound, OptedApplicationResponse, OptedCompany, OptedInventory, OptedStore, OptedStoreAddress, OptedStoreIntegration, OptOutInventory, OptType, OrderFeature, OrderingStore, OrderingStoreConfig, OrderingStores, OrderingStoreSelect, OrderingStoreSelectRequest, OrderingStoresResponse, OrderValidator, OtherEntity, OtherEntityData, OtherSellerApplication, OtherSellerApplications, OtherSellerCompany, Page, PanCardConfig, PaymentModeConfig, PaymentSelectionLock, PcrFeature, PiiMasking, PinterestLink, ProductDetailFeature, QrFeature, RegistrationPageFeature, RevenueEngineFeature, RewardPointsConfig, Safetynet, SafetynetCredentials, SecureUrl, Segment, SegmentCredentials, SocialLinks, SplashImage, StoreByBrandsRequest, StoreByBrandsResponse, StoreCriteriaRule, StoreLatLong, StorePriority, StorePriorityRule, StoresResponse, StoreValidator, SuccessMessageResponse, TokenResponse, Tokens, TokenSchema, TwitterLink, UpdateDomain, UpdateDomainTypeRequest, UpdateIntegrationLevelRequest, ValidationFailedResponse, Validators, VimeoLink, YoutubeLink }; } /** @returns {Android} */ declare function Android(): Android; @@ -1489,6 +1574,7 @@ type AppCartConfig = { * - Shows whether cart configuration is enabled or not */ enabled?: boolean; + international_delivery_charges?: InternationalDeliveryCharges; /** * - Maximum number of items that can be * added to cart by the customer @@ -1509,12 +1595,27 @@ type AppCartConfig = { /** @returns {AppCurrencyResponse} */ declare function AppCurrencyResponse(): AppCurrencyResponse; type AppCurrencyResponse = { + /** + * - The unique identifier (24-digit Mongo Object ID) + * of the currency configuration supported by the application + */ + _id?: string; /** * - Alphanumeric ID allotted to an application * (sales channel website) created within a business account */ application?: string; + /** + * - ISO 8601 timestamp when currency was added + * in the list of currencies supported by the sales channel + */ + created_at?: string; default_currency?: DefaultCurrency; + /** + * - ISO 8601 timestamp when currency was + * updated in the list of currencies supported by the sales channel + */ + modified_at?: string; supported_currency?: Currency[]; }; /** @returns {AppDomain} */ @@ -1550,16 +1651,16 @@ type AppFeature = { created_at?: string; home_page?: HomePageFeature; landing_page?: LandingPageFeature; + /** + * - ISO 8601 timestamp of last known + * modifications to the sales channel feature configuration + */ + modified_at?: string; order?: OrderFeature; pcr?: PcrFeature; product_detail?: ProductDetailFeature; qr?: QrFeature; registration_page?: RegistrationPageFeature; - /** - * - ISO 8601 timestamp of last known - * modifications to the sales channel feature configuration - */ - updated_at?: string; }; /** @returns {AppFeatureRequest} */ declare function AppFeatureRequest(): AppFeatureRequest; @@ -1575,25 +1676,8 @@ type AppFeatureResponse = { declare function AppInventory(): AppInventory; type AppInventory = { article_assignment?: InventoryArticleAssignment; - brand?: InventoryBrandRule; - /** - * - Allow other businesses (companies) - * to consume the current sales channel's inventory and sell products - */ - franchise_enabled?: boolean; - image?: string[]; - /** - * - Show only verified products - * (the ones whose data have been verified by the admin) - */ - only_verified_products?: boolean; - /** - * - Indicates whether out of stock products - * are allowed to show up on the website. - */ - out_of_stock?: boolean; + inventory?: InventoryConfig; payment?: InventoryPaymentConfig; - store?: InventoryStoreRule; }; /** @returns {AppInventoryCompanies} */ declare function AppInventoryCompanies(): AppInventoryCompanies; @@ -1617,6 +1701,7 @@ declare function AppInventoryConfig(): AppInventoryConfig; type AppInventoryConfig = { brand?: InventoryBrand; category?: InventoryCategory; + company_id?: number; /** * - List of selling locations whose * inventory is available to the sales channel for displaying on the website @@ -1668,6 +1753,7 @@ type AppInventoryStores = { * Object ID) in the sales channel inventory */ _id?: string; + address?: any; /** * - Company ID of the selling location (store) * added to the sales channel's inventory @@ -1678,6 +1764,7 @@ type AppInventoryStores = { * inventory store (can be different than the actual store name), e.g. Reebok MUM */ display_name?: string; + integration_type?: any; /** * - ISO 8601 timestamp of last known updation * to the stores in sales channel inventory @@ -1761,6 +1848,11 @@ type Application = { logo?: SecureUrl; meta?: ApplicationMeta[]; mobile_logo?: SecureUrl; + mode?: string; + /** + * - ISO 8601 timestamp of sales channel updation + */ + modified_at?: string; /** * - Name of the sales channel, e.g. Zenz Fashion */ @@ -1771,16 +1863,15 @@ type Application = { */ owner?: string; redirections?: ApplicationRedirections[]; + secret?: string; slug?: string; + status?: string; /** * - Random generated fix length string for sales * channel. It is required and auto-generated. */ token?: string; - /** - * - ISO 8601 timestamp of sales channel updation - */ - updated_at?: string; + tokens?: TokenSchema[]; website?: ApplicationWebsite; }; /** @returns {ApplicationAuth} */ @@ -1805,6 +1896,7 @@ type ApplicationDetail = { */ _id?: string; banner?: SecureUrl; + company_id?: number; /** * - It gives a detailed information about the * sales channel. It is required. @@ -1819,6 +1911,7 @@ type ApplicationDetail = { * - Name of the sales channel. It is required. */ name: string; + slug?: string; }; /** @returns {ApplicationInformation} */ declare function ApplicationInformation(): ApplicationInformation; @@ -1838,7 +1931,7 @@ type ApplicationInformation = { * channel application created within a business account */ application?: string; - business_highlights?: BusinessHighlights; + business_highlights?: BusinessHighlights[]; /** * - Copyright statement usually seen at the * site's footer @@ -1850,17 +1943,18 @@ type ApplicationInformation = { */ created_at?: string; links?: Links[]; - social_links?: SocialLinks; - support?: InformationSupport; /** * - ISO 8601 timestamp of updation of the * application information */ - updated_at?: string; + modified_at?: string; + social_links?: SocialLinks; + support?: InformationSupport; }; /** @returns {ApplicationInventory} */ declare function ApplicationInventory(): ApplicationInventory; type ApplicationInventory = { + __v?: number; /** * - The unique identifier (24-digit Mongo Object ID) * of the sales channel inventory @@ -1892,6 +1986,11 @@ type ApplicationInventory = { inventory?: AppInventoryConfig; logistics?: AppLogisticsConfig; loyalty_points?: LoyaltyPointsConfig; + /** + * - ISO 8601 timestamp of sales channel + * inventory updation + */ + modified_at?: string; /** * - User ID of the person who made the latest * changes in the sales channel inventory @@ -1899,13 +1998,10 @@ type ApplicationInventory = { modified_by?: string; order?: AppOrderConfig; payment?: AppPaymentConfig; + pii_masking?: PiiMasking; platforms?: string[]; reward_points?: RewardPointsConfig; - /** - * - ISO 8601 timestamp of sales channel - * inventory updation - */ - updated_at?: string; + tags?: string[]; }; /** @returns {ApplicationMeta} */ declare function ApplicationMeta(): ApplicationMeta; @@ -2014,6 +2110,7 @@ type AppPaymentConfig = { * Default value is FYND. */ source?: string; + user_cod_limit?: number; }; /** @returns {AppStoreRules} */ declare function AppStoreRules(): AppStoreRules; @@ -2022,7 +2119,7 @@ type AppStoreRules = { * - List of brands whose products will be shown * on the website */ - brands?: any[]; + brands?: number[]; /** * - List of companies whose inventory is * available to the sales channel for displaying on the website @@ -2048,16 +2145,17 @@ type AppSupportedCurrency = { */ created_at?: string; default_currency?: DefaultCurrency; - supported_currency?: string[]; /** * - ISO 8601 timestamp when currency was * updated in the list of currencies supported by the sales channel */ - updated_at?: string; + modified_at?: string; + supported_currency?: string[]; }; /** @returns {ArticleAssignmentConfig} */ declare function ArticleAssignmentConfig(): ArticleAssignmentConfig; type ArticleAssignmentConfig = { + enforced_stores?: number[]; /** * - Allow post order reassigment of article */ @@ -2118,7 +2216,7 @@ type BrandCompanyInfo = { /** @returns {BrandsByCompanyResponse} */ declare function BrandsByCompanyResponse(): BrandsByCompanyResponse; type BrandsByCompanyResponse = { - brands?: CompanyBrandInfo; + brands?: CompanyBrandInfo[]; }; /** @returns {BrandStoreInfo} */ declare function BrandStoreInfo(): BrandStoreInfo; @@ -2168,16 +2266,17 @@ type BuildVersion = { * - ISO 8601 timestamp of app creation */ created_at?: string; + download_url?: LandingImage; + /** + * - ISO 8601 timestamp of last known + * modifications to the app build + */ + modified_at?: string; /** * - Device platform for which the mobile app * was built, e.g. android, ios. */ platform_type?: string; - /** - * - ISO 8601 timestamp of last known - * modifications to the app build - */ - updated_at?: string; /** * - A positive integer used as an internal * version number @@ -2197,7 +2296,7 @@ type BuildVersionHistory = { * the mobile build, in dot-decimal notation */ latest_available_version_name?: string; - versions?: BuildVersion; + versions?: BuildVersion[]; }; /** @returns {BusinessHighlights} */ declare function BusinessHighlights(): BusinessHighlights; @@ -2283,6 +2382,8 @@ type CommonFeature = { currency?: CurrencyFeature; deployment_store_selection?: DeploymentStoreSelectionFeature; feedback?: FeedbackFeature; + international_shipping?: InternationalShipping; + listing_page?: ListingPageFeature; listing_price?: ListingPriceFeature; revenue_engine?: RevenueEngineFeature; reward_points?: RewardPointsConfig; @@ -2313,7 +2414,7 @@ type CommunicationOptinDialogFeature = { /** @returns {CompaniesResponse} */ declare function CompaniesResponse(): CompaniesResponse; type CompaniesResponse = { - items?: AppInventoryCompanies; + items?: AppInventoryCompanies[]; page?: Page; }; /** @returns {CompanyBrandInfo} */ @@ -2381,7 +2482,7 @@ type CompareProductsFeature = { declare function CreateApplicationRequest(): CreateApplicationRequest; type CreateApplicationRequest = { app?: App; - configuration?: AppInventory; + configuration?: ApplicationInventory; domain?: AppDomain; }; /** @returns {CreateAppResponse} */ @@ -2442,6 +2543,8 @@ type Currency = { * - 3-character currency code, e.g. INR, USD, EUR. */ code?: string; + country_code?: string; + country_name?: string; /** * - ISO 8601 timestamp of sales channel support * currency creation @@ -2458,6 +2561,11 @@ type Currency = { * sales channel */ is_active?: boolean; + /** + * - ISO 8601 timestamp of sales channel + * support currency updation + */ + modified_at?: string; /** * - Name of the currency, e.g Indian Rupee */ @@ -2466,11 +2574,6 @@ type Currency = { * - Unique symbol for identifying the currency, e.g. ₹ */ symbol?: string; - /** - * - ISO 8601 timestamp of sales channel support - * currency updation - */ - updated_at?: string; }; /** @returns {CurrencyFeature} */ declare function CurrencyFeature(): CurrencyFeature; @@ -2535,6 +2638,7 @@ type DeliveryCharges = { /** @returns {DeploymentMeta} */ declare function DeploymentMeta(): DeploymentMeta; type DeploymentMeta = { + __v?: number; /** * - The unique identifier (24-digit Mongo Object ID) * of the ordering stores @@ -2597,6 +2701,7 @@ type Domain = { * - Shortlink is present or not for the domain */ is_shortlink?: boolean; + message?: string; /** * - Full domain name, e.g. newton.com */ @@ -2812,6 +2917,10 @@ type FyndRewards = { /** @returns {FyndRewardsCredentials} */ declare function FyndRewardsCredentials(): FyndRewardsCredentials; type FyndRewardsCredentials = { + /** + * - Public key for integrating with Fynd rewards. + */ + private_key?: string; /** * - Public key for integrating with Fynd rewards. */ @@ -2895,16 +3004,25 @@ type InformationAddress = { * - Name of the country, e.g. India */ country?: string; - /** - * - Co-ordinates of the location - */ - loc?: string; + loc?: InformationLoc; phone?: InformationPhone[]; /** * - 6-digit PIN Code of the city, e.g. 400001 */ pincode?: number; }; +/** @returns {InformationLoc} */ +declare function InformationLoc(): InformationLoc; +type InformationLoc = { + /** + * - 10-digit mobile number + */ + coordinates?: number[]; + /** + * - Country code for contact number, e.g. +91 (for India) + */ + type?: string; +}; /** @returns {InformationPhone} */ declare function InformationPhone(): InformationPhone; type InformationPhone = { @@ -2920,13 +3038,35 @@ type InformationPhone = { /** @returns {InformationSupport} */ declare function InformationSupport(): InformationSupport; type InformationSupport = { - email?: string[]; - phone?: string[]; + email?: InformationSupportEmail[]; + phone?: InformationSupportPhone[]; /** * - Working hours of support team, e.g. 9 AM to 9 PM */ timing?: string; }; +/** @returns {InformationSupportEmail} */ +declare function InformationSupportEmail(): InformationSupportEmail; +type InformationSupportEmail = { + key?: string; + /** + * - Value of email. + */ + value?: string; +}; +/** @returns {InformationSupportPhone} */ +declare function InformationSupportPhone(): InformationSupportPhone; +type InformationSupportPhone = { + /** + * - Country code for contact number, e.g. +91 (for India) + */ + code?: string; + key?: string; + /** + * - 10-digit mobile number + */ + number?: string; +}; /** @returns {InstagramLink} */ declare function InstagramLink(): InstagramLink; type InstagramLink = { @@ -2955,7 +3095,7 @@ type Integration = { * of the integration */ _id?: string; - companies?: any[]; + companies?: string[]; constants?: any; /** * - ISO 8601 timestamp of integration creation @@ -2969,11 +3109,16 @@ type Integration = { * - Basic HTML description about the integration */ description_html?: string; + hidden?: boolean; /** * - Hosted URL of the icon image */ icon?: string; meta?: IntegrationMeta[]; + /** + * - ISO 8601 timestamp of integration updation + */ + modified_at?: string; /** * - Name of the integration, e.g. SAP RBL Integration */ @@ -2988,16 +3133,16 @@ type Integration = { * opted integration. It is auto-generated. It would never change once it is generated. */ secret?: string; + /** + * - Name of the integration, e.g. SAP RBL Integration + */ + slug?: string; support?: string[]; /** * - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. */ token?: string; - /** - * - ISO 8601 timestamp of integration updation - */ - updated_at?: string; validators?: Validators; }; /** @returns {IntegrationConfigResponse} */ @@ -3017,6 +3162,10 @@ type IntegrationLevel = { * of the integration config */ _id?: string; + /** + * - Unique id of company. + */ + company_id?: number; /** * - ISO 8601 timestamp of integration config creation */ @@ -3036,13 +3185,19 @@ type IntegrationLevel = { * It can be company level or store level. */ level?: string; + message?: string; meta?: IntegrationMeta[]; + /** + * - ISO 8601 timestamp of integration config updation + */ + modified_at?: string; /** * - Shows this integration is opted or not opted * for the current company */ opted?: boolean; permissions?: any[]; + success?: boolean; /** * - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. @@ -3053,10 +3208,6 @@ type IntegrationLevel = { * level of integration. */ uid?: number; - /** - * - ISO 8601 timestamp of integration config updation - */ - updated_at?: string; }; /** @returns {IntegrationMeta} */ declare function IntegrationMeta(): IntegrationMeta; @@ -3088,7 +3239,7 @@ type IntegrationOptIn = { * of the opted integration */ _id?: string; - companies?: any[]; + companies?: string[]; constants?: string; /** * - ISO 8601 timestamp of integration creation @@ -3103,11 +3254,16 @@ type IntegrationOptIn = { * opted integration */ description_html?: string; + hidden?: boolean; /** * - Hosted URL of the icon image */ icon?: string; meta?: IntegrationMeta[]; + /** + * - ISO 8601 timestamp of integration updation + */ + modified_at?: string; /** * - Nmae of the opted integration, e.g. SAP RBL Integration */ @@ -3122,17 +3278,34 @@ type IntegrationOptIn = { * opted integration. It is auto-generated. It would never change once it is generated. */ secret?: string; + /** + * - Slug of the opted integration, e.g. ginesys + */ + slug?: string; support?: string[]; /** * - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. */ token?: string; + validators?: Validators; +}; +/** @returns {InternationalDeliveryCharges} */ +declare function InternationalDeliveryCharges(): InternationalDeliveryCharges; +type InternationalDeliveryCharges = { + charges?: Charges[]; /** - * - ISO 8601 timestamp of integration updation + * - Allow international delivery charges */ - updated_at?: string; - validators?: Validators; + enabled?: boolean; +}; +/** @returns {InternationalShipping} */ +declare function InternationalShipping(): InternationalShipping; +type InternationalShipping = { + /** + * - International shipping is enabled or not. + */ + enabled?: boolean; }; /** @returns {InvalidPayloadRequest} */ declare function InvalidPayloadRequest(): InvalidPayloadRequest; @@ -3141,6 +3314,10 @@ type InvalidPayloadRequest = { * - Error message when request body payload is improper */ message?: string; + /** + * - Flag for required not successfull. + */ + success?: boolean; }; /** @returns {InventoryArticleAssignment} */ declare function InventoryArticleAssignment(): InventoryArticleAssignment; @@ -3157,7 +3334,7 @@ type InventoryBrand = { /** * - List of brands */ - brands?: any[]; + brands?: number[]; /** * - All brands or specific (explicit) brands to * be shown on the website @@ -3184,6 +3361,28 @@ type InventoryCategory = { categories?: any[]; criteria?: string; }; +/** @returns {InventoryConfig} */ +declare function InventoryConfig(): InventoryConfig; +type InventoryConfig = { + brand?: InventoryBrandRule; + /** + * - Allow other businesses (companies) + * to consume the current sales channel's inventory and sell products + */ + franchise_enabled?: boolean; + image?: string[]; + /** + * - Show only verified products + * (the ones whose data have been verified by the admin) + */ + only_verified_products?: boolean; + /** + * - Indicates whether out of stock products + * are allowed to show up on the website. + */ + out_of_stock?: boolean; + store?: InventoryStoreRule; +}; /** @returns {InventoryDiscount} */ declare function InventoryDiscount(): InventoryDiscount; type InventoryDiscount = { @@ -3392,6 +3591,11 @@ type Links = { */ title?: string; }; +/** @returns {ListingPageFeature} */ +declare function ListingPageFeature(): ListingPageFeature; +type ListingPageFeature = { + sort_on?: string; +}; /** @returns {ListingPriceFeature} */ declare function ListingPriceFeature(): ListingPriceFeature; type ListingPriceFeature = { @@ -3486,6 +3690,11 @@ type MobileAppConfiguration = { */ is_active?: boolean; landing_image?: LandingImage; + /** + * - ISO 8601 timestamp of last known + * modifications to the app build + */ + modified_at?: string; /** * - Shows bundle identifier if device * platform is iOS, and directory of the app if device platform is Android @@ -3497,11 +3706,6 @@ type MobileAppConfiguration = { */ platform_type?: string; splash_image?: SplashImage; - /** - * - ISO 8601 timestamp of last known - * modifications to the app build - */ - updated_at?: string; }; /** @returns {Moengage} */ declare function Moengage(): Moengage; @@ -3530,6 +3734,10 @@ type NotFound = { * - Response message for not found */ message?: string; + /** + * - Flag for required not successfull. + */ + success?: boolean; }; /** @returns {OptedApplicationResponse} */ declare function OptedApplicationResponse(): OptedApplicationResponse; @@ -3558,6 +3766,10 @@ type OptedApplicationResponse = { /** @returns {OptedCompany} */ declare function OptedCompany(): OptedCompany; type OptedCompany = { + /** + * - The unique identifier of the opted inventory company + */ + id?: number; /** * - Name of the company opted by the other seller's * sales channel in its inventory @@ -3572,7 +3784,7 @@ type OptedCompany = { /** @returns {OptedInventory} */ declare function OptedInventory(): OptedInventory; type OptedInventory = { - items?: any; + items?: any[]; opt_type?: OptType; }; /** @returns {OptedStore} */ @@ -3634,15 +3846,27 @@ type OptedStoreAddress = { * - Country of the opted store, e.g. India */ country?: string; + /** + * - Country code of the selected country + */ + country_code?: string; lat_long?: StoreLatLong; /** * - 6-digit PIN code of the opted store location */ pincode?: number; + /** + * - Sector for the opted store. + */ + sector?: string; /** * - State of the opted store, e.g. Maharashtra */ state?: string; + /** + * - Selected state code + */ + state_code?: string; }; /** @returns {OptedStoreIntegration} */ declare function OptedStoreIntegration(): OptedStoreIntegration; @@ -3826,6 +4050,11 @@ type OtherEntity = { */ level?: string; meta?: any[]; + /** + * - ISO 8601 timestamp of other entity + * updation for opted store integration + */ + modified_at?: string; /** * - Allow other entity opted in integration */ @@ -3841,11 +4070,6 @@ type OtherEntity = { * level of integration. */ uid?: number; - /** - * - ISO 8601 timestamp of other entity updation - * for opted store integration - */ - updated_at?: string; }; /** @returns {OtherEntityData} */ declare function OtherEntityData(): OtherEntityData; @@ -3961,6 +4185,11 @@ type PcrFeature = { */ staff_selection?: boolean; }; +/** @returns {PiiMasking} */ +declare function PiiMasking(): PiiMasking; +type PiiMasking = { + enabled?: boolean; +}; /** @returns {PinterestLink} */ declare function PinterestLink(): PinterestLink; type PinterestLink = { @@ -4187,7 +4416,7 @@ type StorePriorityRule = { /** @returns {StoresResponse} */ declare function StoresResponse(): StoresResponse; type StoresResponse = { - items?: AppInventoryStores; + items?: AppInventoryStores[]; page?: Page; }; /** @returns {StoreValidator} */ @@ -4232,11 +4461,11 @@ type TokenResponse = { * - ISO 8601 timestamp of token creation */ created_at?: string; - tokens?: Tokens; /** * - ISO 8601 timestamp of token updation */ - updated_at?: string; + modified_at?: string; + tokens?: Tokens; }; /** @returns {Tokens} */ declare function Tokens(): Tokens; @@ -4250,6 +4479,16 @@ type Tokens = { safetynet?: Safetynet; segment?: Segment; }; +/** @returns {TokenSchema} */ +declare function TokenSchema(): TokenSchema; +type TokenSchema = { + /** + * - ISO 8601 timestamp of when token created + */ + created_at?: string; + created_by?: any; + token?: string; +}; /** @returns {TwitterLink} */ declare function TwitterLink(): TwitterLink; type TwitterLink = { diff --git a/sdk/platform/Configuration/ConfigurationPlatformModel.js b/sdk/platform/Configuration/ConfigurationPlatformModel.js index ba235a6bd..926bc42c3 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformModel.js +++ b/sdk/platform/Configuration/ConfigurationPlatformModel.js @@ -23,6 +23,7 @@ const Joi = require("joi"); * @property {boolean} [bulk_coupons] - Allow creation of bulk coupons * @property {DeliveryCharges} [delivery_charges] * @property {boolean} [enabled] - Shows whether cart configuration is enabled or not + * @property {InternationalDeliveryCharges} [international_delivery_charges] * @property {number} [max_cart_items] - Maximum number of items that can be * added to cart by the customer * @property {number} [min_cart_value] - Minimum cart value below which customer @@ -34,9 +35,15 @@ const Joi = require("joi"); /** * @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 * (sales channel website) created within a business account + * @property {string} [created_at] - ISO 8601 timestamp when currency was added + * in the list of currencies supported by the sales channel * @property {DefaultCurrency} [default_currency] + * @property {string} [modified_at] - ISO 8601 timestamp when currency was + * updated in the list of currencies supported by the sales channel * @property {Currency[]} [supported_currency] */ @@ -57,13 +64,13 @@ const Joi = require("joi"); * the features were configured * @property {HomePageFeature} [home_page] * @property {LandingPageFeature} [landing_page] + * @property {string} [modified_at] - ISO 8601 timestamp of last known + * modifications to the sales channel feature configuration * @property {OrderFeature} [order] * @property {PcrFeature} [pcr] * @property {ProductDetailFeature} [product_detail] * @property {QrFeature} [qr] * @property {RegistrationPageFeature} [registration_page] - * @property {string} [updated_at] - ISO 8601 timestamp of last known - * modifications to the sales channel feature configuration */ /** @@ -79,16 +86,8 @@ const Joi = require("joi"); /** * @typedef AppInventory * @property {InventoryArticleAssignment} [article_assignment] - * @property {InventoryBrandRule} [brand] - * @property {boolean} [franchise_enabled] - Allow other businesses (companies) - * to consume the current sales channel's inventory and sell products - * @property {string[]} [image] - * @property {boolean} [only_verified_products] - Show only verified products - * (the ones whose data have been verified by the admin) - * @property {boolean} [out_of_stock] - Indicates whether out of stock products - * are allowed to show up on the website. + * @property {InventoryConfig} [inventory] * @property {InventoryPaymentConfig} [payment] - * @property {InventoryStoreRule} [store] */ /** @@ -103,6 +102,7 @@ const Joi = require("joi"); * @typedef AppInventoryConfig * @property {InventoryBrand} [brand] * @property {InventoryCategory} [category] + * @property {number} [company_id] * @property {Object[]} [company_store] - List of selling locations whose * inventory is available to the sales channel for displaying on the website * @property {InventoryDiscount} [discount] @@ -133,10 +133,12 @@ const Joi = require("joi"); * @typedef AppInventoryStores * @property {string} [_id] - The unique identifier of the store (24-digit Mongo * Object ID) in the sales channel inventory + * @property {Object} [address] * @property {number} [company_id] - Company ID of the selling location (store) * added to the sales channel's inventory * @property {string} [display_name] - Display name of the sales channel * inventory store (can be different than the actual store name), e.g. Reebok MUM + * @property {Object} [integration_type] * @property {string} [modified_on] - ISO 8601 timestamp of last known updation * to the stores in sales channel inventory * @property {string} [name] - Name of the store in the sales channel inventory, @@ -175,14 +177,18 @@ const Joi = require("joi"); * @property {SecureUrl} [logo] * @property {ApplicationMeta[]} [meta] * @property {SecureUrl} [mobile_logo] + * @property {string} [mode] + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel updation * @property {string} [name] - Name of the sales channel, e.g. Zenz Fashion * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID) * of owner who owns the application * @property {ApplicationRedirections[]} [redirections] + * @property {string} [secret] * @property {string} [slug] + * @property {string} [status] * @property {string} [token] - Random generated fix length string for sales * channel. It is required and auto-generated. - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel updation + * @property {TokenSchema[]} [tokens] * @property {ApplicationWebsite} [website] */ @@ -201,6 +207,7 @@ const Joi = require("joi"); * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * for the sales channel details * @property {SecureUrl} [banner] + * @property {number} [company_id] * @property {string} [description] - It gives a detailed information about the * sales channel. It is required. * @property {Domain} [domain] @@ -209,6 +216,7 @@ const Joi = require("joi"); * @property {SecureUrl} [logo] * @property {SecureUrl} [mobile_logo] * @property {string} name - Name of the sales channel. It is required. + * @property {string} [slug] */ /** @@ -219,20 +227,21 @@ const Joi = require("joi"); * @property {InformationAddress} [address] * @property {string} [application] - Alphanumeric ID allotted to a sales * channel application created within a business account - * @property {BusinessHighlights} [business_highlights] + * @property {BusinessHighlights[]} [business_highlights] * @property {string} [copyright_text] - Copyright statement usually seen at the * site's footer * @property {string} [created_at] - ISO 8601 timestamp of creation of the * application information * @property {Links[]} [links] + * @property {string} [modified_at] - ISO 8601 timestamp of updation of the + * application information * @property {SocialLinks} [social_links] * @property {InformationSupport} [support] - * @property {string} [updated_at] - ISO 8601 timestamp of updation of the - * application information */ /** * @typedef ApplicationInventory + * @property {number} [__v] * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the sales channel inventory * @property {string} [app] - Current sales channel ID @@ -249,14 +258,16 @@ const Joi = require("joi"); * @property {AppInventoryConfig} [inventory] * @property {AppLogisticsConfig} [logistics] * @property {LoyaltyPointsConfig} [loyalty_points] + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel + * inventory updation * @property {string} [modified_by] - User ID of the person who made the latest * changes in the sales channel inventory * @property {AppOrderConfig} [order] * @property {AppPaymentConfig} [payment] + * @property {PiiMasking} [pii_masking] * @property {string[]} [platforms] * @property {RewardPointsConfig} [reward_points] - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel - * inventory updation + * @property {string[]} [tags] */ /** @@ -317,11 +328,12 @@ const Joi = require("joi"); * @property {PaymentSelectionLock} [payment_selection_lock] * @property {string} [source] - Source of the payment mode, e.g. 'ECOMM'. * Default value is FYND. + * @property {number} [user_cod_limit] */ /** * @typedef AppStoreRules - * @property {Object[]} [brands] - List of brands whose products will be shown + * @property {number[]} [brands] - List of brands whose products will be shown * on the website * @property {number[]} [companies] - List of companies whose inventory is * available to the sales channel for displaying on the website @@ -336,13 +348,14 @@ const Joi = require("joi"); * @property {string} [created_at] - ISO 8601 timestamp when currency was added * in the list of currencies supported by the sales channel * @property {DefaultCurrency} [default_currency] - * @property {string[]} [supported_currency] - * @property {string} [updated_at] - ISO 8601 timestamp when currency was + * @property {string} [modified_at] - ISO 8601 timestamp when currency was * updated in the list of currencies supported by the sales channel + * @property {string[]} [supported_currency] */ /** * @typedef ArticleAssignmentConfig + * @property {number[]} [enforced_stores] * @property {boolean} [post_order_reassignment] - Allow post order reassigment of article * @property {ArticleAssignmentRules} [rules] */ @@ -379,7 +392,7 @@ const Joi = require("joi"); /** * @typedef BrandsByCompanyResponse - * @property {CompanyBrandInfo} [brands] + * @property {CompanyBrandInfo[]} [brands] */ /** @@ -402,10 +415,11 @@ const Joi = require("joi"); * @property {string} [build_status] - Current progress of the mobile build, * e.g. pending, cancelled, failed, success * @property {string} [created_at] - ISO 8601 timestamp of app creation + * @property {LandingImage} [download_url] + * @property {string} [modified_at] - ISO 8601 timestamp of last known + * modifications to the app build * @property {string} [platform_type] - Device platform for which the mobile app * was built, e.g. android, ios. - * @property {string} [updated_at] - ISO 8601 timestamp of last known - * modifications to the app build * @property {number} [version_code] - A positive integer used as an internal * version number * @property {string} [version_name] - Version number of the mobile build, in @@ -416,7 +430,7 @@ const Joi = require("joi"); * @typedef BuildVersionHistory * @property {string} [latest_available_version_name] - Latest version number of * the mobile build, in dot-decimal notation - * @property {BuildVersion} [versions] + * @property {BuildVersion[]} [versions] */ /** @@ -463,6 +477,8 @@ const Joi = require("joi"); * @property {CurrencyFeature} [currency] * @property {DeploymentStoreSelectionFeature} [deployment_store_selection] * @property {FeedbackFeature} [feedback] + * @property {InternationalShipping} [international_shipping] + * @property {ListingPageFeature} [listing_page] * @property {ListingPriceFeature} [listing_price] * @property {RevenueEngineFeature} [revenue_engine] * @property {RewardPointsConfig} [reward_points] @@ -487,7 +503,7 @@ const Joi = require("joi"); /** * @typedef CompaniesResponse - * @property {AppInventoryCompanies} [items] + * @property {AppInventoryCompanies[]} [items] * @property {Page} [page] */ @@ -528,7 +544,7 @@ const Joi = require("joi"); /** * @typedef CreateApplicationRequest * @property {App} [app] - * @property {AppInventory} [configuration] + * @property {ApplicationInventory} [configuration] * @property {AppDomain} [domain] */ @@ -568,6 +584,8 @@ const Joi = require("joi"); * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the current sales channel supported currency * @property {string} [code] - 3-character currency code, e.g. INR, USD, EUR. + * @property {string} [country_code] + * @property {string} [country_name] * @property {string} [created_at] - ISO 8601 timestamp of sales channel support * currency creation * @property {number} [decimal_digits] - Acceptable decimal limits for a given @@ -575,10 +593,10 @@ const Joi = require("joi"); * value of a currency. * @property {boolean} [is_active] - Shows currency is enabled or not in current * sales channel + * @property {string} [modified_at] - ISO 8601 timestamp of sales channel + * support currency updation * @property {string} [name] - Name of the currency, e.g Indian Rupee * @property {string} [symbol] - Unique symbol for identifying the currency, e.g. ₹ - * @property {string} [updated_at] - ISO 8601 timestamp of sales channel support - * currency updation */ /** @@ -613,6 +631,7 @@ const Joi = require("joi"); /** * @typedef DeploymentMeta + * @property {number} [__v] * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the ordering stores * @property {boolean} [all_stores] - Allow all stores from the ordering store @@ -642,6 +661,7 @@ const Joi = require("joi"); * @property {boolean} [is_primary] - Domain is primary or not. Primary domain * is the default/main domain. * @property {boolean} [is_shortlink] - Shortlink is present or not for the domain + * @property {string} [message] * @property {string} [name] - Full domain name, e.g. newton.com * @property {boolean} [verified] - Domain is verified or not. TXT and A records * should propagate correctly. @@ -764,6 +784,7 @@ const Joi = require("joi"); /** * @typedef FyndRewardsCredentials + * @property {string} [private_key] - Public key for integrating with Fynd rewards. * @property {string} [public_key] - Public key for integrating with Fynd rewards. */ @@ -814,11 +835,17 @@ const Joi = require("joi"); * @property {string[]} [address_line] - Contact address of the sales channel * @property {string} [city] - Name of the city, e.g. Mumbai * @property {string} [country] - Name of the country, e.g. India - * @property {string} [loc] - Co-ordinates of the location + * @property {InformationLoc} [loc] * @property {InformationPhone[]} [phone] * @property {number} [pincode] - 6-digit PIN Code of the city, e.g. 400001 */ +/** + * @typedef InformationLoc + * @property {number[]} [coordinates] - 10-digit mobile number + * @property {string} [type] - Country code for contact number, e.g. +91 (for India) + */ + /** * @typedef InformationPhone * @property {string} [code] - Country code for contact number, e.g. +91 (for India) @@ -827,11 +854,24 @@ const Joi = require("joi"); /** * @typedef InformationSupport - * @property {string[]} [email] - * @property {string[]} [phone] + * @property {InformationSupportEmail[]} [email] + * @property {InformationSupportPhone[]} [phone] * @property {string} [timing] - Working hours of support team, e.g. 9 AM to 9 PM */ +/** + * @typedef InformationSupportEmail + * @property {string} [key] + * @property {string} [value] - Value of email. + */ + +/** + * @typedef InformationSupportPhone + * @property {string} [code] - Country code for contact number, e.g. +91 (for India) + * @property {string} [key] + * @property {string} [number] - 10-digit mobile number + */ + /** * @typedef InstagramLink * @property {string} [icon] - Hosted URL of social icon image shown on the website @@ -844,22 +884,24 @@ const Joi = require("joi"); * @property {number} [__v] - Version key for tracking revisions. Default value is zero. * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the integration - * @property {Object[]} [companies] + * @property {string[]} [companies] * @property {Object} [constants] * @property {string} [created_at] - ISO 8601 timestamp of integration creation * @property {string} [description] - Basic description about the integration * @property {string} [description_html] - Basic HTML description about the integration + * @property {boolean} [hidden] * @property {string} [icon] - Hosted URL of the icon image * @property {IntegrationMeta[]} [meta] + * @property {string} [modified_at] - ISO 8601 timestamp of integration updation * @property {string} [name] - Name of the integration, e.g. SAP RBL Integration * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID) * of the user who created the integration * @property {string} [secret] - Randomly generated fixed-length string for * opted integration. It is auto-generated. It would never change once it is generated. + * @property {string} [slug] - Name of the integration, e.g. SAP RBL Integration * @property {string[]} [support] * @property {string} [token] - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. - * @property {string} [updated_at] - ISO 8601 timestamp of integration updation * @property {Validators} [validators] */ @@ -873,6 +915,7 @@ const Joi = require("joi"); * @property {number} [__v] - Version key for tracking revisions. Default value is zero. * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the integration config + * @property {number} [company_id] - Unique id of company. * @property {string} [created_at] - ISO 8601 timestamp of integration config creation * @property {Object} [data] - Schema data of the integration stored in key-value pairs * @property {string} [integration] - Integration id. Shows which integration @@ -880,15 +923,17 @@ const Joi = require("joi"); * @property {LastPatch[]} [last_patch] * @property {string} [level] - Shows for what level the integration is set up. * It can be company level or store level. + * @property {string} [message] * @property {IntegrationMeta[]} [meta] + * @property {string} [modified_at] - ISO 8601 timestamp of integration config updation * @property {boolean} [opted] - Shows this integration is opted or not opted * for the current company * @property {Object[]} [permissions] + * @property {boolean} [success] * @property {string} [token] - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. * @property {number} [uid] - It can be store uid or company uid. Depends on the * level of integration. - * @property {string} [updated_at] - ISO 8601 timestamp of integration config updation */ /** @@ -905,29 +950,43 @@ const Joi = require("joi"); * @property {number} [__v] - Version key for tracking revisions. Default value is zero. * @property {string} [_id] - The unique identifier (24-digit Mongo Object ID) * of the opted integration - * @property {Object[]} [companies] + * @property {string[]} [companies] * @property {string} [constants] * @property {string} [created_at] - ISO 8601 timestamp of integration creation * @property {string} [description] - Basic description about the opted integration * @property {string} [description_html] - Basic HTML description about the * opted integration + * @property {boolean} [hidden] * @property {string} [icon] - Hosted URL of the icon image * @property {IntegrationMeta[]} [meta] + * @property {string} [modified_at] - ISO 8601 timestamp of integration updation * @property {string} [name] - Nmae of the opted integration, e.g. SAP RBL Integration * @property {string} [owner] - The unique identifier (24-digit Mongo Object ID) * of the user who created the integration * @property {string} [secret] - Randomly generated fixed-length string for * opted integration. It is auto-generated. It would never change once it is generated. + * @property {string} [slug] - Slug of the opted integration, e.g. ginesys * @property {string[]} [support] * @property {string} [token] - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. - * @property {string} [updated_at] - ISO 8601 timestamp of integration updation * @property {Validators} [validators] */ +/** + * @typedef InternationalDeliveryCharges + * @property {Charges[]} [charges] + * @property {boolean} [enabled] - Allow international delivery charges + */ + +/** + * @typedef InternationalShipping + * @property {boolean} [enabled] - International shipping is enabled or not. + */ + /** * @typedef InvalidPayloadRequest * @property {string} [message] - Error message when request body payload is improper + * @property {boolean} [success] - Flag for required not successfull. */ /** @@ -938,7 +997,7 @@ const Joi = require("joi"); /** * @typedef InventoryBrand - * @property {Object[]} [brands] - List of brands + * @property {number[]} [brands] - List of brands * @property {string} [criteria] - All brands or specific (explicit) brands to * be shown on the website */ @@ -957,6 +1016,19 @@ const Joi = require("joi"); * @property {string} [criteria] */ +/** + * @typedef InventoryConfig + * @property {InventoryBrandRule} [brand] + * @property {boolean} [franchise_enabled] - Allow other businesses (companies) + * to consume the current sales channel's inventory and sell products + * @property {string[]} [image] + * @property {boolean} [only_verified_products] - Show only verified products + * (the ones whose data have been verified by the admin) + * @property {boolean} [out_of_stock] - Indicates whether out of stock products + * are allowed to show up on the website. + * @property {InventoryStoreRule} [store] + */ + /** * @typedef InventoryDiscount * @property {number} [max] - Maximum inventory discount @@ -1063,6 +1135,11 @@ const Joi = require("joi"); * @property {string} [title] - Name of the related page or link */ +/** + * @typedef ListingPageFeature + * @property {string} [sort_on] + */ + /** * @typedef ListingPriceFeature * @property {string} [sort] - Sorting of listing price with min or max value. @@ -1120,13 +1197,13 @@ const Joi = require("joi"); * configuration creation * @property {boolean} [is_active] - Indicates the availability of the mobile build * @property {LandingImage} [landing_image] + * @property {string} [modified_at] - ISO 8601 timestamp of last known + * modifications to the app build * @property {string} [package_name] - Shows bundle identifier if device * platform is iOS, and directory of the app if device platform is Android * @property {string} [platform_type] - Device platform for which the mobile app * was built, e.g. android, ios. * @property {SplashImage} [splash_image] - * @property {string} [updated_at] - ISO 8601 timestamp of last known - * modifications to the app build */ /** @@ -1146,6 +1223,7 @@ const Joi = require("joi"); /** * @typedef NotFound * @property {string} [message] - Response message for not found + * @property {boolean} [success] - Flag for required not successfull. */ /** @@ -1162,6 +1240,7 @@ const Joi = require("joi"); /** * @typedef OptedCompany + * @property {number} [id] - The unique identifier of the opted inventory company * @property {string} [name] - Name of the company opted by the other seller's * sales channel in its inventory * @property {number} [uid] - Company UID opted by the other seller's sales @@ -1170,7 +1249,7 @@ const Joi = require("joi"); /** * @typedef OptedInventory - * @property {Object} [items] + * @property {Object[]} [items] * @property {OptType} [opt_type] */ @@ -1196,9 +1275,12 @@ const Joi = require("joi"); * @property {string} [address2] - Address of the opted store * @property {string} [city] - City of the opted store, e.g. Mumbai * @property {string} [country] - Country of the opted store, e.g. India + * @property {string} [country_code] - Country code of the selected country * @property {StoreLatLong} [lat_long] * @property {number} [pincode] - 6-digit PIN code of the opted store location + * @property {string} [sector] - Sector for the opted store. * @property {string} [state] - State of the opted store, e.g. Maharashtra + * @property {string} [state_code] - Selected state code */ /** @@ -1301,14 +1383,14 @@ const Joi = require("joi"); * @property {string} [level] - Indicates integration level. It can be company * level or store level. * @property {Object[]} [meta] + * @property {string} [modified_at] - ISO 8601 timestamp of other entity + * updation for opted store integration * @property {boolean} [opted] - Allow other entity opted in integration * @property {string[]} [permissions] * @property {string} [token] - Randomly generated fixed-length string for opted * integration. It is auto-generated. It would never change once it is generated. * @property {number} [uid] - It can be store uid or company uid. Depends on the * level of integration. - * @property {string} [updated_at] - ISO 8601 timestamp of other entity updation - * for opted store integration */ /** @@ -1380,6 +1462,11 @@ const Joi = require("joi"); * @property {boolean} [staff_selection] - Allow staff selection. Default value is false. */ +/** + * @typedef PiiMasking + * @property {boolean} [enabled] + */ + /** * @typedef PinterestLink * @property {string} [icon] - Hosted URL of social icon image shown on the website @@ -1521,7 +1608,7 @@ const Joi = require("joi"); /** * @typedef StoresResponse - * @property {AppInventoryStores} [items] + * @property {AppInventoryStores[]} [items] * @property {Page} [page] */ @@ -1545,8 +1632,8 @@ const Joi = require("joi"); * @property {string} [application] - Alphanumeric ID allotted to the current * application created within the current business account * @property {string} [created_at] - ISO 8601 timestamp of token creation + * @property {string} [modified_at] - ISO 8601 timestamp of token updation * @property {Tokens} [tokens] - * @property {string} [updated_at] - ISO 8601 timestamp of token updation */ /** @@ -1561,6 +1648,13 @@ const Joi = require("joi"); * @property {Segment} [segment] */ +/** + * @typedef TokenSchema + * @property {string} [created_at] - ISO 8601 timestamp of when token created + * @property {Object} [created_by] + * @property {string} [token] + */ + /** * @typedef TwitterLink * @property {string} [icon] - Hosted URL of social icon image shown on the website @@ -1646,6 +1740,7 @@ class ConfigurationPlatformModel { bulk_coupons: Joi.boolean(), delivery_charges: ConfigurationPlatformModel.DeliveryCharges(), enabled: Joi.boolean(), + international_delivery_charges: ConfigurationPlatformModel.InternationalDeliveryCharges(), max_cart_items: Joi.number(), min_cart_value: Joi.number(), pan_card: ConfigurationPlatformModel.PanCardConfig(), @@ -1656,8 +1751,11 @@ class ConfigurationPlatformModel { /** @returns {AppCurrencyResponse} */ static AppCurrencyResponse() { return Joi.object({ + _id: Joi.string().allow(""), application: Joi.string().allow(""), + created_at: Joi.string().allow(""), default_currency: ConfigurationPlatformModel.DefaultCurrency(), + modified_at: Joi.string().allow(""), supported_currency: Joi.array().items( ConfigurationPlatformModel.Currency() ), @@ -1682,12 +1780,12 @@ class ConfigurationPlatformModel { created_at: Joi.string().allow(""), home_page: ConfigurationPlatformModel.HomePageFeature(), landing_page: ConfigurationPlatformModel.LandingPageFeature(), + modified_at: Joi.string().allow(""), order: ConfigurationPlatformModel.OrderFeature(), pcr: ConfigurationPlatformModel.PcrFeature(), product_detail: ConfigurationPlatformModel.ProductDetailFeature(), qr: ConfigurationPlatformModel.QrFeature(), registration_page: ConfigurationPlatformModel.RegistrationPageFeature(), - updated_at: Joi.string().allow(""), }); } @@ -1709,13 +1807,8 @@ class ConfigurationPlatformModel { static AppInventory() { return Joi.object({ article_assignment: ConfigurationPlatformModel.InventoryArticleAssignment(), - brand: ConfigurationPlatformModel.InventoryBrandRule(), - franchise_enabled: Joi.boolean(), - image: Joi.array().items(Joi.string().allow("")), - only_verified_products: Joi.boolean(), - out_of_stock: Joi.boolean(), + inventory: ConfigurationPlatformModel.InventoryConfig(), payment: ConfigurationPlatformModel.InventoryPaymentConfig(), - store: ConfigurationPlatformModel.InventoryStoreRule(), }); } @@ -1733,6 +1826,7 @@ class ConfigurationPlatformModel { return Joi.object({ brand: ConfigurationPlatformModel.InventoryBrand(), category: ConfigurationPlatformModel.InventoryCategory(), + company_id: Joi.number(), company_store: Joi.array().items(Joi.any()), discount: ConfigurationPlatformModel.InventoryDiscount(), exclude_category: Joi.array().items(Joi.any()), @@ -1761,8 +1855,10 @@ class ConfigurationPlatformModel { static AppInventoryStores() { return Joi.object({ _id: Joi.string().allow(""), + address: Joi.object().pattern(/\S/, Joi.any()), company_id: Joi.number(), display_name: Joi.string().allow(""), + integration_type: Joi.object().pattern(/\S/, Joi.any()), modified_on: Joi.string().allow(""), name: Joi.string().allow(""), store_code: Joi.string().allow(""), @@ -1793,14 +1889,18 @@ class ConfigurationPlatformModel { logo: ConfigurationPlatformModel.SecureUrl(), meta: Joi.array().items(ConfigurationPlatformModel.ApplicationMeta()), mobile_logo: ConfigurationPlatformModel.SecureUrl(), + mode: Joi.string().allow(""), + modified_at: Joi.string().allow(""), name: Joi.string().allow(""), owner: Joi.string().allow(""), redirections: Joi.array().items( ConfigurationPlatformModel.ApplicationRedirections() ), + secret: Joi.string().allow(""), slug: Joi.string().allow(""), + status: Joi.string().allow(""), token: Joi.string().allow(""), - updated_at: Joi.string().allow(""), + tokens: Joi.array().items(ConfigurationPlatformModel.TokenSchema()), website: ConfigurationPlatformModel.ApplicationWebsite(), }); } @@ -1824,6 +1924,7 @@ class ConfigurationPlatformModel { return Joi.object({ _id: Joi.string().allow(""), banner: ConfigurationPlatformModel.SecureUrl(), + company_id: Joi.number(), description: Joi.string().allow(""), domain: ConfigurationPlatformModel.Domain(), domains: Joi.array().items(ConfigurationPlatformModel.Domain()), @@ -1831,6 +1932,7 @@ class ConfigurationPlatformModel { logo: ConfigurationPlatformModel.SecureUrl(), mobile_logo: ConfigurationPlatformModel.SecureUrl(), name: Joi.string().allow("").required(), + slug: Joi.string().allow(""), }); } @@ -1841,19 +1943,22 @@ class ConfigurationPlatformModel { _id: Joi.string().allow(""), address: ConfigurationPlatformModel.InformationAddress(), application: Joi.string().allow(""), - business_highlights: ConfigurationPlatformModel.BusinessHighlights(), + business_highlights: Joi.array().items( + ConfigurationPlatformModel.BusinessHighlights() + ), copyright_text: Joi.string().allow(""), created_at: Joi.string().allow(""), links: Joi.array().items(ConfigurationPlatformModel.Links()), + modified_at: Joi.string().allow(""), social_links: ConfigurationPlatformModel.SocialLinks(), support: ConfigurationPlatformModel.InformationSupport(), - updated_at: Joi.string().allow(""), }); } /** @returns {ApplicationInventory} */ static ApplicationInventory() { return Joi.object({ + __v: Joi.number(), _id: Joi.string().allow(""), app: Joi.string().allow(""), article_assignment: ConfigurationPlatformModel.ArticleAssignmentConfig(), @@ -1866,12 +1971,14 @@ class ConfigurationPlatformModel { inventory: ConfigurationPlatformModel.AppInventoryConfig(), logistics: ConfigurationPlatformModel.AppLogisticsConfig(), loyalty_points: ConfigurationPlatformModel.LoyaltyPointsConfig(), + modified_at: Joi.string().allow(""), modified_by: Joi.string().allow(""), order: ConfigurationPlatformModel.AppOrderConfig(), payment: ConfigurationPlatformModel.AppPaymentConfig(), + pii_masking: ConfigurationPlatformModel.PiiMasking(), platforms: Joi.array().items(Joi.string().allow("")), reward_points: ConfigurationPlatformModel.RewardPointsConfig(), - updated_at: Joi.string().allow(""), + tags: Joi.array().items(Joi.string().allow("")), }); } @@ -1939,13 +2046,14 @@ class ConfigurationPlatformModel { mode_of_payment: Joi.string().allow(""), payment_selection_lock: ConfigurationPlatformModel.PaymentSelectionLock(), source: Joi.string().allow(""), + user_cod_limit: Joi.number(), }); } /** @returns {AppStoreRules} */ static AppStoreRules() { return Joi.object({ - brands: Joi.array().items(Joi.any()), + brands: Joi.array().items(Joi.number()), companies: Joi.array().items(Joi.number()), }); } @@ -1957,14 +2065,15 @@ class ConfigurationPlatformModel { application: Joi.string().allow(""), created_at: Joi.string().allow(""), default_currency: ConfigurationPlatformModel.DefaultCurrency(), + modified_at: Joi.string().allow(""), supported_currency: Joi.array().items(Joi.string().allow("")), - updated_at: Joi.string().allow(""), }); } /** @returns {ArticleAssignmentConfig} */ static ArticleAssignmentConfig() { return Joi.object({ + enforced_stores: Joi.array().items(Joi.number()), post_order_reassignment: Joi.boolean(), rules: ConfigurationPlatformModel.ArticleAssignmentRules(), }); @@ -2012,7 +2121,7 @@ class ConfigurationPlatformModel { /** @returns {BrandsByCompanyResponse} */ static BrandsByCompanyResponse() { return Joi.object({ - brands: ConfigurationPlatformModel.CompanyBrandInfo(), + brands: Joi.array().items(ConfigurationPlatformModel.CompanyBrandInfo()), }); } @@ -2036,8 +2145,9 @@ class ConfigurationPlatformModel { application: Joi.string().allow(""), build_status: Joi.string().allow(""), created_at: Joi.string().allow(""), + download_url: ConfigurationPlatformModel.LandingImage(), + modified_at: Joi.string().allow(""), platform_type: Joi.string().allow(""), - updated_at: Joi.string().allow(""), version_code: Joi.number(), version_name: Joi.string().allow(""), }); @@ -2047,7 +2157,7 @@ class ConfigurationPlatformModel { static BuildVersionHistory() { return Joi.object({ latest_available_version_name: Joi.string().allow(""), - versions: ConfigurationPlatformModel.BuildVersion(), + versions: Joi.array().items(ConfigurationPlatformModel.BuildVersion()), }); } @@ -2096,6 +2206,8 @@ class ConfigurationPlatformModel { currency: ConfigurationPlatformModel.CurrencyFeature(), deployment_store_selection: ConfigurationPlatformModel.DeploymentStoreSelectionFeature(), feedback: ConfigurationPlatformModel.FeedbackFeature(), + international_shipping: ConfigurationPlatformModel.InternationalShipping(), + listing_page: ConfigurationPlatformModel.ListingPageFeature(), listing_price: ConfigurationPlatformModel.ListingPriceFeature(), revenue_engine: ConfigurationPlatformModel.RevenueEngineFeature(), reward_points: ConfigurationPlatformModel.RewardPointsConfig(), @@ -2128,7 +2240,9 @@ class ConfigurationPlatformModel { /** @returns {CompaniesResponse} */ static CompaniesResponse() { return Joi.object({ - items: ConfigurationPlatformModel.AppInventoryCompanies(), + items: Joi.array().items( + ConfigurationPlatformModel.AppInventoryCompanies() + ), page: ConfigurationPlatformModel.Page(), }); } @@ -2179,7 +2293,7 @@ class ConfigurationPlatformModel { static CreateApplicationRequest() { return Joi.object({ app: ConfigurationPlatformModel.App(), - configuration: ConfigurationPlatformModel.AppInventory(), + configuration: ConfigurationPlatformModel.ApplicationInventory(), domain: ConfigurationPlatformModel.AppDomain(), }); } @@ -2223,12 +2337,14 @@ class ConfigurationPlatformModel { return Joi.object({ _id: Joi.string().allow(""), code: Joi.string().allow(""), + country_code: Joi.string().allow(""), + country_name: Joi.string().allow(""), created_at: Joi.string().allow(""), decimal_digits: Joi.number(), is_active: Joi.boolean(), + modified_at: Joi.string().allow(""), name: Joi.string().allow(""), symbol: Joi.string().allow(""), - updated_at: Joi.string().allow(""), }); } @@ -2269,6 +2385,7 @@ class ConfigurationPlatformModel { /** @returns {DeploymentMeta} */ static DeploymentMeta() { return Joi.object({ + __v: Joi.number(), _id: Joi.string().allow(""), all_stores: Joi.boolean(), app: Joi.string().allow(""), @@ -2293,6 +2410,7 @@ class ConfigurationPlatformModel { is_predefined: Joi.boolean(), is_primary: Joi.boolean(), is_shortlink: Joi.boolean(), + message: Joi.string().allow(""), name: Joi.string().allow(""), verified: Joi.boolean(), }); @@ -2434,6 +2552,7 @@ class ConfigurationPlatformModel { /** @returns {FyndRewardsCredentials} */ static FyndRewardsCredentials() { return Joi.object({ + private_key: Joi.string().allow(""), public_key: Joi.string().allow(""), }); } @@ -2497,12 +2616,20 @@ class ConfigurationPlatformModel { address_line: Joi.array().items(Joi.string().allow("")), city: Joi.string().allow(""), country: Joi.string().allow(""), - loc: Joi.string().allow(""), + loc: ConfigurationPlatformModel.InformationLoc(), phone: Joi.array().items(ConfigurationPlatformModel.InformationPhone()), pincode: Joi.number(), }); } + /** @returns {InformationLoc} */ + static InformationLoc() { + return Joi.object({ + coordinates: Joi.array().items(Joi.number()), + type: Joi.string().allow(""), + }); + } + /** @returns {InformationPhone} */ static InformationPhone() { return Joi.object({ @@ -2514,12 +2641,33 @@ class ConfigurationPlatformModel { /** @returns {InformationSupport} */ static InformationSupport() { return Joi.object({ - email: Joi.array().items(Joi.string().allow("")), - phone: Joi.array().items(Joi.string().allow("")), + email: Joi.array().items( + ConfigurationPlatformModel.InformationSupportEmail() + ), + phone: Joi.array().items( + ConfigurationPlatformModel.InformationSupportPhone() + ), timing: Joi.string().allow(""), }); } + /** @returns {InformationSupportEmail} */ + static InformationSupportEmail() { + return Joi.object({ + key: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {InformationSupportPhone} */ + static InformationSupportPhone() { + return Joi.object({ + code: Joi.string().allow(""), + key: Joi.string().allow(""), + number: Joi.string().allow(""), + }); + } + /** @returns {InstagramLink} */ static InstagramLink() { return Joi.object({ @@ -2534,19 +2682,21 @@ class ConfigurationPlatformModel { return Joi.object({ __v: Joi.number(), _id: Joi.string().allow(""), - companies: Joi.array().items(Joi.any()), + companies: Joi.array().items(Joi.string().allow("")), constants: Joi.any(), created_at: Joi.string().allow(""), description: Joi.string().allow(""), description_html: Joi.string().allow(""), + hidden: Joi.boolean(), icon: Joi.string().allow(""), meta: Joi.array().items(ConfigurationPlatformModel.IntegrationMeta()), + modified_at: Joi.string().allow(""), name: Joi.string().allow(""), owner: Joi.string().allow(""), secret: Joi.string().allow(""), + slug: Joi.string().allow(""), support: Joi.array().items(Joi.string().allow("")), token: Joi.string().allow(""), - updated_at: Joi.string().allow(""), validators: ConfigurationPlatformModel.Validators(), }); } @@ -2563,17 +2713,20 @@ class ConfigurationPlatformModel { return Joi.object({ __v: Joi.number(), _id: Joi.string().allow(""), + company_id: Joi.number(), created_at: Joi.string().allow(""), data: Joi.any(), integration: Joi.string().allow(""), last_patch: Joi.array().items(ConfigurationPlatformModel.LastPatch()), level: Joi.string().allow(""), + message: Joi.string().allow(""), meta: Joi.array().items(ConfigurationPlatformModel.IntegrationMeta()), + modified_at: Joi.string().allow(""), opted: Joi.boolean(), permissions: Joi.array().items(Joi.any()), + success: Joi.boolean(), token: Joi.string().allow(""), uid: Joi.number(), - updated_at: Joi.string().allow(""), }); } @@ -2592,27 +2745,45 @@ class ConfigurationPlatformModel { return Joi.object({ __v: Joi.number(), _id: Joi.string().allow(""), - companies: Joi.array().items(Joi.any()), + companies: Joi.array().items(Joi.string().allow("")), constants: Joi.string().allow(""), created_at: Joi.string().allow(""), description: Joi.string().allow(""), description_html: Joi.string().allow(""), + hidden: Joi.boolean(), icon: Joi.string().allow(""), meta: Joi.array().items(ConfigurationPlatformModel.IntegrationMeta()), + modified_at: Joi.string().allow(""), name: Joi.string().allow(""), owner: Joi.string().allow(""), secret: Joi.string().allow(""), + slug: Joi.string().allow(""), support: Joi.array().items(Joi.string().allow("")), token: Joi.string().allow(""), - updated_at: Joi.string().allow(""), validators: ConfigurationPlatformModel.Validators(), }); } + /** @returns {InternationalDeliveryCharges} */ + static InternationalDeliveryCharges() { + return Joi.object({ + charges: Joi.array().items(ConfigurationPlatformModel.Charges()), + enabled: Joi.boolean(), + }); + } + + /** @returns {InternationalShipping} */ + static InternationalShipping() { + return Joi.object({ + enabled: Joi.boolean(), + }); + } + /** @returns {InvalidPayloadRequest} */ static InvalidPayloadRequest() { return Joi.object({ message: Joi.string().allow(""), + success: Joi.boolean(), }); } @@ -2627,7 +2798,7 @@ class ConfigurationPlatformModel { /** @returns {InventoryBrand} */ static InventoryBrand() { return Joi.object({ - brands: Joi.array().items(Joi.any()), + brands: Joi.array().items(Joi.number()), criteria: Joi.string().allow(""), }); } @@ -2648,6 +2819,18 @@ class ConfigurationPlatformModel { }); } + /** @returns {InventoryConfig} */ + static InventoryConfig() { + return Joi.object({ + brand: ConfigurationPlatformModel.InventoryBrandRule(), + franchise_enabled: Joi.boolean(), + image: Joi.array().items(Joi.string().allow("")), + only_verified_products: Joi.boolean(), + out_of_stock: Joi.boolean(), + store: ConfigurationPlatformModel.InventoryStoreRule(), + }); + } + /** @returns {InventoryDiscount} */ static InventoryDiscount() { return Joi.object({ @@ -2770,6 +2953,13 @@ class ConfigurationPlatformModel { }); } + /** @returns {ListingPageFeature} */ + static ListingPageFeature() { + return Joi.object({ + sort_on: Joi.string().allow(""), + }); + } + /** @returns {ListingPriceFeature} */ static ListingPriceFeature() { return Joi.object({ @@ -2831,10 +3021,10 @@ class ConfigurationPlatformModel { created_at: Joi.string().allow(""), is_active: Joi.boolean(), landing_image: ConfigurationPlatformModel.LandingImage(), + modified_at: Joi.string().allow(""), package_name: Joi.string().allow(""), platform_type: Joi.string().allow(""), splash_image: ConfigurationPlatformModel.SplashImage(), - updated_at: Joi.string().allow(""), }); } @@ -2857,6 +3047,7 @@ class ConfigurationPlatformModel { static NotFound() { return Joi.object({ message: Joi.string().allow(""), + success: Joi.boolean(), }); } @@ -2876,6 +3067,7 @@ class ConfigurationPlatformModel { /** @returns {OptedCompany} */ static OptedCompany() { return Joi.object({ + id: Joi.number(), name: Joi.string().allow(""), uid: Joi.number(), }); @@ -2884,7 +3076,7 @@ class ConfigurationPlatformModel { /** @returns {OptedInventory} */ static OptedInventory() { return Joi.object({ - items: Joi.any(), + items: Joi.array().items(Joi.any()), opt_type: ConfigurationPlatformModel.OptType(), }); } @@ -2911,9 +3103,12 @@ class ConfigurationPlatformModel { address2: Joi.string().allow(""), city: Joi.string().allow(""), country: Joi.string().allow(""), + country_code: Joi.string().allow(""), lat_long: ConfigurationPlatformModel.StoreLatLong(), pincode: Joi.number(), + sector: Joi.string().allow(""), state: Joi.string().allow(""), + state_code: Joi.string().allow(""), }); } @@ -3027,11 +3222,11 @@ class ConfigurationPlatformModel { last_patch: Joi.array().items(ConfigurationPlatformModel.LastPatch()), level: Joi.string().allow(""), meta: Joi.array().items(Joi.any()), + modified_at: Joi.string().allow(""), opted: Joi.boolean(), permissions: Joi.array().items(Joi.string().allow("")), token: Joi.string().allow(""), uid: Joi.number(), - updated_at: Joi.string().allow(""), }); } @@ -3117,6 +3312,13 @@ class ConfigurationPlatformModel { }); } + /** @returns {PiiMasking} */ + static PiiMasking() { + return Joi.object({ + enabled: Joi.boolean(), + }); + } + /** @returns {PinterestLink} */ static PinterestLink() { return Joi.object({ @@ -3279,7 +3481,7 @@ class ConfigurationPlatformModel { /** @returns {StoresResponse} */ static StoresResponse() { return Joi.object({ - items: ConfigurationPlatformModel.AppInventoryStores(), + items: Joi.array().items(ConfigurationPlatformModel.AppInventoryStores()), page: ConfigurationPlatformModel.Page(), }); } @@ -3307,8 +3509,8 @@ class ConfigurationPlatformModel { _id: Joi.string().allow(""), application: Joi.string().allow(""), created_at: Joi.string().allow(""), + modified_at: Joi.string().allow(""), tokens: ConfigurationPlatformModel.Tokens(), - updated_at: Joi.string().allow(""), }); } @@ -3326,6 +3528,15 @@ class ConfigurationPlatformModel { }); } + /** @returns {TokenSchema} */ + static TokenSchema() { + return Joi.object({ + created_at: Joi.string().allow(""), + created_by: Joi.object().pattern(/\S/, Joi.any()), + token: Joi.string().allow(""), + }); + } + /** @returns {TwitterLink} */ static TwitterLink() { return Joi.object({ diff --git a/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts b/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts index 8c26aed93..57f676124 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +++ b/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts @@ -35,7 +35,7 @@ export = ConfigurationPlatformValidator; */ /** * @typedef GetIntegrationByIdParam - * @property {number} id - Integration id + * @property {string} id - Integration id */ /** * @typedef GetIntegrationByLevelIdParam @@ -195,7 +195,7 @@ type GetIntegrationByIdParam = { /** * - Integration id */ - id: number; + id: string; }; type GetIntegrationByLevelIdParam = { /** diff --git a/sdk/platform/Configuration/ConfigurationPlatformValidator.js b/sdk/platform/Configuration/ConfigurationPlatformValidator.js index d4f84fa26..1b1c9cd0f 100644 --- a/sdk/platform/Configuration/ConfigurationPlatformValidator.js +++ b/sdk/platform/Configuration/ConfigurationPlatformValidator.js @@ -45,7 +45,7 @@ const ConfigurationPlatformModel = require("./ConfigurationPlatformModel"); /** * @typedef GetIntegrationByIdParam - * @property {number} id - Integration id + * @property {string} id - Integration id */ /** @@ -182,7 +182,7 @@ class ConfigurationPlatformValidator { /** @returns {GetIntegrationByIdParam} */ static getIntegrationById() { return Joi.object({ - id: Joi.number().required(), + id: Joi.string().allow("").required(), }).required(); } diff --git a/sdk/platform/Content/ContentPlatformApplicationClient.d.ts b/sdk/platform/Content/ContentPlatformApplicationClient.d.ts index 0ef6a0c38..264eb7551 100644 --- a/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +++ b/sdk/platform/Content/ContentPlatformApplicationClient.d.ts @@ -59,6 +59,59 @@ declare class Content { * @description: Announcements are useful to highlight a message or information on top of a webpage. Use this API to create an 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: Use this API to create the custom field entry for given resource and resource_id in param. - 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 + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createAppCustomFieldDefinition + * @summary: Create custom field definition + * @description: Use this API to create a custom field definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomFieldDefinition/). + */ + createAppCustomFieldDefinition({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAppCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.CreateAppCustomObjectParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createAppCustomObject + * @summary: Create custom object entries + * @description: Use this API to create the custom object entry. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObject/). + */ + 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 + * @name createAppCustomObjectDefinition + * @summary: Create custom object definition + * @description: Use this API to create custom object defintion - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObjectDefinition/). + */ + createAppCustomObjectDefinition({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateAppCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.CreateBlogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -125,6 +178,18 @@ declare class Content { * @description: Use this API to create a page preview to check the appearance of a custom page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPagePreview/). */ createPagePreview({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreatePagePreviewParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.CreateSEOMarkupSchemaParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createSEOMarkupSchema + * @summary: Create a SEO Markup schema Template of a page type for an application + * @description: Use this API to create a SEO Markup schema Template inside an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSEOMarkupSchema/). + */ + createSEOMarkupSchema({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateSEOMarkupSchemaParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.CreateSlideshowParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -148,6 +213,44 @@ declare class Content { * @description: Use this API to delete an existing announcement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAnnouncement/). */ deleteAnnouncement({ announcementId, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAnnouncementParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteAppCustomFieldDefinition + * @summary: Delete custom fields definition. + * @description: Use this API to delete the definitions of custom fields using definition_id. This will also delete related custom fields entries related to this definition. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomFieldDefinition/). + */ + deleteAppCustomFieldDefinition({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteAppCustomObject + * @summary: Delete custom object + * @description: Use this API to delete the custom object entry by id. This will also delete related custom fields entries related to this custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObject/). + */ + deleteAppCustomObject({ metaobjectId, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAppCustomObjectParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name deleteAppCustomObjectDefinition + * @summary: delete custom object definition by id + * @description: Use this API to delete a custom object definition and related data for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectDefinition/). + */ + deleteAppCustomObjectDefinition({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.DeleteBlogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -235,6 +338,18 @@ declare class Content { * @description: Use this API to delete redirection rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deletePathRedirectionRules/). */ deletePathRedirectionRules({ pathId, requestHeaders }?: ContentPlatformApplicationValidator.DeletePathRedirectionRulesParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.DeleteSEOMarkupSchemaParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteSEOMarkupSchema + * @summary: delete a particular SEO Markup schema of an application using its id + * @description: Use this API to delete an existing SEO Markup schema an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSEOMarkupSchema/). + */ + deleteSEOMarkupSchema({ id, requestHeaders }?: ContentPlatformApplicationValidator.DeleteSEOMarkupSchemaParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.DeleteSlideshowParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -268,6 +383,32 @@ declare class Content { * @description: Use this API to edit the details of an existing tag by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/editInjectableTag/). */ editInjectableTag({ tagId, body, requestHeaders }?: ContentPlatformApplicationValidator.EditInjectableTagParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.EditSEOMarkupSchemaParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name editSEOMarkupSchema + * @summary: Get a particular SEO Markup schema of an application using its id + * @description: Use this API to edit an existing SEO Markup schema an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/editSEOMarkupSchema/). + */ + editSEOMarkupSchema({ id, body, requestHeaders }?: ContentPlatformApplicationValidator.EditSEOMarkupSchemaParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name exportAppCustomObjectEntries + * @summary: Initiate download for bulk custom object entries + * @description: Use this api to initiate download of bulk entries - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportAppCustomObjectEntries/). + */ + exportAppCustomObjectEntries({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GenerateSEOTitleParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -320,6 +461,142 @@ declare class Content { applicationId: string; pageSize?: number; }): Paginator; + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getAppCustomFieldDefinition + * @summary: Get custom fields definition by id + * @description: Use this API to retrieve the definitions of custom fields using definition_id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinition/). + */ + getAppCustomFieldDefinition({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam} 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: Use this API to retrieve the definitions of custom fields. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitions/). + */ + 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 + * @name getAppCustomFieldTypes + * @summary: Get custom field types + * @description: Use this API to retrieve the custom field types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldTypes/). + */ + 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 given resource + * @description: Use this API to retrieve the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFields/). + */ + getAppCustomFields({ resource, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomFieldsParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getAppCustomFieldsByResourceId + * @summary: Get list of custom fields of given resource and resource id + * @description: Use this API to retrieve the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldsByResourceId/). + */ + getAppCustomFieldsByResourceId({ resource, resourceId, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceIdParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAppCustomObject + * @summary: Get custom object details + * @description: Use this API to retrieve the custom object details and their fields details and definitions and references. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObject/). + */ + getAppCustomObject({ metaobjectId, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getAppCustomObjectDefinition + * @summary: get custom object definition by id + * @description: Use this API to update a custom object definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinition/). + */ + getAppCustomObjectDefinition({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getAppCustomObjectDefinitions + * @summary: Get custom object definitions + * @description: Use this API to retrieve the custom object definitions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinitions/). + */ + getAppCustomObjectDefinitions({ pageNo, pageSize, search, requestHeaders }?: ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionsParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAppCustomObjects + * @summary: Get list of custom objects + * @description: Use this API to retrieve the custom objects. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjects/). + */ + getAppCustomObjects({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetAppJobsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAppJobs + * @summary: Fetch bulk import and export job list. + * @description: Use this api to get list of jobs of bulk import and exports - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppJobs/). + */ + getAppJobs({ page, pageSize, actionType, requestHeaders }?: ContentPlatformApplicationValidator.GetAppJobsParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetAppResourcesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAppResources + * @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/getAppResources/). + */ + getAppResources({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetBlogBySlugParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -377,6 +654,19 @@ declare class Content { * @description: Use this to get all data loaders of an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDataLoaders/). */ getDataLoaders({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetDataLoadersByServiceParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getDataLoadersByService + * @summary: Get all the data loaders in an application by service name + * @description: Use this to get all data loaders of an application by service name - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDataLoadersByService/). + */ + getDataLoadersByService({ serviceName, requestHeaders }?: ContentPlatformApplicationValidator.GetDataLoadersByServiceParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetDefaultNavigationsParam} arg * - Arg object @@ -390,6 +680,18 @@ declare class Content { * @description: On any website (application), there are navigations that are present by default. Use this API to retrieve those default navigations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDefaultNavigations/). */ getDefaultNavigations({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetDefaultSEOMarkupSchemaParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getDefaultSEOMarkupSchema + * @summary: Get Default SEO Markup schemas of an application + * @description: Use this API to get the Default SEO Markup schema Templates setup for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDefaultSEOMarkupSchema/). + */ + getDefaultSEOMarkupSchema({ pageType, requestHeaders }?: ContentPlatformApplicationValidator.GetDefaultSEOMarkupSchemaParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetFaqByIdOrSlugParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -621,6 +923,30 @@ declare class Content { * @description: Use this API to know how the SEO is configured in the application. This includes the sitemap, robot.txt, custom meta tags, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSEOConfiguration/). */ getSEOConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetSEOMarkupSchemaParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getSEOMarkupSchema + * @summary: Get a particular SEO Markup schema of an application using its id + * @description: Use this API to get a existing SEO Markup schema an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSEOMarkupSchema/). + */ + getSEOMarkupSchema({ id, requestHeaders }?: ContentPlatformApplicationValidator.GetSEOMarkupSchemaParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.GetSEOMarkupSchemasParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getSEOMarkupSchemas + * @summary: Get SEO Markup schemas of an application + * @description: Use this API to get all SEO Markup schema Templates setup for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSEOMarkupSchemas/). + */ + getSEOMarkupSchemas({ title, active, pageNo, pageSize, requestHeaders }?: ContentPlatformApplicationValidator.GetSEOMarkupSchemasParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.GetSlideshowBySlugParam} arg * - Arg object @@ -675,6 +1001,20 @@ declare class Content { * @description: Use this API to get the contact details for customer support, including emails and phone numbers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSupportInformation/). */ getSupportInformation({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name importAppCustomObjectEntries + * @summary: Bulk custom object entries upload + * @description: Use this API to upload custom object entries - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importAppCustomObjectEntries/). + */ + importAppCustomObjectEntries({ definitionId, body, requestHeaders }?: ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.RemoveInjectableTagParam} arg * - Arg object @@ -699,6 +1039,18 @@ declare class Content { * @description: Use this API to reselect a data loader. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/resetDataLoader/). */ resetDataLoader({ service, operationId, requestHeaders }?: ContentPlatformApplicationValidator.ResetDataLoaderParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name sampleAppCustomObjectBulkEntry + * @summary: download sample for custom object bulk entry + * @description: Use this api to get sample csv file - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleAppCustomObjectBulkEntry/). + */ + sampleAppCustomObjectBulkEntry({ definitionId, requestHeaders }?: ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.SelectDataLoaderParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -736,6 +1088,45 @@ declare class Content { * @description: Use this API to edit the duration, i.e. start date-time and end date-time of an announcement. Moreover, you can enable/disable an announcement using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAnnouncementSchedule/). */ updateAnnouncementSchedule({ announcementId, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAnnouncementScheduleParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name updateAppCustomFieldDefinition + * @summary: Update custom field definition + * @description: Use this API to update a custom field definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldDefinition/). + */ + updateAppCustomFieldDefinition({ definitionId, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name updateAppCustomObject + * @summary: Update custom object details + * @description: Use this API to update a custom object detail for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObject/). + */ + updateAppCustomObject({ metaobjectId, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomObjectParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name updateAppCustomObjectDefinition + * @summary: Update custom object definition + * @description: Use this API to update a custom object definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectDefinition/). + */ + updateAppCustomObjectDefinition({ definitionId, body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {ContentPlatformApplicationValidator.UpdateBlogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Content/ContentPlatformApplicationClient.js b/sdk/platform/Content/ContentPlatformApplicationClient.js index f26a46847..84cd62e05 100644 --- a/sdk/platform/Content/ContentPlatformApplicationClient.js +++ b/sdk/platform/Content/ContentPlatformApplicationClient.js @@ -414,20 +414,28 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.CreateBlogParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.CreateAppCustomFieldByResourceIdParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name createBlog - * @summary: Create a blog - * @description: Use this API to create a blog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createBlog/). + * @returns {Promise} + * - Success response + * + * @name createAppCustomFieldByResourceId + * @summary: Create custom field entries for gives resource and resource_id + * @description: Use this API to create the custom field entry for given resource and resource_id in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomFieldByResourceId/). */ - async createBlog( - { body, requestHeaders } = { requestHeaders: {} }, + async createAppCustomFieldByResourceId( + { resource, resourceId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ContentPlatformApplicationValidator.createBlog().validate( + const { + error, + } = ContentPlatformApplicationValidator.createAppCustomFieldByResourceId().validate( { + resource, + resourceId, body, }, { abortEarly: false, allowUnknown: true } @@ -439,8 +447,10 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.createBlog().validate( + } = ContentPlatformApplicationValidator.createAppCustomFieldByResourceId().validate( { + resource, + resourceId, body, }, { abortEarly: false, allowUnknown: false } @@ -448,7 +458,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createBlog \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createAppCustomFieldByResourceId \n ${warrning}`, }); } @@ -456,8 +466,8 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/`, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`, query_params, body, requestHeaders, @@ -471,10 +481,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.BlogSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -482,7 +492,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createBlog \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createAppCustomFieldByResourceId \n ${res_error}`, }); } } @@ -491,23 +501,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.CreateFaqCategoryParam} arg + * @param {ContentPlatformApplicationValidator.CreateAppCustomFieldDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name createFaqCategory - * @summary: Create an FAQ category - * @description: FAQs help users to solve an issue or know more about a process. FAQs can be categorized separately, for e.g. some questions can be related to payment, some could be related to purchase, shipping, navigating, etc. Use this API to create an FAQ category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createFaqCategory/). + * @returns {Promise} + * - Success response + * + * @name createAppCustomFieldDefinition + * @summary: Create custom field definition + * @description: Use this API to create a custom field definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomFieldDefinition/). */ - async createFaqCategory( + async createAppCustomFieldDefinition( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.createFaqCategory().validate( + } = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate( { body, }, @@ -520,7 +532,7 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.createFaqCategory().validate( + } = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate( { body, }, @@ -529,7 +541,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createFaqCategory \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createAppCustomFieldDefinition \n ${warrning}`, }); } @@ -538,7 +550,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions`, query_params, body, requestHeaders, @@ -552,10 +564,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CreateFaqCategorySchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -563,7 +575,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createFaqCategory \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createAppCustomFieldDefinition \n ${res_error}`, }); } } @@ -572,23 +584,23 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.CreateLandingPageParam} 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 createLandingPage - * @summary: Create a landing page - * @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to create a landing page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createLandingPage/). + * @returns {Promise} - Success response + * @name createAppCustomObject + * @summary: Create custom object entries + * @description: Use this API to create the custom object entry. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObject/). */ - async createLandingPage( + async createAppCustomObject( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.createLandingPage().validate( + } = ContentPlatformApplicationValidator.createAppCustomObject().validate( { body, }, @@ -601,7 +613,7 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.createLandingPage().validate( + } = ContentPlatformApplicationValidator.createAppCustomObject().validate( { body, }, @@ -610,7 +622,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createLandingPage \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createAppCustomObject \n ${warrning}`, }); } @@ -619,7 +631,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page/`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects`, query_params, body, requestHeaders, @@ -633,7 +645,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.LandingPageSchema().validate(responseData, { + } = ContentPlatformModel.CustomObjectSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -644,7 +656,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createLandingPage \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createAppCustomObject \n ${res_error}`, }); } } @@ -653,21 +665,24 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.CreateNavigationParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.CreateAppCustomObjectDefinitionParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name createNavigation - * @summary: Create a navigation - * @description: Navigation is the arrangement of navigational items to ease the accessibility of resources for users on a website. Use this API to create a navigation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createNavigation/). + * @returns {Promise} - + * Success response + * @name createAppCustomObjectDefinition + * @summary: Create custom object definition + * @description: Use this API to create custom object defintion - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObjectDefinition/). */ - async createNavigation( + async createAppCustomObjectDefinition( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.createNavigation().validate( + } = ContentPlatformApplicationValidator.createAppCustomObjectDefinition().validate( { body, }, @@ -680,7 +695,7 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.createNavigation().validate( + } = ContentPlatformApplicationValidator.createAppCustomObjectDefinition().validate( { body, }, @@ -689,7 +704,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createNavigation \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createAppCustomObjectDefinition \n ${warrning}`, }); } @@ -698,7 +713,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions`, query_params, body, requestHeaders, @@ -712,10 +727,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.NavigationSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomObjectDefinitionSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -723,7 +738,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createNavigation \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createAppCustomObjectDefinition \n ${res_error}`, }); } } @@ -732,19 +747,19 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.CreatePageParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.CreateBlogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name createPage - * @summary: Create a page - * @description: Use this API to create a custom page using a title, seo, publish status, feature image, tags, meta, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPage/). + * @returns {Promise} - Success response + * @name createBlog + * @summary: Create a blog + * @description: Use this API to create a blog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createBlog/). */ - async createPage( + async createBlog( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ContentPlatformApplicationValidator.createPage().validate( + const { error } = ContentPlatformApplicationValidator.createBlog().validate( { body, }, @@ -757,7 +772,7 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.createPage().validate( + } = ContentPlatformApplicationValidator.createBlog().validate( { body, }, @@ -766,7 +781,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createPage \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createBlog \n ${warrning}`, }); } @@ -775,7 +790,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/pages/`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/`, query_params, body, requestHeaders, @@ -789,7 +804,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PageSchema().validate(responseData, { + } = ContentPlatformModel.BlogSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -800,7 +815,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createPage \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createBlog \n ${res_error}`, }); } } @@ -809,23 +824,23 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.CreatePagePreviewParam} arg + * @param {ContentPlatformApplicationValidator.CreateFaqCategoryParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name createPagePreview - * @summary: Create a page preview - * @description: Use this API to create a page preview to check the appearance of a custom page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPagePreview/). + * @returns {Promise} - Success response + * @name createFaqCategory + * @summary: Create an FAQ category + * @description: FAQs help users to solve an issue or know more about a process. FAQs can be categorized separately, for e.g. some questions can be related to payment, some could be related to purchase, shipping, navigating, etc. Use this API to create an FAQ category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createFaqCategory/). */ - async createPagePreview( + async createFaqCategory( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.createPagePreview().validate( + } = ContentPlatformApplicationValidator.createFaqCategory().validate( { body, }, @@ -838,7 +853,7 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.createPagePreview().validate( + } = ContentPlatformApplicationValidator.createFaqCategory().validate( { body, }, @@ -847,7 +862,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createPagePreview \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createFaqCategory \n ${warrning}`, }); } @@ -856,7 +871,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/preview/`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category`, query_params, body, requestHeaders, @@ -870,7 +885,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PageSchema().validate(responseData, { + } = ContentPlatformModel.CreateFaqCategorySchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -881,7 +896,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createPagePreview \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createFaqCategory \n ${res_error}`, }); } } @@ -890,21 +905,23 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.CreateSlideshowParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.CreateLandingPageParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name createSlideshow - * @summary: Create a slideshow - * @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to create a slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSlideshow/). + * @returns {Promise} - Success response + * @name createLandingPage + * @summary: Create a landing page + * @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to create a landing page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createLandingPage/). */ - async createSlideshow( + async createLandingPage( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.createSlideshow().validate( + } = ContentPlatformApplicationValidator.createLandingPage().validate( { body, }, @@ -917,7 +934,7 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.createSlideshow().validate( + } = ContentPlatformApplicationValidator.createLandingPage().validate( { body, }, @@ -926,7 +943,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > createSlideshow \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createLandingPage \n ${warrning}`, }); } @@ -935,7 +952,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page/`, query_params, body, requestHeaders, @@ -949,7 +966,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.SlideshowSchema().validate(responseData, { + } = ContentPlatformModel.LandingPageSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -960,7 +977,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > createSlideshow \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createLandingPage \n ${res_error}`, }); } } @@ -969,26 +986,23 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg - * - Arg object - * + * @param {ContentPlatformApplicationValidator.CreateNavigationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name deleteAnnouncement - * @summary: Delete announcement by id - * @description: Use this API to delete an existing announcement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAnnouncement/). + * @returns {Promise} - Success response + * @name createNavigation + * @summary: Create a navigation + * @description: Navigation is the arrangement of navigational items to ease the accessibility of resources for users on a website. Use this API to create a navigation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createNavigation/). */ - async deleteAnnouncement( - { announcementId, requestHeaders } = { requestHeaders: {} }, + async createNavigation( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.deleteAnnouncement().validate( + } = ContentPlatformApplicationValidator.createNavigation().validate( { - announcementId, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -999,16 +1013,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteAnnouncement().validate( + } = ContentPlatformApplicationValidator.createNavigation().validate( { - announcementId, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteAnnouncement \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createNavigation \n ${warrning}`, }); } @@ -1016,10 +1030,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -1031,7 +1045,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, { + } = ContentPlatformModel.NavigationSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1042,7 +1056,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteAnnouncement \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createNavigation \n ${res_error}`, }); } } @@ -1051,21 +1065,21 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteBlogParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.CreatePageParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteBlog - * @summary: Delete blogs - * @description: Use this API to delete a blog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteBlog/). + * @returns {Promise} - Success response + * @name createPage + * @summary: Create a page + * @description: Use this API to create a custom page using a title, seo, publish status, feature image, tags, meta, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPage/). */ - async deleteBlog( - { id, requestHeaders } = { requestHeaders: {} }, + async createPage( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ContentPlatformApplicationValidator.deleteBlog().validate( + const { error } = ContentPlatformApplicationValidator.createPage().validate( { - id, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -1076,16 +1090,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteBlog().validate( + } = ContentPlatformApplicationValidator.createPage().validate( { - id, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteBlog \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createPage \n ${warrning}`, }); } @@ -1093,10 +1107,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${id}`, + "post", + `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/pages/`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -1108,7 +1122,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.BlogSchema().validate(responseData, { + } = ContentPlatformModel.PageSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1119,7 +1133,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteBlog \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createPage \n ${res_error}`, }); } } @@ -1128,24 +1142,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteDataLoaderParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.CreatePagePreviewParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name deleteDataLoader - * @summary: Delete data loader in application - * @description: Use this API to delete data loader. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteDataLoader/). + * @returns {Promise} - Success response + * @name createPagePreview + * @summary: Create a page preview + * @description: Use this API to create a page preview to check the appearance of a custom page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPagePreview/). */ - async deleteDataLoader( - { dataLoaderId, requestHeaders } = { requestHeaders: {} }, + async createPagePreview( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.deleteDataLoader().validate( + } = ContentPlatformApplicationValidator.createPagePreview().validate( { - dataLoaderId, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -1156,16 +1171,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteDataLoader().validate( + } = ContentPlatformApplicationValidator.createPagePreview().validate( { - dataLoaderId, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteDataLoader \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createPagePreview \n ${warrning}`, }); } @@ -1173,10 +1188,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader/${dataLoaderId}`, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/preview/`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -1188,7 +1203,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.DataLoaderResponseSchema().validate(responseData, { + } = ContentPlatformModel.PageSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1199,7 +1214,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteDataLoader \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createPagePreview \n ${res_error}`, }); } } @@ -1208,22 +1223,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteFaqParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.CreateSEOMarkupSchemaParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteFaq - * @summary: Delete an FAQ - * @description: Use this API to delete an existing FAQ. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteFaq/). + * @returns {Promise} - Success response + * @name createSEOMarkupSchema + * @summary: Create a SEO Markup schema Template of a page type for an application + * @description: Use this API to create a SEO Markup schema Template inside an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSEOMarkupSchema/). */ - async deleteFaq( - { categoryId, faqId, requestHeaders } = { requestHeaders: {} }, + async createSEOMarkupSchema( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ContentPlatformApplicationValidator.deleteFaq().validate( + const { + error, + } = ContentPlatformApplicationValidator.createSEOMarkupSchema().validate( { - categoryId, - faqId, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -1234,17 +1252,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteFaq().validate( + } = ContentPlatformApplicationValidator.createSEOMarkupSchema().validate( { - categoryId, - faqId, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteFaq \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createSEOMarkupSchema \n ${warrning}`, }); } @@ -1252,10 +1269,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${categoryId}/faq/${faqId}`, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -1267,7 +1284,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CreateFaqResponseSchema().validate(responseData, { + } = ContentPlatformModel.SEOSchemaMarkupTemplate().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1278,7 +1295,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteFaq \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createSEOMarkupSchema \n ${res_error}`, }); } } @@ -1287,25 +1304,23 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteFaqCategoryParam} arg - * - Arg object - * + * @param {ContentPlatformApplicationValidator.CreateSlideshowParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteFaqCategory - * @summary: Delete an FAQ category - * @description: Use this API to delete an FAQ category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteFaqCategory/). + * @returns {Promise} - Success response + * @name createSlideshow + * @summary: Create a slideshow + * @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to create a slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSlideshow/). */ - async deleteFaqCategory( - { id, requestHeaders } = { requestHeaders: {} }, + async createSlideshow( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.deleteFaqCategory().validate( + } = ContentPlatformApplicationValidator.createSlideshow().validate( { - id, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -1316,16 +1331,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteFaqCategory().validate( + } = ContentPlatformApplicationValidator.createSlideshow().validate( { - id, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteFaqCategory \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > createSlideshow \n ${warrning}`, }); } @@ -1333,10 +1348,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${id}`, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -1348,7 +1363,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.FaqSchema().validate(responseData, { + } = ContentPlatformModel.SlideshowSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1359,7 +1374,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteFaqCategory \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > createSlideshow \n ${res_error}`, }); } } @@ -1368,25 +1383,26 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteLandingPageParam} arg + * @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteLandingPage - * @summary: Delete a landing page - * @description: Use this API to delete an existing landing page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteLandingPage/). + * @returns {Promise} - + * Success response + * @name deleteAnnouncement + * @summary: Delete announcement by id + * @description: Use this API to delete an existing announcement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAnnouncement/). */ - async deleteLandingPage( - { id, requestHeaders } = { requestHeaders: {} }, + async deleteAnnouncement( + { announcementId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.deleteLandingPage().validate( + } = ContentPlatformApplicationValidator.deleteAnnouncement().validate( { - id, + announcementId, }, { abortEarly: false, allowUnknown: true } ); @@ -1397,16 +1413,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteLandingPage().validate( + } = ContentPlatformApplicationValidator.deleteAnnouncement().validate( { - id, + announcementId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteLandingPage \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteAnnouncement \n ${warrning}`, }); } @@ -1415,7 +1431,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page/${id}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`, query_params, undefined, requestHeaders, @@ -1429,7 +1445,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.LandingPageSchema().validate(responseData, { + } = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1440,7 +1456,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteLandingPage \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteAnnouncement \n ${res_error}`, }); } } @@ -1449,23 +1465,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteNavigationParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteNavigation - * @summary: Delete a navigation - * @description: Use this API to delete an existing navigation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteNavigation/). + * @returns {Promise} - Success response + * @name deleteAppCustomFieldDefinition + * @summary: Delete custom fields definition. + * @description: Use this API to delete the definitions of custom fields using definition_id. This will also delete related custom fields entries related to this definition. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomFieldDefinition/). */ - async deleteNavigation( - { id, requestHeaders } = { requestHeaders: {} }, + async deleteAppCustomFieldDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.deleteNavigation().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinition().validate( { - id, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -1476,16 +1494,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteNavigation().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinition().validate( { - id, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteNavigation \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteAppCustomFieldDefinition \n ${warrning}`, }); } @@ -1494,7 +1512,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/${id}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${definitionId}`, query_params, undefined, requestHeaders, @@ -1508,7 +1526,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.NavigationSchema().validate(responseData, { + } = ContentPlatformModel.CustomDataDeleteSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1519,7 +1537,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteNavigation \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteAppCustomFieldDefinition \n ${res_error}`, }); } } @@ -1528,21 +1546,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeletePageParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deletePage - * @summary: Delete a page - * @description: Use this API to delete an existing page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deletePage/). + * @returns {Promise} - Success response + * @name deleteAppCustomObject + * @summary: Delete custom object + * @description: Use this API to delete the custom object entry by id. This will also delete related custom fields entries related to this custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObject/). */ - async deletePage( - { id, requestHeaders } = { requestHeaders: {} }, + async deleteAppCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ContentPlatformApplicationValidator.deletePage().validate( + const { + error, + } = ContentPlatformApplicationValidator.deleteAppCustomObject().validate( { - id, + metaobjectId, }, { abortEarly: false, allowUnknown: true } ); @@ -1553,16 +1575,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deletePage().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomObject().validate( { - id, + metaobjectId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deletePage \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObject \n ${warrning}`, }); } @@ -1571,7 +1593,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/${id}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${metaobjectId}`, query_params, undefined, requestHeaders, @@ -1585,7 +1607,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PageSchema().validate(responseData, { + } = ContentPlatformModel.CustomDataDeleteSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1596,7 +1618,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deletePage \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteAppCustomObject \n ${res_error}`, }); } } @@ -1605,25 +1627,27 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeletePathRedirectionRulesParam} arg + * @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deletePathRedirectionRules - * @summary: Delete path based redirection rules - * @description: Use this API to delete redirection rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deletePathRedirectionRules/). + * @returns {Promise} + * - Success response + * + * @name deleteAppCustomObjectDefinition + * @summary: delete custom object definition by id + * @description: Use this API to delete a custom object definition and related data for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectDefinition/). */ - async deletePathRedirectionRules( - { pathId, requestHeaders } = { requestHeaders: {} }, + async deleteAppCustomObjectDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.deletePathRedirectionRules().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinition().validate( { - pathId, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -1634,16 +1658,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deletePathRedirectionRules().validate( + } = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinition().validate( { - pathId, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deletePathRedirectionRules \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectDefinition \n ${warrning}`, }); } @@ -1652,7 +1676,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/path-mappings/${pathId}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${definitionId}`, query_params, undefined, requestHeaders, @@ -1664,10 +1688,12 @@ class Content { responseData = response[0]; } - const { error: res_error } = Joi.any().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + const { + error: res_error, + } = ContentPlatformModel.CustomObjectDefinitionDeleteResponseSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1675,7 +1701,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deletePathRedirectionRules \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectDefinition \n ${res_error}`, }); } } @@ -1684,21 +1710,19 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.DeleteSlideshowParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.DeleteBlogParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name deleteSlideshow - * @summary: Delete a slideshow - * @description: Use this API to delete an existing slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSlideshow/). + * @returns {Promise} - Success response + * @name deleteBlog + * @summary: Delete blogs + * @description: Use this API to delete a blog. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteBlog/). */ - async deleteSlideshow( + async deleteBlog( { id, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ContentPlatformApplicationValidator.deleteSlideshow().validate( + const { error } = ContentPlatformApplicationValidator.deleteBlog().validate( { id, }, @@ -1711,7 +1735,7 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.deleteSlideshow().validate( + } = ContentPlatformApplicationValidator.deleteBlog().validate( { id, }, @@ -1720,7 +1744,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > deleteSlideshow \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteBlog \n ${warrning}`, }); } @@ -1729,7 +1753,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "delete", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${id}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${id}`, query_params, undefined, requestHeaders, @@ -1743,7 +1767,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.SlideshowSchema().validate(responseData, { + } = ContentPlatformModel.BlogSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1754,7 +1778,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > deleteSlideshow \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteBlog \n ${res_error}`, }); } } @@ -1763,25 +1787,24 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.EditDataLoaderParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.DeleteDataLoaderParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - * Success response - * @name editDataLoader - * @summary: Edit a data loader by id - * @description: Use this API to edit the details of an existing data loader by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/editDataLoader/). + * @name deleteDataLoader + * @summary: Delete data loader in application + * @description: Use this API to delete data loader. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteDataLoader/). */ - async editDataLoader( - { dataLoaderId, body, requestHeaders } = { requestHeaders: {} }, + async deleteDataLoader( + { dataLoaderId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.editDataLoader().validate( + } = ContentPlatformApplicationValidator.deleteDataLoader().validate( { dataLoaderId, - body, }, { abortEarly: false, allowUnknown: true } ); @@ -1792,17 +1815,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.editDataLoader().validate( + } = ContentPlatformApplicationValidator.deleteDataLoader().validate( { dataLoaderId, - body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > editDataLoader \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteDataLoader \n ${warrning}`, }); } @@ -1810,10 +1832,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "put", + "delete", `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader/${dataLoaderId}`, query_params, - body, + undefined, requestHeaders, { responseHeaders } ); @@ -1836,7 +1858,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > editDataLoader \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteDataLoader \n ${res_error}`, }); } } @@ -1845,26 +1867,22 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.EditInjectableTagParam} arg - * - Arg object - * + * @param {ContentPlatformApplicationValidator.DeleteFaqParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name editInjectableTag - * @summary: Edit a tag by id - * @description: Use this API to edit the details of an existing tag by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/editInjectableTag/). + * @returns {Promise} - Success response + * @name deleteFaq + * @summary: Delete an FAQ + * @description: Use this API to delete an existing FAQ. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteFaq/). */ - async editInjectableTag( - { tagId, body, requestHeaders } = { requestHeaders: {} }, + async deleteFaq( + { categoryId, faqId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ContentPlatformApplicationValidator.editInjectableTag().validate( + const { error } = ContentPlatformApplicationValidator.deleteFaq().validate( { - tagId, - body, + categoryId, + faqId, }, { abortEarly: false, allowUnknown: true } ); @@ -1875,17 +1893,17 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.editInjectableTag().validate( + } = ContentPlatformApplicationValidator.deleteFaq().validate( { - tagId, - body, + categoryId, + faqId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > editInjectableTag \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteFaq \n ${warrning}`, }); } @@ -1893,10 +1911,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "put", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags/edit/handpicked/${tagId}`, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${categoryId}/faq/${faqId}`, query_params, - body, + undefined, requestHeaders, { responseHeaders } ); @@ -1908,7 +1926,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.TagsSchema().validate(responseData, { + } = ContentPlatformModel.CreateFaqResponseSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1919,7 +1937,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > editInjectableTag \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteFaq \n ${res_error}`, }); } } @@ -1928,24 +1946,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GenerateSEOTitleParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.DeleteFaqCategoryParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name generateSEOTitle - * @summary: Get SEO meta tag title for content - * @description: Use this API to get GPT3 generated SEO meta tag title for content - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/generateSEOTitle/). + * @returns {Promise} - Success response + * @name deleteFaqCategory + * @summary: Delete an FAQ category + * @description: Use this API to delete an FAQ category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteFaqCategory/). */ - async generateSEOTitle( - { type, body, requestHeaders } = { requestHeaders: {} }, + async deleteFaqCategory( + { id, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.generateSEOTitle().validate( + } = ContentPlatformApplicationValidator.deleteFaqCategory().validate( { - type, - body, + id, }, { abortEarly: false, allowUnknown: true } ); @@ -1956,17 +1975,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.generateSEOTitle().validate( + } = ContentPlatformApplicationValidator.deleteFaqCategory().validate( { - type, - body, + id, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > generateSEOTitle \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteFaqCategory \n ${warrning}`, }); } @@ -1974,10 +1992,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/generate-seo/${type}`, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${id}`, query_params, - body, + undefined, requestHeaders, { responseHeaders } ); @@ -1989,7 +2007,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.GeneratedSEOContent().validate(responseData, { + } = ContentPlatformModel.FaqSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2000,7 +2018,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > generateSEOTitle \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteFaqCategory \n ${res_error}`, }); } } @@ -2009,25 +2027,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAnnouncementByIdParam} arg + * @param {ContentPlatformApplicationValidator.DeleteLandingPageParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getAnnouncementById - * @summary: Get announcement by ID - * @description: Use this API to retrieve an announcement and its details such as the target platform and pages on which it's applicable - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAnnouncementById/). + * @returns {Promise} - Success response + * @name deleteLandingPage + * @summary: Delete a landing page + * @description: Use this API to delete an existing landing page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteLandingPage/). */ - async getAnnouncementById( - { announcementId, requestHeaders } = { requestHeaders: {} }, + async deleteLandingPage( + { id, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAnnouncementById().validate( + } = ContentPlatformApplicationValidator.deleteLandingPage().validate( { - announcementId, + id, }, { abortEarly: false, allowUnknown: true } ); @@ -2038,16 +2056,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAnnouncementById().validate( + } = ContentPlatformApplicationValidator.deleteLandingPage().validate( { - announcementId, + id, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAnnouncementById \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteLandingPage \n ${warrning}`, }); } @@ -2055,8 +2073,8 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page/${id}`, query_params, undefined, requestHeaders, @@ -2070,7 +2088,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.AdminAnnouncementSchema().validate(responseData, { + } = ContentPlatformModel.LandingPageSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2081,7 +2099,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAnnouncementById \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteLandingPage \n ${res_error}`, }); } } @@ -2090,27 +2108,23 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetAnnouncementsListParam} arg - * - Arg object - * + * @param {ContentPlatformApplicationValidator.DeleteNavigationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getAnnouncementsList - * @summary: Get a list of announcements - * @description: Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve a list of announcements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAnnouncementsList/). + * @returns {Promise} - Success response + * @name deleteNavigation + * @summary: Delete a navigation + * @description: Use this API to delete an existing navigation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteNavigation/). */ - async getAnnouncementsList( - { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + async deleteNavigation( + { id, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getAnnouncementsList().validate( + } = ContentPlatformApplicationValidator.deleteNavigation().validate( { - pageNo, - pageSize, + id, }, { abortEarly: false, allowUnknown: true } ); @@ -2121,28 +2135,25 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getAnnouncementsList().validate( + } = ContentPlatformApplicationValidator.deleteNavigation().validate( { - pageNo, - pageSize, + id, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getAnnouncementsList \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deleteNavigation \n ${warrning}`, }); } const query_params = {}; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements`, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/${id}`, query_params, undefined, requestHeaders, @@ -2156,10 +2167,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.GetAnnouncementListSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ContentPlatformModel.NavigationSchema().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2167,7 +2178,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getAnnouncementsList \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deleteNavigation \n ${res_error}`, }); } } @@ -2176,57 +2187,21 @@ class Content { } /** - * @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 {number} [arg.pageSize] - The number of items to retrieve in each - * page. Default value is 10. - * @returns {Paginator} - * @summary: Get a list of announcements - * @description: Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve a list of announcements. - */ - getAnnouncementsListPaginator({ companyId, applicationId, pageSize } = {}) { - const paginator = new Paginator(); - const callback = async () => { - const pageId = paginator.nextId; - const pageNo = paginator.pageNo; - const pageType = "number"; - const data = await this.getAnnouncementsList({ - companyId: companyId, - applicationId: applicationId, - 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.GetBlogBySlugParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.DeletePageParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getBlogBySlug - * @summary: Get blog by slug - * @description: Use this API to retrieve the components of a blog, such as title, slug, feature image, content, schedule, publish status, author, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogBySlug/). + * @returns {Promise} - Success response + * @name deletePage + * @summary: Delete a page + * @description: Use this API to delete an existing page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deletePage/). */ - async getBlogBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async deletePage( + { id, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ContentPlatformApplicationValidator.getBlogBySlug().validate( + const { error } = ContentPlatformApplicationValidator.deletePage().validate( { - slug, + id, }, { abortEarly: false, allowUnknown: true } ); @@ -2237,16 +2212,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getBlogBySlug().validate( + } = ContentPlatformApplicationValidator.deletePage().validate( { - slug, + id, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getBlogBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deletePage \n ${warrning}`, }); } @@ -2254,8 +2229,8 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${slug}`, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/${id}`, query_params, undefined, requestHeaders, @@ -2269,7 +2244,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.BlogSchema().validate(responseData, { + } = ContentPlatformModel.PageSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2280,7 +2255,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getBlogBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deletePage \n ${res_error}`, }); } } @@ -2289,22 +2264,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetBlogsParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.DeletePathRedirectionRulesParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getBlogs - * @summary: Get blogs - * @description: Use this API to get a list of blogs along with their details, such as the title, reading time, publish status, feature image, tags, author, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogs/). + * @returns {Promise} - Success response + * @name deletePathRedirectionRules + * @summary: Delete path based redirection rules + * @description: Use this API to delete redirection rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deletePathRedirectionRules/). */ - async getBlogs( - { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + async deletePathRedirectionRules( + { pathId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ContentPlatformApplicationValidator.getBlogs().validate( + const { + error, + } = ContentPlatformApplicationValidator.deletePathRedirectionRules().validate( { - pageNo, - pageSize, + pathId, }, { abortEarly: false, allowUnknown: true } ); @@ -2315,28 +2293,25 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getBlogs().validate( + } = ContentPlatformApplicationValidator.deletePathRedirectionRules().validate( { - pageNo, - pageSize, + pathId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getBlogs \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > deletePathRedirectionRules \n ${warrning}`, }); } const query_params = {}; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/`, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/path-mappings/${pathId}`, query_params, undefined, requestHeaders, @@ -2348,9 +2323,7 @@ class Content { responseData = response[0]; } - const { - error: res_error, - } = ContentPlatformModel.BlogGetResponse().validate(responseData, { + const { error: res_error } = Joi.any().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2361,7 +2334,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getBlogs \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > deletePathRedirectionRules \n ${res_error}`, }); } } @@ -2370,57 +2343,2455 @@ class Content { } /** - * @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 {number} [arg.pageSize] - The number of items to retrieve in each - * page. Default value is 10. - * @returns {Paginator} - * @summary: Get blogs - * @description: Use this API to get a list of blogs along with their details, such as the title, reading time, publish status, feature image, tags, author, etc. + * @param {ContentPlatformApplicationValidator.DeleteSEOMarkupSchemaParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteSEOMarkupSchema + * @summary: delete a particular SEO Markup schema of an application using its id + * @description: Use this API to delete an existing SEO Markup schema an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSEOMarkupSchema/). */ - getBlogsPaginator({ companyId, applicationId, pageSize } = {}) { - const paginator = new Paginator(); - const callback = async () => { - const pageId = paginator.nextId; - const pageNo = paginator.pageNo; - const pageType = "number"; - const data = await this.getBlogs({ - companyId: companyId, - applicationId: applicationId, - 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; - } - + async deleteSEOMarkupSchema( + { id, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.deleteSEOMarkupSchema().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, + } = ContentPlatformApplicationValidator.deleteSEOMarkupSchema().validate( + { + id, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > deleteSEOMarkupSchema \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema/${id}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.SEOSchemaMarkupTemplate().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 > deleteSEOMarkupSchema \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.DeleteSlideshowParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteSlideshow + * @summary: Delete a slideshow + * @description: Use this API to delete an existing slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSlideshow/). + */ + async deleteSlideshow( + { id, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.deleteSlideshow().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, + } = ContentPlatformApplicationValidator.deleteSlideshow().validate( + { + id, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > deleteSlideshow \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${id}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.SlideshowSchema().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 > deleteSlideshow \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.EditDataLoaderParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name editDataLoader + * @summary: Edit a data loader by id + * @description: Use this API to edit the details of an existing data loader by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/editDataLoader/). + */ + async editDataLoader( + { dataLoaderId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.editDataLoader().validate( + { + dataLoaderId, + 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.editDataLoader().validate( + { + dataLoaderId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > editDataLoader \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}/data-loader/${dataLoaderId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.DataLoaderResponseSchema().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 > editDataLoader \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.EditInjectableTagParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name editInjectableTag + * @summary: Edit a tag by id + * @description: Use this API to edit the details of an existing tag by its ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/editInjectableTag/). + */ + async editInjectableTag( + { tagId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.editInjectableTag().validate( + { + tagId, + 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.editInjectableTag().validate( + { + tagId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > editInjectableTag \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}/tags/edit/handpicked/${tagId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.TagsSchema().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 > editInjectableTag \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.EditSEOMarkupSchemaParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name editSEOMarkupSchema + * @summary: Get a particular SEO Markup schema of an application using its id + * @description: Use this API to edit an existing SEO Markup schema an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/editSEOMarkupSchema/). + */ + async editSEOMarkupSchema( + { id, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.editSEOMarkupSchema().validate( + { + 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, + } = ContentPlatformApplicationValidator.editSEOMarkupSchema().validate( + { + id, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > editSEOMarkupSchema \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}/seo/schema/${id}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.SEOSchemaMarkupTemplate().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 > editSEOMarkupSchema \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name exportAppCustomObjectEntries + * @summary: Initiate download for bulk custom object entries + * @description: Use this api to initiate download of bulk entries - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportAppCustomObjectEntries/). + */ + async exportAppCustomObjectEntries( + { definitionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.exportAppCustomObjectEntries().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.exportAppCustomObjectEntries().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > exportAppCustomObjectEntries \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/download`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectBulkEntryInitiateDownload().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 > exportAppCustomObjectEntries \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GenerateSEOTitleParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name generateSEOTitle + * @summary: Get SEO meta tag title for content + * @description: Use this API to get GPT3 generated SEO meta tag title for content - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/generateSEOTitle/). + */ + async generateSEOTitle( + { type, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.generateSEOTitle().validate( + { + type, + 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.generateSEOTitle().validate( + { + type, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > generateSEOTitle \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/generate-seo/${type}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.GeneratedSEOContent().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 > generateSEOTitle \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAnnouncementByIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAnnouncementById + * @summary: Get announcement by ID + * @description: Use this API to retrieve an announcement and its details such as the target platform and pages on which it's applicable - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAnnouncementById/). + */ + async getAnnouncementById( + { announcementId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAnnouncementById().validate( + { + announcementId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAnnouncementById().validate( + { + announcementId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAnnouncementById \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.AdminAnnouncementSchema().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 > getAnnouncementById \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAnnouncementsListParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getAnnouncementsList + * @summary: Get a list of announcements + * @description: Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve a list of announcements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAnnouncementsList/). + */ + async getAnnouncementsList( + { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAnnouncementsList().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAnnouncementsList().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAnnouncementsList \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.GetAnnouncementListSchema().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 > getAnnouncementsList \n ${res_error}`, + }); + } + } + + 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 {number} [arg.pageSize] - The number of items to retrieve in each + * page. Default value is 10. + * @returns {Paginator} + * @summary: Get a list of announcements + * @description: Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve a list of announcements. + */ + getAnnouncementsListPaginator({ companyId, applicationId, pageSize } = {}) { + const paginator = new Paginator(); + const callback = async () => { + const pageId = paginator.nextId; + const pageNo = paginator.pageNo; + const pageType = "number"; + const data = await this.getAnnouncementsList({ + companyId: companyId, + applicationId: applicationId, + 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.GetAppCustomFieldDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getAppCustomFieldDefinition + * @summary: Get custom fields definition by id + * @description: Use this API to retrieve the definitions of custom fields using definition_id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinition/). + */ + async getAppCustomFieldDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppCustomFieldDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppCustomFieldDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${definitionId}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().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 > getAppCustomFieldDefinition \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam} 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: Use this API to retrieve the definitions of custom fields. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitions/). + */ + async getAppCustomFieldDefinitions( + { pageNo, pageSize, resource, type, search, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate( + { + pageNo, + pageSize, + resource, + type, + search, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate( + { + pageNo, + pageSize, + resource, + type, + search, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + 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/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomFieldDefinitionsSchema().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 > getAppCustomFieldDefinitions \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldTypesParam} 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: Use this API to retrieve the custom field types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldTypes/). + */ + async getAppCustomFieldTypes( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldTypes \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/types`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectByIdSchema().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 > getAppCustomFieldTypes \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @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 given resource + * @description: Use this API to retrieve the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFields/). + */ + async getAppCustomFields( + { resource, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppCustomFields().validate( + { + resource, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppCustomFields().validate( + { + resource, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppCustomFields \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomFieldsResponseSchema().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 > getAppCustomFields \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getAppCustomFieldsByResourceId + * @summary: Get list of custom fields of given resource and resource id + * @description: Use this API to retrieve the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldsByResourceId/). + */ + async getAppCustomFieldsByResourceId( + { resource, resourceId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceId().validate( + { + resource, + resourceId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceId().validate( + { + resource, + resourceId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldsByResourceId \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`, + query_params, + undefined, + 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 > getAppCustomFieldsByResourceId \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAppCustomObject + * @summary: Get custom object details + * @description: Use this API to retrieve the custom object details and their fields details and definitions and references. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObject/). + */ + async getAppCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppCustomObject().validate( + { + metaobjectId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppCustomObject().validate( + { + metaobjectId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppCustomObject \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${metaobjectId}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectByIdSchema().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 > getAppCustomObject \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getAppCustomObjectDefinition + * @summary: get custom object definition by id + * @description: Use this API to update a custom object definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinition/). + */ + async getAppCustomObjectDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppCustomObjectDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppCustomObjectDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${definitionId}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectDefinitionSchema().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 > getAppCustomObjectDefinition \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getAppCustomObjectDefinitions + * @summary: Get custom object definitions + * @description: Use this API to retrieve the custom object definitions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinitions/). + */ + async getAppCustomObjectDefinitions( + { pageNo, pageSize, search, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppCustomObjectDefinitions().validate( + { + pageNo, + pageSize, + search, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppCustomObjectDefinitions().validate( + { + pageNo, + pageSize, + search, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectDefinitions \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["search"] = search; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectDefinitionsSchema().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 > getAppCustomObjectDefinitions \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAppCustomObjectsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAppCustomObjects + * @summary: Get list of custom objects + * @description: Use this API to retrieve the custom objects. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjects/). + */ + async getAppCustomObjects( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppCustomObjects().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppCustomObjects().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppCustomObjects \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectsSchema().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 > getAppCustomObjects \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAppJobsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAppJobs + * @summary: Fetch bulk import and export job list. + * @description: Use this api to get list of jobs of bulk import and exports - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppJobs/). + */ + async getAppJobs( + { page, pageSize, actionType, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformApplicationValidator.getAppJobs().validate( + { + page, + pageSize, + actionType, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppJobs().validate( + { + page, + pageSize, + actionType, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppJobs \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page"] = page; + query_params["page_size"] = pageSize; + query_params["action_type"] = actionType; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/jobs`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectBulkEntry().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 > getAppJobs \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetAppResourcesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAppResources + * @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/getAppResources/). + */ + async getAppResources( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getAppResources().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getAppResources().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getAppResources \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/resources`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.ResourcesSchema().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 > getAppResources \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetBlogBySlugParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getBlogBySlug + * @summary: Get blog by slug + * @description: Use this API to retrieve the components of a blog, such as title, slug, feature image, content, schedule, publish status, author, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogBySlug/). + */ + async getBlogBySlug( + { slug, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getBlogBySlug().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, + } = ContentPlatformApplicationValidator.getBlogBySlug().validate( + { + slug, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getBlogBySlug \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${slug}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.BlogSchema().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 > getBlogBySlug \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetBlogsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getBlogs + * @summary: Get blogs + * @description: Use this API to get a list of blogs along with their details, such as the title, reading time, publish status, feature image, tags, author, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogs/). + */ + async getBlogs( + { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformApplicationValidator.getBlogs().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getBlogs().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getBlogs \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.BlogGetResponse().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 > getBlogs \n ${res_error}`, + }); + } + } + + 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 {number} [arg.pageSize] - The number of items to retrieve in each + * page. Default value is 10. + * @returns {Paginator} + * @summary: Get blogs + * @description: Use this API to get a list of blogs along with their details, such as the title, reading time, publish status, feature image, tags, author, etc. + */ + getBlogsPaginator({ companyId, applicationId, pageSize } = {}) { + const paginator = new Paginator(); + const callback = async () => { + const pageId = paginator.nextId; + const pageNo = paginator.pageNo; + const pageType = "number"; + const data = await this.getBlogs({ + companyId: companyId, + applicationId: applicationId, + 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.GetComponentByIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getComponentById + * @summary: Get components of a blog + * @description: Use this API to retrieve the components of a blog, such as title, slug, feature image, content, schedule, publish status, author, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getComponentById/). + */ + async getComponentById( + { slug, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getComponentById().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, + } = ContentPlatformApplicationValidator.getComponentById().validate( + { + slug, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getComponentById \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${slug}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.BlogSchema().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 > getComponentById \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetDataLoadersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getDataLoaders + * @summary: Get all the data loaders in an application + * @description: Use this to get all data loaders of an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDataLoaders/). + */ + async getDataLoaders( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getDataLoaders().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getDataLoaders().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getDataLoaders \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.DataLoadersSchema().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 > getDataLoaders \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetDataLoadersByServiceParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getDataLoadersByService + * @summary: Get all the data loaders in an application by service name + * @description: Use this to get all data loaders of an application by service name - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDataLoadersByService/). + */ + async getDataLoadersByService( + { serviceName, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getDataLoadersByService().validate( + { + serviceName, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getDataLoadersByService().validate( + { + serviceName, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getDataLoadersByService \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader/service/${serviceName}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.DataLoaderResponseSchema().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 > getDataLoadersByService \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetDefaultNavigationsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getDefaultNavigations + * @summary: Get default navigations + * @description: On any website (application), there are navigations that are present by default. Use this API to retrieve those default navigations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDefaultNavigations/). + */ + async getDefaultNavigations( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getDefaultNavigations().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getDefaultNavigations().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getDefaultNavigations \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/default`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.DefaultNavigationResponse().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 > getDefaultNavigations \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetDefaultSEOMarkupSchemaParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getDefaultSEOMarkupSchema + * @summary: Get Default SEO Markup schemas of an application + * @description: Use this API to get the Default SEO Markup schema Templates setup for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDefaultSEOMarkupSchema/). + */ + async getDefaultSEOMarkupSchema( + { pageType, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getDefaultSEOMarkupSchema().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, + } = ContentPlatformApplicationValidator.getDefaultSEOMarkupSchema().validate( + { + pageType, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getDefaultSEOMarkupSchema \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_type"] = pageType; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema/default`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.DefaultSchemaComponent().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 > getDefaultSEOMarkupSchema \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetFaqByIdOrSlugParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getFaqByIdOrSlug + * @summary: Get an FAQ + * @description: Use this API to retrieve a specific FAQ. You will get the question and answer of that FAQ. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getFaqByIdOrSlug/). + */ + async getFaqByIdOrSlug( + { idOrSlug, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getFaqByIdOrSlug().validate( + { + idOrSlug, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getFaqByIdOrSlug().validate( + { + idOrSlug, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getFaqByIdOrSlug \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/${idOrSlug}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CreateFaqResponseSchema().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 > getFaqByIdOrSlug \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetFaqCategoriesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getFaqCategories + * @summary: Get a list of FAQ categories + * @description: FAQs can be divided into categories. Use this API to get a list of FAQ categories. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getFaqCategories/). + */ + async getFaqCategories( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getFaqCategories().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getFaqCategories().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getFaqCategories \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/categories`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.GetFaqCategoriesSchema().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 > getFaqCategories \n ${res_error}`, + }); + } + } + + return response; + } + /** - * @param {ContentPlatformApplicationValidator.GetComponentByIdParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetFaqCategoryBySlugOrIdParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getComponentById - * @summary: Get components of a blog - * @description: Use this API to retrieve the components of a blog, such as title, slug, feature image, content, schedule, publish status, author, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getComponentById/). + * @returns {Promise} - + * Success response + * @name getFaqCategoryBySlugOrId + * @summary: Get an FAQ category by slug or id + * @description: FAQs can be divided into categories. Use this API to get an FAQ categories using its slug or ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getFaqCategoryBySlugOrId/). */ - async getComponentById( - { slug, requestHeaders } = { requestHeaders: {} }, + async getFaqCategoryBySlugOrId( + { idOrSlug, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getComponentById().validate( + } = ContentPlatformApplicationValidator.getFaqCategoryBySlugOrId().validate( { - slug, + idOrSlug, }, { abortEarly: false, allowUnknown: true } ); @@ -2431,16 +4802,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getComponentById().validate( + } = ContentPlatformApplicationValidator.getFaqCategoryBySlugOrId().validate( { - slug, + idOrSlug, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getComponentById \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getFaqCategoryBySlugOrId \n ${warrning}`, }); } @@ -2449,7 +4820,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${idOrSlug}`, query_params, undefined, requestHeaders, @@ -2463,7 +4834,88 @@ class Content { const { error: res_error, - } = ContentPlatformModel.BlogSchema().validate(responseData, { + } = ContentPlatformModel.GetFaqCategoryBySlugSchema().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 > getFaqCategoryBySlugOrId \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetFaqsByCategoryIdOrSlugParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getFaqsByCategoryIdOrSlug + * @summary: Get question and answers within an FAQ category + * @description: Use this API to retrieve all the commonly asked question and answers belonging to an FAQ category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getFaqsByCategoryIdOrSlug/). + */ + async getFaqsByCategoryIdOrSlug( + { idOrSlug, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getFaqsByCategoryIdOrSlug().validate( + { + idOrSlug, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getFaqsByCategoryIdOrSlug().validate( + { + idOrSlug, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getFaqsByCategoryIdOrSlug \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${idOrSlug}/faqs`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.GetFaqSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2474,7 +4926,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getComponentById \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getFaqsByCategoryIdOrSlug \n ${res_error}`, }); } } @@ -2483,22 +4935,26 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetDataLoadersParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetInjectableTagsParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getDataLoaders - * @summary: Get all the data loaders in an application - * @description: Use this to get all data loaders of an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDataLoaders/). + * @returns {Promise} - Success response + * @name getInjectableTags + * @summary: Get all the tags in an application + * @description: Use this API to get the CSS and JS injected in the application in the form of tags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getInjectableTags/). */ - async getDataLoaders( - { requestHeaders } = { requestHeaders: {} }, + async getInjectableTags( + { all, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getDataLoaders().validate( - {}, + } = ContentPlatformApplicationValidator.getInjectableTags().validate( + { + all, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -2508,23 +4964,26 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getDataLoaders().validate( - {}, + } = ContentPlatformApplicationValidator.getInjectableTags().validate( + { + all, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getDataLoaders \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getInjectableTags \n ${warrning}`, }); } const query_params = {}; + query_params["all"] = all; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags`, query_params, undefined, requestHeaders, @@ -2538,7 +4997,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.DataLoadersSchema().validate(responseData, { + } = ContentPlatformModel.TagsSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2549,7 +5008,90 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getDataLoaders \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getInjectableTags \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getLandingPages + * @summary: Get landing pages + * @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch a list of landing pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getLandingPages/). + */ + async getLandingPages( + { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformApplicationValidator.getLandingPages().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformApplicationValidator.getLandingPages().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getLandingPages \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page/`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.LandingPageGetResponse().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 > getLandingPages \n ${res_error}`, }); } } @@ -2558,24 +5100,57 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetDefaultNavigationsParam} arg + * @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 {number} [arg.pageSize] - The number of items to retrieve in each + * page. Default value is 10. + * @returns {Paginator} + * @summary: Get landing pages + * @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch a list of landing pages. + */ + getLandingPagesPaginator({ companyId, applicationId, pageSize } = {}) { + const paginator = new Paginator(); + const callback = async () => { + const pageId = paginator.nextId; + const pageNo = paginator.pageNo; + const pageType = "number"; + const data = await this.getLandingPages({ + companyId: companyId, + applicationId: applicationId, + 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.GetLegalInformationParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getDefaultNavigations - * @summary: Get default navigations - * @description: On any website (application), there are navigations that are present by default. Use this API to retrieve those default navigations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDefaultNavigations/). + * @returns {Promise} - Success response + * @name getLegalInformation + * @summary: Get legal information + * @description: Use this API to get the legal information of an application, which includes Policy, Terms and Conditions, Shipping Policy and FAQ regarding the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getLegalInformation/). */ - async getDefaultNavigations( + async getLegalInformation( { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getDefaultNavigations().validate( + } = ContentPlatformApplicationValidator.getLegalInformation().validate( {}, { abortEarly: false, allowUnknown: true } ); @@ -2586,14 +5161,14 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getDefaultNavigations().validate( + } = ContentPlatformApplicationValidator.getLegalInformation().validate( {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getDefaultNavigations \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getLegalInformation \n ${warrning}`, }); } @@ -2602,7 +5177,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/default`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/legal`, query_params, undefined, requestHeaders, @@ -2616,10 +5191,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.DefaultNavigationResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ContentPlatformModel.ApplicationLegal().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2627,7 +5202,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getDefaultNavigations \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getLegalInformation \n ${res_error}`, }); } } @@ -2636,23 +5211,26 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetFaqByIdOrSlugParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetNavigationBySlugParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getFaqByIdOrSlug - * @summary: Get an FAQ - * @description: Use this API to retrieve a specific FAQ. You will get the question and answer of that FAQ. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getFaqByIdOrSlug/). + * @returns {Promise} - Success response + * @name getNavigationBySlug + * @summary: Get a navigation by slug + * @description: Use this API to retrieve a navigation by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getNavigationBySlug/). */ - async getFaqByIdOrSlug( - { idOrSlug, requestHeaders } = { requestHeaders: {} }, + async getNavigationBySlug( + { slug, devicePlatform, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getFaqByIdOrSlug().validate( + } = ContentPlatformApplicationValidator.getNavigationBySlug().validate( { - idOrSlug, + slug, + devicePlatform, }, { abortEarly: false, allowUnknown: true } ); @@ -2663,25 +5241,27 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getFaqByIdOrSlug().validate( + } = ContentPlatformApplicationValidator.getNavigationBySlug().validate( { - idOrSlug, + slug, + devicePlatform, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getFaqByIdOrSlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getNavigationBySlug \n ${warrning}`, }); } const query_params = {}; + query_params["device_platform"] = devicePlatform; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/${idOrSlug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/${slug}`, query_params, undefined, requestHeaders, @@ -2695,7 +5275,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CreateFaqResponseSchema().validate(responseData, { + } = ContentPlatformModel.NavigationSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2706,7 +5286,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getFaqByIdOrSlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getNavigationBySlug \n ${res_error}`, }); } } @@ -2715,22 +5295,28 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetFaqCategoriesParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetNavigationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getFaqCategories - * @summary: Get a list of FAQ categories - * @description: FAQs can be divided into categories. Use this API to get a list of FAQ categories. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getFaqCategories/). + * @returns {Promise} - Success response + * @name getNavigations + * @summary: Get navigations + * @description: Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the orientation, links, sub-navigations, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getNavigations/). */ - async getFaqCategories( - { requestHeaders } = { requestHeaders: {} }, + async getNavigations( + { devicePlatform, pageNo, pageSize, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getFaqCategories().validate( - {}, + } = ContentPlatformApplicationValidator.getNavigations().validate( + { + devicePlatform, + pageNo, + pageSize, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -2740,23 +5326,30 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getFaqCategories().validate( - {}, + } = ContentPlatformApplicationValidator.getNavigations().validate( + { + devicePlatform, + pageNo, + pageSize, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getFaqCategories \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getNavigations \n ${warrning}`, }); } const query_params = {}; + query_params["device_platform"] = devicePlatform; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/categories`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/`, query_params, undefined, requestHeaders, @@ -2770,7 +5363,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.GetFaqCategoriesSchema().validate(responseData, { + } = ContentPlatformModel.NavigationGetResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2781,7 +5374,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getFaqCategories \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getNavigations \n ${res_error}`, }); } } @@ -2790,26 +5383,65 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetFaqCategoryBySlugOrIdParam} arg - * - Arg object - * + * @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 navigations by platform. + * Acceptable values are: web, android, ios, all + * @param {number} [arg.pageSize] - The number of items to retrieve in each + * page. Default value is 10. + * @returns {Paginator} + * @summary: Get navigations + * @description: Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the orientation, links, sub-navigations, etc. + */ + getNavigationsPaginator({ + 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.getNavigations({ + 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.GetPageBySlugParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getFaqCategoryBySlugOrId - * @summary: Get an FAQ category by slug or id - * @description: FAQs can be divided into categories. Use this API to get an FAQ categories using its slug or ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getFaqCategoryBySlugOrId/). + * @returns {Promise} - Success response + * @name getPageBySlug + * @summary: Get page by slug + * @description: Use this API to retrieve the components of a page, such as its title, seo, publish status, feature image, tags, schedule, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPageBySlug/). */ - async getFaqCategoryBySlugOrId( - { idOrSlug, requestHeaders } = { requestHeaders: {} }, + async getPageBySlug( + { slug, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getFaqCategoryBySlugOrId().validate( + } = ContentPlatformApplicationValidator.getPageBySlug().validate( { - idOrSlug, + slug, }, { abortEarly: false, allowUnknown: true } ); @@ -2820,16 +5452,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getFaqCategoryBySlugOrId().validate( + } = ContentPlatformApplicationValidator.getPageBySlug().validate( { - idOrSlug, + slug, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getFaqCategoryBySlugOrId \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getPageBySlug \n ${warrning}`, }); } @@ -2838,7 +5470,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${idOrSlug}`, + `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/pages/${slug}`, query_params, undefined, requestHeaders, @@ -2852,10 +5484,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.GetFaqCategoryBySlugSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ContentPlatformModel.PageSchema().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2863,7 +5495,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getFaqCategoryBySlugOrId \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getPageBySlug \n ${res_error}`, }); } } @@ -2872,26 +5504,22 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetFaqsByCategoryIdOrSlugParam} arg - * - Arg object - * + * @param {ContentPlatformApplicationValidator.GetPageMetaParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getFaqsByCategoryIdOrSlug - * @summary: Get question and answers within an FAQ category - * @description: Use this API to retrieve all the commonly asked question and answers belonging to an FAQ category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getFaqsByCategoryIdOrSlug/). + * @returns {Promise} - Success response + * @name getPageMeta + * @summary: Get page meta + * @description: Use this API to get the meta of custom pages (blog, page) and default system pages (e.g. home/brand/category/collection). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPageMeta/). */ - async getFaqsByCategoryIdOrSlug( - { idOrSlug, requestHeaders } = { requestHeaders: {} }, + async getPageMeta( + { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getFaqsByCategoryIdOrSlug().validate( - { - idOrSlug, - }, + } = ContentPlatformApplicationValidator.getPageMeta().validate( + {}, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -2901,16 +5529,14 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getFaqsByCategoryIdOrSlug().validate( - { - idOrSlug, - }, + } = ContentPlatformApplicationValidator.getPageMeta().validate( + {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getFaqsByCategoryIdOrSlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getPageMeta \n ${warrning}`, }); } @@ -2919,7 +5545,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/faq/category/${idOrSlug}/faqs`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/meta`, query_params, undefined, requestHeaders, @@ -2933,7 +5559,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.GetFaqSchema().validate(responseData, { + } = ContentPlatformModel.PageMetaSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2944,7 +5570,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getFaqsByCategoryIdOrSlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getPageMeta \n ${res_error}`, }); } } @@ -2953,26 +5579,22 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetInjectableTagsParam} arg - * - Arg object - * - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getInjectableTags - * @summary: Get all the tags in an application - * @description: Use this API to get the CSS and JS injected in the application in the form of tags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getInjectableTags/). + * @param {ContentPlatformApplicationValidator.GetPageSpecParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getPageSpec + * @summary: Get page spec + * @description: Use this API to get the specifications of a page, such as page type, display name, params and query. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPageSpec/). */ - async getInjectableTags( - { all, requestHeaders } = { requestHeaders: {} }, + async getPageSpec( + { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getInjectableTags().validate( - { - all, - }, + } = ContentPlatformApplicationValidator.getPageSpec().validate( + {}, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -2982,26 +5604,23 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getInjectableTags().validate( - { - all, - }, + } = ContentPlatformApplicationValidator.getPageSpec().validate( + {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getInjectableTags \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getPageSpec \n ${warrning}`, }); } const query_params = {}; - query_params["all"] = all; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/spec`, query_params, undefined, requestHeaders, @@ -3015,7 +5634,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.TagsSchema().validate(responseData, { + } = ContentPlatformModel.PageSpec().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3026,7 +5645,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getInjectableTags \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getPageSpec \n ${res_error}`, }); } } @@ -3035,21 +5654,19 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetPagesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getLandingPages - * @summary: Get landing pages - * @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch a list of landing pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getLandingPages/). + * @returns {Promise} - Success response + * @name getPages + * @summary: Get a list of pages + * @description: Use this API to retrieve a list of pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPages/). */ - async getLandingPages( + async getPages( { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ContentPlatformApplicationValidator.getLandingPages().validate( + const { error } = ContentPlatformApplicationValidator.getPages().validate( { pageNo, pageSize, @@ -3063,7 +5680,7 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getLandingPages().validate( + } = ContentPlatformApplicationValidator.getPages().validate( { pageNo, pageSize, @@ -3073,7 +5690,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getLandingPages \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getPages \n ${warrning}`, }); } @@ -3084,7 +5701,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page/`, + `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/pages/`, query_params, undefined, requestHeaders, @@ -3098,7 +5715,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.LandingPageGetResponse().validate(responseData, { + } = ContentPlatformModel.PageGetResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3109,7 +5726,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getLandingPages \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getPages \n ${res_error}`, }); } } @@ -3125,17 +5742,17 @@ class Content { * created within a business account. * @param {number} [arg.pageSize] - The number of items to retrieve in each * page. Default value is 10. - * @returns {Paginator} - * @summary: Get landing pages - * @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch a list of landing pages. + * @returns {Paginator} + * @summary: Get a list of pages + * @description: Use this API to retrieve a list of pages. */ - getLandingPagesPaginator({ companyId, applicationId, pageSize } = {}) { + getPagesPaginator({ companyId, applicationId, pageSize } = {}) { const paginator = new Paginator(); const callback = async () => { const pageId = paginator.nextId; const pageNo = paginator.pageNo; const pageType = "number"; - const data = await this.getLandingPages({ + const data = await this.getPages({ companyId: companyId, applicationId: applicationId, pageNo: pageNo, @@ -3152,24 +5769,26 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetLegalInformationParam} arg + * @param {ContentPlatformApplicationValidator.GetPathRedirectionRuleParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getLegalInformation - * @summary: Get legal information - * @description: Use this API to get the legal information of an application, which includes Policy, Terms and Conditions, Shipping Policy and FAQ regarding the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getLegalInformation/). + * @returns {Promise} - Success response + * @name getPathRedirectionRule + * @summary: Get path based redirection rule + * @description: Use this API to get path based redirection rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPathRedirectionRule/). */ - async getLegalInformation( - { requestHeaders } = { requestHeaders: {} }, + async getPathRedirectionRule( + { pathId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getLegalInformation().validate( - {}, + } = ContentPlatformApplicationValidator.getPathRedirectionRule().validate( + { + pathId, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -3179,14 +5798,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getLegalInformation().validate( - {}, + } = ContentPlatformApplicationValidator.getPathRedirectionRule().validate( + { + pathId, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getLegalInformation \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getPathRedirectionRule \n ${warrning}`, }); } @@ -3195,7 +5816,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/legal`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/path-mappings/${pathId}`, query_params, undefined, requestHeaders, @@ -3209,7 +5830,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.ApplicationLegal().validate(responseData, { + } = ContentPlatformModel.PathMappingSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3220,7 +5841,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getLegalInformation \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getPathRedirectionRule \n ${res_error}`, }); } } @@ -3229,26 +5850,26 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetNavigationBySlugParam} arg + * @param {ContentPlatformApplicationValidator.GetPathRedirectionRulesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getNavigationBySlug - * @summary: Get a navigation by slug - * @description: Use this API to retrieve a navigation by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getNavigationBySlug/). + * @returns {Promise} - Success response + * @name getPathRedirectionRules + * @summary: Get path based redirection rules + * @description: Use this API to get path based redirection rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPathRedirectionRules/). */ - async getNavigationBySlug( - { slug, devicePlatform, requestHeaders } = { requestHeaders: {} }, + async getPathRedirectionRules( + { pageSize, pageNo, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getNavigationBySlug().validate( + } = ContentPlatformApplicationValidator.getPathRedirectionRules().validate( { - slug, - devicePlatform, + pageSize, + pageNo, }, { abortEarly: false, allowUnknown: true } ); @@ -3259,27 +5880,28 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getNavigationBySlug().validate( + } = ContentPlatformApplicationValidator.getPathRedirectionRules().validate( { - slug, - devicePlatform, + pageSize, + pageNo, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getNavigationBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getPathRedirectionRules \n ${warrning}`, }); } const query_params = {}; - query_params["device_platform"] = devicePlatform; + query_params["page_size"] = pageSize; + query_params["page_no"] = pageNo; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/path-mappings`, query_params, undefined, requestHeaders, @@ -3293,7 +5915,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.NavigationSchema().validate(responseData, { + } = ContentPlatformModel.PathMappingSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3304,7 +5926,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getNavigationBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getPathRedirectionRules \n ${res_error}`, }); } } @@ -3313,28 +5935,24 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetNavigationsParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetSEOConfigurationParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getNavigations - * @summary: Get navigations - * @description: Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the orientation, links, sub-navigations, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getNavigations/). + * @returns {Promise} - Success response + * @name getSEOConfiguration + * @summary: Get SEO configuration of an application + * @description: Use this API to know how the SEO is configured in the application. This includes the sitemap, robot.txt, custom meta tags, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSEOConfiguration/). */ - async getNavigations( - { devicePlatform, pageNo, pageSize, requestHeaders } = { - requestHeaders: {}, - }, + async getSEOConfiguration( + { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getNavigations().validate( - { - devicePlatform, - pageNo, - pageSize, - }, + } = ContentPlatformApplicationValidator.getSEOConfiguration().validate( + {}, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -3344,30 +5962,23 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getNavigations().validate( - { - devicePlatform, - pageNo, - pageSize, - }, + } = ContentPlatformApplicationValidator.getSEOConfiguration().validate( + {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getNavigations \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getSEOConfiguration \n ${warrning}`, }); } const query_params = {}; - query_params["device_platform"] = devicePlatform; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations/`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo`, query_params, undefined, requestHeaders, @@ -3381,7 +5992,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.NavigationGetResponse().validate(responseData, { + } = ContentPlatformModel.SeoComponent().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3392,7 +6003,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getNavigations \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getSEOConfiguration \n ${res_error}`, }); } } @@ -3401,65 +6012,25 @@ class Content { } /** - * @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 navigations by platform. - * Acceptable values are: web, android, ios, all - * @param {number} [arg.pageSize] - The number of items to retrieve in each - * page. Default value is 10. - * @returns {Paginator} - * @summary: Get navigations - * @description: Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the orientation, links, sub-navigations, etc. - */ - getNavigationsPaginator({ - 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.getNavigations({ - 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.GetPageBySlugParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetSEOMarkupSchemaParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPageBySlug - * @summary: Get page by slug - * @description: Use this API to retrieve the components of a page, such as its title, seo, publish status, feature image, tags, schedule, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPageBySlug/). + * @returns {Promise} - Success response + * @name getSEOMarkupSchema + * @summary: Get a particular SEO Markup schema of an application using its id + * @description: Use this API to get a existing SEO Markup schema an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSEOMarkupSchema/). */ - async getPageBySlug( - { slug, requestHeaders } = { requestHeaders: {} }, + async getSEOMarkupSchema( + { id, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getPageBySlug().validate( + } = ContentPlatformApplicationValidator.getSEOMarkupSchema().validate( { - slug, + id, }, { abortEarly: false, allowUnknown: true } ); @@ -3470,16 +6041,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getPageBySlug().validate( + } = ContentPlatformApplicationValidator.getSEOMarkupSchema().validate( { - slug, + id, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getPageBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getSEOMarkupSchema \n ${warrning}`, }); } @@ -3488,7 +6059,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/pages/${slug}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema/${id}`, query_params, undefined, requestHeaders, @@ -3502,7 +6073,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PageSchema().validate(responseData, { + } = ContentPlatformModel.SEOSchemaMarkupTemplate().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3513,7 +6084,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getPageBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getSEOMarkupSchema \n ${res_error}`, }); } } @@ -3522,22 +6093,31 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetPageMetaParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetSEOMarkupSchemasParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPageMeta - * @summary: Get page meta - * @description: Use this API to get the meta of custom pages (blog, page) and default system pages (e.g. home/brand/category/collection). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPageMeta/). + * @returns {Promise} - Success response + * @name getSEOMarkupSchemas + * @summary: Get SEO Markup schemas of an application + * @description: Use this API to get all SEO Markup schema Templates setup for an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSEOMarkupSchemas/). */ - async getPageMeta( - { requestHeaders } = { requestHeaders: {} }, + async getSEOMarkupSchemas( + { title, active, pageNo, pageSize, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getPageMeta().validate( - {}, + } = ContentPlatformApplicationValidator.getSEOMarkupSchemas().validate( + { + title, + active, + pageNo, + pageSize, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -3547,23 +6127,32 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getPageMeta().validate( - {}, + } = ContentPlatformApplicationValidator.getSEOMarkupSchemas().validate( + { + title, + active, + pageNo, + pageSize, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getPageMeta \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getSEOMarkupSchemas \n ${warrning}`, }); } const query_params = {}; + query_params["title"] = title; + query_params["active"] = active; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/meta`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema`, query_params, undefined, requestHeaders, @@ -3577,7 +6166,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PageMetaSchema().validate(responseData, { + } = ContentPlatformModel.SeoSchemaComponent().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3588,7 +6177,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getPageMeta \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getSEOMarkupSchemas \n ${res_error}`, }); } } @@ -3597,22 +6186,27 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetPageSpecParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetSlideshowBySlugParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPageSpec - * @summary: Get page spec - * @description: Use this API to get the specifications of a page, such as page type, display name, params and query. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPageSpec/). + * @returns {Promise} - Success response + * @name getSlideshowBySlug + * @summary: Get slideshow by slug + * @description: Use this API to retrieve the details of a slideshow by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshowBySlug/). */ - async getPageSpec( - { requestHeaders } = { requestHeaders: {} }, + async getSlideshowBySlug( + { slug, devicePlatform, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getPageSpec().validate( - {}, + } = ContentPlatformApplicationValidator.getSlideshowBySlug().validate( + { + slug, + devicePlatform, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -3622,23 +6216,27 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getPageSpec().validate( - {}, + } = ContentPlatformApplicationValidator.getSlideshowBySlug().validate( + { + slug, + devicePlatform, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getPageSpec \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getSlideshowBySlug \n ${warrning}`, }); } const query_params = {}; + query_params["device_platform"] = devicePlatform; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/spec`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${slug}`, query_params, undefined, requestHeaders, @@ -3652,7 +6250,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PageSpec().validate(responseData, { + } = ContentPlatformModel.SlideshowSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3663,7 +6261,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getPageSpec \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getSlideshowBySlug \n ${res_error}`, }); } } @@ -3672,20 +6270,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetPagesParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.GetSlideshowsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPages - * @summary: Get a list of pages - * @description: Use this API to retrieve a list of pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPages/). + * @returns {Promise} - Success response + * @name getSlideshows + * @summary: Get slideshows + * @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a list of slideshows. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshows/). */ - async getPages( - { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + async getSlideshows( + { devicePlatform, pageNo, pageSize, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ContentPlatformApplicationValidator.getPages().validate( + const { + error, + } = ContentPlatformApplicationValidator.getSlideshows().validate( { + devicePlatform, pageNo, pageSize, }, @@ -3698,8 +6301,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getPages().validate( + } = ContentPlatformApplicationValidator.getSlideshows().validate( { + devicePlatform, pageNo, pageSize, }, @@ -3708,18 +6312,19 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getPages \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getSlideshows \n ${warrning}`, }); } const query_params = {}; + query_params["device_platform"] = devicePlatform; 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}/pages/`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows`, query_params, undefined, requestHeaders, @@ -3733,7 +6338,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PageGetResponse().validate(responseData, { + } = ContentPlatformModel.SlideshowGetResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3744,7 +6349,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getPages \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getSlideshows \n ${res_error}`, }); } } @@ -3758,21 +6363,29 @@ class Content { * 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: Get a list of pages - * @description: Use this API to retrieve a list of pages. + * @returns {Paginator} + * @summary: Get slideshows + * @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a list of slideshows. */ - getPagesPaginator({ companyId, applicationId, pageSize } = {}) { + 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.getPages({ + const data = await this.getSlideshows({ companyId: companyId, applicationId: applicationId, + devicePlatform: devicePlatform, pageNo: pageNo, pageSize: pageSize, }); @@ -3787,26 +6400,24 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetPathRedirectionRuleParam} arg + * @param {ContentPlatformApplicationValidator.GetSupportInformationParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPathRedirectionRule - * @summary: Get path based redirection rule - * @description: Use this API to get path based redirection rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPathRedirectionRule/). + * @returns {Promise} - Success response + * @name getSupportInformation + * @summary: Get support information + * @description: Use this API to get the contact details for customer support, including emails and phone numbers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSupportInformation/). */ - async getPathRedirectionRule( - { pathId, requestHeaders } = { requestHeaders: {} }, + async getSupportInformation( + { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getPathRedirectionRule().validate( - { - pathId, - }, + } = ContentPlatformApplicationValidator.getSupportInformation().validate( + {}, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -3816,16 +6427,14 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getPathRedirectionRule().validate( - { - pathId, - }, + } = ContentPlatformApplicationValidator.getSupportInformation().validate( + {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getPathRedirectionRule \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > getSupportInformation \n ${warrning}`, }); } @@ -3834,7 +6443,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/path-mappings/${pathId}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/support`, query_params, undefined, requestHeaders, @@ -3848,7 +6457,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PathMappingSchema().validate(responseData, { + } = ContentPlatformModel.Support().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -3859,7 +6468,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getPathRedirectionRule \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > getSupportInformation \n ${res_error}`, }); } } @@ -3868,26 +6477,28 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetPathRedirectionRulesParam} arg + * @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPathRedirectionRules - * @summary: Get path based redirection rules - * @description: Use this API to get path based redirection rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPathRedirectionRules/). + * @returns {Promise} + * - Success response + * + * @name importAppCustomObjectEntries + * @summary: Bulk custom object entries upload + * @description: Use this API to upload custom object entries - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importAppCustomObjectEntries/). */ - async getPathRedirectionRules( - { pageSize, pageNo, requestHeaders } = { requestHeaders: {} }, + async importAppCustomObjectEntries( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getPathRedirectionRules().validate( + } = ContentPlatformApplicationValidator.importAppCustomObjectEntries().validate( { - pageSize, - pageNo, + definitionId, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -3898,30 +6509,28 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getPathRedirectionRules().validate( + } = ContentPlatformApplicationValidator.importAppCustomObjectEntries().validate( { - pageSize, - pageNo, + definitionId, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getPathRedirectionRules \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > importAppCustomObjectEntries \n ${warrning}`, }); } const query_params = {}; - query_params["page_size"] = pageSize; - query_params["page_no"] = pageNo; const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/path-mappings`, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/upload`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -3933,10 +6542,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.PathMappingSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomObjectEntryBulkUploadResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3944,7 +6553,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getPathRedirectionRules \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > importAppCustomObjectEntries \n ${res_error}`, }); } } @@ -3953,24 +6562,27 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetSEOConfigurationParam} arg + * @param {ContentPlatformApplicationValidator.RemoveInjectableTagParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getSEOConfiguration - * @summary: Get SEO configuration of an application - * @description: Use this API to know how the SEO is configured in the application. This includes the sitemap, robot.txt, custom meta tags, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSEOConfiguration/). + * @returns {Promise} - + * Success response + * @name removeInjectableTag + * @summary: Remove a tag + * @description: Use this API to delete an existing tag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/removeInjectableTag/). */ - async getSEOConfiguration( - { requestHeaders } = { requestHeaders: {} }, + async removeInjectableTag( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getSEOConfiguration().validate( - {}, + } = ContentPlatformApplicationValidator.removeInjectableTag().validate( + { + body, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -3980,14 +6592,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getSEOConfiguration().validate( - {}, + } = ContentPlatformApplicationValidator.removeInjectableTag().validate( + { + body, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getSEOConfiguration \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > removeInjectableTag \n ${warrning}`, }); } @@ -3995,10 +6609,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo`, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags/remove/handpicked`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -4010,7 +6624,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.SeoComponent().validate(responseData, { + } = ContentPlatformModel.TagDeleteSuccessResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4021,7 +6635,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getSEOConfiguration \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > removeInjectableTag \n ${res_error}`, }); } } @@ -4030,26 +6644,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetSlideshowBySlugParam} arg - * - Arg object - * + * @param {ContentPlatformApplicationValidator.ResetDataLoaderParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getSlideshowBySlug - * @summary: Get slideshow by slug - * @description: Use this API to retrieve the details of a slideshow by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshowBySlug/). + * @returns {Promise} - + * Success response + * @name resetDataLoader + * @summary: Reset a data loader by serive name and operation Id + * @description: Use this API to reselect a data loader. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/resetDataLoader/). */ - async getSlideshowBySlug( - { slug, devicePlatform, requestHeaders } = { requestHeaders: {} }, + async resetDataLoader( + { service, operationId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getSlideshowBySlug().validate( + } = ContentPlatformApplicationValidator.resetDataLoader().validate( { - slug, - devicePlatform, + service, + operationId, }, { abortEarly: false, allowUnknown: true } ); @@ -4060,27 +6673,26 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getSlideshowBySlug().validate( + } = ContentPlatformApplicationValidator.resetDataLoader().validate( { - slug, - devicePlatform, + service, + operationId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getSlideshowBySlug \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > resetDataLoader \n ${warrning}`, }); } const query_params = {}; - query_params["device_platform"] = devicePlatform; const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/${slug}`, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader/${service}/${operationId}/reset`, query_params, undefined, requestHeaders, @@ -4094,10 +6706,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.SlideshowSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.DataLoaderResetResponseSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4105,7 +6717,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getSlideshowBySlug \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > resetDataLoader \n ${res_error}`, }); } } @@ -4114,27 +6726,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.GetSlideshowsParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getSlideshows - * @summary: Get slideshows - * @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a list of slideshows. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSlideshows/). + * @returns {Promise} - Success response + * @name sampleAppCustomObjectBulkEntry + * @summary: download sample for custom object bulk entry + * @description: Use this api to get sample csv file - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleAppCustomObjectBulkEntry/). */ - async getSlideshows( - { devicePlatform, pageNo, pageSize, requestHeaders } = { - requestHeaders: {}, - }, + async sampleAppCustomObjectBulkEntry( + { definitionId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getSlideshows().validate( + } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntry().validate( { - devicePlatform, - pageNo, - pageSize, + definitionId, }, { abortEarly: false, allowUnknown: true } ); @@ -4145,30 +6755,25 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getSlideshows().validate( + } = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntry().validate( { - devicePlatform, - pageNo, - pageSize, + definitionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getSlideshows \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > sampleAppCustomObjectBulkEntry \n ${warrning}`, }); } const query_params = {}; - query_params["device_platform"] = devicePlatform; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/slideshows/`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/sample`, query_params, undefined, requestHeaders, @@ -4180,12 +6785,9 @@ class Content { responseData = response[0]; } - const { - error: res_error, - } = ContentPlatformModel.SlideshowGetResponse().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + const { error: res_error } = Joi.string() + .allow("") + .validate(responseData, { abortEarly: false, allowUnknown: true }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4193,7 +6795,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getSlideshows \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > sampleAppCustomObjectBulkEntry \n ${res_error}`, }); } } @@ -4202,66 +6804,25 @@ class Content { } /** - * @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: Get slideshows - * @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a list of 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 - * + * @param {ContentPlatformApplicationValidator.SelectDataLoaderParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getSupportInformation - * @summary: Get support information - * @description: Use this API to get the contact details for customer support, including emails and phone numbers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSupportInformation/). + * @returns {Promise} - + * Success response + * @name selectDataLoader + * @summary: Select a data loader by id + * @description: Use this API to select a data loader to be used in applications. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/selectDataLoader/). */ - async getSupportInformation( - { requestHeaders } = { requestHeaders: {} }, + async selectDataLoader( + { dataLoaderId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.getSupportInformation().validate( - {}, + } = ContentPlatformApplicationValidator.selectDataLoader().validate( + { + dataLoaderId, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -4271,14 +6832,16 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.getSupportInformation().validate( - {}, + } = ContentPlatformApplicationValidator.selectDataLoader().validate( + { + dataLoaderId, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > getSupportInformation \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > selectDataLoader \n ${warrning}`, }); } @@ -4286,8 +6849,8 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/support`, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader/${dataLoaderId}/select`, query_params, undefined, requestHeaders, @@ -4301,7 +6864,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.Support().validate(responseData, { + } = ContentPlatformModel.DataLoaderResponseSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4312,7 +6875,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > getSupportInformation \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > selectDataLoader \n ${res_error}`, }); } } @@ -4321,25 +6884,26 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.RemoveInjectableTagParam} arg + * @param {ContentPlatformApplicationValidator.UpdateAnnouncementParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name removeInjectableTag - * @summary: Remove a tag - * @description: Use this API to delete an existing tag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/removeInjectableTag/). + * @name updateAnnouncement + * @summary: Update an announcement + * @description: Use this API to edit an existing announcement and its details such as the target platform and pages on which it's applicable - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAnnouncement/). */ - async removeInjectableTag( - { body, requestHeaders } = { requestHeaders: {} }, + async updateAnnouncement( + { announcementId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.removeInjectableTag().validate( + } = ContentPlatformApplicationValidator.updateAnnouncement().validate( { + announcementId, body, }, { abortEarly: false, allowUnknown: true } @@ -4351,8 +6915,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.removeInjectableTag().validate( + } = ContentPlatformApplicationValidator.updateAnnouncement().validate( { + announcementId, body, }, { abortEarly: false, allowUnknown: false } @@ -4360,7 +6925,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > removeInjectableTag \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateAnnouncement \n ${warrning}`, }); } @@ -4369,7 +6934,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags/remove/handpicked`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`, query_params, body, requestHeaders, @@ -4383,7 +6948,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.TagDeleteSuccessResponse().validate(responseData, { + } = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4394,7 +6959,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > removeInjectableTag \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateAnnouncement \n ${res_error}`, }); } } @@ -4403,25 +6968,27 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.ResetDataLoaderParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.UpdateAnnouncementScheduleParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name resetDataLoader - * @summary: Reset a data loader by serive name and operation Id - * @description: Use this API to reselect a data loader. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/resetDataLoader/). + * @name updateAnnouncementSchedule + * @summary: Update the schedule and the publish status of an announcement + * @description: Use this API to edit the duration, i.e. start date-time and end date-time of an announcement. Moreover, you can enable/disable an announcement using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAnnouncementSchedule/). */ - async resetDataLoader( - { service, operationId, requestHeaders } = { requestHeaders: {} }, + async updateAnnouncementSchedule( + { announcementId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.resetDataLoader().validate( + } = ContentPlatformApplicationValidator.updateAnnouncementSchedule().validate( { - service, - operationId, + announcementId, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -4432,17 +6999,17 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.resetDataLoader().validate( + } = ContentPlatformApplicationValidator.updateAnnouncementSchedule().validate( { - service, - operationId, + announcementId, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > resetDataLoader \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateAnnouncementSchedule \n ${warrning}`, }); } @@ -4450,10 +7017,10 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "put", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader/${service}/${operationId}/reset`, + "patch", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -4465,10 +7032,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.DataLoaderResetResponseSchema().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4476,7 +7043,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > resetDataLoader \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateAnnouncementSchedule \n ${res_error}`, }); } } @@ -4485,24 +7052,28 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.SelectDataLoaderParam} arg - Arg object + * @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name selectDataLoader - * @summary: Select a data loader by id - * @description: Use this API to select a data loader to be used in applications. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/selectDataLoader/). + * @returns {Promise} + * - Success response + * + * @name updateAppCustomFieldDefinition + * @summary: Update custom field definition + * @description: Use this API to update a custom field definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldDefinition/). */ - async selectDataLoader( - { dataLoaderId, requestHeaders } = { requestHeaders: {} }, + async updateAppCustomFieldDefinition( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.selectDataLoader().validate( + } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinition().validate( { - dataLoaderId, + definitionId, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -4513,16 +7084,17 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.selectDataLoader().validate( + } = ContentPlatformApplicationValidator.updateAppCustomFieldDefinition().validate( { - dataLoaderId, + definitionId, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > selectDataLoader \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldDefinition \n ${warrning}`, }); } @@ -4531,9 +7103,9 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader/${dataLoaderId}/select`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${definitionId}`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -4545,10 +7117,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.DataLoaderResponseSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4556,7 +7128,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > selectDataLoader \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateAppCustomFieldDefinition \n ${res_error}`, }); } } @@ -4565,26 +7137,25 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.UpdateAnnouncementParam} 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 updateAnnouncement - * @summary: Update an announcement - * @description: Use this API to edit an existing announcement and its details such as the target platform and pages on which it's applicable - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAnnouncement/). + * @returns {Promise} - Success response + * @name updateAppCustomObject + * @summary: Update custom object details + * @description: Use this API to update a custom object detail for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObject/). */ - async updateAnnouncement( - { announcementId, body, requestHeaders } = { requestHeaders: {} }, + async updateAppCustomObject( + { metaobjectId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.updateAnnouncement().validate( + } = ContentPlatformApplicationValidator.updateAppCustomObject().validate( { - announcementId, + metaobjectId, body, }, { abortEarly: false, allowUnknown: true } @@ -4596,9 +7167,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.updateAnnouncement().validate( + } = ContentPlatformApplicationValidator.updateAppCustomObject().validate( { - announcementId, + metaobjectId, body, }, { abortEarly: false, allowUnknown: false } @@ -4606,7 +7177,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateAnnouncement \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateAppCustomObject \n ${warrning}`, }); } @@ -4615,7 +7186,7 @@ class Content { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`, + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${metaobjectId}`, query_params, body, requestHeaders, @@ -4629,7 +7200,7 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, { + } = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -4640,7 +7211,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > updateAnnouncement \n ${res_error}`, + message: `Response Validation Warnings for platform > Content > updateAppCustomObject \n ${res_error}`, }); } } @@ -4649,26 +7220,26 @@ class Content { } /** - * @param {ContentPlatformApplicationValidator.UpdateAnnouncementScheduleParam} arg + * @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name updateAnnouncementSchedule - * @summary: Update the schedule and the publish status of an announcement - * @description: Use this API to edit the duration, i.e. start date-time and end date-time of an announcement. Moreover, you can enable/disable an announcement using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAnnouncementSchedule/). + * @name updateAppCustomObjectDefinition + * @summary: Update custom object definition + * @description: Use this API to update a custom object definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectDefinition/). */ - async updateAnnouncementSchedule( - { announcementId, body, requestHeaders } = { requestHeaders: {} }, + async updateAppCustomObjectDefinition( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ContentPlatformApplicationValidator.updateAnnouncementSchedule().validate( + } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinition().validate( { - announcementId, + definitionId, body, }, { abortEarly: false, allowUnknown: true } @@ -4680,9 +7251,9 @@ class Content { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ContentPlatformApplicationValidator.updateAnnouncementSchedule().validate( + } = ContentPlatformApplicationValidator.updateAppCustomObjectDefinition().validate( { - announcementId, + definitionId, body, }, { abortEarly: false, allowUnknown: false } @@ -4690,7 +7261,7 @@ class Content { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Content > updateAnnouncementSchedule \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectDefinition \n ${warrning}`, }); } @@ -4698,8 +7269,8 @@ class Content { const response = await PlatformAPIClient.execute( this.config, - "patch", - `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${definitionId}`, query_params, body, requestHeaders, @@ -4713,10 +7284,10 @@ class Content { const { error: res_error, - } = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ContentPlatformModel.CustomObjectDefinitionSchema().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -4724,7 +7295,7 @@ class Content { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Content > updateAnnouncementSchedule \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 4220ee73b..f11a0bf00 100644 --- a/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +++ b/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts @@ -20,6 +20,24 @@ export = ContentPlatformApplicationValidator; * @typedef CreateAnnouncementParam * @property {ContentPlatformModel.AdminAnnouncementSchema} body */ +/** + * @typedef CreateAppCustomFieldByResourceIdParam + * @property {string} resource + * @property {string} resourceId + * @property {ContentPlatformModel.CustomFieldRequestSchema} body + */ +/** + * @typedef CreateAppCustomFieldDefinitionParam + * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body + */ +/** + * @typedef CreateAppCustomObjectParam + * @property {ContentPlatformModel.CustomObjectRequestSchema} body + */ +/** + * @typedef CreateAppCustomObjectDefinitionParam + * @property {ContentPlatformModel.CustomObjectDefinitionRequestSchema} body + */ /** * @typedef CreateBlogParam * @property {ContentPlatformModel.BlogRequest} body @@ -44,6 +62,10 @@ export = ContentPlatformApplicationValidator; * @typedef CreatePagePreviewParam * @property {ContentPlatformModel.PageRequest} body */ +/** + * @typedef CreateSEOMarkupSchemaParam + * @property {ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody} body + */ /** * @typedef CreateSlideshowParam * @property {ContentPlatformModel.SlideshowRequest} body @@ -52,6 +74,18 @@ export = ContentPlatformApplicationValidator; * @typedef DeleteAnnouncementParam * @property {string} announcementId - ID allotted to the announcement. */ +/** + * @typedef DeleteAppCustomFieldDefinitionParam + * @property {string} definitionId + */ +/** + * @typedef DeleteAppCustomObjectParam + * @property {string} metaobjectId + */ +/** + * @typedef DeleteAppCustomObjectDefinitionParam + * @property {string} definitionId + */ /** * @typedef DeleteBlogParam * @property {string} id - ID allotted to the blog. @@ -85,6 +119,11 @@ export = ContentPlatformApplicationValidator; * @typedef DeletePathRedirectionRulesParam * @property {string} pathId - ID allotted to the path redirection rule. */ +/** + * @typedef DeleteSEOMarkupSchemaParam + * @property {string} id - Alphanumeric ID allotted to a SEO Markup Schema + * Template created within a business. + */ /** * @typedef DeleteSlideshowParam * @property {string} id - ID allotted to the slideshow. @@ -99,6 +138,16 @@ export = ContentPlatformApplicationValidator; * @property {string} tagId - ID allotted to the tag. * @property {ContentPlatformModel.UpdateHandpickedSchema} body */ +/** + * @typedef EditSEOMarkupSchemaParam + * @property {string} id - Alphanumeric ID allotted to a SEO Markup Schema + * Template created within a business. + * @property {ContentPlatformModel.SEOSchemaMarkupTemplate} body + */ +/** + * @typedef ExportAppCustomObjectEntriesParam + * @property {string} definitionId + */ /** * @typedef GenerateSEOTitleParam * @property {ContentPlatformModel.GenerationEntityType} type - String @@ -117,6 +166,50 @@ export = ContentPlatformApplicationValidator; * @property {number} [pageSize] - The number of items to retrieve in each page. * Default value is 10. */ +/** + * @typedef GetAppCustomFieldDefinitionParam + * @property {string} definitionId + */ +/** + * @typedef GetAppCustomFieldDefinitionsParam + * @property {string} pageNo + * @property {string} pageSize + * @property {string} [resource] + * @property {string} [type] + * @property {string} [search] + */ +/** @typedef GetAppCustomFieldTypesParam */ +/** + * @typedef GetAppCustomFieldsParam + * @property {string} resource + */ +/** + * @typedef GetAppCustomFieldsByResourceIdParam + * @property {string} resource + * @property {string} resourceId + */ +/** + * @typedef GetAppCustomObjectParam + * @property {string} metaobjectId + */ +/** + * @typedef GetAppCustomObjectDefinitionParam + * @property {string} definitionId + */ +/** + * @typedef GetAppCustomObjectDefinitionsParam + * @property {string} pageNo + * @property {string} pageSize + * @property {string} [search] + */ +/** @typedef GetAppCustomObjectsParam */ +/** + * @typedef GetAppJobsParam + * @property {string} page + * @property {string} pageSize + * @property {string} actionType + */ +/** @typedef GetAppResourcesParam */ /** * @typedef GetBlogBySlugParam * @property {string} slug - A short, human-readable, URL-friendly identifier of @@ -135,7 +228,16 @@ export = ContentPlatformApplicationValidator; * a blog page. You can get slug value of a blog from `getBlogs` API. */ /** @typedef GetDataLoadersParam */ +/** + * @typedef GetDataLoadersByServiceParam + * @property {string} serviceName - Service name of the data loader.. + */ /** @typedef GetDefaultNavigationsParam */ +/** + * @typedef GetDefaultSEOMarkupSchemaParam + * @property {string} [pageType] - The type of page against which schema + * template was created + */ /** * @typedef GetFaqByIdOrSlugParam * @property {string} idOrSlug - ID or the slug allotted to an FAQ category. @@ -209,6 +311,20 @@ export = ContentPlatformApplicationValidator; * set of results. Default value is 1. */ /** @typedef GetSEOConfigurationParam */ +/** + * @typedef GetSEOMarkupSchemaParam + * @property {string} id - Alphanumeric ID allotted to a SEO Markup Schema + * Template created within a business. + */ +/** + * @typedef GetSEOMarkupSchemasParam + * @property {string} [title] - Title of the seo schema. + * @property {string} [active] - Boolean value for fetching seo schema. + * @property {number} [pageNo] - The page number to navigate through the given + * set of results. Default value is 1. + * @property {number} [pageSize] - The number of items to retrieve in each page. + * Default value is 10. + */ /** * @typedef GetSlideshowBySlugParam * @property {string} slug - A short, human-readable, URL-friendly identifier of @@ -226,6 +342,11 @@ export = ContentPlatformApplicationValidator; * Default value is 10. */ /** @typedef GetSupportInformationParam */ +/** + * @typedef ImportAppCustomObjectEntriesParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomObjectBulkSchema} body + */ /** * @typedef RemoveInjectableTagParam * @property {ContentPlatformModel.RemoveHandpickedSchema} body @@ -235,6 +356,10 @@ export = ContentPlatformApplicationValidator; * @property {string} service - Name of service. * @property {string} operationId - Name of operation id of the service. */ +/** + * @typedef SampleAppCustomObjectBulkEntryParam + * @property {string} definitionId + */ /** * @typedef SelectDataLoaderParam * @property {string} dataLoaderId - ID allotted to the data loader. @@ -249,6 +374,21 @@ export = ContentPlatformApplicationValidator; * @property {string} announcementId - ID allotted to the announcement. * @property {ContentPlatformModel.ScheduleSchema} body */ +/** + * @typedef UpdateAppCustomFieldDefinitionParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body + */ +/** + * @typedef UpdateAppCustomObjectParam + * @property {string} metaobjectId + * @property {ContentPlatformModel.CustomObjectRequestSchema} body + */ +/** + * @typedef UpdateAppCustomObjectDefinitionParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema} body + */ /** * @typedef UpdateBlogParam * @property {string} id - ID allotted to the blog. @@ -323,6 +463,14 @@ declare class ContentPlatformApplicationValidator { static addPathRedirectionRules(): AddPathRedirectionRulesParam; /** @returns {CreateAnnouncementParam} */ static createAnnouncement(): CreateAnnouncementParam; + /** @returns {CreateAppCustomFieldByResourceIdParam} */ + static createAppCustomFieldByResourceId(): CreateAppCustomFieldByResourceIdParam; + /** @returns {CreateAppCustomFieldDefinitionParam} */ + static createAppCustomFieldDefinition(): CreateAppCustomFieldDefinitionParam; + /** @returns {CreateAppCustomObjectParam} */ + static createAppCustomObject(): CreateAppCustomObjectParam; + /** @returns {CreateAppCustomObjectDefinitionParam} */ + static createAppCustomObjectDefinition(): CreateAppCustomObjectDefinitionParam; /** @returns {CreateBlogParam} */ static createBlog(): CreateBlogParam; /** @returns {CreateFaqCategoryParam} */ @@ -335,10 +483,18 @@ declare class ContentPlatformApplicationValidator { static createPage(): CreatePageParam; /** @returns {CreatePagePreviewParam} */ static createPagePreview(): CreatePagePreviewParam; + /** @returns {CreateSEOMarkupSchemaParam} */ + static createSEOMarkupSchema(): CreateSEOMarkupSchemaParam; /** @returns {CreateSlideshowParam} */ static createSlideshow(): CreateSlideshowParam; /** @returns {DeleteAnnouncementParam} */ static deleteAnnouncement(): DeleteAnnouncementParam; + /** @returns {DeleteAppCustomFieldDefinitionParam} */ + static deleteAppCustomFieldDefinition(): DeleteAppCustomFieldDefinitionParam; + /** @returns {DeleteAppCustomObjectParam} */ + static deleteAppCustomObject(): DeleteAppCustomObjectParam; + /** @returns {DeleteAppCustomObjectDefinitionParam} */ + static deleteAppCustomObjectDefinition(): DeleteAppCustomObjectDefinitionParam; /** @returns {DeleteBlogParam} */ static deleteBlog(): DeleteBlogParam; /** @returns {DeleteDataLoaderParam} */ @@ -355,18 +511,46 @@ declare class ContentPlatformApplicationValidator { static deletePage(): DeletePageParam; /** @returns {DeletePathRedirectionRulesParam} */ static deletePathRedirectionRules(): DeletePathRedirectionRulesParam; + /** @returns {DeleteSEOMarkupSchemaParam} */ + static deleteSEOMarkupSchema(): DeleteSEOMarkupSchemaParam; /** @returns {DeleteSlideshowParam} */ static deleteSlideshow(): DeleteSlideshowParam; /** @returns {EditDataLoaderParam} */ static editDataLoader(): EditDataLoaderParam; /** @returns {EditInjectableTagParam} */ static editInjectableTag(): EditInjectableTagParam; + /** @returns {EditSEOMarkupSchemaParam} */ + static editSEOMarkupSchema(): EditSEOMarkupSchemaParam; + /** @returns {ExportAppCustomObjectEntriesParam} */ + static exportAppCustomObjectEntries(): ExportAppCustomObjectEntriesParam; /** @returns {GenerateSEOTitleParam} */ static generateSEOTitle(): GenerateSEOTitleParam; /** @returns {GetAnnouncementByIdParam} */ static getAnnouncementById(): GetAnnouncementByIdParam; /** @returns {GetAnnouncementsListParam} */ static getAnnouncementsList(): GetAnnouncementsListParam; + /** @returns {GetAppCustomFieldDefinitionParam} */ + static getAppCustomFieldDefinition(): GetAppCustomFieldDefinitionParam; + /** @returns {GetAppCustomFieldDefinitionsParam} */ + static getAppCustomFieldDefinitions(): GetAppCustomFieldDefinitionsParam; + /** @returns {GetAppCustomFieldTypesParam} */ + static getAppCustomFieldTypes(): any; + /** @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 {GetAppCustomObjectsParam} */ + static getAppCustomObjects(): any; + /** @returns {GetAppJobsParam} */ + static getAppJobs(): GetAppJobsParam; + /** @returns {GetAppResourcesParam} */ + static getAppResources(): any; /** @returns {GetBlogBySlugParam} */ static getBlogBySlug(): GetBlogBySlugParam; /** @returns {GetBlogsParam} */ @@ -375,8 +559,12 @@ declare class ContentPlatformApplicationValidator { static getComponentById(): GetComponentByIdParam; /** @returns {GetDataLoadersParam} */ static getDataLoaders(): any; + /** @returns {GetDataLoadersByServiceParam} */ + static getDataLoadersByService(): GetDataLoadersByServiceParam; /** @returns {GetDefaultNavigationsParam} */ static getDefaultNavigations(): any; + /** @returns {GetDefaultSEOMarkupSchemaParam} */ + static getDefaultSEOMarkupSchema(): GetDefaultSEOMarkupSchemaParam; /** @returns {GetFaqByIdOrSlugParam} */ static getFaqByIdOrSlug(): GetFaqByIdOrSlugParam; /** @returns {GetFaqCategoriesParam} */ @@ -409,22 +597,36 @@ declare class ContentPlatformApplicationValidator { static getPathRedirectionRules(): GetPathRedirectionRulesParam; /** @returns {GetSEOConfigurationParam} */ static getSEOConfiguration(): any; + /** @returns {GetSEOMarkupSchemaParam} */ + static getSEOMarkupSchema(): GetSEOMarkupSchemaParam; + /** @returns {GetSEOMarkupSchemasParam} */ + static getSEOMarkupSchemas(): GetSEOMarkupSchemasParam; /** @returns {GetSlideshowBySlugParam} */ static getSlideshowBySlug(): GetSlideshowBySlugParam; /** @returns {GetSlideshowsParam} */ static getSlideshows(): GetSlideshowsParam; /** @returns {GetSupportInformationParam} */ static getSupportInformation(): any; + /** @returns {ImportAppCustomObjectEntriesParam} */ + static importAppCustomObjectEntries(): ImportAppCustomObjectEntriesParam; /** @returns {RemoveInjectableTagParam} */ static removeInjectableTag(): RemoveInjectableTagParam; /** @returns {ResetDataLoaderParam} */ static resetDataLoader(): ResetDataLoaderParam; + /** @returns {SampleAppCustomObjectBulkEntryParam} */ + static sampleAppCustomObjectBulkEntry(): SampleAppCustomObjectBulkEntryParam; /** @returns {SelectDataLoaderParam} */ static selectDataLoader(): SelectDataLoaderParam; /** @returns {UpdateAnnouncementParam} */ static updateAnnouncement(): UpdateAnnouncementParam; /** @returns {UpdateAnnouncementScheduleParam} */ static updateAnnouncementSchedule(): UpdateAnnouncementScheduleParam; + /** @returns {UpdateAppCustomFieldDefinitionParam} */ + static updateAppCustomFieldDefinition(): UpdateAppCustomFieldDefinitionParam; + /** @returns {UpdateAppCustomObjectParam} */ + static updateAppCustomObject(): UpdateAppCustomObjectParam; + /** @returns {UpdateAppCustomObjectDefinitionParam} */ + static updateAppCustomObjectDefinition(): UpdateAppCustomObjectDefinitionParam; /** @returns {UpdateBlogParam} */ static updateBlog(): UpdateBlogParam; /** @returns {UpdateFaqParam} */ @@ -453,7 +655,7 @@ declare class ContentPlatformApplicationValidator { static updateSupportInformation(): UpdateSupportInformationParam; } declare namespace ContentPlatformApplicationValidator { - export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreatePagePreviewParam, CreateSlideshowParam, DeleteAnnouncementParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSlideshowParam, EditDataLoaderParam, EditInjectableTagParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetBlogBySlugParam, GetBlogsParam, GetComponentByIdParam, GetDataLoadersParam, GetDefaultNavigationsParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSlideshowBySlugParam, GetSlideshowsParam, GetSupportInformationParam, RemoveInjectableTagParam, ResetDataLoaderParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, 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, GetComponentByIdParam, 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; @@ -474,6 +676,20 @@ type AddPathRedirectionRulesParam = { type CreateAnnouncementParam = { body: ContentPlatformModel.AdminAnnouncementSchema; }; +type CreateAppCustomFieldByResourceIdParam = { + resource: string; + resourceId: string; + body: ContentPlatformModel.CustomFieldRequestSchema; +}; +type CreateAppCustomFieldDefinitionParam = { + body: ContentPlatformModel.CustomFieldDefinitionRequestSchema; +}; +type CreateAppCustomObjectParam = { + body: ContentPlatformModel.CustomObjectRequestSchema; +}; +type CreateAppCustomObjectDefinitionParam = { + body: ContentPlatformModel.CustomObjectDefinitionRequestSchema; +}; type CreateBlogParam = { body: ContentPlatformModel.BlogRequest; }; @@ -492,6 +708,9 @@ type CreatePageParam = { type CreatePagePreviewParam = { body: ContentPlatformModel.PageRequest; }; +type CreateSEOMarkupSchemaParam = { + body: ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody; +}; type CreateSlideshowParam = { body: ContentPlatformModel.SlideshowRequest; }; @@ -501,6 +720,15 @@ type DeleteAnnouncementParam = { */ announcementId: string; }; +type DeleteAppCustomFieldDefinitionParam = { + definitionId: string; +}; +type DeleteAppCustomObjectParam = { + metaobjectId: string; +}; +type DeleteAppCustomObjectDefinitionParam = { + definitionId: string; +}; type DeleteBlogParam = { /** * - ID allotted to the blog. @@ -553,6 +781,13 @@ type DeletePathRedirectionRulesParam = { */ pathId: string; }; +type DeleteSEOMarkupSchemaParam = { + /** + * - Alphanumeric ID allotted to a SEO Markup Schema + * Template created within a business. + */ + id: string; +}; type DeleteSlideshowParam = { /** * - ID allotted to the slideshow. @@ -573,6 +808,17 @@ type EditInjectableTagParam = { tagId: string; body: ContentPlatformModel.UpdateHandpickedSchema; }; +type EditSEOMarkupSchemaParam = { + /** + * - Alphanumeric ID allotted to a SEO Markup Schema + * Template created within a business. + */ + id: string; + body: ContentPlatformModel.SEOSchemaMarkupTemplate; +}; +type ExportAppCustomObjectEntriesParam = { + definitionId: string; +}; type GenerateSEOTitleParam = { /** * - String @@ -600,6 +846,39 @@ type GetAnnouncementsListParam = { */ pageSize?: number; }; +type GetAppCustomFieldDefinitionParam = { + definitionId: string; +}; +type GetAppCustomFieldDefinitionsParam = { + pageNo: string; + pageSize: string; + resource?: string; + type?: string; + search?: string; +}; +type GetAppCustomFieldsParam = { + resource: string; +}; +type GetAppCustomFieldsByResourceIdParam = { + resource: string; + resourceId: string; +}; +type GetAppCustomObjectParam = { + metaobjectId: string; +}; +type GetAppCustomObjectDefinitionParam = { + definitionId: string; +}; +type GetAppCustomObjectDefinitionsParam = { + pageNo: string; + pageSize: string; + search?: string; +}; +type GetAppJobsParam = { + page: string; + pageSize: string; + actionType: string; +}; type GetBlogBySlugParam = { /** * - A short, human-readable, URL-friendly identifier of @@ -626,6 +905,19 @@ type GetComponentByIdParam = { */ slug: string; }; +type GetDataLoadersByServiceParam = { + /** + * - Service name of the data loader.. + */ + serviceName: string; +}; +type GetDefaultSEOMarkupSchemaParam = { + /** + * - The type of page against which schema + * template was created + */ + pageType?: string; +}; type GetFaqByIdOrSlugParam = { /** * - ID or the slug allotted to an FAQ category. @@ -734,6 +1026,33 @@ type GetPathRedirectionRulesParam = { */ pageNo?: number; }; +type GetSEOMarkupSchemaParam = { + /** + * - Alphanumeric ID allotted to a SEO Markup Schema + * Template created within a business. + */ + id: string; +}; +type GetSEOMarkupSchemasParam = { + /** + * - Title of the seo schema. + */ + title?: string; + /** + * - Boolean value for fetching seo schema. + */ + active?: string; + /** + * - The page number to navigate through the given + * set of results. Default value is 1. + */ + pageNo?: number; + /** + * - The number of items to retrieve in each page. + * Default value is 10. + */ + pageSize?: number; +}; type GetSlideshowBySlugParam = { /** * - A short, human-readable, URL-friendly identifier of @@ -763,6 +1082,10 @@ type GetSlideshowsParam = { */ pageSize?: number; }; +type ImportAppCustomObjectEntriesParam = { + definitionId: string; + body: ContentPlatformModel.CustomObjectBulkSchema; +}; type RemoveInjectableTagParam = { body: ContentPlatformModel.RemoveHandpickedSchema; }; @@ -776,6 +1099,9 @@ type ResetDataLoaderParam = { */ operationId: string; }; +type SampleAppCustomObjectBulkEntryParam = { + definitionId: string; +}; type SelectDataLoaderParam = { /** * - ID allotted to the data loader. @@ -796,6 +1122,18 @@ type UpdateAnnouncementScheduleParam = { announcementId: string; body: ContentPlatformModel.ScheduleSchema; }; +type UpdateAppCustomFieldDefinitionParam = { + definitionId: string; + body: ContentPlatformModel.CustomFieldDefinitionRequestSchema; +}; +type UpdateAppCustomObjectParam = { + metaobjectId: string; + body: ContentPlatformModel.CustomObjectRequestSchema; +}; +type UpdateAppCustomObjectDefinitionParam = { + definitionId: string; + body: ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema; +}; type UpdateBlogParam = { /** * - ID allotted to the blog. @@ -876,6 +1214,9 @@ type UpdateSlideshowParam = { type UpdateSupportInformationParam = { body: ContentPlatformModel.Support; }; +type GetAppCustomFieldTypesParam = any; +type GetAppCustomObjectsParam = any; +type GetAppResourcesParam = any; type GetDataLoadersParam = any; type GetDefaultNavigationsParam = any; type GetFaqCategoriesParam = any; diff --git a/sdk/platform/Content/ContentPlatformApplicationValidator.js b/sdk/platform/Content/ContentPlatformApplicationValidator.js index fbec7dfb7..9d1225ad9 100644 --- a/sdk/platform/Content/ContentPlatformApplicationValidator.js +++ b/sdk/platform/Content/ContentPlatformApplicationValidator.js @@ -28,6 +28,28 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * @property {ContentPlatformModel.AdminAnnouncementSchema} body */ +/** + * @typedef CreateAppCustomFieldByResourceIdParam + * @property {string} resource + * @property {string} resourceId + * @property {ContentPlatformModel.CustomFieldRequestSchema} body + */ + +/** + * @typedef CreateAppCustomFieldDefinitionParam + * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body + */ + +/** + * @typedef CreateAppCustomObjectParam + * @property {ContentPlatformModel.CustomObjectRequestSchema} body + */ + +/** + * @typedef CreateAppCustomObjectDefinitionParam + * @property {ContentPlatformModel.CustomObjectDefinitionRequestSchema} body + */ + /** * @typedef CreateBlogParam * @property {ContentPlatformModel.BlogRequest} body @@ -58,6 +80,11 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * @property {ContentPlatformModel.PageRequest} body */ +/** + * @typedef CreateSEOMarkupSchemaParam + * @property {ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody} body + */ + /** * @typedef CreateSlideshowParam * @property {ContentPlatformModel.SlideshowRequest} body @@ -68,6 +95,21 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * @property {string} announcementId - ID allotted to the announcement. */ +/** + * @typedef DeleteAppCustomFieldDefinitionParam + * @property {string} definitionId + */ + +/** + * @typedef DeleteAppCustomObjectParam + * @property {string} metaobjectId + */ + +/** + * @typedef DeleteAppCustomObjectDefinitionParam + * @property {string} definitionId + */ + /** * @typedef DeleteBlogParam * @property {string} id - ID allotted to the blog. @@ -109,6 +151,12 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * @property {string} pathId - ID allotted to the path redirection rule. */ +/** + * @typedef DeleteSEOMarkupSchemaParam + * @property {string} id - Alphanumeric ID allotted to a SEO Markup Schema + * Template created within a business. + */ + /** * @typedef DeleteSlideshowParam * @property {string} id - ID allotted to the slideshow. @@ -126,6 +174,18 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * @property {ContentPlatformModel.UpdateHandpickedSchema} body */ +/** + * @typedef EditSEOMarkupSchemaParam + * @property {string} id - Alphanumeric ID allotted to a SEO Markup Schema + * Template created within a business. + * @property {ContentPlatformModel.SEOSchemaMarkupTemplate} body + */ + +/** + * @typedef ExportAppCustomObjectEntriesParam + * @property {string} definitionId + */ + /** * @typedef GenerateSEOTitleParam * @property {ContentPlatformModel.GenerationEntityType} type - String @@ -147,6 +207,61 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * Default value is 10. */ +/** + * @typedef GetAppCustomFieldDefinitionParam + * @property {string} definitionId + */ + +/** + * @typedef GetAppCustomFieldDefinitionsParam + * @property {string} pageNo + * @property {string} pageSize + * @property {string} [resource] + * @property {string} [type] + * @property {string} [search] + */ + +/** @typedef GetAppCustomFieldTypesParam */ + +/** + * @typedef GetAppCustomFieldsParam + * @property {string} resource + */ + +/** + * @typedef GetAppCustomFieldsByResourceIdParam + * @property {string} resource + * @property {string} resourceId + */ + +/** + * @typedef GetAppCustomObjectParam + * @property {string} metaobjectId + */ + +/** + * @typedef GetAppCustomObjectDefinitionParam + * @property {string} definitionId + */ + +/** + * @typedef GetAppCustomObjectDefinitionsParam + * @property {string} pageNo + * @property {string} pageSize + * @property {string} [search] + */ + +/** @typedef GetAppCustomObjectsParam */ + +/** + * @typedef GetAppJobsParam + * @property {string} page + * @property {string} pageSize + * @property {string} actionType + */ + +/** @typedef GetAppResourcesParam */ + /** * @typedef GetBlogBySlugParam * @property {string} slug - A short, human-readable, URL-friendly identifier of @@ -169,8 +284,19 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** @typedef GetDataLoadersParam */ +/** + * @typedef GetDataLoadersByServiceParam + * @property {string} serviceName - Service name of the data loader.. + */ + /** @typedef GetDefaultNavigationsParam */ +/** + * @typedef GetDefaultSEOMarkupSchemaParam + * @property {string} [pageType] - The type of page against which schema + * template was created + */ + /** * @typedef GetFaqByIdOrSlugParam * @property {string} idOrSlug - ID or the slug allotted to an FAQ category. @@ -260,6 +386,22 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** @typedef GetSEOConfigurationParam */ +/** + * @typedef GetSEOMarkupSchemaParam + * @property {string} id - Alphanumeric ID allotted to a SEO Markup Schema + * Template created within a business. + */ + +/** + * @typedef GetSEOMarkupSchemasParam + * @property {string} [title] - Title of the seo schema. + * @property {string} [active] - Boolean value for fetching seo schema. + * @property {number} [pageNo] - The page number to navigate through the given + * set of results. Default value is 1. + * @property {number} [pageSize] - The number of items to retrieve in each page. + * Default value is 10. + */ + /** * @typedef GetSlideshowBySlugParam * @property {string} slug - A short, human-readable, URL-friendly identifier of @@ -280,6 +422,12 @@ const ContentPlatformModel = require("./ContentPlatformModel"); /** @typedef GetSupportInformationParam */ +/** + * @typedef ImportAppCustomObjectEntriesParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomObjectBulkSchema} body + */ + /** * @typedef RemoveInjectableTagParam * @property {ContentPlatformModel.RemoveHandpickedSchema} body @@ -291,6 +439,11 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * @property {string} operationId - Name of operation id of the service. */ +/** + * @typedef SampleAppCustomObjectBulkEntryParam + * @property {string} definitionId + */ + /** * @typedef SelectDataLoaderParam * @property {string} dataLoaderId - ID allotted to the data loader. @@ -308,6 +461,24 @@ const ContentPlatformModel = require("./ContentPlatformModel"); * @property {ContentPlatformModel.ScheduleSchema} body */ +/** + * @typedef UpdateAppCustomFieldDefinitionParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body + */ + +/** + * @typedef UpdateAppCustomObjectParam + * @property {string} metaobjectId + * @property {ContentPlatformModel.CustomObjectRequestSchema} body + */ + +/** + * @typedef UpdateAppCustomObjectDefinitionParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema} body + */ + /** * @typedef UpdateBlogParam * @property {string} id - ID allotted to the blog. @@ -421,6 +592,36 @@ 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({ + body: ContentPlatformModel.CustomFieldDefinitionRequestSchema().required(), + }).required(); + } + + /** @returns {CreateAppCustomObjectParam} */ + static createAppCustomObject() { + return Joi.object({ + body: ContentPlatformModel.CustomObjectRequestSchema().required(), + }).required(); + } + + /** @returns {CreateAppCustomObjectDefinitionParam} */ + static createAppCustomObjectDefinition() { + return Joi.object({ + body: ContentPlatformModel.CustomObjectDefinitionRequestSchema().required(), + }).required(); + } + /** @returns {CreateBlogParam} */ static createBlog() { return Joi.object({ @@ -463,6 +664,13 @@ class ContentPlatformApplicationValidator { }).required(); } + /** @returns {CreateSEOMarkupSchemaParam} */ + static createSEOMarkupSchema() { + return Joi.object({ + body: ContentPlatformModel.SEOSchemaMarkupTemplateRequestBody().required(), + }).required(); + } + /** @returns {CreateSlideshowParam} */ static createSlideshow() { return Joi.object({ @@ -477,6 +685,27 @@ class ContentPlatformApplicationValidator { }).required(); } + /** @returns {DeleteAppCustomFieldDefinitionParam} */ + static deleteAppCustomFieldDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {DeleteAppCustomObjectParam} */ + static deleteAppCustomObject() { + return Joi.object({ + metaobjectId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {DeleteAppCustomObjectDefinitionParam} */ + static deleteAppCustomObjectDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + /** @returns {DeleteBlogParam} */ static deleteBlog() { return Joi.object({ @@ -534,6 +763,13 @@ class ContentPlatformApplicationValidator { }).required(); } + /** @returns {DeleteSEOMarkupSchemaParam} */ + static deleteSEOMarkupSchema() { + return Joi.object({ + id: Joi.string().allow("").required(), + }).required(); + } + /** @returns {DeleteSlideshowParam} */ static deleteSlideshow() { return Joi.object({ @@ -557,6 +793,21 @@ class ContentPlatformApplicationValidator { }).required(); } + /** @returns {EditSEOMarkupSchemaParam} */ + static editSEOMarkupSchema() { + return Joi.object({ + id: Joi.string().allow("").required(), + body: ContentPlatformModel.SEOSchemaMarkupTemplate().required(), + }).required(); + } + + /** @returns {ExportAppCustomObjectEntriesParam} */ + static exportAppCustomObjectEntries() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + /** @returns {GenerateSEOTitleParam} */ static generateSEOTitle() { return Joi.object({ @@ -580,6 +831,86 @@ class ContentPlatformApplicationValidator { }).required(); } + /** @returns {GetAppCustomFieldDefinitionParam} */ + static getAppCustomFieldDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetAppCustomFieldDefinitionsParam} */ + static getAppCustomFieldDefinitions() { + return Joi.object({ + pageNo: Joi.string().allow("").required(), + pageSize: Joi.string().allow("").required(), + resource: Joi.string().allow(""), + type: Joi.string().allow(""), + search: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetAppCustomFieldTypesParam} */ + static getAppCustomFieldTypes() { + return Joi.object({}).required(); + } + + /** @returns {GetAppCustomFieldsParam} */ + static getAppCustomFields() { + return Joi.object({ + resource: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetAppCustomFieldsByResourceIdParam} */ + static getAppCustomFieldsByResourceId() { + return Joi.object({ + resource: Joi.string().allow("").required(), + resourceId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetAppCustomObjectParam} */ + static getAppCustomObject() { + return Joi.object({ + metaobjectId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetAppCustomObjectDefinitionParam} */ + static getAppCustomObjectDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetAppCustomObjectDefinitionsParam} */ + static getAppCustomObjectDefinitions() { + return Joi.object({ + pageNo: Joi.string().allow("").required(), + pageSize: Joi.string().allow("").required(), + search: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetAppCustomObjectsParam} */ + static getAppCustomObjects() { + return Joi.object({}).required(); + } + + /** @returns {GetAppJobsParam} */ + static getAppJobs() { + return Joi.object({ + page: Joi.string().allow("").required(), + pageSize: Joi.string().allow("").required(), + actionType: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetAppResourcesParam} */ + static getAppResources() { + return Joi.object({}).required(); + } + /** @returns {GetBlogBySlugParam} */ static getBlogBySlug() { return Joi.object({ @@ -607,11 +938,25 @@ class ContentPlatformApplicationValidator { return Joi.object({}).required(); } + /** @returns {GetDataLoadersByServiceParam} */ + static getDataLoadersByService() { + return Joi.object({ + serviceName: Joi.string().allow("").required(), + }).required(); + } + /** @returns {GetDefaultNavigationsParam} */ static getDefaultNavigations() { return Joi.object({}).required(); } + /** @returns {GetDefaultSEOMarkupSchemaParam} */ + static getDefaultSEOMarkupSchema() { + return Joi.object({ + pageType: Joi.string().allow(""), + }).required(); + } + /** @returns {GetFaqByIdOrSlugParam} */ static getFaqByIdOrSlug() { return Joi.object({ @@ -720,6 +1065,23 @@ class ContentPlatformApplicationValidator { return Joi.object({}).required(); } + /** @returns {GetSEOMarkupSchemaParam} */ + static getSEOMarkupSchema() { + return Joi.object({ + id: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetSEOMarkupSchemasParam} */ + static getSEOMarkupSchemas() { + return Joi.object({ + title: Joi.string().allow(""), + active: Joi.string().allow(""), + pageNo: Joi.number(), + pageSize: Joi.number(), + }).required(); + } + /** @returns {GetSlideshowBySlugParam} */ static getSlideshowBySlug() { return Joi.object({ @@ -742,6 +1104,14 @@ class ContentPlatformApplicationValidator { return Joi.object({}).required(); } + /** @returns {ImportAppCustomObjectEntriesParam} */ + static importAppCustomObjectEntries() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomObjectBulkSchema().required(), + }).required(); + } + /** @returns {RemoveInjectableTagParam} */ static removeInjectableTag() { return Joi.object({ @@ -757,6 +1127,13 @@ class ContentPlatformApplicationValidator { }).required(); } + /** @returns {SampleAppCustomObjectBulkEntryParam} */ + static sampleAppCustomObjectBulkEntry() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + /** @returns {SelectDataLoaderParam} */ static selectDataLoader() { return Joi.object({ @@ -780,6 +1157,30 @@ class ContentPlatformApplicationValidator { }).required(); } + /** @returns {UpdateAppCustomFieldDefinitionParam} */ + static updateAppCustomFieldDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomFieldDefinitionRequestSchema().required(), + }).required(); + } + + /** @returns {UpdateAppCustomObjectParam} */ + static updateAppCustomObject() { + return Joi.object({ + metaobjectId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomObjectRequestSchema().required(), + }).required(); + } + + /** @returns {UpdateAppCustomObjectDefinitionParam} */ + static updateAppCustomObjectDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema().required(), + }).required(); + } + /** @returns {UpdateBlogParam} */ static updateBlog() { return Joi.object({ diff --git a/sdk/platform/Content/ContentPlatformClient.d.ts b/sdk/platform/Content/ContentPlatformClient.d.ts new file mode 100644 index 000000000..f948e49c9 --- /dev/null +++ b/sdk/platform/Content/ContentPlatformClient.d.ts @@ -0,0 +1,277 @@ +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: Use this API to create the custom field entry for given resource and resource_id in param. - 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 `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createCustomFieldDefinition + * @summary: Create custom field definition + * @description: Use this API to create a custom field definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldDefinition/). + */ + createCustomFieldDefinition({ body, requestHeaders }?: ContentPlatformValidator.CreateCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.CreateCustomObjectParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createCustomObject + * @summary: Create custom object entries + * @description: Use this API to create the custom object entry. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObject/). + */ + 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 + * @name createCustomObjectDefinition + * @summary: Create custom object definition + * @description: Use this API to create custom object defintion - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObjectDefinition/). + */ + createCustomObjectDefinition({ body, requestHeaders }?: ContentPlatformValidator.CreateCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteCustomFieldDefinition + * @summary: Delete custom fields definition. + * @description: Use this API to delete the definitions of custom fields using definition_id. This will also delete related custom fields entries related to this definition. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldDefinition/). + */ + deleteCustomFieldDefinition({ definitionId, requestHeaders }?: ContentPlatformValidator.DeleteCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.DeleteCustomObjectParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteCustomObject + * @summary: Delete custom object + * @description: Use this API to delete the custom object entry by id. This will also delete related custom fields entries related to this custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObject/). + */ + deleteCustomObject({ metaobjectId, requestHeaders }?: ContentPlatformValidator.DeleteCustomObjectParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name deleteCustomObjectDefinition + * @summary: delete custom object definition by id + * @description: Use this API to delete a custom object definition and related data for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectDefinition/). + */ + deleteCustomObjectDefinition({ definitionId, requestHeaders }?: ContentPlatformValidator.DeleteCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.ExportCustomObjectEntriesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name exportCustomObjectEntries + * @summary: Initiate download for bulk custom object entries + * @description: Use this api to initiate download of bulk entries - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportCustomObjectEntries/). + */ + exportCustomObjectEntries({ definitionId, requestHeaders }?: ContentPlatformValidator.ExportCustomObjectEntriesParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.GetCustomFieldDefinitionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getCustomFieldDefinition + * @summary: Get custom fields definition by id + * @description: Use this API to retrieve the definitions of custom fields using definition_id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinition/). + */ + getCustomFieldDefinition({ definitionId, requestHeaders }?: ContentPlatformValidator.GetCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.GetCustomFieldDefinitionsParam} 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: Use this API to retrieve the definitions of custom fields. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitions/). + */ + 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 + * @name getCustomFieldTypes + * @summary: Get custom field types + * @description: Use this API to retrieve the custom field types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldTypes/). + */ + getCustomFieldTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @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: Use this API to retrieve the custom fields for given resource in param. - 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 getCustomFieldsByResourceId + * @summary: Get list of custom fields of given resource and resource id + * @description: Use this API to retrieve the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldsByResourceId/). + */ + getCustomFieldsByResourceId({ resource, resourceId, requestHeaders }?: ContentPlatformValidator.GetCustomFieldsByResourceIdParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.GetCustomObjectParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCustomObject + * @summary: Get custom object details + * @description: Use this API to retrieve the custom object details and their fields details and definitions and references. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObject/). + */ + getCustomObject({ metaobjectId, requestHeaders }?: ContentPlatformValidator.GetCustomObjectParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.GetCustomObjectDefinitionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getCustomObjectDefinition + * @summary: get custom object definition by id + * @description: Use this API to update a custom object definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinition/). + */ + getCustomObjectDefinition({ definitionId, requestHeaders }?: ContentPlatformValidator.GetCustomObjectDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.GetCustomObjectDefinitionsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getCustomObjectDefinitions + * @summary: Get custom object definitions + * @description: Use this API to retrieve the custom object definitions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinitions/). + */ + getCustomObjectDefinitions({ pageNo, pageSize, search, requestHeaders }?: ContentPlatformValidator.GetCustomObjectDefinitionsParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.GetCustomObjectsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCustomObjects + * @summary: Get list of custom objects + * @description: Use this API to retrieve the custom objects. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjects/). + */ + getCustomObjects({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.GetJobsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getJobs + * @summary: Fetch bulk import and export job list. + * @description: Use this api to get list of jobs of bulk import and exports - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getJobs/). + */ + getJobs({ page, pageSize, actionType, requestHeaders }?: ContentPlatformValidator.GetJobsParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.GetResourcesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/). + */ + getResources({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.ImportCustomObjectEntriesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name importCustomObjectEntries + * @summary: Bulk custom object entries upload + * @description: Use this API to upload custom object entries - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importCustomObjectEntries/). + */ + importCustomObjectEntries({ definitionId, body, requestHeaders }?: ContentPlatformValidator.ImportCustomObjectEntriesParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name sampleCustomObjectBulkEntry + * @summary: download sample for custom object bulk entry + * @description: Use this api to get sample csv file - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleCustomObjectBulkEntry/). + */ + sampleCustomObjectBulkEntry({ definitionId, requestHeaders }?: ContentPlatformValidator.SampleCustomObjectBulkEntryParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name updateCustomFieldDefinition + * @summary: Update custom field definition + * @description: Use this API to update a custom field definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldDefinition/). + */ + updateCustomFieldDefinition({ definitionId, body, requestHeaders }?: ContentPlatformValidator.UpdateCustomFieldDefinitionParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.UpdateCustomObjectParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name updateCustomObject + * @summary: Update custom object details + * @description: Use this API to update a custom object detail for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObject/). + */ + updateCustomObject({ metaobjectId, body, requestHeaders }?: ContentPlatformValidator.UpdateCustomObjectParam, { responseHeaders }?: object): Promise; + /** + * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name updateCustomObjectDefinition + * @summary: Update custom object definition + * @description: Use this API to update a custom object definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectDefinition/). + */ + 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 new file mode 100644 index 000000000..0f661e163 --- /dev/null +++ b/sdk/platform/Content/ContentPlatformClient.js @@ -0,0 +1,2000 @@ +const PlatformAPIClient = require("../PlatformAPIClient"); +const { + FDKClientValidationError, + FDKResponseValidationError, +} = require("../../common/FDKError"); +const Paginator = require("../../common/Paginator"); +const ContentPlatformValidator = require("./ContentPlatformValidator"); +const ContentPlatformModel = require("./ContentPlatformModel"); +const { Logger } = require("./../../common/Logger"); +const Joi = require("joi"); + +class Content { + constructor(config) { + this.config = config; + } + + /** + * @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: Use this API to create the custom field entry for given resource and resource_id in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldByResourceId/). + */ + async createCustomFieldByResourceId( + { resource, resourceId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.createCustomFieldByResourceId().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, + } = ContentPlatformValidator.createCustomFieldByResourceId().validate( + { + resource, + resourceId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > createCustomFieldByResourceId \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`, + 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 > createCustomFieldByResourceId \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.CreateCustomFieldDefinitionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createCustomFieldDefinition + * @summary: Create custom field definition + * @description: Use this API to create a custom field definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomFieldDefinition/). + */ + async createCustomFieldDefinition( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.createCustomFieldDefinition().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, + } = ContentPlatformValidator.createCustomFieldDefinition().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > createCustomFieldDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().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 > createCustomFieldDefinition \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.CreateCustomObjectParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createCustomObject + * @summary: Create custom object entries + * @description: Use this API to create the custom object entry. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObject/). + */ + async createCustomObject( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformValidator.createCustomObject().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, + } = ContentPlatformValidator.createCustomObject().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > createCustomObject \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectSchema().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 > createCustomObject \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.CreateCustomObjectDefinitionParam} 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: Use this API to create custom object defintion - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createCustomObjectDefinition/). + */ + async createCustomObjectDefinition( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.createCustomObjectDefinition().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, + } = ContentPlatformValidator.createCustomObjectDefinition().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > createCustomObjectDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectDefinitionSchema().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 > createCustomObjectDefinition \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.DeleteCustomFieldDefinitionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteCustomFieldDefinition + * @summary: Delete custom fields definition. + * @description: Use this API to delete the definitions of custom fields using definition_id. This will also delete related custom fields entries related to this definition. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomFieldDefinition/). + */ + async deleteCustomFieldDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.deleteCustomFieldDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.deleteCustomFieldDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > deleteCustomFieldDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${definitionId}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomDataDeleteSchema().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 > deleteCustomFieldDefinition \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.DeleteCustomObjectParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteCustomObject + * @summary: Delete custom object + * @description: Use this API to delete the custom object entry by id. This will also delete related custom fields entries related to this custom object. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObject/). + */ + async deleteCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformValidator.deleteCustomObject().validate( + { + metaobjectId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.deleteCustomObject().validate( + { + metaobjectId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > deleteCustomObject \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${metaobjectId}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomDataDeleteSchema().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 > deleteCustomObject \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.DeleteCustomObjectDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name deleteCustomObjectDefinition + * @summary: delete custom object definition by id + * @description: Use this API to delete a custom object definition and related data for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteCustomObjectDefinition/). + */ + async deleteCustomObjectDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.deleteCustomObjectDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.deleteCustomObjectDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > deleteCustomObjectDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${definitionId}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectDefinitionDeleteResponseSchema().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 > deleteCustomObjectDefinition \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.ExportCustomObjectEntriesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name exportCustomObjectEntries + * @summary: Initiate download for bulk custom object entries + * @description: Use this api to initiate download of bulk entries - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportCustomObjectEntries/). + */ + async exportCustomObjectEntries( + { definitionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.exportCustomObjectEntries().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.exportCustomObjectEntries().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > exportCustomObjectEntries \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/download`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectBulkEntryInitiateDownload().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 > exportCustomObjectEntries \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetCustomFieldDefinitionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getCustomFieldDefinition + * @summary: Get custom fields definition by id + * @description: Use this API to retrieve the definitions of custom fields using definition_id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinition/). + */ + async getCustomFieldDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.getCustomFieldDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getCustomFieldDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getCustomFieldDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${definitionId}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().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 > getCustomFieldDefinition \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetCustomFieldDefinitionsParam} 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: Use this API to retrieve the definitions of custom fields. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldDefinitions/). + */ + async getCustomFieldDefinitions( + { pageNo, pageSize, resource, type, search, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.getCustomFieldDefinitions().validate( + { + pageNo, + pageSize, + resource, + type, + search, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getCustomFieldDefinitions().validate( + { + pageNo, + pageSize, + resource, + type, + search, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + 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/v1.0/company/${this.config.companyId}/metafields/definitions`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomFieldDefinitionsSchema().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 > getCustomFieldDefinitions \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetCustomFieldTypesParam} 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: Use this API to retrieve the custom field types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldTypes/). + */ + async getCustomFieldTypes( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformValidator.getCustomFieldTypes().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getCustomFieldTypes().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getCustomFieldTypes \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/types`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectByIdSchema().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 > getCustomFieldTypes \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @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: Use this API to retrieve the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFields/). + */ + async getCustomFields( + { resource, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformValidator.getCustomFields().validate( + { + resource, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getCustomFields().validate( + { + resource, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getCustomFields \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomFieldsResponseSchema().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 > getCustomFields \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetCustomFieldsByResourceIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getCustomFieldsByResourceId + * @summary: Get list of custom fields of given resource and resource id + * @description: Use this API to retrieve the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomFieldsByResourceId/). + */ + async getCustomFieldsByResourceId( + { resource, resourceId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.getCustomFieldsByResourceId().validate( + { + resource, + resourceId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getCustomFieldsByResourceId().validate( + { + resource, + resourceId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getCustomFieldsByResourceId \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/${resource}/${resourceId}`, + query_params, + undefined, + { ...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 > getCustomFieldsByResourceId \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetCustomObjectParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCustomObject + * @summary: Get custom object details + * @description: Use this API to retrieve the custom object details and their fields details and definitions and references. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObject/). + */ + async getCustomObject( + { metaobjectId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformValidator.getCustomObject().validate( + { + metaobjectId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getCustomObject().validate( + { + metaobjectId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getCustomObject \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${metaobjectId}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectByIdSchema().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 > getCustomObject \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetCustomObjectDefinitionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getCustomObjectDefinition + * @summary: get custom object definition by id + * @description: Use this API to update a custom object definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinition/). + */ + async getCustomObjectDefinition( + { definitionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.getCustomObjectDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getCustomObjectDefinition().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getCustomObjectDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${definitionId}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectDefinitionSchema().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 > getCustomObjectDefinition \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetCustomObjectDefinitionsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getCustomObjectDefinitions + * @summary: Get custom object definitions + * @description: Use this API to retrieve the custom object definitions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjectDefinitions/). + */ + async getCustomObjectDefinitions( + { pageNo, pageSize, search, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.getCustomObjectDefinitions().validate( + { + pageNo, + pageSize, + search, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getCustomObjectDefinitions().validate( + { + pageNo, + pageSize, + search, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getCustomObjectDefinitions \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["search"] = search; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectDefinitionsSchema().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 > getCustomObjectDefinitions \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetCustomObjectsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCustomObjects + * @summary: Get list of custom objects + * @description: Use this API to retrieve the custom objects. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getCustomObjects/). + */ + async getCustomObjects( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformValidator.getCustomObjects().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getCustomObjects().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getCustomObjects \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectsSchema().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 > getCustomObjects \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetJobsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getJobs + * @summary: Fetch bulk import and export job list. + * @description: Use this api to get list of jobs of bulk import and exports - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getJobs/). + */ + async getJobs( + { page, pageSize, actionType, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformValidator.getJobs().validate( + { + page, + pageSize, + actionType, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = ContentPlatformValidator.getJobs().validate( + { + page, + pageSize, + actionType, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getJobs \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page"] = page; + query_params["page_size"] = pageSize; + query_params["action_type"] = actionType; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/jobs`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectBulkEntry().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 > getJobs \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.GetResourcesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/). + */ + async getResources( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformValidator.getResources().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.getResources().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > getResources \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/resources`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.ResourcesSchema().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 > getResources \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.ImportCustomObjectEntriesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name importCustomObjectEntries + * @summary: Bulk custom object entries upload + * @description: Use this API to upload custom object entries - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importCustomObjectEntries/). + */ + async importCustomObjectEntries( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.importCustomObjectEntries().validate( + { + definitionId, + 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.importCustomObjectEntries().validate( + { + definitionId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > importCustomObjectEntries \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/upload`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectEntryBulkUploadResponse().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 > importCustomObjectEntries \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.SampleCustomObjectBulkEntryParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name sampleCustomObjectBulkEntry + * @summary: download sample for custom object bulk entry + * @description: Use this api to get sample csv file - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleCustomObjectBulkEntry/). + */ + async sampleCustomObjectBulkEntry( + { definitionId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.sampleCustomObjectBulkEntry().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPlatformValidator.sampleCustomObjectBulkEntry().validate( + { + definitionId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > sampleCustomObjectBulkEntry \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/bulk/${definitionId}/sample`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { error: res_error } = Joi.string() + .allow("") + .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 > sampleCustomObjectBulkEntry \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.UpdateCustomFieldDefinitionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name updateCustomFieldDefinition + * @summary: Update custom field definition + * @description: Use this API to update a custom field definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomFieldDefinition/). + */ + async updateCustomFieldDefinition( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.updateCustomFieldDefinition().validate( + { + definitionId, + 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.updateCustomFieldDefinition().validate( + { + definitionId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > updateCustomFieldDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/metafields/definitions/${definitionId}`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().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 > updateCustomFieldDefinition \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.UpdateCustomObjectParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name updateCustomObject + * @summary: Update custom object details + * @description: Use this API to update a custom object detail for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObject/). + */ + async updateCustomObject( + { metaobjectId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPlatformValidator.updateCustomObject().validate( + { + metaobjectId, + 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.updateCustomObject().validate( + { + metaobjectId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > updateCustomObject \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/${metaobjectId}`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectByIdSchema().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 > updateCustomObject \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ContentPlatformValidator.UpdateCustomObjectDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name updateCustomObjectDefinition + * @summary: Update custom object definition + * @description: Use this API to update a custom object definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateCustomObjectDefinition/). + */ + async updateCustomObjectDefinition( + { definitionId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ContentPlatformValidator.updateCustomObjectDefinition().validate( + { + definitionId, + 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.updateCustomObjectDefinition().validate( + { + definitionId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Content > updateCustomObjectDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/content/v1.0/company/${this.config.companyId}/metaobjects/definitions/${definitionId}`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPlatformModel.CustomObjectDefinitionSchema().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 > updateCustomObjectDefinition \n ${res_error}`, + }); + } + } + + return response; + } +} + +module.exports = Content; diff --git a/sdk/platform/Content/ContentPlatformModel.d.ts b/sdk/platform/Content/ContentPlatformModel.d.ts index 58fa93d2f..7980da92a 100644 --- a/sdk/platform/Content/ContentPlatformModel.d.ts +++ b/sdk/platform/Content/ContentPlatformModel.d.ts @@ -103,6 +103,14 @@ export = ContentPlatformModel; * @property {string[]} [tags] * @property {string} [title] */ +/** + * @typedef BooleanType + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** * @typedef CategoryRequestSchema * @property {string} [slug] @@ -203,12 +211,304 @@ export = ContentPlatformModel; * @property {string} [end] * @property {string} [start] */ +/** + * @typedef CustomDataDeleteSchema + * @property {string} [message] + * @property {boolean} [success] + */ +/** + * @typedef CustomField + * @property {string} [definition_id] + * @property {Object[]} [value] + */ +/** + * @typedef CustomFieldDefinitionDetailResSchema + * @property {string} [_id] + * @property {string} [application_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [description] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [namespace] + * @property {boolean} [required] + * @property {string} [resource] + * @property {string} [type] + * @property {string} [updated_at] + * @property {string} [updated_by] + * @property {Object[]} [validations] + */ +/** + * @typedef CustomFieldDefinitionRequestSchema + * @property {string} [description] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [namespace] + * @property {string} [resource] + * @property {string} [type] + * @property {FieldValidations[]} [validations] + */ +/** + * @typedef CustomFieldDefinitionsSchema + * @property {FieldDefinitionSchema[]} [items] + * @property {Page} [page] + */ +/** + * @typedef CustomFieldRequestSchema + * @property {CustomField[]} [fields] + */ +/** + * @typedef CustomFieldSchema + * @property {string} [_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [definition_id] + * @property {boolean} [has_invalid_values] + * @property {Object[]} [invalid_value_errors] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [namespace] + * @property {string} [resource] + * @property {string} [resource_id] + * @property {string} [type] + * @property {string} [updated_at] + * @property {CustomFieldValue[]} [value] + */ +/** + * @typedef CustomFieldsResponseByResourceIdSchema + * @property {CustomFieldSchema[]} [items] + */ +/** + * @typedef CustomFieldsResponseSchema + * @property {CustomFieldSchema[]} [items] + * @property {Page} [page] + */ +/** + * @typedef CustomFieldTypeSchema + * @property {BooleanType} [boolean_type] + * @property {Date} [date] + * @property {Datetime} [datetime] + * @property {Dropdown} [dropdown] + * @property {File} [file] + * @property {FloatType} [float_type] + * @property {Integer} [integer] + * @property {Json} [json] + * @property {Metaobject} [metaobject] + * @property {Product} [product] + * @property {StringMultiLine} [string_multi_line] + * @property {StringSingleLine} [string_single_line] + * @property {Url} [url] + */ +/** + * @typedef CustomFieldValue + * @property {Object} [value] + */ /** * @typedef CustomMetaTag * @property {string} [_id] * @property {string} [content] * @property {string} [name] */ +/** + * @typedef CustomObjectBulkEntry + * @property {CustomObjectJobSchema[]} [items] + * @property {Page} [page] + */ +/** + * @typedef CustomObjectBulkEntryInitiateDownload + * @property {string} [message] + * @property {string} [task_id] + */ +/** + * @typedef CustomObjectBulkSchema + * @property {number} [total_records] + * @property {string} [url] + */ +/** + * @typedef CustomObjectByIdSchema + * @property {string} [_id] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {string} [display_name] + * @property {CustomObjectFieldSchema[]} [fields] + * @property {Object[]} [references] + * @property {string} [status] + */ +/** + * @typedef CustomObjectCustomFieldDefinitionResSchema + * @property {string} [_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [description] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {string} [metaobject_definition_id] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [namespace] + * @property {boolean} [required] + * @property {string} [resource] + * @property {string} [type] + * @property {string} [updated_at] + * @property {FieldValidations[]} [validations] + */ +/** + * @typedef CustomObjectCustomFieldDefinitions + * @property {string} [action] + * @property {string} [description] + * @property {string} [id] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {boolean} [required] + * @property {string} [type] + * @property {FieldValidations[]} [validations] + */ +/** + * @typedef CustomObjectDefinitionDeleteResponseSchema + * @property {string} [message] + * @property {boolean} [success] + */ +/** + * @typedef CustomObjectDefinitionRequestSchema + * @property {string} [description] + * @property {string} [display_name_key] + * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] + * @property {string} [name] + * @property {string} [type] + */ +/** + * @typedef CustomObjectDefinitionSchema + * @property {string} [_id] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [description] + * @property {string} [display_name_key] + * @property {CustomObjectCustomFieldDefinitionResSchema[]} [field_definitions] + * @property {string} [name] + * @property {string} [type] + * @property {string} [updated_by] + */ +/** + * @typedef CustomObjectDefinitionsSchema + * @property {CustomObjectEntry[]} [items] + * @property {Page} [page] + */ +/** + * @typedef CustomObjectDefinitionUpdateRequestSchema + * @property {string} [description] + * @property {string} [display_name_key] + * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] + * @property {string} [name] + * @property {string} [type] + */ +/** + * @typedef CustomObjectEntry + * @property {string} [_id] + * @property {number} [entries_count] + * @property {number} [fields_count] + * @property {string} [name] + * @property {string} [type] + * @property {string} [updated_at] + */ +/** + * @typedef CustomObjectEntryBulkUploadResponse + * @property {number} [total_records] + * @property {string} [url] + */ +/** + * @typedef CustomObjectEntryFieldSchema + * @property {string} [definition_id] + * @property {Object[]} [value] + */ +/** + * @typedef CustomObjectFieldSchema + * @property {string} [_id] + * @property {string} [definition_id] + * @property {string} [key] + * @property {string} [type] + * @property {Object[]} [value] + */ +/** + * @typedef CustomObjectJobSchema + * @property {string} [_id] + * @property {string} [action_type] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [entity] + * @property {number} [error_count] + * @property {string[]} [error_jobs] + * @property {string} [error_url] + * @property {string[]} [errors_occured] + * @property {number} [finished_count] + * @property {string[]} [finished_jobs] + * @property {string[]} [jobs] + * @property {CustomObjectMetaSchema} [meta] + * @property {string} [status] + * @property {number} [success_count] + * @property {number} [total_jobs] + * @property {string} [updated_at] + * @property {string} [url] + */ +/** + * @typedef CustomObjectListItemDefinationSchema + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] + */ +/** + * @typedef CustomObjectListItemSchema + * @property {string} [_id] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {string} [definition_id] + * @property {string} [display_name] + * @property {number} [references] + * @property {string} [status] + * @property {string} [updated_at] + */ +/** + * @typedef CustomObjectMetaSchema + * @property {string} [mo_defintion_type] + * @property {number} [mo_error_count] + * @property {number} [mo_success_count] + * @property {number} [mo_total_count] + */ +/** + * @typedef CustomObjectRequestSchema + * @property {string} [definition_id] + * @property {CustomObjectEntryFieldSchema[]} [fields] + * @property {string} [status] + */ +/** + * @typedef CustomObjectSchema + * @property {string} [_id] + * @property {string} [application_id] + * @property {string} [company_id] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [definition_id] + * @property {string} [display_name] + * @property {CustomFieldSchema[]} [fields] + * @property {string} [status] + * @property {string} [type] + * @property {string} [updated_by] + */ +/** + * @typedef CustomObjectsSchema + * @property {CustomObjectListItemSchema[]} [items] + * @property {Page} [page] + */ /** * @typedef DataLoaderResetResponseSchema * @property {boolean} [reset] @@ -246,21 +546,54 @@ export = ContentPlatformModel; * @typedef DataLoadersSchema * @property {DataLoaderSchema[]} [items] */ +/** + * @typedef Date + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** * @typedef DateMeta * @property {string} [created_on] * @property {string} [modified_on] */ +/** + * @typedef Datetime + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** * @typedef DefaultNavigationResponse * @property {NavigationSchema[]} [items] */ +/** + * @typedef DefaultSchemaComponent + * @property {DefaultSEOSchemaMarkupTemplate[]} [items] + */ +/** + * @typedef DefaultSEOSchemaMarkupTemplate + * @property {string} [page_type] + * @property {string} [schema] + */ /** * @typedef Detail * @property {string} [description] * @property {string} [image_url] * @property {string} [title] */ +/** + * @typedef Dropdown + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** * @typedef EditorMeta * @property {string} [background_color] @@ -305,6 +638,50 @@ export = ContentPlatformModel; * @property {string} [slug] * @property {string[]} [tags] */ +/** + * @typedef FieldDefinitionSchema + * @property {string} [_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [description] + * @property {number} [invalid_fields_count] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [namespace] + * @property {boolean} [required] + * @property {string} [resource] + * @property {string} [type] + * @property {string} [type_name] + * @property {string} [updated_at] + * @property {string} [updated_by] + * @property {FieldValidations[]} [validations] + */ +/** + * @typedef FieldValidations + * @property {string} [name] + * @property {string} [type] + * @property {Object} [value] + */ +/** + * @typedef File + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ +/** + * @typedef FloatType + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** * @typedef GeneratedSEOContent * @property {string} [description] @@ -344,6 +721,22 @@ export = ContentPlatformModel; * @property {string} [type] * @property {string} [url] */ +/** + * @typedef Integer + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ +/** + * @typedef Json + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** * @typedef LandingPageGetResponse * @property {LandingPageSchema[]} [items] @@ -371,6 +764,14 @@ export = ContentPlatformModel; * @property {Language} [en_us] * @property {Language} [hi] */ +/** + * @typedef Metaobject + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** * @typedef NavigationGetResponse * @property {NavigationSchema[]} [items] @@ -530,6 +931,14 @@ export = ContentPlatformModel; * @property {boolean} [active] * @property {PhoneProperties[]} [phone] */ +/** + * @typedef Product + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** * @typedef RemoveHandpickedSchema * @property {string[]} [tags] @@ -539,6 +948,16 @@ export = ContentPlatformModel; * @property {string} [type] * @property {string} [value] */ +/** + * @typedef ResourceSchema + * @property {number} [definitions_count] - Number of definitions + * @property {string} [key] - Resource key + * @property {string} [name] - Resource name + */ +/** + * @typedef ResourcesSchema + * @property {ResourceSchema[]} [resources] + */ /** * @typedef ScheduleSchema * @property {string} [cron] @@ -549,10 +968,19 @@ export = ContentPlatformModel; */ /** * @typedef SEO + * @property {SEObreadcrumb[]} [breadcrumb] + * @property {string} [canonical_url] * @property {string} [description] * @property {SEOImage} [image] + * @property {SEOMetaItem[]} [meta_tags] + * @property {SEOSitemap} [sitemap] * @property {string} [title] */ +/** + * @typedef SEObreadcrumb + * @property {Action} [action] + * @property {string} [url] + */ /** * @typedef SeoComponent * @property {SeoSchema} [seo] @@ -561,9 +989,20 @@ export = ContentPlatformModel; * @typedef SEOImage * @property {string} [url] */ +/** + * @typedef SEOMetaItem + * @property {SEOMetaItems[]} [items] + * @property {string} [title] + */ +/** + * @typedef SEOMetaItems + * @property {string} [key] + * @property {string} [value] + */ /** * @typedef SeoSchema * @property {string} [_id] + * @property {string} [additional_sitemap] * @property {string} [app] * @property {boolean} [cannonical_enabled] * @property {string} [created_at] @@ -573,6 +1012,38 @@ export = ContentPlatformModel; * @property {boolean} [sitemap_enabled] * @property {string} [updated_at] */ +/** + * @typedef SeoSchemaComponent + * @property {SEOSchemaMarkupTemplate[]} [items] + * @property {Page} [page] + */ +/** + * @typedef SEOSchemaMarkupTemplate + * @property {boolean} [active] + * @property {string} [application] + * @property {string} [created_at] + * @property {string} [description] + * @property {string} [id] + * @property {string} [page_type] + * @property {string} [schema] + * @property {string} [title] + * @property {string} [updated_at] + */ +/** + * @typedef SEOSchemaMarkupTemplateRequestBody + * @property {boolean} [active] + * @property {string} [created_at] + * @property {string} [description] + * @property {string} [page_type] + * @property {string} [schema] + * @property {string} [title] + * @property {string} [updated_at] + */ +/** + * @typedef SEOSitemap + * @property {string} [frequency] + * @property {number} [priority] + */ /** * @typedef SlideshowGetResponse * @property {SlideshowSchema[]} [items] @@ -608,6 +1079,22 @@ export = ContentPlatformModel; * @property {string} [platform] * @property {string} [slug] */ +/** + * @typedef StringMultiLine + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ +/** + * @typedef StringSingleLine + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** * @typedef Support * @property {string} [_id] @@ -618,6 +1105,23 @@ export = ContentPlatformModel; * @property {string} [created_at] * @property {string} [updated_at] */ +/** + * @typedef SupportedValidationsMetaExampleSchema + * @property {string} [name] + * @property {string} [value] + */ +/** + * @typedef SupportedValidationsMetaSchema + * @property {SupportedValidationsMetaExampleSchema[]} [examples] + */ +/** + * @typedef SupportedValidationsSchema + * @property {string} [display] + * @property {SupportedValidationsMetaSchema} [meta] + * @property {string} [name] + * @property {boolean} [required] + * @property {string} [type] + */ /** * @typedef TagDeleteSuccessResponse * @property {boolean} [success] @@ -654,6 +1158,13 @@ export = ContentPlatformModel; * @typedef UpdateHandpickedSchema * @property {HandpickedTagSchema} [tag] */ +/** + * @typedef Url + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ /** @typedef {"title" | "description"} GenerationEntityType */ /** * @typedef {| "about-us" @@ -706,7 +1217,7 @@ export = ContentPlatformModel; declare class ContentPlatformModel { } declare namespace ContentPlatformModel { - export { Action, ActionPage, AdminAnnouncementSchema, AnnouncementAuthorSchema, AnnouncementPageSchema, ApplicationLegal, ApplicationLegalFAQ, Asset, Author, BlogGetResponse, BlogRequest, BlogSchema, CategoryRequestSchema, CategorySchema, ChildrenSchema, CommonError, ConfigurationSchema, ContactSchema, ContentAPIError, CreateAnnouncementSchema, CreatedBySchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, CreateFaqResponseSchema, CreateFaqSchema, CreateTagRequestSchema, CreateTagSchema, CronSchedule, CustomMetaTag, DataLoaderResetResponseSchema, DataLoaderResponseSchema, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, DateMeta, DefaultNavigationResponse, Detail, EditorMeta, EmailProperties, EmailSchema, FAQ, FAQCategorySchema, FaqSchema, GeneratedSEOContent, GenerateSEOContent, GetAnnouncementListSchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, GetFaqSchema, HandpickedTagSchema, LandingPageGetResponse, LandingPageSchema, Language, LocaleLanguage, NavigationGetResponse, NavigationReference, NavigationRequest, NavigationSchema, NextSchedule, Orientation, Page, PageGetResponse, PageMetaSchema, PagePublishRequest, PageRequest, PageSchema, PageSpec, PageSpecItem, PageSpecParam, PathMappingSchema, PathSourceSchema, PhoneProperties, PhoneSchema, RemoveHandpickedSchema, ResourceContent, ScheduleSchema, SEO, SeoComponent, SEOImage, SeoSchema, SlideshowGetResponse, SlideshowMedia, SlideshowRequest, SlideshowSchema, Support, TagDeleteSuccessResponse, TagSchema, TagSourceSchema, TagsSchema, UpdateFaqCategoryRequestSchema, UpdateHandpickedSchema, GenerationEntityType, PageType }; + export { Action, ActionPage, AdminAnnouncementSchema, AnnouncementAuthorSchema, AnnouncementPageSchema, ApplicationLegal, ApplicationLegalFAQ, Asset, Author, BlogGetResponse, BlogRequest, BlogSchema, BooleanType, CategoryRequestSchema, CategorySchema, ChildrenSchema, CommonError, ConfigurationSchema, ContactSchema, ContentAPIError, CreateAnnouncementSchema, CreatedBySchema, CreateFaqCategoryRequestSchema, CreateFaqCategorySchema, CreateFaqResponseSchema, CreateFaqSchema, CreateTagRequestSchema, CreateTagSchema, CronSchedule, CustomDataDeleteSchema, CustomField, CustomFieldDefinitionDetailResSchema, CustomFieldDefinitionRequestSchema, CustomFieldDefinitionsSchema, CustomFieldRequestSchema, CustomFieldSchema, CustomFieldsResponseByResourceIdSchema, CustomFieldsResponseSchema, CustomFieldTypeSchema, CustomFieldValue, CustomMetaTag, CustomObjectBulkEntry, CustomObjectBulkEntryInitiateDownload, CustomObjectBulkSchema, CustomObjectByIdSchema, CustomObjectCustomFieldDefinitionResSchema, CustomObjectCustomFieldDefinitions, CustomObjectDefinitionDeleteResponseSchema, CustomObjectDefinitionRequestSchema, CustomObjectDefinitionSchema, CustomObjectDefinitionsSchema, CustomObjectDefinitionUpdateRequestSchema, CustomObjectEntry, CustomObjectEntryBulkUploadResponse, CustomObjectEntryFieldSchema, CustomObjectFieldSchema, CustomObjectJobSchema, CustomObjectListItemDefinationSchema, CustomObjectListItemSchema, CustomObjectMetaSchema, CustomObjectRequestSchema, CustomObjectSchema, CustomObjectsSchema, DataLoaderResetResponseSchema, DataLoaderResponseSchema, DataLoaderSchema, DataLoaderSourceSchema, DataLoadersSchema, Date, DateMeta, Datetime, DefaultNavigationResponse, DefaultSchemaComponent, DefaultSEOSchemaMarkupTemplate, Detail, Dropdown, EditorMeta, EmailProperties, EmailSchema, FAQ, FAQCategorySchema, FaqSchema, FieldDefinitionSchema, FieldValidations, File, FloatType, GeneratedSEOContent, GenerateSEOContent, GetAnnouncementListSchema, GetFaqCategoriesSchema, GetFaqCategoryBySlugSchema, GetFaqSchema, HandpickedTagSchema, Integer, Json, LandingPageGetResponse, LandingPageSchema, Language, LocaleLanguage, Metaobject, NavigationGetResponse, NavigationReference, NavigationRequest, NavigationSchema, NextSchedule, Orientation, Page, PageGetResponse, PageMetaSchema, PagePublishRequest, PageRequest, PageSchema, PageSpec, PageSpecItem, PageSpecParam, PathMappingSchema, PathSourceSchema, PhoneProperties, PhoneSchema, Product, RemoveHandpickedSchema, ResourceContent, ResourceSchema, ResourcesSchema, ScheduleSchema, SEO, SEObreadcrumb, SeoComponent, SEOImage, SEOMetaItem, SEOMetaItems, SeoSchema, SeoSchemaComponent, SEOSchemaMarkupTemplate, SEOSchemaMarkupTemplateRequestBody, SEOSitemap, SlideshowGetResponse, SlideshowMedia, SlideshowRequest, SlideshowSchema, StringMultiLine, StringSingleLine, Support, SupportedValidationsMetaExampleSchema, SupportedValidationsMetaSchema, SupportedValidationsSchema, TagDeleteSuccessResponse, TagSchema, TagSourceSchema, TagsSchema, UpdateFaqCategoryRequestSchema, UpdateHandpickedSchema, Url, GenerationEntityType, PageType }; } /** @returns {Action} */ declare function Action(): Action; @@ -824,6 +1335,15 @@ type BlogSchema = { tags?: string[]; title?: string; }; +/** @returns {BooleanType} */ +declare function BooleanType(): BooleanType; +type BooleanType = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** @returns {CategoryRequestSchema} */ declare function CategoryRequestSchema(): CategoryRequestSchema; type CategoryRequestSchema = { @@ -940,6 +1460,117 @@ type CronSchedule = { end?: string; start?: string; }; +/** @returns {CustomDataDeleteSchema} */ +declare function CustomDataDeleteSchema(): CustomDataDeleteSchema; +type CustomDataDeleteSchema = { + message?: string; + success?: boolean; +}; +/** @returns {CustomField} */ +declare function CustomField(): CustomField; +type CustomField = { + definition_id?: string; + value?: any[]; +}; +/** @returns {CustomFieldDefinitionDetailResSchema} */ +declare function CustomFieldDefinitionDetailResSchema(): CustomFieldDefinitionDetailResSchema; +type CustomFieldDefinitionDetailResSchema = { + _id?: string; + application_id?: string; + company_id?: string; + created_at?: string; + created_by?: string; + creator?: string; + description?: string; + is_deleted?: boolean; + key?: string; + multi_value?: boolean; + name?: string; + namespace?: string; + required?: boolean; + resource?: string; + type?: string; + updated_at?: string; + updated_by?: string; + validations?: any[]; +}; +/** @returns {CustomFieldDefinitionRequestSchema} */ +declare function CustomFieldDefinitionRequestSchema(): CustomFieldDefinitionRequestSchema; +type CustomFieldDefinitionRequestSchema = { + description?: string; + key?: string; + multi_value?: boolean; + name?: string; + namespace?: string; + resource?: string; + type?: string; + validations?: FieldValidations[]; +}; +/** @returns {CustomFieldDefinitionsSchema} */ +declare function CustomFieldDefinitionsSchema(): CustomFieldDefinitionsSchema; +type CustomFieldDefinitionsSchema = { + items?: FieldDefinitionSchema[]; + page?: Page; +}; +/** @returns {CustomFieldRequestSchema} */ +declare function CustomFieldRequestSchema(): CustomFieldRequestSchema; +type CustomFieldRequestSchema = { + fields?: CustomField[]; +}; +/** @returns {CustomFieldSchema} */ +declare function CustomFieldSchema(): CustomFieldSchema; +type CustomFieldSchema = { + _id?: string; + company_id?: string; + created_at?: string; + created_by?: string; + creator?: string; + definition_id?: string; + has_invalid_values?: boolean; + invalid_value_errors?: any[]; + is_deleted?: boolean; + key?: string; + multi_value?: boolean; + namespace?: string; + resource?: string; + resource_id?: string; + type?: string; + updated_at?: string; + value?: CustomFieldValue[]; +}; +/** @returns {CustomFieldsResponseByResourceIdSchema} */ +declare function CustomFieldsResponseByResourceIdSchema(): CustomFieldsResponseByResourceIdSchema; +type CustomFieldsResponseByResourceIdSchema = { + items?: CustomFieldSchema[]; +}; +/** @returns {CustomFieldsResponseSchema} */ +declare function CustomFieldsResponseSchema(): CustomFieldsResponseSchema; +type CustomFieldsResponseSchema = { + items?: CustomFieldSchema[]; + page?: Page; +}; +/** @returns {CustomFieldTypeSchema} */ +declare function CustomFieldTypeSchema(): CustomFieldTypeSchema; +type CustomFieldTypeSchema = { + boolean_type?: BooleanType; + date?: Date; + datetime?: Datetime; + dropdown?: Dropdown; + file?: File; + float_type?: FloatType; + integer?: Integer; + json?: Json; + metaobject?: Metaobject; + product?: Product; + string_multi_line?: StringMultiLine; + string_single_line?: StringSingleLine; + url?: Url; +}; +/** @returns {CustomFieldValue} */ +declare function CustomFieldValue(): CustomFieldValue; +type CustomFieldValue = { + value?: any; +}; /** @returns {CustomMetaTag} */ declare function CustomMetaTag(): CustomMetaTag; type CustomMetaTag = { @@ -947,6 +1578,220 @@ type CustomMetaTag = { content?: string; name?: string; }; +/** @returns {CustomObjectBulkEntry} */ +declare function CustomObjectBulkEntry(): CustomObjectBulkEntry; +type CustomObjectBulkEntry = { + items?: CustomObjectJobSchema[]; + page?: Page; +}; +/** @returns {CustomObjectBulkEntryInitiateDownload} */ +declare function CustomObjectBulkEntryInitiateDownload(): CustomObjectBulkEntryInitiateDownload; +type CustomObjectBulkEntryInitiateDownload = { + message?: string; + task_id?: string; +}; +/** @returns {CustomObjectBulkSchema} */ +declare function CustomObjectBulkSchema(): CustomObjectBulkSchema; +type CustomObjectBulkSchema = { + total_records?: number; + url?: string; +}; +/** @returns {CustomObjectByIdSchema} */ +declare function CustomObjectByIdSchema(): CustomObjectByIdSchema; +type CustomObjectByIdSchema = { + _id?: string; + definition?: CustomObjectListItemDefinationSchema; + display_name?: string; + fields?: CustomObjectFieldSchema[]; + references?: any[]; + status?: string; +}; +/** @returns {CustomObjectCustomFieldDefinitionResSchema} */ +declare function CustomObjectCustomFieldDefinitionResSchema(): CustomObjectCustomFieldDefinitionResSchema; +type CustomObjectCustomFieldDefinitionResSchema = { + _id?: string; + company_id?: string; + created_at?: string; + created_by?: string; + creator?: string; + description?: string; + is_deleted?: boolean; + key?: string; + metaobject_definition_id?: string; + multi_value?: boolean; + name?: string; + namespace?: string; + required?: boolean; + resource?: string; + type?: string; + updated_at?: string; + validations?: FieldValidations[]; +}; +/** @returns {CustomObjectCustomFieldDefinitions} */ +declare function CustomObjectCustomFieldDefinitions(): CustomObjectCustomFieldDefinitions; +type CustomObjectCustomFieldDefinitions = { + action?: string; + description?: string; + id?: string; + key?: string; + multi_value?: boolean; + name?: string; + required?: boolean; + type?: string; + validations?: FieldValidations[]; +}; +/** @returns {CustomObjectDefinitionDeleteResponseSchema} */ +declare function CustomObjectDefinitionDeleteResponseSchema(): CustomObjectDefinitionDeleteResponseSchema; +type CustomObjectDefinitionDeleteResponseSchema = { + message?: string; + success?: boolean; +}; +/** @returns {CustomObjectDefinitionRequestSchema} */ +declare function CustomObjectDefinitionRequestSchema(): CustomObjectDefinitionRequestSchema; +type CustomObjectDefinitionRequestSchema = { + description?: string; + display_name_key?: string; + field_definitions?: CustomObjectCustomFieldDefinitions[]; + name?: string; + type?: string; +}; +/** @returns {CustomObjectDefinitionSchema} */ +declare function CustomObjectDefinitionSchema(): CustomObjectDefinitionSchema; +type CustomObjectDefinitionSchema = { + _id?: string; + created_by?: string; + creator?: string; + description?: string; + display_name_key?: string; + field_definitions?: CustomObjectCustomFieldDefinitionResSchema[]; + name?: string; + type?: string; + updated_by?: string; +}; +/** @returns {CustomObjectDefinitionsSchema} */ +declare function CustomObjectDefinitionsSchema(): CustomObjectDefinitionsSchema; +type CustomObjectDefinitionsSchema = { + items?: CustomObjectEntry[]; + page?: Page; +}; +/** @returns {CustomObjectDefinitionUpdateRequestSchema} */ +declare function CustomObjectDefinitionUpdateRequestSchema(): CustomObjectDefinitionUpdateRequestSchema; +type CustomObjectDefinitionUpdateRequestSchema = { + description?: string; + display_name_key?: string; + field_definitions?: CustomObjectCustomFieldDefinitions[]; + name?: string; + type?: string; +}; +/** @returns {CustomObjectEntry} */ +declare function CustomObjectEntry(): CustomObjectEntry; +type CustomObjectEntry = { + _id?: string; + entries_count?: number; + fields_count?: number; + name?: string; + type?: string; + updated_at?: string; +}; +/** @returns {CustomObjectEntryBulkUploadResponse} */ +declare function CustomObjectEntryBulkUploadResponse(): CustomObjectEntryBulkUploadResponse; +type CustomObjectEntryBulkUploadResponse = { + total_records?: number; + url?: string; +}; +/** @returns {CustomObjectEntryFieldSchema} */ +declare function CustomObjectEntryFieldSchema(): CustomObjectEntryFieldSchema; +type CustomObjectEntryFieldSchema = { + definition_id?: string; + value?: any[]; +}; +/** @returns {CustomObjectFieldSchema} */ +declare function CustomObjectFieldSchema(): CustomObjectFieldSchema; +type CustomObjectFieldSchema = { + _id?: string; + definition_id?: string; + key?: string; + type?: string; + value?: any[]; +}; +/** @returns {CustomObjectJobSchema} */ +declare function CustomObjectJobSchema(): CustomObjectJobSchema; +type CustomObjectJobSchema = { + _id?: string; + action_type?: string; + company_id?: string; + created_at?: string; + created_by?: string; + creator?: string; + entity?: string; + error_count?: number; + error_jobs?: string[]; + error_url?: string; + errors_occured?: string[]; + finished_count?: number; + finished_jobs?: string[]; + jobs?: string[]; + meta?: CustomObjectMetaSchema; + status?: string; + success_count?: number; + total_jobs?: number; + updated_at?: string; + url?: string; +}; +/** @returns {CustomObjectListItemDefinationSchema} */ +declare function CustomObjectListItemDefinationSchema(): CustomObjectListItemDefinationSchema; +type CustomObjectListItemDefinationSchema = { + _id?: string; + name?: string; + type?: string; +}; +/** @returns {CustomObjectListItemSchema} */ +declare function CustomObjectListItemSchema(): CustomObjectListItemSchema; +type CustomObjectListItemSchema = { + _id?: string; + definition?: CustomObjectListItemDefinationSchema; + definition_id?: string; + display_name?: string; + references?: number; + status?: string; + updated_at?: string; +}; +/** @returns {CustomObjectMetaSchema} */ +declare function CustomObjectMetaSchema(): CustomObjectMetaSchema; +type CustomObjectMetaSchema = { + mo_defintion_type?: string; + mo_error_count?: number; + mo_success_count?: number; + mo_total_count?: number; +}; +/** @returns {CustomObjectRequestSchema} */ +declare function CustomObjectRequestSchema(): CustomObjectRequestSchema; +type CustomObjectRequestSchema = { + definition_id?: string; + fields?: CustomObjectEntryFieldSchema[]; + status?: string; +}; +/** @returns {CustomObjectSchema} */ +declare function CustomObjectSchema(): CustomObjectSchema; +type CustomObjectSchema = { + _id?: string; + application_id?: string; + company_id?: string; + created_by?: string; + creator?: string; + definition_id?: string; + display_name?: string; + fields?: CustomFieldSchema[]; + status?: string; + type?: string; + updated_by?: string; +}; +/** @returns {CustomObjectsSchema} */ +declare function CustomObjectsSchema(): CustomObjectsSchema; +type CustomObjectsSchema = { + items?: CustomObjectListItemSchema[]; + page?: Page; +}; /** @returns {DataLoaderResetResponseSchema} */ declare function DataLoaderResetResponseSchema(): DataLoaderResetResponseSchema; type DataLoaderResetResponseSchema = { @@ -989,17 +1834,46 @@ declare function DataLoadersSchema(): DataLoadersSchema; type DataLoadersSchema = { items?: DataLoaderSchema[]; }; +/** @returns {Date} */ +declare function Date(): Date; +type Date = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** @returns {DateMeta} */ declare function DateMeta(): DateMeta; type DateMeta = { created_on?: string; modified_on?: string; }; +/** @returns {Datetime} */ +declare function Datetime(): Datetime; +type Datetime = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** @returns {DefaultNavigationResponse} */ declare function DefaultNavigationResponse(): DefaultNavigationResponse; type DefaultNavigationResponse = { items?: NavigationSchema[]; }; +/** @returns {DefaultSchemaComponent} */ +declare function DefaultSchemaComponent(): DefaultSchemaComponent; +type DefaultSchemaComponent = { + items?: DefaultSEOSchemaMarkupTemplate[]; +}; +/** @returns {DefaultSEOSchemaMarkupTemplate} */ +declare function DefaultSEOSchemaMarkupTemplate(): DefaultSEOSchemaMarkupTemplate; +type DefaultSEOSchemaMarkupTemplate = { + page_type?: string; + schema?: string; +}; /** @returns {Detail} */ declare function Detail(): Detail; type Detail = { @@ -1007,6 +1881,15 @@ type Detail = { image_url?: string; title?: string; }; +/** @returns {Dropdown} */ +declare function Dropdown(): Dropdown; +type Dropdown = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** @returns {EditorMeta} */ declare function EditorMeta(): EditorMeta; type EditorMeta = { @@ -1057,6 +1940,54 @@ type FaqSchema = { slug?: string; tags?: string[]; }; +/** @returns {FieldDefinitionSchema} */ +declare function FieldDefinitionSchema(): FieldDefinitionSchema; +type FieldDefinitionSchema = { + _id?: string; + company_id?: string; + created_at?: string; + created_by?: string; + creator?: string; + description?: string; + invalid_fields_count?: number; + is_deleted?: boolean; + key?: string; + multi_value?: boolean; + name?: string; + namespace?: string; + required?: boolean; + resource?: string; + type?: string; + type_name?: string; + updated_at?: string; + updated_by?: string; + validations?: FieldValidations[]; +}; +/** @returns {FieldValidations} */ +declare function FieldValidations(): FieldValidations; +type FieldValidations = { + name?: string; + type?: string; + value?: any; +}; +/** @returns {File} */ +declare function File(): File; +type File = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; +/** @returns {FloatType} */ +declare function FloatType(): FloatType; +type FloatType = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** @returns {GeneratedSEOContent} */ declare function GeneratedSEOContent(): GeneratedSEOContent; type GeneratedSEOContent = { @@ -1103,6 +2034,24 @@ type HandpickedTagSchema = { type?: string; url?: string; }; +/** @returns {Integer} */ +declare function Integer(): Integer; +type Integer = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; +/** @returns {Json} */ +declare function Json(): Json; +type Json = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** @returns {LandingPageGetResponse} */ declare function LandingPageGetResponse(): LandingPageGetResponse; type LandingPageGetResponse = { @@ -1134,6 +2083,15 @@ type LocaleLanguage = { en_us?: Language; hi?: Language; }; +/** @returns {Metaobject} */ +declare function Metaobject(): Metaobject; +type Metaobject = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** @returns {NavigationGetResponse} */ declare function NavigationGetResponse(): NavigationGetResponse; type NavigationGetResponse = { @@ -1315,6 +2273,15 @@ type PhoneSchema = { active?: boolean; phone?: PhoneProperties[]; }; +/** @returns {Product} */ +declare function Product(): Product; +type Product = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** @returns {RemoveHandpickedSchema} */ declare function RemoveHandpickedSchema(): RemoveHandpickedSchema; type RemoveHandpickedSchema = { @@ -1326,6 +2293,27 @@ type ResourceContent = { type?: string; value?: string; }; +/** @returns {ResourceSchema} */ +declare function ResourceSchema(): ResourceSchema; +type ResourceSchema = { + /** + * - Number of definitions + */ + definitions_count?: number; + /** + * - Resource key + */ + key?: string; + /** + * - Resource name + */ + name?: string; +}; +/** @returns {ResourcesSchema} */ +declare function ResourcesSchema(): ResourcesSchema; +type ResourcesSchema = { + resources?: ResourceSchema[]; +}; /** @returns {ScheduleSchema} */ declare function ScheduleSchema(): ScheduleSchema; type ScheduleSchema = { @@ -1338,10 +2326,20 @@ type ScheduleSchema = { /** @returns {SEO} */ declare function SEO(): SEO; type SEO = { + breadcrumb?: SEObreadcrumb[]; + canonical_url?: string; description?: string; image?: SEOImage; + meta_tags?: SEOMetaItem[]; + sitemap?: SEOSitemap; title?: string; }; +/** @returns {SEObreadcrumb} */ +declare function SEObreadcrumb(): SEObreadcrumb; +type SEObreadcrumb = { + action?: Action; + url?: string; +}; /** @returns {SeoComponent} */ declare function SeoComponent(): SeoComponent; type SeoComponent = { @@ -1352,10 +2350,23 @@ declare function SEOImage(): SEOImage; type SEOImage = { url?: string; }; +/** @returns {SEOMetaItem} */ +declare function SEOMetaItem(): SEOMetaItem; +type SEOMetaItem = { + items?: SEOMetaItems[]; + title?: string; +}; +/** @returns {SEOMetaItems} */ +declare function SEOMetaItems(): SEOMetaItems; +type SEOMetaItems = { + key?: string; + value?: string; +}; /** @returns {SeoSchema} */ declare function SeoSchema(): SeoSchema; type SeoSchema = { _id?: string; + additional_sitemap?: string; app?: string; cannonical_enabled?: boolean; created_at?: string; @@ -1365,6 +2376,42 @@ type SeoSchema = { sitemap_enabled?: boolean; updated_at?: string; }; +/** @returns {SeoSchemaComponent} */ +declare function SeoSchemaComponent(): SeoSchemaComponent; +type SeoSchemaComponent = { + items?: SEOSchemaMarkupTemplate[]; + page?: Page; +}; +/** @returns {SEOSchemaMarkupTemplate} */ +declare function SEOSchemaMarkupTemplate(): SEOSchemaMarkupTemplate; +type SEOSchemaMarkupTemplate = { + active?: boolean; + application?: string; + created_at?: string; + description?: string; + id?: string; + page_type?: string; + schema?: string; + title?: string; + updated_at?: string; +}; +/** @returns {SEOSchemaMarkupTemplateRequestBody} */ +declare function SEOSchemaMarkupTemplateRequestBody(): SEOSchemaMarkupTemplateRequestBody; +type SEOSchemaMarkupTemplateRequestBody = { + active?: boolean; + created_at?: string; + description?: string; + page_type?: string; + schema?: string; + title?: string; + updated_at?: string; +}; +/** @returns {SEOSitemap} */ +declare function SEOSitemap(): SEOSitemap; +type SEOSitemap = { + frequency?: string; + priority?: number; +}; /** @returns {SlideshowGetResponse} */ declare function SlideshowGetResponse(): SlideshowGetResponse; type SlideshowGetResponse = { @@ -1404,6 +2451,24 @@ type SlideshowSchema = { platform?: string; slug?: string; }; +/** @returns {StringMultiLine} */ +declare function StringMultiLine(): StringMultiLine; +type StringMultiLine = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; +/** @returns {StringSingleLine} */ +declare function StringSingleLine(): StringSingleLine; +type StringSingleLine = { + category?: string; + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** @returns {Support} */ declare function Support(): Support; type Support = { @@ -1415,6 +2480,26 @@ type Support = { created_at?: string; updated_at?: string; }; +/** @returns {SupportedValidationsMetaExampleSchema} */ +declare function SupportedValidationsMetaExampleSchema(): SupportedValidationsMetaExampleSchema; +type SupportedValidationsMetaExampleSchema = { + name?: string; + value?: string; +}; +/** @returns {SupportedValidationsMetaSchema} */ +declare function SupportedValidationsMetaSchema(): SupportedValidationsMetaSchema; +type SupportedValidationsMetaSchema = { + examples?: SupportedValidationsMetaExampleSchema[]; +}; +/** @returns {SupportedValidationsSchema} */ +declare function SupportedValidationsSchema(): SupportedValidationsSchema; +type SupportedValidationsSchema = { + display?: string; + meta?: SupportedValidationsMetaSchema; + name?: string; + required?: boolean; + type?: string; +}; /** @returns {TagDeleteSuccessResponse} */ declare function TagDeleteSuccessResponse(): TagDeleteSuccessResponse; type TagDeleteSuccessResponse = { @@ -1457,6 +2542,14 @@ declare function UpdateHandpickedSchema(): UpdateHandpickedSchema; type UpdateHandpickedSchema = { tag?: HandpickedTagSchema; }; +/** @returns {Url} */ +declare function Url(): Url; +type Url = { + list_enabled?: boolean; + name?: string; + supported_validations?: SupportedValidationsSchema[]; + type?: string; +}; /** * Enum: GenerationEntityType Used By: Content * diff --git a/sdk/platform/Content/ContentPlatformModel.js b/sdk/platform/Content/ContentPlatformModel.js index 643c5e160..6289d73a9 100644 --- a/sdk/platform/Content/ContentPlatformModel.js +++ b/sdk/platform/Content/ContentPlatformModel.js @@ -116,6 +116,15 @@ const Joi = require("joi"); * @property {string} [title] */ +/** + * @typedef BooleanType + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** * @typedef CategoryRequestSchema * @property {string} [slug] @@ -232,6 +241,117 @@ const Joi = require("joi"); * @property {string} [start] */ +/** + * @typedef CustomDataDeleteSchema + * @property {string} [message] + * @property {boolean} [success] + */ + +/** + * @typedef CustomField + * @property {string} [definition_id] + * @property {Object[]} [value] + */ + +/** + * @typedef CustomFieldDefinitionDetailResSchema + * @property {string} [_id] + * @property {string} [application_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [description] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [namespace] + * @property {boolean} [required] + * @property {string} [resource] + * @property {string} [type] + * @property {string} [updated_at] + * @property {string} [updated_by] + * @property {Object[]} [validations] + */ + +/** + * @typedef CustomFieldDefinitionRequestSchema + * @property {string} [description] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [namespace] + * @property {string} [resource] + * @property {string} [type] + * @property {FieldValidations[]} [validations] + */ + +/** + * @typedef CustomFieldDefinitionsSchema + * @property {FieldDefinitionSchema[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef CustomFieldRequestSchema + * @property {CustomField[]} [fields] + */ + +/** + * @typedef CustomFieldSchema + * @property {string} [_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [definition_id] + * @property {boolean} [has_invalid_values] + * @property {Object[]} [invalid_value_errors] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [namespace] + * @property {string} [resource] + * @property {string} [resource_id] + * @property {string} [type] + * @property {string} [updated_at] + * @property {CustomFieldValue[]} [value] + */ + +/** + * @typedef CustomFieldsResponseByResourceIdSchema + * @property {CustomFieldSchema[]} [items] + */ + +/** + * @typedef CustomFieldsResponseSchema + * @property {CustomFieldSchema[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef CustomFieldTypeSchema + * @property {BooleanType} [boolean_type] + * @property {Date} [date] + * @property {Datetime} [datetime] + * @property {Dropdown} [dropdown] + * @property {File} [file] + * @property {FloatType} [float_type] + * @property {Integer} [integer] + * @property {Json} [json] + * @property {Metaobject} [metaobject] + * @property {Product} [product] + * @property {StringMultiLine} [string_multi_line] + * @property {StringSingleLine} [string_single_line] + * @property {Url} [url] + */ + +/** + * @typedef CustomFieldValue + * @property {Object} [value] + */ + /** * @typedef CustomMetaTag * @property {string} [_id] @@ -239,6 +359,220 @@ const Joi = require("joi"); * @property {string} [name] */ +/** + * @typedef CustomObjectBulkEntry + * @property {CustomObjectJobSchema[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef CustomObjectBulkEntryInitiateDownload + * @property {string} [message] + * @property {string} [task_id] + */ + +/** + * @typedef CustomObjectBulkSchema + * @property {number} [total_records] + * @property {string} [url] + */ + +/** + * @typedef CustomObjectByIdSchema + * @property {string} [_id] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {string} [display_name] + * @property {CustomObjectFieldSchema[]} [fields] + * @property {Object[]} [references] + * @property {string} [status] + */ + +/** + * @typedef CustomObjectCustomFieldDefinitionResSchema + * @property {string} [_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [description] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {string} [metaobject_definition_id] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [namespace] + * @property {boolean} [required] + * @property {string} [resource] + * @property {string} [type] + * @property {string} [updated_at] + * @property {FieldValidations[]} [validations] + */ + +/** + * @typedef CustomObjectCustomFieldDefinitions + * @property {string} [action] + * @property {string} [description] + * @property {string} [id] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {boolean} [required] + * @property {string} [type] + * @property {FieldValidations[]} [validations] + */ + +/** + * @typedef CustomObjectDefinitionDeleteResponseSchema + * @property {string} [message] + * @property {boolean} [success] + */ + +/** + * @typedef CustomObjectDefinitionRequestSchema + * @property {string} [description] + * @property {string} [display_name_key] + * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] + * @property {string} [name] + * @property {string} [type] + */ + +/** + * @typedef CustomObjectDefinitionSchema + * @property {string} [_id] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [description] + * @property {string} [display_name_key] + * @property {CustomObjectCustomFieldDefinitionResSchema[]} [field_definitions] + * @property {string} [name] + * @property {string} [type] + * @property {string} [updated_by] + */ + +/** + * @typedef CustomObjectDefinitionsSchema + * @property {CustomObjectEntry[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef CustomObjectDefinitionUpdateRequestSchema + * @property {string} [description] + * @property {string} [display_name_key] + * @property {CustomObjectCustomFieldDefinitions[]} [field_definitions] + * @property {string} [name] + * @property {string} [type] + */ + +/** + * @typedef CustomObjectEntry + * @property {string} [_id] + * @property {number} [entries_count] + * @property {number} [fields_count] + * @property {string} [name] + * @property {string} [type] + * @property {string} [updated_at] + */ + +/** + * @typedef CustomObjectEntryBulkUploadResponse + * @property {number} [total_records] + * @property {string} [url] + */ + +/** + * @typedef CustomObjectEntryFieldSchema + * @property {string} [definition_id] + * @property {Object[]} [value] + */ + +/** + * @typedef CustomObjectFieldSchema + * @property {string} [_id] + * @property {string} [definition_id] + * @property {string} [key] + * @property {string} [type] + * @property {Object[]} [value] + */ + +/** + * @typedef CustomObjectJobSchema + * @property {string} [_id] + * @property {string} [action_type] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [entity] + * @property {number} [error_count] + * @property {string[]} [error_jobs] + * @property {string} [error_url] + * @property {string[]} [errors_occured] + * @property {number} [finished_count] + * @property {string[]} [finished_jobs] + * @property {string[]} [jobs] + * @property {CustomObjectMetaSchema} [meta] + * @property {string} [status] + * @property {number} [success_count] + * @property {number} [total_jobs] + * @property {string} [updated_at] + * @property {string} [url] + */ + +/** + * @typedef CustomObjectListItemDefinationSchema + * @property {string} [_id] + * @property {string} [name] + * @property {string} [type] + */ + +/** + * @typedef CustomObjectListItemSchema + * @property {string} [_id] + * @property {CustomObjectListItemDefinationSchema} [definition] + * @property {string} [definition_id] + * @property {string} [display_name] + * @property {number} [references] + * @property {string} [status] + * @property {string} [updated_at] + */ + +/** + * @typedef CustomObjectMetaSchema + * @property {string} [mo_defintion_type] + * @property {number} [mo_error_count] + * @property {number} [mo_success_count] + * @property {number} [mo_total_count] + */ + +/** + * @typedef CustomObjectRequestSchema + * @property {string} [definition_id] + * @property {CustomObjectEntryFieldSchema[]} [fields] + * @property {string} [status] + */ + +/** + * @typedef CustomObjectSchema + * @property {string} [_id] + * @property {string} [application_id] + * @property {string} [company_id] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [definition_id] + * @property {string} [display_name] + * @property {CustomFieldSchema[]} [fields] + * @property {string} [status] + * @property {string} [type] + * @property {string} [updated_by] + */ + +/** + * @typedef CustomObjectsSchema + * @property {CustomObjectListItemSchema[]} [items] + * @property {Page} [page] + */ + /** * @typedef DataLoaderResetResponseSchema * @property {boolean} [reset] @@ -281,17 +615,46 @@ const Joi = require("joi"); * @property {DataLoaderSchema[]} [items] */ +/** + * @typedef Date + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** * @typedef DateMeta * @property {string} [created_on] * @property {string} [modified_on] */ +/** + * @typedef Datetime + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** * @typedef DefaultNavigationResponse * @property {NavigationSchema[]} [items] */ +/** + * @typedef DefaultSchemaComponent + * @property {DefaultSEOSchemaMarkupTemplate[]} [items] + */ + +/** + * @typedef DefaultSEOSchemaMarkupTemplate + * @property {string} [page_type] + * @property {string} [schema] + */ + /** * @typedef Detail * @property {string} [description] @@ -299,6 +662,15 @@ const Joi = require("joi"); * @property {string} [title] */ +/** + * @typedef Dropdown + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** * @typedef EditorMeta * @property {string} [background_color] @@ -349,6 +721,54 @@ const Joi = require("joi"); * @property {string[]} [tags] */ +/** + * @typedef FieldDefinitionSchema + * @property {string} [_id] + * @property {string} [company_id] + * @property {string} [created_at] + * @property {string} [created_by] + * @property {string} [creator] + * @property {string} [description] + * @property {number} [invalid_fields_count] + * @property {boolean} [is_deleted] + * @property {string} [key] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {string} [namespace] + * @property {boolean} [required] + * @property {string} [resource] + * @property {string} [type] + * @property {string} [type_name] + * @property {string} [updated_at] + * @property {string} [updated_by] + * @property {FieldValidations[]} [validations] + */ + +/** + * @typedef FieldValidations + * @property {string} [name] + * @property {string} [type] + * @property {Object} [value] + */ + +/** + * @typedef File + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + +/** + * @typedef FloatType + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** * @typedef GeneratedSEOContent * @property {string} [description] @@ -395,6 +815,24 @@ const Joi = require("joi"); * @property {string} [url] */ +/** + * @typedef Integer + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + +/** + * @typedef Json + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** * @typedef LandingPageGetResponse * @property {LandingPageSchema[]} [items] @@ -426,6 +864,15 @@ const Joi = require("joi"); * @property {Language} [hi] */ +/** + * @typedef Metaobject + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** * @typedef NavigationGetResponse * @property {NavigationSchema[]} [items] @@ -604,6 +1051,15 @@ const Joi = require("joi"); * @property {PhoneProperties[]} [phone] */ +/** + * @typedef Product + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** * @typedef RemoveHandpickedSchema * @property {string[]} [tags] @@ -615,6 +1071,18 @@ const Joi = require("joi"); * @property {string} [value] */ +/** + * @typedef ResourceSchema + * @property {number} [definitions_count] - Number of definitions + * @property {string} [key] - Resource key + * @property {string} [name] - Resource name + */ + +/** + * @typedef ResourcesSchema + * @property {ResourceSchema[]} [resources] + */ + /** * @typedef ScheduleSchema * @property {string} [cron] @@ -626,11 +1094,21 @@ const Joi = require("joi"); /** * @typedef SEO + * @property {SEObreadcrumb[]} [breadcrumb] + * @property {string} [canonical_url] * @property {string} [description] * @property {SEOImage} [image] + * @property {SEOMetaItem[]} [meta_tags] + * @property {SEOSitemap} [sitemap] * @property {string} [title] */ +/** + * @typedef SEObreadcrumb + * @property {Action} [action] + * @property {string} [url] + */ + /** * @typedef SeoComponent * @property {SeoSchema} [seo] @@ -641,9 +1119,22 @@ const Joi = require("joi"); * @property {string} [url] */ +/** + * @typedef SEOMetaItem + * @property {SEOMetaItems[]} [items] + * @property {string} [title] + */ + +/** + * @typedef SEOMetaItems + * @property {string} [key] + * @property {string} [value] + */ + /** * @typedef SeoSchema * @property {string} [_id] + * @property {string} [additional_sitemap] * @property {string} [app] * @property {boolean} [cannonical_enabled] * @property {string} [created_at] @@ -654,6 +1145,42 @@ const Joi = require("joi"); * @property {string} [updated_at] */ +/** + * @typedef SeoSchemaComponent + * @property {SEOSchemaMarkupTemplate[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef SEOSchemaMarkupTemplate + * @property {boolean} [active] + * @property {string} [application] + * @property {string} [created_at] + * @property {string} [description] + * @property {string} [id] + * @property {string} [page_type] + * @property {string} [schema] + * @property {string} [title] + * @property {string} [updated_at] + */ + +/** + * @typedef SEOSchemaMarkupTemplateRequestBody + * @property {boolean} [active] + * @property {string} [created_at] + * @property {string} [description] + * @property {string} [page_type] + * @property {string} [schema] + * @property {string} [title] + * @property {string} [updated_at] + */ + +/** + * @typedef SEOSitemap + * @property {string} [frequency] + * @property {number} [priority] + */ + /** * @typedef SlideshowGetResponse * @property {SlideshowSchema[]} [items] @@ -693,6 +1220,24 @@ const Joi = require("joi"); * @property {string} [slug] */ +/** + * @typedef StringMultiLine + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + +/** + * @typedef StringSingleLine + * @property {string} [category] + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** * @typedef Support * @property {string} [_id] @@ -704,6 +1249,26 @@ const Joi = require("joi"); * @property {string} [updated_at] */ +/** + * @typedef SupportedValidationsMetaExampleSchema + * @property {string} [name] + * @property {string} [value] + */ + +/** + * @typedef SupportedValidationsMetaSchema + * @property {SupportedValidationsMetaExampleSchema[]} [examples] + */ + +/** + * @typedef SupportedValidationsSchema + * @property {string} [display] + * @property {SupportedValidationsMetaSchema} [meta] + * @property {string} [name] + * @property {boolean} [required] + * @property {string} [type] + */ + /** * @typedef TagDeleteSuccessResponse * @property {boolean} [success] @@ -746,6 +1311,14 @@ const Joi = require("joi"); * @property {HandpickedTagSchema} [tag] */ +/** + * @typedef Url + * @property {boolean} [list_enabled] + * @property {string} [name] + * @property {SupportedValidationsSchema[]} [supported_validations] + * @property {string} [type] + */ + /** @typedef {"title" | "description"} GenerationEntityType */ /** @@ -944,6 +1517,19 @@ class ContentPlatformModel { }); } + /** @returns {BooleanType} */ + static BooleanType() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** @returns {CategoryRequestSchema} */ static CategoryRequestSchema() { return Joi.object({ @@ -1017,87 +1603,488 @@ class ContentPlatformModel { }); } - /** @returns {CreateAnnouncementSchema} */ - static CreateAnnouncementSchema() { + /** @returns {CreateAnnouncementSchema} */ + static CreateAnnouncementSchema() { + return Joi.object({ + data: ContentPlatformModel.AdminAnnouncementSchema(), + message: Joi.string().allow(""), + }); + } + + /** @returns {CreatedBySchema} */ + static CreatedBySchema() { + return Joi.object({ + id: Joi.string().allow(""), + }); + } + + /** @returns {CreateFaqCategoryRequestSchema} */ + static CreateFaqCategoryRequestSchema() { + return Joi.object({ + category: ContentPlatformModel.CategoryRequestSchema(), + }); + } + + /** @returns {CreateFaqCategorySchema} */ + static CreateFaqCategorySchema() { + return Joi.object({ + category: ContentPlatformModel.CategorySchema(), + }); + } + + /** @returns {CreateFaqResponseSchema} */ + static CreateFaqResponseSchema() { + return Joi.object({ + faq: ContentPlatformModel.FaqSchema(), + }); + } + + /** @returns {CreateFaqSchema} */ + static CreateFaqSchema() { + return Joi.object({ + faq: ContentPlatformModel.FAQ(), + }); + } + + /** @returns {CreateTagRequestSchema} */ + static CreateTagRequestSchema() { + return Joi.object({ + tags: Joi.array().items(ContentPlatformModel.CreateTagSchema()), + }); + } + + /** @returns {CreateTagSchema} */ + static CreateTagSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + attributes: Joi.any(), + content: Joi.string().allow(""), + name: Joi.string().allow(""), + pages: Joi.array().items(Joi.any()), + position: Joi.string().allow(""), + sub_type: Joi.string().allow(""), + type: Joi.string().allow(""), + url: Joi.string().allow(""), + }); + } + + /** @returns {CronSchedule} */ + static CronSchedule() { + return Joi.object({ + cron: Joi.string().allow(""), + duration: Joi.number(), + end: Joi.string().allow(""), + start: Joi.string().allow(""), + }); + } + + /** @returns {CustomDataDeleteSchema} */ + static CustomDataDeleteSchema() { + return Joi.object({ + message: Joi.string().allow(""), + success: Joi.boolean(), + }); + } + + /** @returns {CustomField} */ + static CustomField() { + return Joi.object({ + definition_id: Joi.string().allow(""), + value: Joi.array().items(Joi.any()), + }); + } + + /** @returns {CustomFieldDefinitionDetailResSchema} */ + static CustomFieldDefinitionDetailResSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + application_id: Joi.string().allow(""), + company_id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + created_by: Joi.string().allow(""), + creator: Joi.string().allow(""), + description: Joi.string().allow(""), + is_deleted: Joi.boolean(), + key: Joi.string().allow(""), + multi_value: Joi.boolean(), + name: Joi.string().allow(""), + namespace: Joi.string().allow(""), + required: Joi.boolean(), + resource: Joi.string().allow(""), + type: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + updated_by: Joi.string().allow(""), + validations: Joi.array().items(Joi.any()), + }); + } + + /** @returns {CustomFieldDefinitionRequestSchema} */ + static CustomFieldDefinitionRequestSchema() { + return Joi.object({ + description: Joi.string().allow(""), + key: Joi.string().allow(""), + multi_value: Joi.boolean(), + name: Joi.string().allow(""), + namespace: Joi.string().allow(""), + resource: Joi.string().allow(""), + type: Joi.string().allow(""), + validations: Joi.array().items(ContentPlatformModel.FieldValidations()), + }); + } + + /** @returns {CustomFieldDefinitionsSchema} */ + static CustomFieldDefinitionsSchema() { + return Joi.object({ + items: Joi.array().items(ContentPlatformModel.FieldDefinitionSchema()), + page: ContentPlatformModel.Page(), + }); + } + + /** @returns {CustomFieldRequestSchema} */ + static CustomFieldRequestSchema() { + return Joi.object({ + fields: Joi.array().items(ContentPlatformModel.CustomField()), + }); + } + + /** @returns {CustomFieldSchema} */ + static CustomFieldSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + company_id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + created_by: Joi.string().allow(""), + creator: Joi.string().allow(""), + definition_id: Joi.string().allow(""), + has_invalid_values: Joi.boolean(), + invalid_value_errors: Joi.array().items(Joi.any()), + is_deleted: Joi.boolean(), + key: Joi.string().allow(""), + multi_value: Joi.boolean(), + namespace: Joi.string().allow(""), + resource: Joi.string().allow(""), + resource_id: Joi.string().allow(""), + type: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + value: Joi.array().items(ContentPlatformModel.CustomFieldValue()), + }); + } + + /** @returns {CustomFieldsResponseByResourceIdSchema} */ + static CustomFieldsResponseByResourceIdSchema() { + return Joi.object({ + items: Joi.array().items(ContentPlatformModel.CustomFieldSchema()), + }); + } + + /** @returns {CustomFieldsResponseSchema} */ + static CustomFieldsResponseSchema() { + return Joi.object({ + items: Joi.array().items(ContentPlatformModel.CustomFieldSchema()), + page: ContentPlatformModel.Page(), + }); + } + + /** @returns {CustomFieldTypeSchema} */ + static CustomFieldTypeSchema() { + return Joi.object({ + boolean_type: ContentPlatformModel.BooleanType(), + date: ContentPlatformModel.Date(), + datetime: ContentPlatformModel.Datetime(), + dropdown: ContentPlatformModel.Dropdown(), + file: ContentPlatformModel.File(), + float_type: ContentPlatformModel.FloatType(), + integer: ContentPlatformModel.Integer(), + json: ContentPlatformModel.Json(), + metaobject: ContentPlatformModel.Metaobject(), + product: ContentPlatformModel.Product(), + string_multi_line: ContentPlatformModel.StringMultiLine(), + string_single_line: ContentPlatformModel.StringSingleLine(), + url: ContentPlatformModel.Url(), + }); + } + + /** @returns {CustomFieldValue} */ + static CustomFieldValue() { + return Joi.object({ + value: Joi.any(), + }); + } + + /** @returns {CustomMetaTag} */ + static CustomMetaTag() { + return Joi.object({ + _id: Joi.string().allow(""), + content: Joi.string().allow(""), + name: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectBulkEntry} */ + static CustomObjectBulkEntry() { + return Joi.object({ + items: Joi.array().items(ContentPlatformModel.CustomObjectJobSchema()), + page: ContentPlatformModel.Page(), + }); + } + + /** @returns {CustomObjectBulkEntryInitiateDownload} */ + static CustomObjectBulkEntryInitiateDownload() { + return Joi.object({ + message: Joi.string().allow(""), + task_id: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectBulkSchema} */ + static CustomObjectBulkSchema() { + return Joi.object({ + total_records: Joi.number(), + url: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectByIdSchema} */ + static CustomObjectByIdSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + definition: ContentPlatformModel.CustomObjectListItemDefinationSchema(), + display_name: Joi.string().allow(""), + fields: Joi.array().items(ContentPlatformModel.CustomObjectFieldSchema()), + references: Joi.array().items(Joi.any()), + status: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectCustomFieldDefinitionResSchema} */ + static CustomObjectCustomFieldDefinitionResSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + company_id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + created_by: Joi.string().allow(""), + creator: Joi.string().allow(""), + description: Joi.string().allow(""), + is_deleted: Joi.boolean(), + key: Joi.string().allow(""), + metaobject_definition_id: Joi.string().allow(""), + multi_value: Joi.boolean(), + name: Joi.string().allow(""), + namespace: Joi.string().allow(""), + required: Joi.boolean(), + resource: Joi.string().allow(""), + type: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + validations: Joi.array().items(ContentPlatformModel.FieldValidations()), + }); + } + + /** @returns {CustomObjectCustomFieldDefinitions} */ + static CustomObjectCustomFieldDefinitions() { + return Joi.object({ + action: Joi.string().allow(""), + description: Joi.string().allow(""), + id: Joi.string().allow(""), + key: Joi.string().allow(""), + multi_value: Joi.boolean(), + name: Joi.string().allow(""), + required: Joi.boolean(), + type: Joi.string().allow(""), + validations: Joi.array().items(ContentPlatformModel.FieldValidations()), + }); + } + + /** @returns {CustomObjectDefinitionDeleteResponseSchema} */ + static CustomObjectDefinitionDeleteResponseSchema() { + return Joi.object({ + message: Joi.string().allow(""), + success: Joi.boolean(), + }); + } + + /** @returns {CustomObjectDefinitionRequestSchema} */ + static CustomObjectDefinitionRequestSchema() { + return Joi.object({ + description: Joi.string().allow(""), + display_name_key: Joi.string().allow(""), + field_definitions: Joi.array().items( + ContentPlatformModel.CustomObjectCustomFieldDefinitions() + ), + name: Joi.string().allow(""), + type: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectDefinitionSchema} */ + static CustomObjectDefinitionSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + created_by: Joi.string().allow(""), + creator: Joi.string().allow(""), + description: Joi.string().allow(""), + display_name_key: Joi.string().allow(""), + field_definitions: Joi.array().items( + ContentPlatformModel.CustomObjectCustomFieldDefinitionResSchema() + ), + name: Joi.string().allow(""), + type: Joi.string().allow(""), + updated_by: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectDefinitionsSchema} */ + static CustomObjectDefinitionsSchema() { + return Joi.object({ + items: Joi.array().items(ContentPlatformModel.CustomObjectEntry()), + page: ContentPlatformModel.Page(), + }); + } + + /** @returns {CustomObjectDefinitionUpdateRequestSchema} */ + static CustomObjectDefinitionUpdateRequestSchema() { + return Joi.object({ + description: Joi.string().allow(""), + display_name_key: Joi.string().allow(""), + field_definitions: Joi.array().items( + ContentPlatformModel.CustomObjectCustomFieldDefinitions() + ), + name: Joi.string().allow(""), + type: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectEntry} */ + static CustomObjectEntry() { + return Joi.object({ + _id: Joi.string().allow(""), + entries_count: Joi.number(), + fields_count: Joi.number(), + name: Joi.string().allow(""), + type: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectEntryBulkUploadResponse} */ + static CustomObjectEntryBulkUploadResponse() { + return Joi.object({ + total_records: Joi.number(), + url: Joi.string().allow(""), + }); + } + + /** @returns {CustomObjectEntryFieldSchema} */ + static CustomObjectEntryFieldSchema() { return Joi.object({ - data: ContentPlatformModel.AdminAnnouncementSchema(), - message: Joi.string().allow(""), + definition_id: Joi.string().allow(""), + value: Joi.array().items(Joi.any()), }); } - /** @returns {CreatedBySchema} */ - static CreatedBySchema() { + /** @returns {CustomObjectFieldSchema} */ + static CustomObjectFieldSchema() { return Joi.object({ - id: Joi.string().allow(""), + _id: Joi.string().allow(""), + definition_id: Joi.string().allow(""), + key: Joi.string().allow(""), + type: Joi.string().allow(""), + value: Joi.array().items(Joi.any()), }); } - /** @returns {CreateFaqCategoryRequestSchema} */ - static CreateFaqCategoryRequestSchema() { + /** @returns {CustomObjectJobSchema} */ + static CustomObjectJobSchema() { return Joi.object({ - category: ContentPlatformModel.CategoryRequestSchema(), + _id: Joi.string().allow(""), + action_type: Joi.string().allow(""), + company_id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + created_by: Joi.string().allow(""), + creator: Joi.string().allow(""), + entity: Joi.string().allow(""), + error_count: Joi.number(), + error_jobs: Joi.array().items(Joi.string().allow("")), + error_url: Joi.string().allow(""), + errors_occured: Joi.array().items(Joi.string().allow("")), + finished_count: Joi.number(), + finished_jobs: Joi.array().items(Joi.string().allow("")), + jobs: Joi.array().items(Joi.string().allow("")), + meta: ContentPlatformModel.CustomObjectMetaSchema(), + status: Joi.string().allow(""), + success_count: Joi.number(), + total_jobs: Joi.number(), + updated_at: Joi.string().allow(""), + url: Joi.string().allow(""), }); } - /** @returns {CreateFaqCategorySchema} */ - static CreateFaqCategorySchema() { + /** @returns {CustomObjectListItemDefinationSchema} */ + static CustomObjectListItemDefinationSchema() { return Joi.object({ - category: ContentPlatformModel.CategorySchema(), + _id: Joi.string().allow(""), + name: Joi.string().allow(""), + type: Joi.string().allow(""), }); } - /** @returns {CreateFaqResponseSchema} */ - static CreateFaqResponseSchema() { + /** @returns {CustomObjectListItemSchema} */ + static CustomObjectListItemSchema() { return Joi.object({ - faq: ContentPlatformModel.FaqSchema(), + _id: Joi.string().allow(""), + definition: ContentPlatformModel.CustomObjectListItemDefinationSchema(), + definition_id: Joi.string().allow(""), + display_name: Joi.string().allow(""), + references: Joi.number(), + status: Joi.string().allow(""), + updated_at: Joi.string().allow(""), }); } - /** @returns {CreateFaqSchema} */ - static CreateFaqSchema() { + /** @returns {CustomObjectMetaSchema} */ + static CustomObjectMetaSchema() { return Joi.object({ - faq: ContentPlatformModel.FAQ(), + mo_defintion_type: Joi.string().allow(""), + mo_error_count: Joi.number(), + mo_success_count: Joi.number(), + mo_total_count: Joi.number(), }); } - /** @returns {CreateTagRequestSchema} */ - static CreateTagRequestSchema() { + /** @returns {CustomObjectRequestSchema} */ + static CustomObjectRequestSchema() { return Joi.object({ - tags: Joi.array().items(ContentPlatformModel.CreateTagSchema()), + definition_id: Joi.string().allow(""), + fields: Joi.array().items( + ContentPlatformModel.CustomObjectEntryFieldSchema() + ), + status: Joi.string().allow(""), }); } - /** @returns {CreateTagSchema} */ - static CreateTagSchema() { + /** @returns {CustomObjectSchema} */ + static CustomObjectSchema() { return Joi.object({ _id: Joi.string().allow(""), - attributes: Joi.any(), - content: Joi.string().allow(""), - name: Joi.string().allow(""), - pages: Joi.array().items(Joi.any()), - position: Joi.string().allow(""), - sub_type: Joi.string().allow(""), + application_id: Joi.string().allow(""), + company_id: Joi.string().allow(""), + created_by: Joi.string().allow(""), + creator: Joi.string().allow(""), + definition_id: Joi.string().allow(""), + display_name: Joi.string().allow(""), + fields: Joi.array().items(ContentPlatformModel.CustomFieldSchema()), + status: Joi.string().allow(""), type: Joi.string().allow(""), - url: Joi.string().allow(""), - }); - } - - /** @returns {CronSchedule} */ - static CronSchedule() { - return Joi.object({ - cron: Joi.string().allow(""), - duration: Joi.number(), - end: Joi.string().allow(""), - start: Joi.string().allow(""), + updated_by: Joi.string().allow(""), }); } - /** @returns {CustomMetaTag} */ - static CustomMetaTag() { + /** @returns {CustomObjectsSchema} */ + static CustomObjectsSchema() { return Joi.object({ - _id: Joi.string().allow(""), - content: Joi.string().allow(""), - name: Joi.string().allow(""), + items: Joi.array().items( + ContentPlatformModel.CustomObjectListItemSchema() + ), + page: ContentPlatformModel.Page(), }); } @@ -1153,6 +2140,19 @@ class ContentPlatformModel { }); } + /** @returns {Date} */ + static Date() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** @returns {DateMeta} */ static DateMeta() { return Joi.object({ @@ -1161,6 +2161,19 @@ class ContentPlatformModel { }); } + /** @returns {Datetime} */ + static Datetime() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** @returns {DefaultNavigationResponse} */ static DefaultNavigationResponse() { return Joi.object({ @@ -1168,6 +2181,23 @@ class ContentPlatformModel { }); } + /** @returns {DefaultSchemaComponent} */ + static DefaultSchemaComponent() { + return Joi.object({ + items: Joi.array().items( + ContentPlatformModel.DefaultSEOSchemaMarkupTemplate() + ), + }); + } + + /** @returns {DefaultSEOSchemaMarkupTemplate} */ + static DefaultSEOSchemaMarkupTemplate() { + return Joi.object({ + page_type: Joi.string().allow(""), + schema: Joi.string().allow(""), + }); + } + /** @returns {Detail} */ static Detail() { return Joi.object({ @@ -1177,6 +2207,19 @@ class ContentPlatformModel { }); } + /** @returns {Dropdown} */ + static Dropdown() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** @returns {EditorMeta} */ static EditorMeta() { return Joi.object({ @@ -1239,6 +2282,66 @@ class ContentPlatformModel { }); } + /** @returns {FieldDefinitionSchema} */ + static FieldDefinitionSchema() { + return Joi.object({ + _id: Joi.string().allow(""), + company_id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + created_by: Joi.string().allow(""), + creator: Joi.string().allow(""), + description: Joi.string().allow(""), + invalid_fields_count: Joi.number(), + is_deleted: Joi.boolean(), + key: Joi.string().allow(""), + multi_value: Joi.boolean(), + name: Joi.string().allow(""), + namespace: Joi.string().allow(""), + required: Joi.boolean(), + resource: Joi.string().allow(""), + type: Joi.string().allow(""), + type_name: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + updated_by: Joi.string().allow(""), + validations: Joi.array().items(ContentPlatformModel.FieldValidations()), + }); + } + + /** @returns {FieldValidations} */ + static FieldValidations() { + return Joi.object({ + name: Joi.string().allow(""), + type: Joi.string().allow(""), + value: Joi.any(), + }); + } + + /** @returns {File} */ + static File() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + + /** @returns {FloatType} */ + static FloatType() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** @returns {GeneratedSEOContent} */ static GeneratedSEOContent() { return Joi.object({ @@ -1299,6 +2402,32 @@ class ContentPlatformModel { }); } + /** @returns {Integer} */ + static Integer() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + + /** @returns {Json} */ + static Json() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** @returns {LandingPageGetResponse} */ static LandingPageGetResponse() { return Joi.object({ @@ -1338,6 +2467,19 @@ class ContentPlatformModel { }); } + /** @returns {Metaobject} */ + static Metaobject() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** @returns {NavigationGetResponse} */ static NavigationGetResponse() { return Joi.object({ @@ -1553,6 +2695,19 @@ class ContentPlatformModel { }); } + /** @returns {Product} */ + static Product() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** @returns {RemoveHandpickedSchema} */ static RemoveHandpickedSchema() { return Joi.object({ @@ -1568,6 +2723,22 @@ class ContentPlatformModel { }); } + /** @returns {ResourceSchema} */ + static ResourceSchema() { + return Joi.object({ + definitions_count: Joi.number(), + key: Joi.string().allow(""), + name: Joi.string().allow(""), + }); + } + + /** @returns {ResourcesSchema} */ + static ResourcesSchema() { + return Joi.object({ + resources: Joi.array().items(ContentPlatformModel.ResourceSchema()), + }); + } + /** @returns {ScheduleSchema} */ static ScheduleSchema() { return Joi.object({ @@ -1582,12 +2753,24 @@ class ContentPlatformModel { /** @returns {SEO} */ static SEO() { return Joi.object({ + breadcrumb: Joi.array().items(ContentPlatformModel.SEObreadcrumb()), + canonical_url: Joi.string().allow(""), description: Joi.string().allow(""), image: ContentPlatformModel.SEOImage(), + meta_tags: Joi.array().items(ContentPlatformModel.SEOMetaItem()), + sitemap: ContentPlatformModel.SEOSitemap(), title: Joi.string().allow(""), }); } + /** @returns {SEObreadcrumb} */ + static SEObreadcrumb() { + return Joi.object({ + action: ContentPlatformModel.Action(), + url: Joi.string().allow(""), + }); + } + /** @returns {SeoComponent} */ static SeoComponent() { return Joi.object({ @@ -1602,10 +2785,27 @@ class ContentPlatformModel { }); } + /** @returns {SEOMetaItem} */ + static SEOMetaItem() { + return Joi.object({ + items: Joi.array().items(ContentPlatformModel.SEOMetaItems()), + title: Joi.string().allow(""), + }); + } + + /** @returns {SEOMetaItems} */ + static SEOMetaItems() { + return Joi.object({ + key: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + /** @returns {SeoSchema} */ static SeoSchema() { return Joi.object({ _id: Joi.string().allow(""), + additional_sitemap: Joi.string().allow(""), app: Joi.string().allow(""), cannonical_enabled: Joi.boolean(), created_at: Joi.string().allow(""), @@ -1617,6 +2817,50 @@ class ContentPlatformModel { }); } + /** @returns {SeoSchemaComponent} */ + static SeoSchemaComponent() { + return Joi.object({ + items: Joi.array().items(ContentPlatformModel.SEOSchemaMarkupTemplate()), + page: ContentPlatformModel.Page(), + }); + } + + /** @returns {SEOSchemaMarkupTemplate} */ + static SEOSchemaMarkupTemplate() { + return Joi.object({ + active: Joi.boolean(), + application: Joi.string().allow(""), + created_at: Joi.string().allow(""), + description: Joi.string().allow(""), + id: Joi.string().allow(""), + page_type: Joi.string().allow(""), + schema: Joi.string().allow(""), + title: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + }); + } + + /** @returns {SEOSchemaMarkupTemplateRequestBody} */ + static SEOSchemaMarkupTemplateRequestBody() { + return Joi.object({ + active: Joi.boolean(), + created_at: Joi.string().allow(""), + description: Joi.string().allow(""), + page_type: Joi.string().allow(""), + schema: Joi.string().allow(""), + title: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + }); + } + + /** @returns {SEOSitemap} */ + static SEOSitemap() { + return Joi.object({ + frequency: Joi.string().allow(""), + priority: Joi.number(), + }); + } + /** @returns {SlideshowGetResponse} */ static SlideshowGetResponse() { return Joi.object({ @@ -1664,6 +2908,32 @@ class ContentPlatformModel { }); } + /** @returns {StringMultiLine} */ + static StringMultiLine() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + + /** @returns {StringSingleLine} */ + static StringSingleLine() { + return Joi.object({ + category: Joi.string().allow(""), + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** @returns {Support} */ static Support() { return Joi.object({ @@ -1677,6 +2947,34 @@ class ContentPlatformModel { }); } + /** @returns {SupportedValidationsMetaExampleSchema} */ + static SupportedValidationsMetaExampleSchema() { + return Joi.object({ + name: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {SupportedValidationsMetaSchema} */ + static SupportedValidationsMetaSchema() { + return Joi.object({ + examples: Joi.array().items( + ContentPlatformModel.SupportedValidationsMetaExampleSchema() + ), + }); + } + + /** @returns {SupportedValidationsSchema} */ + static SupportedValidationsSchema() { + return Joi.object({ + display: Joi.string().allow(""), + meta: ContentPlatformModel.SupportedValidationsMetaSchema(), + name: Joi.string().allow(""), + required: Joi.boolean(), + type: Joi.string().allow(""), + }); + } + /** @returns {TagDeleteSuccessResponse} */ static TagDeleteSuccessResponse() { return Joi.object({ @@ -1731,6 +3029,18 @@ class ContentPlatformModel { }); } + /** @returns {Url} */ + static Url() { + return Joi.object({ + list_enabled: Joi.boolean(), + name: Joi.string().allow(""), + supported_validations: Joi.array().items( + ContentPlatformModel.SupportedValidationsSchema() + ), + type: Joi.string().allow(""), + }); + } + /** * Enum: GenerationEntityType Used By: Content * diff --git a/sdk/platform/Content/ContentPlatformValidator.d.ts b/sdk/platform/Content/ContentPlatformValidator.d.ts new file mode 100644 index 000000000..2aac0f630 --- /dev/null +++ b/sdk/platform/Content/ContentPlatformValidator.d.ts @@ -0,0 +1,238 @@ +export = ContentPlatformValidator; +/** + * @typedef CreateCustomFieldByResourceIdParam + * @property {string} resource + * @property {string} resourceId + * @property {ContentPlatformModel.CustomFieldRequestSchema} body + */ +/** + * @typedef CreateCustomFieldDefinitionParam + * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body + */ +/** + * @typedef CreateCustomObjectParam + * @property {ContentPlatformModel.CustomObjectRequestSchema} body + */ +/** + * @typedef CreateCustomObjectDefinitionParam + * @property {ContentPlatformModel.CustomObjectDefinitionRequestSchema} body + */ +/** + * @typedef DeleteCustomFieldDefinitionParam + * @property {string} definitionId + */ +/** + * @typedef DeleteCustomObjectParam + * @property {string} metaobjectId + */ +/** + * @typedef DeleteCustomObjectDefinitionParam + * @property {string} definitionId + */ +/** + * @typedef ExportCustomObjectEntriesParam + * @property {string} definitionId + */ +/** + * @typedef GetCustomFieldDefinitionParam + * @property {string} definitionId + */ +/** + * @typedef GetCustomFieldDefinitionsParam + * @property {string} pageNo + * @property {string} pageSize + * @property {string} [resource] + * @property {string} [type] + * @property {string} [search] + */ +/** @typedef GetCustomFieldTypesParam */ +/** + * @typedef GetCustomFieldsParam + * @property {string} resource + */ +/** + * @typedef GetCustomFieldsByResourceIdParam + * @property {string} resource + * @property {string} resourceId + */ +/** + * @typedef GetCustomObjectParam + * @property {string} metaobjectId + */ +/** + * @typedef GetCustomObjectDefinitionParam + * @property {string} definitionId + */ +/** + * @typedef GetCustomObjectDefinitionsParam + * @property {string} pageNo + * @property {string} pageSize + * @property {string} [search] + */ +/** @typedef GetCustomObjectsParam */ +/** + * @typedef GetJobsParam + * @property {string} page + * @property {string} pageSize + * @property {string} actionType + */ +/** @typedef GetResourcesParam */ +/** + * @typedef ImportCustomObjectEntriesParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomObjectBulkSchema} body + */ +/** + * @typedef SampleCustomObjectBulkEntryParam + * @property {string} definitionId + */ +/** + * @typedef UpdateCustomFieldDefinitionParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body + */ +/** + * @typedef UpdateCustomObjectParam + * @property {string} metaobjectId + * @property {ContentPlatformModel.CustomObjectRequestSchema} body + */ +/** + * @typedef UpdateCustomObjectDefinitionParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema} body + */ +declare class ContentPlatformValidator { + /** @returns {CreateCustomFieldByResourceIdParam} */ + static createCustomFieldByResourceId(): CreateCustomFieldByResourceIdParam; + /** @returns {CreateCustomFieldDefinitionParam} */ + static createCustomFieldDefinition(): CreateCustomFieldDefinitionParam; + /** @returns {CreateCustomObjectParam} */ + static createCustomObject(): CreateCustomObjectParam; + /** @returns {CreateCustomObjectDefinitionParam} */ + static createCustomObjectDefinition(): CreateCustomObjectDefinitionParam; + /** @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 {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 {GetCustomObjectsParam} */ + static getCustomObjects(): any; + /** @returns {GetJobsParam} */ + static getJobs(): GetJobsParam; + /** @returns {GetResourcesParam} */ + static getResources(): any; + /** @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 { 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 CreateCustomFieldByResourceIdParam = { + resource: string; + resourceId: string; + body: ContentPlatformModel.CustomFieldRequestSchema; +}; +type CreateCustomFieldDefinitionParam = { + body: ContentPlatformModel.CustomFieldDefinitionRequestSchema; +}; +type CreateCustomObjectParam = { + body: ContentPlatformModel.CustomObjectRequestSchema; +}; +type CreateCustomObjectDefinitionParam = { + body: ContentPlatformModel.CustomObjectDefinitionRequestSchema; +}; +type DeleteCustomFieldDefinitionParam = { + definitionId: string; +}; +type DeleteCustomObjectParam = { + metaobjectId: string; +}; +type DeleteCustomObjectDefinitionParam = { + definitionId: string; +}; +type ExportCustomObjectEntriesParam = { + definitionId: string; +}; +type GetCustomFieldDefinitionParam = { + definitionId: string; +}; +type GetCustomFieldDefinitionsParam = { + pageNo: string; + pageSize: string; + resource?: string; + type?: string; + search?: string; +}; +type GetCustomFieldsParam = { + resource: string; +}; +type GetCustomFieldsByResourceIdParam = { + resource: string; + resourceId: string; +}; +type GetCustomObjectParam = { + metaobjectId: string; +}; +type GetCustomObjectDefinitionParam = { + definitionId: string; +}; +type GetCustomObjectDefinitionsParam = { + pageNo: string; + pageSize: string; + search?: string; +}; +type GetJobsParam = { + page: string; + pageSize: string; + actionType: string; +}; +type ImportCustomObjectEntriesParam = { + definitionId: string; + body: ContentPlatformModel.CustomObjectBulkSchema; +}; +type SampleCustomObjectBulkEntryParam = { + definitionId: string; +}; +type UpdateCustomFieldDefinitionParam = { + definitionId: string; + body: ContentPlatformModel.CustomFieldDefinitionRequestSchema; +}; +type UpdateCustomObjectParam = { + metaobjectId: string; + body: ContentPlatformModel.CustomObjectRequestSchema; +}; +type UpdateCustomObjectDefinitionParam = { + definitionId: string; + body: ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema; +}; +type GetCustomFieldTypesParam = any; +type GetCustomObjectsParam = any; +type GetResourcesParam = any; +import ContentPlatformModel = require("./ContentPlatformModel"); diff --git a/sdk/platform/Content/ContentPlatformValidator.js b/sdk/platform/Content/ContentPlatformValidator.js new file mode 100644 index 000000000..057079f9f --- /dev/null +++ b/sdk/platform/Content/ContentPlatformValidator.js @@ -0,0 +1,310 @@ +const Joi = require("joi"); + +const ContentPlatformModel = require("./ContentPlatformModel"); + +/** + * @typedef CreateCustomFieldByResourceIdParam + * @property {string} resource + * @property {string} resourceId + * @property {ContentPlatformModel.CustomFieldRequestSchema} body + */ + +/** + * @typedef CreateCustomFieldDefinitionParam + * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body + */ + +/** + * @typedef CreateCustomObjectParam + * @property {ContentPlatformModel.CustomObjectRequestSchema} body + */ + +/** + * @typedef CreateCustomObjectDefinitionParam + * @property {ContentPlatformModel.CustomObjectDefinitionRequestSchema} body + */ + +/** + * @typedef DeleteCustomFieldDefinitionParam + * @property {string} definitionId + */ + +/** + * @typedef DeleteCustomObjectParam + * @property {string} metaobjectId + */ + +/** + * @typedef DeleteCustomObjectDefinitionParam + * @property {string} definitionId + */ + +/** + * @typedef ExportCustomObjectEntriesParam + * @property {string} definitionId + */ + +/** + * @typedef GetCustomFieldDefinitionParam + * @property {string} definitionId + */ + +/** + * @typedef GetCustomFieldDefinitionsParam + * @property {string} pageNo + * @property {string} pageSize + * @property {string} [resource] + * @property {string} [type] + * @property {string} [search] + */ + +/** @typedef GetCustomFieldTypesParam */ + +/** + * @typedef GetCustomFieldsParam + * @property {string} resource + */ + +/** + * @typedef GetCustomFieldsByResourceIdParam + * @property {string} resource + * @property {string} resourceId + */ + +/** + * @typedef GetCustomObjectParam + * @property {string} metaobjectId + */ + +/** + * @typedef GetCustomObjectDefinitionParam + * @property {string} definitionId + */ + +/** + * @typedef GetCustomObjectDefinitionsParam + * @property {string} pageNo + * @property {string} pageSize + * @property {string} [search] + */ + +/** @typedef GetCustomObjectsParam */ + +/** + * @typedef GetJobsParam + * @property {string} page + * @property {string} pageSize + * @property {string} actionType + */ + +/** @typedef GetResourcesParam */ + +/** + * @typedef ImportCustomObjectEntriesParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomObjectBulkSchema} body + */ + +/** + * @typedef SampleCustomObjectBulkEntryParam + * @property {string} definitionId + */ + +/** + * @typedef UpdateCustomFieldDefinitionParam + * @property {string} definitionId + * @property {ContentPlatformModel.CustomFieldDefinitionRequestSchema} body + */ + +/** + * @typedef UpdateCustomObjectParam + * @property {string} metaobjectId + * @property {ContentPlatformModel.CustomObjectRequestSchema} body + */ + +/** + * @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({ + body: ContentPlatformModel.CustomFieldDefinitionRequestSchema().required(), + }).required(); + } + + /** @returns {CreateCustomObjectParam} */ + static createCustomObject() { + return Joi.object({ + body: ContentPlatformModel.CustomObjectRequestSchema().required(), + }).required(); + } + + /** @returns {CreateCustomObjectDefinitionParam} */ + static createCustomObjectDefinition() { + return Joi.object({ + body: ContentPlatformModel.CustomObjectDefinitionRequestSchema().required(), + }).required(); + } + + /** @returns {DeleteCustomFieldDefinitionParam} */ + static deleteCustomFieldDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {DeleteCustomObjectParam} */ + static deleteCustomObject() { + return Joi.object({ + metaobjectId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {DeleteCustomObjectDefinitionParam} */ + static deleteCustomObjectDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {ExportCustomObjectEntriesParam} */ + static exportCustomObjectEntries() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetCustomFieldDefinitionParam} */ + static getCustomFieldDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetCustomFieldDefinitionsParam} */ + static getCustomFieldDefinitions() { + return Joi.object({ + pageNo: Joi.string().allow("").required(), + pageSize: Joi.string().allow("").required(), + resource: Joi.string().allow(""), + type: Joi.string().allow(""), + search: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetCustomFieldTypesParam} */ + static getCustomFieldTypes() { + return Joi.object({}).required(); + } + + /** @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(), + resourceId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetCustomObjectParam} */ + static getCustomObject() { + return Joi.object({ + metaobjectId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetCustomObjectDefinitionParam} */ + static getCustomObjectDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetCustomObjectDefinitionsParam} */ + static getCustomObjectDefinitions() { + return Joi.object({ + pageNo: Joi.string().allow("").required(), + pageSize: Joi.string().allow("").required(), + search: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetCustomObjectsParam} */ + static getCustomObjects() { + return Joi.object({}).required(); + } + + /** @returns {GetJobsParam} */ + static getJobs() { + return Joi.object({ + page: Joi.string().allow("").required(), + pageSize: Joi.string().allow("").required(), + actionType: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetResourcesParam} */ + static getResources() { + return Joi.object({}).required(); + } + + /** @returns {ImportCustomObjectEntriesParam} */ + static importCustomObjectEntries() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomObjectBulkSchema().required(), + }).required(); + } + + /** @returns {SampleCustomObjectBulkEntryParam} */ + static sampleCustomObjectBulkEntry() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {UpdateCustomFieldDefinitionParam} */ + static updateCustomFieldDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomFieldDefinitionRequestSchema().required(), + }).required(); + } + + /** @returns {UpdateCustomObjectParam} */ + static updateCustomObject() { + return Joi.object({ + metaobjectId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomObjectRequestSchema().required(), + }).required(); + } + + /** @returns {UpdateCustomObjectDefinitionParam} */ + static updateCustomObjectDefinition() { + return Joi.object({ + definitionId: Joi.string().allow("").required(), + body: ContentPlatformModel.CustomObjectDefinitionUpdateRequestSchema().required(), + }).required(); + } +} + +module.exports = ContentPlatformValidator; diff --git a/sdk/platform/Discount/DiscountPlatformClient.d.ts b/sdk/platform/Discount/DiscountPlatformClient.d.ts index 69d46a954..68b729645 100644 --- a/sdk/platform/Discount/DiscountPlatformClient.d.ts +++ b/sdk/platform/Discount/DiscountPlatformClient.d.ts @@ -113,8 +113,8 @@ declare class Discount { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name updateDiscount - * @summary: Create Discount. - * @description: Create Discount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/updateDiscount/). + * @summary: Update Discount. + * @description: Update Discount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/updateDiscount/). */ updateDiscount({ id, body, requestHeaders }?: DiscountPlatformValidator.UpdateDiscountParam, { responseHeaders }?: object): Promise; /** diff --git a/sdk/platform/Discount/DiscountPlatformClient.js b/sdk/platform/Discount/DiscountPlatformClient.js index b340ed947..2af76f2cb 100644 --- a/sdk/platform/Discount/DiscountPlatformClient.js +++ b/sdk/platform/Discount/DiscountPlatformClient.js @@ -741,8 +741,8 @@ class Discount { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name updateDiscount - * @summary: Create Discount. - * @description: Create Discount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/updateDiscount/). + * @summary: Update Discount. + * @description: Update Discount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/discount/updateDiscount/). */ async updateDiscount( { id, body, requestHeaders } = { requestHeaders: {} }, diff --git a/sdk/platform/Discount/DiscountPlatformModel.d.ts b/sdk/platform/Discount/DiscountPlatformModel.d.ts index d684cc390..886333850 100644 --- a/sdk/platform/Discount/DiscountPlatformModel.d.ts +++ b/sdk/platform/Discount/DiscountPlatformModel.d.ts @@ -1,8 +1,18 @@ export = DiscountPlatformModel; +/** + * @typedef BadRequestData + * @property {string} [message] + */ /** * @typedef BadRequestObject * @property {string} message */ +/** + * @typedef BadRequestObjectGet + * @property {BadRequestData} [data] + * @property {string} [error] + * @property {string} [message] + */ /** * @typedef BulkDiscount * @property {number} company_id @@ -20,7 +30,7 @@ export = DiscountPlatformModel; * @property {string} discount_level * @property {DiscountMeta} [discount_meta] * @property {string} discount_type - * @property {string[]} extension_ids + * @property {string[]} [extension_ids] * @property {string} [file_path] * @property {boolean} is_active * @property {string} job_type @@ -28,11 +38,10 @@ export = DiscountPlatformModel; * @property {number[]} [store_ids] * @property {ValidityObject} validity * @property {number} [value] - * @property {string[]} [zone_ids] */ /** * @typedef DiscountItems - * @property {number} [brand_uid] + * @property {string} [brand_name] * @property {DiscountMeta} [discount_meta] * @property {string} discount_type * @property {string} [item_code] @@ -60,6 +69,7 @@ export = DiscountPlatformModel; * @property {number[]} [store_ids] * @property {ValidityObject} validity * @property {number} [value] + * @property {string[]} [zone_ids] */ /** * @typedef DiscountMeta @@ -75,10 +85,34 @@ export = DiscountPlatformModel; * @property {number[]} [brand_ids] * @property {number[]} [store_ids] */ +/** + * @typedef FileJobBody + * @property {string[]} [app_ids] + * @property {number[]} [brand_ids] + * @property {number} [company_id] + * @property {UserDetails} [created_by] + * @property {string} [created_on] + * @property {string} [discount_level] + * @property {DiscountMeta} [discount_meta] + * @property {string} [discount_type] + * @property {string[]} [extension_ids] + * @property {string} [file_path] + * @property {boolean} [is_active] + * @property {string} [job_type] + * @property {Object} [meta] + * @property {UserDetails} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {number[]} [store_ids] + * @property {ValidityObject} [validity] + * @property {number} [value] + * @property {string[]} [zone_ids] + */ /** * @typedef FileJobRequest * @property {string[]} [app_ids] * @property {number[]} [brand_ids] + * @property {number} company_id * @property {string} [discount_level] * @property {string} [discount_type] * @property {string} [file_path] @@ -92,14 +126,20 @@ export = DiscountPlatformModel; /** * @typedef FileJobResponse * @property {string} _id - A unique identifier to distinguish and identify a job. - * @property {Object} [body] + * @property {FileJobBody} [body] * @property {number} company_id + * @property {UserDetails} [created_by] + * @property {string} [created_on] + * @property {string[]} [extension_ids] * @property {number} failed - * @property {string} file_path - * @property {string} file_type + * @property {string} [file_path] + * @property {string} [file_type] + * @property {string} [modified_on] + * @property {number} [progress] * @property {string} stage * @property {number} total * @property {string} type + * @property {string[]} [zone_ids] */ /** * @typedef ListOrCalender @@ -129,13 +169,25 @@ export = DiscountPlatformModel; declare class DiscountPlatformModel { } declare namespace DiscountPlatformModel { - export { BadRequestObject, BulkDiscount, CancelJobResponse, CreateUpdateDiscount, DiscountItems, DiscountJob, DiscountMeta, DownloadFileJob, FileJobRequest, FileJobResponse, ListOrCalender, Page, UserDetails, ValidityObject }; + export { BadRequestData, BadRequestObject, BadRequestObjectGet, BulkDiscount, CancelJobResponse, CreateUpdateDiscount, DiscountItems, DiscountJob, DiscountMeta, DownloadFileJob, FileJobBody, FileJobRequest, FileJobResponse, ListOrCalender, Page, UserDetails, ValidityObject }; } +/** @returns {BadRequestData} */ +declare function BadRequestData(): BadRequestData; +type BadRequestData = { + message?: string; +}; /** @returns {BadRequestObject} */ declare function BadRequestObject(): BadRequestObject; type BadRequestObject = { message: string; }; +/** @returns {BadRequestObjectGet} */ +declare function BadRequestObjectGet(): BadRequestObjectGet; +type BadRequestObjectGet = { + data?: BadRequestData; + error?: string; + message?: string; +}; /** @returns {BulkDiscount} */ declare function BulkDiscount(): BulkDiscount; type BulkDiscount = { @@ -156,7 +208,7 @@ type CreateUpdateDiscount = { discount_level: string; discount_meta?: DiscountMeta; discount_type: string; - extension_ids: string[]; + extension_ids?: string[]; file_path?: string; is_active: boolean; job_type: string; @@ -164,12 +216,11 @@ type CreateUpdateDiscount = { store_ids?: number[]; validity: ValidityObject; value?: number; - zone_ids?: string[]; }; /** @returns {DiscountItems} */ declare function DiscountItems(): DiscountItems; type DiscountItems = { - brand_uid?: number; + brand_name?: string; discount_meta?: DiscountMeta; discount_type: string; item_code?: string; @@ -198,6 +249,7 @@ type DiscountJob = { store_ids?: number[]; validity: ValidityObject; value?: number; + zone_ids?: string[]; }; /** @returns {DiscountMeta} */ declare function DiscountMeta(): DiscountMeta; @@ -224,11 +276,36 @@ type DownloadFileJob = { brand_ids?: number[]; store_ids?: number[]; }; +/** @returns {FileJobBody} */ +declare function FileJobBody(): FileJobBody; +type FileJobBody = { + app_ids?: string[]; + brand_ids?: number[]; + company_id?: number; + created_by?: UserDetails; + created_on?: string; + discount_level?: string; + discount_meta?: DiscountMeta; + discount_type?: string; + extension_ids?: string[]; + file_path?: string; + is_active?: boolean; + job_type?: string; + meta?: any; + modified_by?: UserDetails; + modified_on?: string; + name?: string; + store_ids?: number[]; + validity?: ValidityObject; + value?: number; + zone_ids?: string[]; +}; /** @returns {FileJobRequest} */ declare function FileJobRequest(): FileJobRequest; type FileJobRequest = { app_ids?: string[]; brand_ids?: number[]; + company_id: number; discount_level?: string; discount_type?: string; file_path?: string; @@ -246,14 +323,20 @@ type FileJobResponse = { * - A unique identifier to distinguish and identify a job. */ _id: string; - body?: any; + body?: FileJobBody; company_id: number; + created_by?: UserDetails; + created_on?: string; + extension_ids?: string[]; failed: number; - file_path: string; - file_type: string; + file_path?: string; + file_type?: string; + modified_on?: string; + progress?: number; stage: string; total: number; type: string; + zone_ids?: string[]; }; /** @returns {ListOrCalender} */ declare function ListOrCalender(): ListOrCalender; diff --git a/sdk/platform/Discount/DiscountPlatformModel.js b/sdk/platform/Discount/DiscountPlatformModel.js index 13fc8f6c7..5ef6f30b7 100644 --- a/sdk/platform/Discount/DiscountPlatformModel.js +++ b/sdk/platform/Discount/DiscountPlatformModel.js @@ -1,10 +1,22 @@ const Joi = require("joi"); +/** + * @typedef BadRequestData + * @property {string} [message] + */ + /** * @typedef BadRequestObject * @property {string} message */ +/** + * @typedef BadRequestObjectGet + * @property {BadRequestData} [data] + * @property {string} [error] + * @property {string} [message] + */ + /** * @typedef BulkDiscount * @property {number} company_id @@ -24,7 +36,7 @@ const Joi = require("joi"); * @property {string} discount_level * @property {DiscountMeta} [discount_meta] * @property {string} discount_type - * @property {string[]} extension_ids + * @property {string[]} [extension_ids] * @property {string} [file_path] * @property {boolean} is_active * @property {string} job_type @@ -32,12 +44,11 @@ const Joi = require("joi"); * @property {number[]} [store_ids] * @property {ValidityObject} validity * @property {number} [value] - * @property {string[]} [zone_ids] */ /** * @typedef DiscountItems - * @property {number} [brand_uid] + * @property {string} [brand_name] * @property {DiscountMeta} [discount_meta] * @property {string} discount_type * @property {string} [item_code] @@ -66,6 +77,7 @@ const Joi = require("joi"); * @property {number[]} [store_ids] * @property {ValidityObject} validity * @property {number} [value] + * @property {string[]} [zone_ids] */ /** @@ -84,10 +96,35 @@ const Joi = require("joi"); * @property {number[]} [store_ids] */ +/** + * @typedef FileJobBody + * @property {string[]} [app_ids] + * @property {number[]} [brand_ids] + * @property {number} [company_id] + * @property {UserDetails} [created_by] + * @property {string} [created_on] + * @property {string} [discount_level] + * @property {DiscountMeta} [discount_meta] + * @property {string} [discount_type] + * @property {string[]} [extension_ids] + * @property {string} [file_path] + * @property {boolean} [is_active] + * @property {string} [job_type] + * @property {Object} [meta] + * @property {UserDetails} [modified_by] + * @property {string} [modified_on] + * @property {string} [name] + * @property {number[]} [store_ids] + * @property {ValidityObject} [validity] + * @property {number} [value] + * @property {string[]} [zone_ids] + */ + /** * @typedef FileJobRequest * @property {string[]} [app_ids] * @property {number[]} [brand_ids] + * @property {number} company_id * @property {string} [discount_level] * @property {string} [discount_type] * @property {string} [file_path] @@ -102,14 +139,20 @@ const Joi = require("joi"); /** * @typedef FileJobResponse * @property {string} _id - A unique identifier to distinguish and identify a job. - * @property {Object} [body] + * @property {FileJobBody} [body] * @property {number} company_id + * @property {UserDetails} [created_by] + * @property {string} [created_on] + * @property {string[]} [extension_ids] * @property {number} failed - * @property {string} file_path - * @property {string} file_type + * @property {string} [file_path] + * @property {string} [file_type] + * @property {string} [modified_on] + * @property {number} [progress] * @property {string} stage * @property {number} total * @property {string} type + * @property {string[]} [zone_ids] */ /** @@ -142,6 +185,13 @@ const Joi = require("joi"); */ class DiscountPlatformModel { + /** @returns {BadRequestData} */ + static BadRequestData() { + return Joi.object({ + message: Joi.string().allow(""), + }); + } + /** @returns {BadRequestObject} */ static BadRequestObject() { return Joi.object({ @@ -149,6 +199,15 @@ class DiscountPlatformModel { }); } + /** @returns {BadRequestObjectGet} */ + static BadRequestObjectGet() { + return Joi.object({ + data: DiscountPlatformModel.BadRequestData(), + error: Joi.string().allow(""), + message: Joi.string().allow(""), + }); + } + /** @returns {BulkDiscount} */ static BulkDiscount() { return Joi.object({ @@ -175,7 +234,7 @@ class DiscountPlatformModel { discount_level: Joi.string().allow("").required(), discount_meta: DiscountPlatformModel.DiscountMeta(), discount_type: Joi.string().allow("").required(), - extension_ids: Joi.array().items(Joi.string().allow("")).required(), + extension_ids: Joi.array().items(Joi.string().allow("")), file_path: Joi.string().allow(""), is_active: Joi.boolean().required(), job_type: Joi.string().allow("").required(), @@ -183,14 +242,13 @@ class DiscountPlatformModel { store_ids: Joi.array().items(Joi.number()), validity: DiscountPlatformModel.ValidityObject().required(), value: Joi.number(), - zone_ids: Joi.array().items(Joi.string().allow("")), }); } /** @returns {DiscountItems} */ static DiscountItems() { return Joi.object({ - brand_uid: Joi.number(), + brand_name: Joi.string().allow(""), discount_meta: DiscountPlatformModel.DiscountMeta(), discount_type: Joi.string().allow("").required(), item_code: Joi.string().allow(""), @@ -221,6 +279,7 @@ class DiscountPlatformModel { store_ids: Joi.array().items(Joi.number()), validity: DiscountPlatformModel.ValidityObject().required(), value: Joi.number(), + zone_ids: Joi.array().items(Joi.string().allow("")), }); } @@ -241,11 +300,38 @@ class DiscountPlatformModel { }); } + /** @returns {FileJobBody} */ + static FileJobBody() { + return Joi.object({ + app_ids: Joi.array().items(Joi.string().allow("")), + brand_ids: Joi.array().items(Joi.number()), + company_id: Joi.number(), + created_by: DiscountPlatformModel.UserDetails(), + created_on: Joi.string().allow(""), + discount_level: Joi.string().allow(""), + discount_meta: DiscountPlatformModel.DiscountMeta(), + discount_type: Joi.string().allow(""), + extension_ids: Joi.array().items(Joi.string().allow("")), + file_path: Joi.string().allow(""), + is_active: Joi.boolean(), + job_type: Joi.string().allow(""), + meta: Joi.any(), + modified_by: DiscountPlatformModel.UserDetails(), + modified_on: Joi.string().allow(""), + name: Joi.string().allow(""), + store_ids: Joi.array().items(Joi.number()), + validity: DiscountPlatformModel.ValidityObject(), + value: Joi.number(), + zone_ids: Joi.array().items(Joi.string().allow("")), + }); + } + /** @returns {FileJobRequest} */ static FileJobRequest() { return Joi.object({ app_ids: Joi.array().items(Joi.string().allow("")), brand_ids: Joi.array().items(Joi.number()), + company_id: Joi.number().required(), discount_level: Joi.string().allow(""), discount_type: Joi.string().allow(""), file_path: Joi.string().allow(""), @@ -262,14 +348,20 @@ class DiscountPlatformModel { static FileJobResponse() { return Joi.object({ _id: Joi.string().allow("").required(), - body: Joi.any(), + body: DiscountPlatformModel.FileJobBody(), company_id: Joi.number().required(), + created_by: DiscountPlatformModel.UserDetails(), + created_on: Joi.string().allow(""), + extension_ids: Joi.array().items(Joi.string().allow("")), failed: Joi.number().required(), - file_path: Joi.string().allow("").required(), - file_type: Joi.string().allow("").required(), + file_path: Joi.string().allow(""), + file_type: Joi.string().allow(""), + modified_on: Joi.string().allow(""), + progress: Joi.number(), stage: Joi.string().allow("").required(), total: Joi.number().required(), type: Joi.string().allow("").required(), + zone_ids: Joi.array().items(Joi.string().allow("")), }); } diff --git a/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts b/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts index ca1c83010..05d3e7bac 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +++ b/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts @@ -82,7 +82,17 @@ declare class FileStorage { * @summary: Browse Files * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/). */ - appbrowse({ namespace, page, limit, requestHeaders }?: FileStoragePlatformApplicationValidator.AppbrowseParam, { responseHeaders }?: object): Promise; + appbrowse({ namespace, page, limit, search, requestHeaders }?: FileStoragePlatformApplicationValidator.AppbrowseParam, { responseHeaders }?: object): Promise; + /** + * @param {FileStoragePlatformApplicationValidator.BrowsefilesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @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/). + */ + browsefiles({ namespace, body, page, limit, search, requestHeaders }?: FileStoragePlatformApplicationValidator.BrowsefilesParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.GeneratePaymentReceiptParam} arg * - Arg object @@ -106,7 +116,7 @@ declare class FileStorage { * @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/getDefaultHtmlTemplate/). */ - getDefaultHtmlTemplate({ pdfTypeId, format, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultHtmlTemplateParam, { responseHeaders }?: object): Promise; + getDefaultHtmlTemplate({ pdfTypeId, format, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultHtmlTemplateParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam} arg * - Arg object @@ -119,7 +129,7 @@ declare class FileStorage { * @summary: Get Dummy pdf data for invoice or label * @description: Get Dummy pdf data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/). */ - getDefaultPdfData({ pdfTypeId, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam, { responseHeaders }?: object): Promise; + getDefaultPdfData({ pdfTypeId, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultPdfDataParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.GetDefaultPdfTemplateParam} arg * - Arg object @@ -132,7 +142,7 @@ declare class FileStorage { * @summary: Default html template * @description: Get default html template data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/). */ - getDefaultPdfTemplate({ pdfTypeId, format, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultPdfTemplateParam, { responseHeaders }?: object): Promise; + getDefaultPdfTemplate({ pdfTypeId, format, countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetDefaultPdfTemplateParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.GetPdfTypesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -141,9 +151,9 @@ declare class FileStorage { * Success response * @name getPdfTypes * @summary: Get all the supported invoice pdf types - * @description: Get all the supported invoice pdf types such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/). + * @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/). */ - getPdfTypes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getPdfTypes({ countryCode, requestHeaders }?: FileStoragePlatformApplicationValidator.GetPdfTypesParam, { responseHeaders }?: object): Promise; /** * @param {FileStoragePlatformApplicationValidator.SaveHtmlTemplateParam} arg * - Arg object diff --git a/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js b/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js index 89cc30c4b..6b876c5e7 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +++ b/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js @@ -310,7 +310,7 @@ class FileStorage { * @description: Browse Files - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/appbrowse/). */ async appbrowse( - { namespace, page, limit, requestHeaders } = { requestHeaders: {} }, + { namespace, page, limit, search, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -321,6 +321,7 @@ class FileStorage { page, limit, + search, }, { abortEarly: false, allowUnknown: true } ); @@ -337,6 +338,7 @@ class FileStorage { page, limit, + search, }, { abortEarly: false, allowUnknown: false } ); @@ -350,6 +352,7 @@ class FileStorage { const query_params = {}; query_params["page"] = page; query_params["limit"] = limit; + query_params["search"] = search; const response = await PlatformAPIClient.execute( this.config, @@ -385,6 +388,98 @@ class FileStorage { return response; } + /** + * @param {FileStoragePlatformApplicationValidator.BrowsefilesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @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/). + */ + async browsefiles( + { namespace, body, page, limit, search, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = FileStoragePlatformApplicationValidator.browsefiles().validate( + { + namespace, + + body, + page, + limit, + search, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = FileStoragePlatformApplicationValidator.browsefiles().validate( + { + namespace, + + body, + page, + limit, + search, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > FileStorage > browsefiles \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page"] = page; + query_params["limit"] = limit; + query_params["search"] = search; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/assets/v1.0/company/${this.config.companyId}/application/${this.applicationId}/namespaces/${namespace}/browse`, + query_params, + body, + 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 > browsefiles \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {FileStoragePlatformApplicationValidator.GeneratePaymentReceiptParam} arg * - Arg object @@ -476,7 +571,7 @@ class FileStorage { * @description: Get default html template for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultHtmlTemplate/). */ async getDefaultHtmlTemplate( - { pdfTypeId, format, requestHeaders } = { requestHeaders: {} }, + { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -485,6 +580,7 @@ class FileStorage { { pdfTypeId, format, + countryCode, }, { abortEarly: false, allowUnknown: true } ); @@ -499,6 +595,7 @@ class FileStorage { { pdfTypeId, format, + countryCode, }, { abortEarly: false, allowUnknown: false } ); @@ -512,6 +609,7 @@ class FileStorage { 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, @@ -562,7 +660,7 @@ class FileStorage { * @description: Get Dummy pdf data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfData/). */ async getDefaultPdfData( - { pdfTypeId, requestHeaders } = { requestHeaders: {} }, + { pdfTypeId, countryCode, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -570,6 +668,7 @@ class FileStorage { } = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate( { pdfTypeId, + countryCode, }, { abortEarly: false, allowUnknown: true } ); @@ -583,6 +682,7 @@ class FileStorage { } = FileStoragePlatformApplicationValidator.getDefaultPdfData().validate( { pdfTypeId, + countryCode, }, { abortEarly: false, allowUnknown: false } ); @@ -595,6 +695,7 @@ class FileStorage { const query_params = {}; query_params["pdf_type_id"] = pdfTypeId; + query_params["country_code"] = countryCode; const response = await PlatformAPIClient.execute( this.config, @@ -645,7 +746,7 @@ class FileStorage { * @description: Get default html template data for invoice or label - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getDefaultPdfTemplate/). */ async getDefaultPdfTemplate( - { pdfTypeId, format, requestHeaders } = { requestHeaders: {} }, + { pdfTypeId, format, countryCode, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { @@ -654,6 +755,7 @@ class FileStorage { { pdfTypeId, format, + countryCode, }, { abortEarly: false, allowUnknown: true } ); @@ -668,6 +770,7 @@ class FileStorage { { pdfTypeId, format, + countryCode, }, { abortEarly: false, allowUnknown: false } ); @@ -681,6 +784,7 @@ class FileStorage { 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, @@ -726,16 +830,18 @@ class FileStorage { * Success response * @name getPdfTypes * @summary: Get all the supported invoice pdf types - * @description: Get all the supported invoice pdf types such as Invoice, Label, Deliver challan - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/filestorage/getPdfTypes/). + * @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/). */ async getPdfTypes( - { requestHeaders } = { requestHeaders: {} }, + { countryCode, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, } = FileStoragePlatformApplicationValidator.getPdfTypes().validate( - {}, + { + countryCode, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -746,7 +852,9 @@ class FileStorage { const { error: warrning, } = FileStoragePlatformApplicationValidator.getPdfTypes().validate( - {}, + { + countryCode, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -757,6 +865,7 @@ class FileStorage { } const query_params = {}; + query_params["country_code"] = countryCode; const response = await PlatformAPIClient.execute( this.config, diff --git a/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts b/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts index 4a88fe4d6..426d7a930 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +++ b/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts @@ -28,6 +28,18 @@ export = FileStoragePlatformApplicationValidator; * inside the storage bucket. * @property {number} [page] - Page no * @property {number} [limit] - Limit + * @property {string} [search] - Search + */ +/** + * @typedef BrowsefilesParam + * @property {string} namespace - Segregation of different types of + * 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 {number} [page] - Page no + * @property {number} [limit] - Limit + * @property {string} [search] - Search + * @property {FileStoragePlatformModel.ExtensionSlug} body */ /** * @typedef GeneratePaymentReceiptParam @@ -37,17 +49,23 @@ export = FileStoragePlatformApplicationValidator; * @typedef GetDefaultHtmlTemplateParam * @property {number} pdfTypeId * @property {string} format + * @property {string} [countryCode] */ /** * @typedef GetDefaultPdfDataParam * @property {number} pdfTypeId + * @property {string} [countryCode] */ /** * @typedef GetDefaultPdfTemplateParam * @property {number} pdfTypeId * @property {string} format + * @property {string} [countryCode] + */ +/** + * @typedef GetPdfTypesParam + * @property {string} [countryCode] */ -/** @typedef GetPdfTypesParam */ /** * @typedef SaveHtmlTemplateParam * @property {FileStoragePlatformModel.PdfConfig} body @@ -66,6 +84,8 @@ declare class FileStoragePlatformApplicationValidator { static appStartUpload(): AppStartUploadParam; /** @returns {AppbrowseParam} */ static appbrowse(): AppbrowseParam; + /** @returns {BrowsefilesParam} */ + static browsefiles(): BrowsefilesParam; /** @returns {GeneratePaymentReceiptParam} */ static generatePaymentReceipt(): GeneratePaymentReceiptParam; /** @returns {GetDefaultHtmlTemplateParam} */ @@ -75,14 +95,14 @@ declare class FileStoragePlatformApplicationValidator { /** @returns {GetDefaultPdfTemplateParam} */ static getDefaultPdfTemplate(): GetDefaultPdfTemplateParam; /** @returns {GetPdfTypesParam} */ - static getPdfTypes(): any; + static getPdfTypes(): GetPdfTypesParam; /** @returns {SaveHtmlTemplateParam} */ static saveHtmlTemplate(): SaveHtmlTemplateParam; /** @returns {UpdateHtmlTemplateParam} */ static updateHtmlTemplate(): UpdateHtmlTemplateParam; } declare namespace FileStoragePlatformApplicationValidator { - export { AppCompleteUploadParam, AppCopyFilesParam, AppStartUploadParam, AppbrowseParam, GeneratePaymentReceiptParam, GetDefaultHtmlTemplateParam, GetDefaultPdfDataParam, GetDefaultPdfTemplateParam, GetPdfTypesParam, SaveHtmlTemplateParam, UpdateHtmlTemplateParam }; + export { AppCompleteUploadParam, AppCopyFilesParam, AppStartUploadParam, AppbrowseParam, BrowsefilesParam, GeneratePaymentReceiptParam, GetDefaultHtmlTemplateParam, GetDefaultPdfDataParam, GetDefaultPdfTemplateParam, GetPdfTypesParam, SaveHtmlTemplateParam, UpdateHtmlTemplateParam }; } type AppCompleteUploadParam = { /** @@ -127,6 +147,32 @@ type AppbrowseParam = { * - Limit */ limit?: number; + /** + * - Search + */ + search?: string; +}; +type BrowsefilesParam = { + /** + * - Segregation of different types of + * 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. + */ + namespace: string; + /** + * - Page no + */ + page?: number; + /** + * - Limit + */ + limit?: number; + /** + * - Search + */ + search?: string; + body: FileStoragePlatformModel.ExtensionSlug; }; type GeneratePaymentReceiptParam = { body: FileStoragePlatformModel.PaymentReceiptRequestBody; @@ -134,13 +180,19 @@ type GeneratePaymentReceiptParam = { type GetDefaultHtmlTemplateParam = { pdfTypeId: number; format: string; + countryCode?: string; }; type GetDefaultPdfDataParam = { pdfTypeId: number; + countryCode?: string; }; type GetDefaultPdfTemplateParam = { pdfTypeId: number; format: string; + countryCode?: string; +}; +type GetPdfTypesParam = { + countryCode?: string; }; type SaveHtmlTemplateParam = { body: FileStoragePlatformModel.PdfConfig; @@ -149,5 +201,4 @@ type UpdateHtmlTemplateParam = { id: string; body: FileStoragePlatformModel.PdfConfig; }; -type GetPdfTypesParam = any; import FileStoragePlatformModel = require("./FileStoragePlatformModel"); diff --git a/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js b/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js index b7fff3929..6321d16f9 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +++ b/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js @@ -34,6 +34,19 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel"); * inside the storage bucket. * @property {number} [page] - Page no * @property {number} [limit] - Limit + * @property {string} [search] - Search + */ + +/** + * @typedef BrowsefilesParam + * @property {string} namespace - Segregation of different types of + * 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 {number} [page] - Page no + * @property {number} [limit] - Limit + * @property {string} [search] - Search + * @property {FileStoragePlatformModel.ExtensionSlug} body */ /** @@ -45,20 +58,26 @@ const FileStoragePlatformModel = require("./FileStoragePlatformModel"); * @typedef GetDefaultHtmlTemplateParam * @property {number} pdfTypeId * @property {string} format + * @property {string} [countryCode] */ /** * @typedef GetDefaultPdfDataParam * @property {number} pdfTypeId + * @property {string} [countryCode] */ /** * @typedef GetDefaultPdfTemplateParam * @property {number} pdfTypeId * @property {string} format + * @property {string} [countryCode] */ -/** @typedef GetPdfTypesParam */ +/** + * @typedef GetPdfTypesParam + * @property {string} [countryCode] + */ /** * @typedef SaveHtmlTemplateParam @@ -106,6 +125,19 @@ class FileStoragePlatformApplicationValidator { page: Joi.number(), limit: Joi.number(), + search: Joi.string().allow(""), + }).required(); + } + + /** @returns {BrowsefilesParam} */ + static browsefiles() { + return Joi.object({ + namespace: Joi.string().allow("").required(), + + page: Joi.number(), + limit: Joi.number(), + search: Joi.string().allow(""), + body: FileStoragePlatformModel.ExtensionSlug().required(), }).required(); } @@ -121,6 +153,7 @@ class FileStoragePlatformApplicationValidator { return Joi.object({ pdfTypeId: Joi.number().required(), format: Joi.string().allow("").required(), + countryCode: Joi.string().allow(""), }).required(); } @@ -128,6 +161,7 @@ class FileStoragePlatformApplicationValidator { static getDefaultPdfData() { return Joi.object({ pdfTypeId: Joi.number().required(), + countryCode: Joi.string().allow(""), }).required(); } @@ -136,12 +170,15 @@ class FileStoragePlatformApplicationValidator { return Joi.object({ pdfTypeId: Joi.number().required(), format: Joi.string().allow("").required(), + countryCode: Joi.string().allow(""), }).required(); } /** @returns {GetPdfTypesParam} */ static getPdfTypes() { - return Joi.object({}).required(); + return Joi.object({ + countryCode: Joi.string().allow(""), + }).required(); } /** @returns {SaveHtmlTemplateParam} */ diff --git a/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts b/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts index b3eaff8a6..7dfea57ac 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +++ b/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts @@ -125,6 +125,7 @@ export = FileStoragePlatformModel; * @typedef DummyTemplateData * @property {number} [__v] * @property {string} [_id] + * @property {string} [country_code] * @property {DummyTemplateDataPayload} payload * @property {number} [pdf_type_id] */ @@ -151,7 +152,7 @@ export = FileStoragePlatformModel; * @property {string} [disclaimer] * @property {Image} [image] * @property {InvoiceDetail} [invoice_detail] - * @property {boolean} [is_international] + * @property {boolean} [is_export] * @property {boolean} [is_self_pickup] * @property {boolean} [is_self_ship] * @property {Meta} [meta] @@ -171,6 +172,10 @@ export = FileStoragePlatformModel; * @property {string} [upi_qrcode] * @property {Object[]} [waybills] */ +/** + * @typedef ExtensionSlug + * @property {string} [extension_slug] + */ /** * @typedef FailedResponse * @property {string} message @@ -205,7 +210,7 @@ export = FileStoragePlatformModel; * @typedef InvoiceTypesDataResponse * @property {number} __v * @property {string} _id - * @property {string} [country_code] + * @property {string} country_code * @property {string[]} format * @property {string} name * @property {number} pdf_type_id @@ -514,7 +519,7 @@ export = FileStoragePlatformModel; declare class FileStoragePlatformModel { } declare namespace FileStoragePlatformModel { - export { AwbNumberLabelBarcodeGenerator, Brand, CDN, Cgst, CompanyDetail, CompleteResponse, ConversionRate, CopyFiles, CreatedBy, CustomerBillingDetail, CustomerShippingDetail, DeliveryPartnerDetail, DestinationNamespace, DigitalsignatureGenerator, Document, DummyTemplateData, DummyTemplateDataItems, DummyTemplateDataPayload, FailedResponse, Igst, Image, Inr, InvoiceDetail, InvoiceTypesDataResponse, InvoiceTypesResponse, ItemsProductTable, Kwargs, KwargsAwbNumber, KwargsUpiQrcode, Meta, MetaProperty, Params, PaymentData, PaymentReceiptCustomerDetails, PaymentReceiptFormat, PaymentReceiptMeta, PaymentReceiptOrderDetails, PaymentReceiptPayload, PaymentReceiptPayments, PaymentReceiptRequestBody, PaymentReceiptService, PaymentReceiptTaxes, PdfConfig, PdfConfigSaveSuccess, PdfConfigSaveSuccessData, PdfConfigSuccess, PdfConfigSuccessData, PdfDefaultTemplateSuccess, ProductTable, Rates, RegisteredCompanyDetail, ReturnDetail, Sgst, ShipmentIdBarcodeGenerator, SignedQrcodeGenerator, SignUrlRequest, SignUrlResponse, StartRequest, StartResponse, StoreDetail, Tax, Taxes, TaxTable, UpiQrcodeGenerator, Upload, Urls, Usd }; + export { AwbNumberLabelBarcodeGenerator, Brand, CDN, Cgst, CompanyDetail, CompleteResponse, ConversionRate, CopyFiles, CreatedBy, CustomerBillingDetail, CustomerShippingDetail, DeliveryPartnerDetail, DestinationNamespace, DigitalsignatureGenerator, Document, DummyTemplateData, DummyTemplateDataItems, DummyTemplateDataPayload, ExtensionSlug, FailedResponse, Igst, Image, Inr, InvoiceDetail, InvoiceTypesDataResponse, InvoiceTypesResponse, ItemsProductTable, Kwargs, KwargsAwbNumber, KwargsUpiQrcode, Meta, MetaProperty, Params, PaymentData, PaymentReceiptCustomerDetails, PaymentReceiptFormat, PaymentReceiptMeta, PaymentReceiptOrderDetails, PaymentReceiptPayload, PaymentReceiptPayments, PaymentReceiptRequestBody, PaymentReceiptService, PaymentReceiptTaxes, PdfConfig, PdfConfigSaveSuccess, PdfConfigSaveSuccessData, PdfConfigSuccess, PdfConfigSuccessData, PdfDefaultTemplateSuccess, ProductTable, Rates, RegisteredCompanyDetail, ReturnDetail, Sgst, ShipmentIdBarcodeGenerator, SignedQrcodeGenerator, SignUrlRequest, SignUrlResponse, StartRequest, StartResponse, StoreDetail, Tax, Taxes, TaxTable, UpiQrcodeGenerator, Upload, Urls, Usd }; } /** @returns {AwbNumberLabelBarcodeGenerator} */ declare function AwbNumberLabelBarcodeGenerator(): AwbNumberLabelBarcodeGenerator; @@ -658,6 +663,7 @@ declare function DummyTemplateData(): DummyTemplateData; type DummyTemplateData = { __v?: number; _id?: string; + country_code?: string; payload: DummyTemplateDataPayload; pdf_type_id?: number; }; @@ -686,7 +692,7 @@ type DummyTemplateDataPayload = { disclaimer?: string; image?: Image; invoice_detail?: InvoiceDetail; - is_international?: boolean; + is_export?: boolean; is_self_pickup?: boolean; is_self_ship?: boolean; meta?: Meta; @@ -706,6 +712,11 @@ type DummyTemplateDataPayload = { upi_qrcode?: string; waybills?: any[]; }; +/** @returns {ExtensionSlug} */ +declare function ExtensionSlug(): ExtensionSlug; +type ExtensionSlug = { + extension_slug?: string; +}; /** @returns {FailedResponse} */ declare function FailedResponse(): FailedResponse; type FailedResponse = { @@ -746,7 +757,7 @@ declare function InvoiceTypesDataResponse(): InvoiceTypesDataResponse; type InvoiceTypesDataResponse = { __v: number; _id: string; - country_code?: string; + country_code: string; format: string[]; name: string; pdf_type_id: number; diff --git a/sdk/platform/FileStorage/FileStoragePlatformModel.js b/sdk/platform/FileStorage/FileStoragePlatformModel.js index 6c6925426..3bdaed916 100644 --- a/sdk/platform/FileStorage/FileStoragePlatformModel.js +++ b/sdk/platform/FileStorage/FileStoragePlatformModel.js @@ -141,6 +141,7 @@ const Joi = require("joi"); * @typedef DummyTemplateData * @property {number} [__v] * @property {string} [_id] + * @property {string} [country_code] * @property {DummyTemplateDataPayload} payload * @property {number} [pdf_type_id] */ @@ -169,7 +170,7 @@ const Joi = require("joi"); * @property {string} [disclaimer] * @property {Image} [image] * @property {InvoiceDetail} [invoice_detail] - * @property {boolean} [is_international] + * @property {boolean} [is_export] * @property {boolean} [is_self_pickup] * @property {boolean} [is_self_ship] * @property {Meta} [meta] @@ -190,6 +191,11 @@ const Joi = require("joi"); * @property {Object[]} [waybills] */ +/** + * @typedef ExtensionSlug + * @property {string} [extension_slug] + */ + /** * @typedef FailedResponse * @property {string} message @@ -229,7 +235,7 @@ const Joi = require("joi"); * @typedef InvoiceTypesDataResponse * @property {number} __v * @property {string} _id - * @property {string} [country_code] + * @property {string} country_code * @property {string[]} format * @property {string} name * @property {number} pdf_type_id @@ -752,6 +758,7 @@ class FileStoragePlatformModel { return Joi.object({ __v: Joi.number(), _id: Joi.string().allow(""), + country_code: Joi.string().allow(""), payload: FileStoragePlatformModel.DummyTemplateDataPayload().required(), pdf_type_id: Joi.number(), }); @@ -786,7 +793,7 @@ class FileStoragePlatformModel { disclaimer: Joi.string().allow(""), image: FileStoragePlatformModel.Image(), invoice_detail: FileStoragePlatformModel.InvoiceDetail(), - is_international: Joi.boolean(), + is_export: Joi.boolean(), is_self_pickup: Joi.boolean(), is_self_ship: Joi.boolean(), meta: FileStoragePlatformModel.Meta(), @@ -808,6 +815,13 @@ class FileStoragePlatformModel { }); } + /** @returns {ExtensionSlug} */ + static ExtensionSlug() { + return Joi.object({ + extension_slug: Joi.string().allow(""), + }); + } + /** @returns {FailedResponse} */ static FailedResponse() { return Joi.object({ @@ -858,7 +872,7 @@ class FileStoragePlatformModel { return Joi.object({ __v: Joi.number().required(), _id: Joi.string().allow("").required(), - country_code: Joi.string().allow(""), + country_code: Joi.string().allow("").required(), format: Joi.array().items(Joi.string().allow("")).required(), name: Joi.string().allow("").required(), pdf_type_id: Joi.number().required(), diff --git a/sdk/platform/Finance/FinancePlatformClient.d.ts b/sdk/platform/Finance/FinancePlatformClient.d.ts index de6069dad..c671205d7 100644 --- a/sdk/platform/Finance/FinancePlatformClient.d.ts +++ b/sdk/platform/Finance/FinancePlatformClient.d.ts @@ -199,6 +199,17 @@ declare class Finance { * @description: Gets all customer Cn filters and search. - 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 `{}` @@ -219,6 +230,17 @@ declare class Finance { * @description: Gives pdf view of 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.InvoiceTypeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -261,6 +283,17 @@ declare class Finance { * @description: Payment Processing API. - 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: Unlocks 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 index 9f18b1211..ce039b9ff 100644 --- a/sdk/platform/Finance/FinancePlatformClient.js +++ b/sdk/platform/Finance/FinancePlatformClient.js @@ -1464,6 +1464,86 @@ class Finance { 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 `{}` @@ -1620,6 +1700,86 @@ class Finance { 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.InvoiceTypeParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -1935,6 +2095,86 @@ class Finance { 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: Unlocks 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 index f2b80f5ac..351988ee5 100644 --- a/sdk/platform/Finance/FinancePlatformModel.d.ts +++ b/sdk/platform/Finance/FinancePlatformModel.d.ts @@ -109,7 +109,7 @@ export = FinancePlatformModel; * @property {number} [item_count] * @property {Object[]} [items] * @property {string} [message] - * @property {Object} [page] + * @property {Page} [page] * @property {boolean} [show_mr] */ /** @@ -120,7 +120,7 @@ export = FinancePlatformModel; * @typedef CreditNoteDetails * @property {number} [available_cn_balance] * @property {number} [cn_amount] - * @property {Object} [cn_details] + * @property {CnDetails} [cn_details] * @property {string} [cn_reference_number] * @property {string} [cn_status] * @property {string} [customer_mobile_number] @@ -136,6 +136,12 @@ export = FinancePlatformModel; * @property {CreditNoteDetails} [data] * @property {boolean} [success] */ +/** + * @typedef Currency + * @property {string} [code] + * @property {string} [name] + * @property {string} [symbol] + */ /** * @typedef DeleteConfig * @property {string} [affiliate_id] @@ -418,6 +424,23 @@ export = FinancePlatformModel; * @property {string[]} [invoice_type] * @property {string[]} [payment_status] */ +/** + * @typedef InvoiceActivityLogError + * @property {string} [reason] + */ +/** + * @typedef InvoiceActivityLogsResponse + * @property {InvoiceActivityLogsResponseData[]} [data] + */ +/** + * @typedef InvoiceActivityLogsResponseData + * @property {boolean} [is_resolved] + * @property {number} [max_retry_attempts] + * @property {string} [performed_by] + * @property {string} [reason] + * @property {number} [retry_attempts] + * @property {string} [status] + */ /** * @typedef InvoiceListingPayloadData * @property {string} [end_date] @@ -442,6 +465,7 @@ export = FinancePlatformModel; * @typedef InvoiceListingResponseItems * @property {string} [amount] * @property {string} [company] + * @property {Currency} [currency] * @property {string} [due_date] * @property {string} [invoice_date] * @property {string} [invoice_id] @@ -451,6 +475,17 @@ export = FinancePlatformModel; * @property {string} [period] * @property {string} [status] */ +/** + * @typedef InvoicePaymentDetailsResponse + * @property {InvoicePaymentDetailsResponseData} [data] + * @property {boolean} [payment_details_visible] + * @property {boolean} [success] + */ +/** + * @typedef InvoicePaymentDetailsResponseData + * @property {Object[]} [failed_attempts_details] + * @property {PaidInvoicePaymentDetail[]} [paid_invoice_payment_details] + */ /** * @typedef InvoicePdfPayloadData * @property {string[]} [invoice_number] @@ -526,6 +561,17 @@ export = FinancePlatformModel; * @property {number} [size] * @property {string} type */ +/** + * @typedef PaidInvoicePaymentDetail + * @property {number} [amount] + * @property {string} [date_of_payment] + * @property {PaymentDetail[]} [payment_details] + */ +/** + * @typedef PaymentDetail + * @property {string} [display_name] + * @property {string} [value] + */ /** * @typedef PaymentProcessPayload * @property {string} [amount] @@ -578,6 +624,27 @@ export = FinancePlatformModel; * @property {string} [name] * @property {string} [report_type] */ +/** + * @typedef UnlockCreditNoteRequest + * @property {UnlockCreditNoteRequestData} [data] + */ +/** + * @typedef UnlockCreditNoteRequestData + * @property {string} [description] + * @property {string[]} [locked_credit_notes] + * @property {string} [seller_id] + * @property {string} [unlock_reason] + */ +/** + * @typedef UnlockCreditNoteResponse + * @property {UnlockCreditNoteResponseData} [data] + * @property {boolean} [success] + */ +/** + * @typedef UnlockCreditNoteResponseData + * @property {boolean} [is_cn_unlocked] + * @property {string} [status] + */ /** * @typedef UnpaidInvoiceDataItems * @property {string} [currency] @@ -587,7 +654,7 @@ export = FinancePlatformModel; declare class FinancePlatformModel { } declare namespace FinancePlatformModel { - export { ChannelDisplayName, ChannelDisplayNameResponse, CnDetails, CnDownloadReport, CnGenerateReport, CnGenerateReportFilters, CnGenerateReportItems, CnReferenceNumber, CreateSellerCreditNoteConfig, CreateSellerCreditNoteConfigRequest, CreateSellerCreditNoteConfigResponse, CreditlineDataPlatformPayload, CreditlineDataPlatformRequest, CreditlineDataPlatformResponse, CreditNoteConfigNotificationEvents, CreditNoteDetails, CreditNoteDetailsRequest, CreditNoteDetailsResponse, DeleteConfig, DeleteConfigRequest, DeleteConfigResponse, DownloadCreditDebitNote, DownloadCreditDebitNoteRequest, DownloadCreditDebitNoteResponse, DownloadCreditDebitNoteResponseData, DownloadReport, DownloadReportCustomerCnRequest, DownloadReportCustomerCnResponse, DownloadReportItems, DownloadReportList, DownloadReportResponseData, Error, GenerateReportCustomerCnRequest, GenerateReportCustomerCnResponse, GenerateReportCustomerCnResponseData, GenerateReportFilters, GenerateReportJson, GenerateReportMeta, GenerateReportPlatform, GenerateReportRequest, GetAffiliate, GetAffiliateResponse, GetCnConfigRequest, GetCnConfigResponse, GetCnConfigResponseData, GetCnConfigResponseMeta, GetCustomerCreditBalance, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, GetCustomerCreditBalanceResponseData, GetEngineData, GetEngineRequest, GetEngineResponse, GetPdfUrlViewRequest, GetPdfUrlViewResponse, GetPdfUrlViewResponseData, GetReason, GetReasonRequest, GetReasonResponse, GetReportingFilters, GetReportingFiltersResponse, GetReportingNestedFilters, GetReportListData, GetReportListRequest, GetReportListResponse, InoviceListingPayloadDataFilters, InvoiceListingPayloadData, InvoiceListingRequest, InvoiceListingResponse, InvoiceListingResponseItems, InvoicePdfPayloadData, InvoicePdfRequest, InvoicePdfResponse, InvoiceTypePayloadData, InvoiceTypeRequest, InvoiceTypeResponse, InvoiceTypeResponseItems, IsCnRefundMethodData, IsCnRefundMethodRequest, IsCnRefundMethodResponse, IsCnRefundMethodResponseData, IsCreditlinePayload, IsCreditlinePlatformRequest, IsCreditlinePlatformResponse, Page, PaymentProcessPayload, PaymentProcessRequest, PaymentProcessResponse, ReasonItem, RedemptionDetails, ReportItem, UnpaidInvoiceDataItems }; + export { ChannelDisplayName, ChannelDisplayNameResponse, CnDetails, CnDownloadReport, CnGenerateReport, CnGenerateReportFilters, CnGenerateReportItems, CnReferenceNumber, CreateSellerCreditNoteConfig, CreateSellerCreditNoteConfigRequest, CreateSellerCreditNoteConfigResponse, CreditlineDataPlatformPayload, CreditlineDataPlatformRequest, CreditlineDataPlatformResponse, CreditNoteConfigNotificationEvents, CreditNoteDetails, CreditNoteDetailsRequest, CreditNoteDetailsResponse, Currency, DeleteConfig, DeleteConfigRequest, DeleteConfigResponse, DownloadCreditDebitNote, DownloadCreditDebitNoteRequest, DownloadCreditDebitNoteResponse, DownloadCreditDebitNoteResponseData, DownloadReport, DownloadReportCustomerCnRequest, DownloadReportCustomerCnResponse, DownloadReportItems, DownloadReportList, DownloadReportResponseData, Error, GenerateReportCustomerCnRequest, GenerateReportCustomerCnResponse, GenerateReportCustomerCnResponseData, GenerateReportFilters, GenerateReportJson, GenerateReportMeta, GenerateReportPlatform, GenerateReportRequest, GetAffiliate, GetAffiliateResponse, GetCnConfigRequest, GetCnConfigResponse, GetCnConfigResponseData, GetCnConfigResponseMeta, GetCustomerCreditBalance, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, GetCustomerCreditBalanceResponseData, GetEngineData, GetEngineRequest, GetEngineResponse, GetPdfUrlViewRequest, GetPdfUrlViewResponse, GetPdfUrlViewResponseData, GetReason, GetReasonRequest, GetReasonResponse, GetReportingFilters, GetReportingFiltersResponse, GetReportingNestedFilters, GetReportListData, GetReportListRequest, GetReportListResponse, InoviceListingPayloadDataFilters, InvoiceActivityLogError, InvoiceActivityLogsResponse, InvoiceActivityLogsResponseData, InvoiceListingPayloadData, InvoiceListingRequest, InvoiceListingResponse, InvoiceListingResponseItems, InvoicePaymentDetailsResponse, InvoicePaymentDetailsResponseData, InvoicePdfPayloadData, InvoicePdfRequest, InvoicePdfResponse, InvoiceTypePayloadData, InvoiceTypeRequest, InvoiceTypeResponse, InvoiceTypeResponseItems, IsCnRefundMethodData, IsCnRefundMethodRequest, IsCnRefundMethodResponse, IsCnRefundMethodResponseData, IsCreditlinePayload, IsCreditlinePlatformRequest, IsCreditlinePlatformResponse, Page, PaidInvoicePaymentDetail, PaymentDetail, PaymentProcessPayload, PaymentProcessRequest, PaymentProcessResponse, ReasonItem, RedemptionDetails, ReportItem, UnlockCreditNoteRequest, UnlockCreditNoteRequestData, UnlockCreditNoteResponse, UnlockCreditNoteResponseData, UnpaidInvoiceDataItems }; } /** @returns {ChannelDisplayName} */ declare function ChannelDisplayName(): ChannelDisplayName; @@ -713,7 +780,7 @@ type CreditlineDataPlatformResponse = { item_count?: number; items?: any[]; message?: string; - page?: any; + page?: Page; show_mr?: boolean; }; /** @returns {CreditNoteConfigNotificationEvents} */ @@ -726,7 +793,7 @@ declare function CreditNoteDetails(): CreditNoteDetails; type CreditNoteDetails = { available_cn_balance?: number; cn_amount?: number; - cn_details?: any; + cn_details?: CnDetails; cn_reference_number?: string; cn_status?: string; customer_mobile_number?: string; @@ -744,6 +811,13 @@ type CreditNoteDetailsResponse = { data?: CreditNoteDetails; success?: boolean; }; +/** @returns {Currency} */ +declare function Currency(): Currency; +type Currency = { + code?: string; + name?: string; + symbol?: string; +}; /** @returns {DeleteConfig} */ declare function DeleteConfig(): DeleteConfig; type DeleteConfig = { @@ -1074,6 +1148,26 @@ type InoviceListingPayloadDataFilters = { invoice_type?: string[]; payment_status?: string[]; }; +/** @returns {InvoiceActivityLogError} */ +declare function InvoiceActivityLogError(): InvoiceActivityLogError; +type InvoiceActivityLogError = { + reason?: string; +}; +/** @returns {InvoiceActivityLogsResponse} */ +declare function InvoiceActivityLogsResponse(): InvoiceActivityLogsResponse; +type InvoiceActivityLogsResponse = { + data?: InvoiceActivityLogsResponseData[]; +}; +/** @returns {InvoiceActivityLogsResponseData} */ +declare function InvoiceActivityLogsResponseData(): InvoiceActivityLogsResponseData; +type InvoiceActivityLogsResponseData = { + is_resolved?: boolean; + max_retry_attempts?: number; + performed_by?: string; + reason?: string; + retry_attempts?: number; + status?: string; +}; /** @returns {InvoiceListingPayloadData} */ declare function InvoiceListingPayloadData(): InvoiceListingPayloadData; type InvoiceListingPayloadData = { @@ -1102,6 +1196,7 @@ declare function InvoiceListingResponseItems(): InvoiceListingResponseItems; type InvoiceListingResponseItems = { amount?: string; company?: string; + currency?: Currency; due_date?: string; invoice_date?: string; invoice_id?: string; @@ -1111,6 +1206,19 @@ type InvoiceListingResponseItems = { period?: string; status?: string; }; +/** @returns {InvoicePaymentDetailsResponse} */ +declare function InvoicePaymentDetailsResponse(): InvoicePaymentDetailsResponse; +type InvoicePaymentDetailsResponse = { + data?: InvoicePaymentDetailsResponseData; + payment_details_visible?: boolean; + success?: boolean; +}; +/** @returns {InvoicePaymentDetailsResponseData} */ +declare function InvoicePaymentDetailsResponseData(): InvoicePaymentDetailsResponseData; +type InvoicePaymentDetailsResponseData = { + failed_attempts_details?: any[]; + paid_invoice_payment_details?: PaidInvoicePaymentDetail[]; +}; /** @returns {InvoicePdfPayloadData} */ declare function InvoicePdfPayloadData(): InvoicePdfPayloadData; type InvoicePdfPayloadData = { @@ -1201,6 +1309,19 @@ type Page = { size?: number; type: string; }; +/** @returns {PaidInvoicePaymentDetail} */ +declare function PaidInvoicePaymentDetail(): PaidInvoicePaymentDetail; +type PaidInvoicePaymentDetail = { + amount?: number; + date_of_payment?: string; + payment_details?: PaymentDetail[]; +}; +/** @returns {PaymentDetail} */ +declare function PaymentDetail(): PaymentDetail; +type PaymentDetail = { + display_name?: string; + value?: string; +}; /** @returns {PaymentProcessPayload} */ declare function PaymentProcessPayload(): PaymentProcessPayload; type PaymentProcessPayload = { @@ -1259,6 +1380,31 @@ type ReportItem = { name?: string; report_type?: string; }; +/** @returns {UnlockCreditNoteRequest} */ +declare function UnlockCreditNoteRequest(): UnlockCreditNoteRequest; +type UnlockCreditNoteRequest = { + data?: UnlockCreditNoteRequestData; +}; +/** @returns {UnlockCreditNoteRequestData} */ +declare function UnlockCreditNoteRequestData(): UnlockCreditNoteRequestData; +type UnlockCreditNoteRequestData = { + description?: string; + locked_credit_notes?: string[]; + seller_id?: string; + unlock_reason?: string; +}; +/** @returns {UnlockCreditNoteResponse} */ +declare function UnlockCreditNoteResponse(): UnlockCreditNoteResponse; +type UnlockCreditNoteResponse = { + data?: UnlockCreditNoteResponseData; + success?: boolean; +}; +/** @returns {UnlockCreditNoteResponseData} */ +declare function UnlockCreditNoteResponseData(): UnlockCreditNoteResponseData; +type UnlockCreditNoteResponseData = { + is_cn_unlocked?: boolean; + status?: string; +}; /** @returns {UnpaidInvoiceDataItems} */ declare function UnpaidInvoiceDataItems(): UnpaidInvoiceDataItems; type UnpaidInvoiceDataItems = { diff --git a/sdk/platform/Finance/FinancePlatformModel.js b/sdk/platform/Finance/FinancePlatformModel.js index 46a7336ad..e4fc6b78e 100644 --- a/sdk/platform/Finance/FinancePlatformModel.js +++ b/sdk/platform/Finance/FinancePlatformModel.js @@ -123,7 +123,7 @@ const Joi = require("joi"); * @property {number} [item_count] * @property {Object[]} [items] * @property {string} [message] - * @property {Object} [page] + * @property {Page} [page] * @property {boolean} [show_mr] */ @@ -136,7 +136,7 @@ const Joi = require("joi"); * @typedef CreditNoteDetails * @property {number} [available_cn_balance] * @property {number} [cn_amount] - * @property {Object} [cn_details] + * @property {CnDetails} [cn_details] * @property {string} [cn_reference_number] * @property {string} [cn_status] * @property {string} [customer_mobile_number] @@ -155,6 +155,13 @@ const Joi = require("joi"); * @property {boolean} [success] */ +/** + * @typedef Currency + * @property {string} [code] + * @property {string} [name] + * @property {string} [symbol] + */ + /** * @typedef DeleteConfig * @property {string} [affiliate_id] @@ -485,6 +492,26 @@ const Joi = require("joi"); * @property {string[]} [payment_status] */ +/** + * @typedef InvoiceActivityLogError + * @property {string} [reason] + */ + +/** + * @typedef InvoiceActivityLogsResponse + * @property {InvoiceActivityLogsResponseData[]} [data] + */ + +/** + * @typedef InvoiceActivityLogsResponseData + * @property {boolean} [is_resolved] + * @property {number} [max_retry_attempts] + * @property {string} [performed_by] + * @property {string} [reason] + * @property {number} [retry_attempts] + * @property {string} [status] + */ + /** * @typedef InvoiceListingPayloadData * @property {string} [end_date] @@ -512,6 +539,7 @@ const Joi = require("joi"); * @typedef InvoiceListingResponseItems * @property {string} [amount] * @property {string} [company] + * @property {Currency} [currency] * @property {string} [due_date] * @property {string} [invoice_date] * @property {string} [invoice_id] @@ -522,6 +550,19 @@ const Joi = require("joi"); * @property {string} [status] */ +/** + * @typedef InvoicePaymentDetailsResponse + * @property {InvoicePaymentDetailsResponseData} [data] + * @property {boolean} [payment_details_visible] + * @property {boolean} [success] + */ + +/** + * @typedef InvoicePaymentDetailsResponseData + * @property {Object[]} [failed_attempts_details] + * @property {PaidInvoicePaymentDetail[]} [paid_invoice_payment_details] + */ + /** * @typedef InvoicePdfPayloadData * @property {string[]} [invoice_number] @@ -612,6 +653,19 @@ const Joi = require("joi"); * @property {string} type */ +/** + * @typedef PaidInvoicePaymentDetail + * @property {number} [amount] + * @property {string} [date_of_payment] + * @property {PaymentDetail[]} [payment_details] + */ + +/** + * @typedef PaymentDetail + * @property {string} [display_name] + * @property {string} [value] + */ + /** * @typedef PaymentProcessPayload * @property {string} [amount] @@ -670,6 +724,31 @@ const Joi = require("joi"); * @property {string} [report_type] */ +/** + * @typedef UnlockCreditNoteRequest + * @property {UnlockCreditNoteRequestData} [data] + */ + +/** + * @typedef UnlockCreditNoteRequestData + * @property {string} [description] + * @property {string[]} [locked_credit_notes] + * @property {string} [seller_id] + * @property {string} [unlock_reason] + */ + +/** + * @typedef UnlockCreditNoteResponse + * @property {UnlockCreditNoteResponseData} [data] + * @property {boolean} [success] + */ + +/** + * @typedef UnlockCreditNoteResponseData + * @property {boolean} [is_cn_unlocked] + * @property {string} [status] + */ + /** * @typedef UnpaidInvoiceDataItems * @property {string} [currency] @@ -828,7 +907,7 @@ class FinancePlatformModel { item_count: Joi.number(), items: Joi.array().items(Joi.any()), message: Joi.string().allow(""), - page: Joi.any(), + page: FinancePlatformModel.Page(), show_mr: Joi.boolean(), }); } @@ -845,7 +924,7 @@ class FinancePlatformModel { return Joi.object({ available_cn_balance: Joi.number(), cn_amount: Joi.number(), - cn_details: Joi.any(), + cn_details: FinancePlatformModel.CnDetails(), cn_reference_number: Joi.string().allow(""), cn_status: Joi.string().allow(""), customer_mobile_number: Joi.string().allow(""), @@ -871,6 +950,15 @@ class FinancePlatformModel { }); } + /** @returns {Currency} */ + static Currency() { + return Joi.object({ + code: Joi.string().allow(""), + name: Joi.string().allow(""), + symbol: Joi.string().allow(""), + }); + } + /** @returns {DeleteConfig} */ static DeleteConfig() { return Joi.object({ @@ -1303,6 +1391,34 @@ class FinancePlatformModel { }); } + /** @returns {InvoiceActivityLogError} */ + static InvoiceActivityLogError() { + return Joi.object({ + reason: Joi.string().allow(""), + }); + } + + /** @returns {InvoiceActivityLogsResponse} */ + static InvoiceActivityLogsResponse() { + return Joi.object({ + data: Joi.array().items( + FinancePlatformModel.InvoiceActivityLogsResponseData() + ), + }); + } + + /** @returns {InvoiceActivityLogsResponseData} */ + static InvoiceActivityLogsResponseData() { + return Joi.object({ + is_resolved: Joi.boolean(), + max_retry_attempts: Joi.number(), + performed_by: Joi.string().allow(""), + reason: Joi.string().allow(""), + retry_attempts: Joi.number(), + status: Joi.string().allow(""), + }); + } + /** @returns {InvoiceListingPayloadData} */ static InvoiceListingPayloadData() { return Joi.object({ @@ -1339,6 +1455,7 @@ class FinancePlatformModel { return Joi.object({ amount: Joi.string().allow(""), company: Joi.string().allow(""), + currency: FinancePlatformModel.Currency(), due_date: Joi.string().allow(""), invoice_date: Joi.string().allow(""), invoice_id: Joi.string().allow(""), @@ -1350,6 +1467,25 @@ class FinancePlatformModel { }); } + /** @returns {InvoicePaymentDetailsResponse} */ + static InvoicePaymentDetailsResponse() { + return Joi.object({ + data: FinancePlatformModel.InvoicePaymentDetailsResponseData(), + payment_details_visible: Joi.boolean(), + success: Joi.boolean(), + }); + } + + /** @returns {InvoicePaymentDetailsResponseData} */ + static InvoicePaymentDetailsResponseData() { + return Joi.object({ + failed_attempts_details: Joi.array().items(Joi.any()), + paid_invoice_payment_details: Joi.array().items( + FinancePlatformModel.PaidInvoicePaymentDetail() + ), + }); + } + /** @returns {InvoicePdfPayloadData} */ static InvoicePdfPayloadData() { return Joi.object({ @@ -1474,6 +1610,23 @@ class FinancePlatformModel { }); } + /** @returns {PaidInvoicePaymentDetail} */ + static PaidInvoicePaymentDetail() { + return Joi.object({ + amount: Joi.number(), + date_of_payment: Joi.string().allow(""), + payment_details: Joi.array().items(FinancePlatformModel.PaymentDetail()), + }); + } + + /** @returns {PaymentDetail} */ + static PaymentDetail() { + return Joi.object({ + display_name: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + /** @returns {PaymentProcessPayload} */ static PaymentProcessPayload() { return Joi.object({ @@ -1544,6 +1697,39 @@ class FinancePlatformModel { }); } + /** @returns {UnlockCreditNoteRequest} */ + static UnlockCreditNoteRequest() { + return Joi.object({ + data: FinancePlatformModel.UnlockCreditNoteRequestData(), + }); + } + + /** @returns {UnlockCreditNoteRequestData} */ + static UnlockCreditNoteRequestData() { + return Joi.object({ + description: Joi.string().allow(""), + locked_credit_notes: Joi.array().items(Joi.string().allow("")), + seller_id: Joi.string().allow(""), + unlock_reason: Joi.string().allow(""), + }); + } + + /** @returns {UnlockCreditNoteResponse} */ + static UnlockCreditNoteResponse() { + return Joi.object({ + data: FinancePlatformModel.UnlockCreditNoteResponseData(), + success: Joi.boolean(), + }); + } + + /** @returns {UnlockCreditNoteResponseData} */ + static UnlockCreditNoteResponseData() { + return Joi.object({ + is_cn_unlocked: Joi.boolean(), + status: Joi.string().allow(""), + }); + } + /** @returns {UnpaidInvoiceDataItems} */ static UnpaidInvoiceDataItems() { return Joi.object({ diff --git a/sdk/platform/Finance/FinancePlatformValidator.d.ts b/sdk/platform/Finance/FinancePlatformValidator.d.ts index a12579aee..8f1c0d9c9 100644 --- a/sdk/platform/Finance/FinancePlatformValidator.d.ts +++ b/sdk/platform/Finance/FinancePlatformValidator.d.ts @@ -72,6 +72,11 @@ export = FinancePlatformValidator; * @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.InvoiceListingRequest} body @@ -80,6 +85,11 @@ export = FinancePlatformValidator; * @typedef InvoicePDFParam * @property {FinancePlatformModel.InvoicePdfRequest} body */ +/** + * @typedef InvoicePaymentDetailsParam + * @property {string} invoiceNumber - Invoice Number for which the data will be + * returned.Invoice_Number is required. + */ /** * @typedef InvoiceTypeParam * @property {FinancePlatformModel.InvoiceTypeRequest} body @@ -96,6 +106,10 @@ export = FinancePlatformValidator; * @typedef PaymentProcessParam * @property {FinancePlatformModel.PaymentProcessRequest} body */ +/** + * @typedef UnlockCreditNoteParam + * @property {FinancePlatformModel.UnlockCreditNoteRequest} body + */ declare class FinancePlatformValidator { /** @returns {ChannelDisplayNameParam} */ static channelDisplayName(): ChannelDisplayNameParam; @@ -133,10 +147,14 @@ declare class FinancePlatformValidator { 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 {InvoiceTypeParam} */ static invoiceType(): InvoiceTypeParam; /** @returns {IsCnRefundMethodParam} */ @@ -145,9 +163,11 @@ declare class FinancePlatformValidator { static isCreditlinePlatform(): IsCreditlinePlatformParam; /** @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, InvoiceListingParam, InvoicePDFParam, InvoiceTypeParam, IsCnRefundMethodParam, IsCreditlinePlatformParam, PaymentProcessParam }; + export { ChannelDisplayNameParam, CreateSellerCreditNoteConfigParam, CreditNoteDetailsParam, CreditlineDataplatformParam, DeleteConfigParam, DownloadCreditDebitNoteParam, DownloadReportParam, DownloadReportCustomerCnParam, GenerateReportParam, GenerateReportCustomerCnParam, GetAffiliateParam, GetCnConfigParam, GetCustomerCreditBalanceParam, GetDataParam, GetPdfUrlViewParam, GetReasonParam, GetReportListParam, GetReportingFiltersParam, InvoiceActivityLogsParam, InvoiceListingParam, InvoicePDFParam, InvoicePaymentDetailsParam, InvoiceTypeParam, IsCnRefundMethodParam, IsCreditlinePlatformParam, PaymentProcessParam, UnlockCreditNoteParam }; } type ChannelDisplayNameParam = { /** @@ -213,12 +233,26 @@ type GetReportingFiltersParam = { */ affiliateId?: string; }; +type InvoiceActivityLogsParam = { + /** + * - Invoice Number for which the data will be + * returned. Invoice_number is required. + */ + invoiceNumber: string; +}; type InvoiceListingParam = { body: FinancePlatformModel.InvoiceListingRequest; }; type InvoicePDFParam = { body: FinancePlatformModel.InvoicePdfRequest; }; +type InvoicePaymentDetailsParam = { + /** + * - Invoice Number for which the data will be + * returned.Invoice_Number is required. + */ + invoiceNumber: string; +}; type InvoiceTypeParam = { body: FinancePlatformModel.InvoiceTypeRequest; }; @@ -231,4 +265,7 @@ type IsCreditlinePlatformParam = { type PaymentProcessParam = { body: FinancePlatformModel.PaymentProcessRequest; }; +type UnlockCreditNoteParam = { + body: FinancePlatformModel.UnlockCreditNoteRequest; +}; import FinancePlatformModel = require("./FinancePlatformModel"); diff --git a/sdk/platform/Finance/FinancePlatformValidator.js b/sdk/platform/Finance/FinancePlatformValidator.js index 9e7c9690b..6f44b8e9d 100644 --- a/sdk/platform/Finance/FinancePlatformValidator.js +++ b/sdk/platform/Finance/FinancePlatformValidator.js @@ -93,6 +93,12 @@ const FinancePlatformModel = require("./FinancePlatformModel"); * @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.InvoiceListingRequest} body @@ -103,6 +109,12 @@ const FinancePlatformModel = require("./FinancePlatformModel"); * @property {FinancePlatformModel.InvoicePdfRequest} body */ +/** + * @typedef InvoicePaymentDetailsParam + * @property {string} invoiceNumber - Invoice Number for which the data will be + * returned.Invoice_Number is required. + */ + /** * @typedef InvoiceTypeParam * @property {FinancePlatformModel.InvoiceTypeRequest} body @@ -123,6 +135,11 @@ const FinancePlatformModel = require("./FinancePlatformModel"); * @property {FinancePlatformModel.PaymentProcessRequest} body */ +/** + * @typedef UnlockCreditNoteParam + * @property {FinancePlatformModel.UnlockCreditNoteRequest} body + */ + class FinancePlatformValidator { /** @returns {ChannelDisplayNameParam} */ static channelDisplayName() { @@ -251,6 +268,13 @@ class FinancePlatformValidator { }).required(); } + /** @returns {InvoiceActivityLogsParam} */ + static invoiceActivityLogs() { + return Joi.object({ + invoiceNumber: Joi.string().allow("").required(), + }).required(); + } + /** @returns {InvoiceListingParam} */ static invoiceListing() { return Joi.object({ @@ -265,6 +289,13 @@ class FinancePlatformValidator { }).required(); } + /** @returns {InvoicePaymentDetailsParam} */ + static invoicePaymentDetails() { + return Joi.object({ + invoiceNumber: Joi.string().allow("").required(), + }).required(); + } + /** @returns {InvoiceTypeParam} */ static invoiceType() { return Joi.object({ @@ -292,6 +323,13 @@ class FinancePlatformValidator { body: FinancePlatformModel.PaymentProcessRequest().required(), }).required(); } + + /** @returns {UnlockCreditNoteParam} */ + static unlockCreditNote() { + return Joi.object({ + body: FinancePlatformModel.UnlockCreditNoteRequest().required(), + }).required(); + } } module.exports = FinancePlatformValidator; diff --git a/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts b/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts index 305ab5392..ca93f9e22 100644 --- a/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +++ b/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts @@ -24,15 +24,25 @@ declare class Lead { */ createCustomForm({ body, requestHeaders }?: LeadPlatformApplicationValidator.CreateCustomFormParam, { responseHeaders }?: object): Promise; /** - * @param {LeadPlatformApplicationValidator.CreateHistoryParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.CreateNewHistoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name createHistory + * @name createNewHistory * @summary: Create history for specific application level ticket - * @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createHistory/). + * @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createNewHistory/). */ - createHistory({ id, body, requestHeaders }?: LeadPlatformApplicationValidator.CreateHistoryParam, { responseHeaders }?: object): Promise; + createNewHistory({ id, body, requestHeaders }?: LeadPlatformApplicationValidator.CreateNewHistoryParam, { responseHeaders }?: object): Promise; + /** + * @param {LeadPlatformApplicationValidator.DeleteCustomFormParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteCustomForm + * @summary: Delete a custom form + * @description: Delete a custom form using it's slug - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/deleteCustomForm/). + */ + deleteCustomForm({ slug, requestHeaders }?: LeadPlatformApplicationValidator.DeleteCustomFormParam, { responseHeaders }?: object): Promise; /** * @param {LeadPlatformApplicationValidator.EditCustomFormParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -44,15 +54,15 @@ declare class Lead { */ editCustomForm({ slug, body, requestHeaders }?: LeadPlatformApplicationValidator.EditCustomFormParam, { responseHeaders }?: object): Promise; /** - * @param {LeadPlatformApplicationValidator.EditTicketParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.EditNewTicketParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name editTicket + * @name editNewTicket * @summary: Edits ticket details of a application level ticket - * @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/editTicket/). + * @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/editNewTicket/). */ - editTicket({ id, body, requestHeaders }?: LeadPlatformApplicationValidator.EditTicketParam, { responseHeaders }?: object): Promise; + editNewTicket({ id, body, requestHeaders }?: LeadPlatformApplicationValidator.EditNewTicketParam, { responseHeaders }?: object): Promise; /** * @param {LeadPlatformApplicationValidator.GetCustomFormParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -74,50 +84,50 @@ declare class Lead { */ getCustomForms({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** - * @param {LeadPlatformApplicationValidator.GetTicketParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.GetNewTicketParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getTicket + * @name getNewTicket * @summary: Retreives ticket details of a application level ticket - * @description: Retreives ticket details of a application level ticket with ticket ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTicket/). + * @description: Retreives ticket details of a application level ticket with ticket ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewTicket/). */ - getTicket({ id, requestHeaders }?: LeadPlatformApplicationValidator.GetTicketParam, { responseHeaders }?: object): Promise; + getNewTicket({ id, requestHeaders }?: LeadPlatformApplicationValidator.GetNewTicketParam, { responseHeaders }?: object): Promise; /** - * @param {LeadPlatformApplicationValidator.GetTicketHistoryParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.GetNewTicketHistoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getTicketHistory + * @name getNewTicketHistory * @summary: Gets history list for specific application level ticket - * @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTicketHistory/). + * @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewTicketHistory/). */ - getTicketHistory({ id, requestHeaders }?: LeadPlatformApplicationValidator.GetTicketHistoryParam, { responseHeaders }?: object): Promise; + getNewTicketHistory({ id, requestHeaders }?: LeadPlatformApplicationValidator.GetNewTicketHistoryParam, { responseHeaders }?: object): Promise; /** - * @param {LeadPlatformApplicationValidator.GetTicketsParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.GetNewTicketsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getTickets + * @name getNewTickets * @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params - * @description: Gets the list of Application level Tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTickets/). + * @description: Gets the list of Application level Tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewTickets/). */ - getTickets({ items, filters, q, status, priority, category, requestHeaders }?: LeadPlatformApplicationValidator.GetTicketsParam, { responseHeaders }?: object): Promise; + getNewTickets({ items, filters, q, status, priority, category, requestHeaders }?: LeadPlatformApplicationValidator.GetNewTicketsParam, { responseHeaders }?: object): Promise; /** - * @param {LeadPlatformApplicationValidator.GetTokenForVideoRoomParam} arg + * @param {LeadPlatformApplicationValidator.GetNewTokenForVideoRoomParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - * Success response - * @name getTokenForVideoRoom + * @name getNewTokenForVideoRoom * @summary: Get Token to join a specific Video Room using it's unqiue name - * @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTokenForVideoRoom/). + * @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewTokenForVideoRoom/). */ - getTokenForVideoRoom({ uniqueName, requestHeaders }?: LeadPlatformApplicationValidator.GetTokenForVideoRoomParam, { responseHeaders }?: object): Promise; + getNewTokenForVideoRoom({ uniqueName, requestHeaders }?: LeadPlatformApplicationValidator.GetNewTokenForVideoRoomParam, { responseHeaders }?: object): Promise; /** - * @param {LeadPlatformApplicationValidator.GetVideoParticipantsParam} arg + * @param {LeadPlatformApplicationValidator.GetNewVideoParticipantsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -125,11 +135,11 @@ declare class Lead { * @returns {Promise} * - Success response * - * @name getVideoParticipants + * @name getNewVideoParticipants * @summary: Get participants of a specific Video Room using it's unique name - * @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getVideoParticipants/). + * @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewVideoParticipants/). */ - getVideoParticipants({ uniqueName, requestHeaders }?: LeadPlatformApplicationValidator.GetVideoParticipantsParam, { responseHeaders }?: object): Promise; + getNewVideoParticipants({ uniqueName, requestHeaders }?: LeadPlatformApplicationValidator.GetNewVideoParticipantsParam, { responseHeaders }?: object): Promise; /** * @param {LeadPlatformApplicationValidator.OpenVideoRoomParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Lead/LeadPlatformApplicationClient.js b/sdk/platform/Lead/LeadPlatformApplicationClient.js index 59435616e..d84107b94 100644 --- a/sdk/platform/Lead/LeadPlatformApplicationClient.js +++ b/sdk/platform/Lead/LeadPlatformApplicationClient.js @@ -171,19 +171,21 @@ class Lead { } /** - * @param {LeadPlatformApplicationValidator.CreateHistoryParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.CreateNewHistoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name createHistory + * @name createNewHistory * @summary: Create history for specific application level ticket - * @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createHistory/). + * @description: Create history for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/createNewHistory/). */ - async createHistory( + async createNewHistory( { id, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = LeadPlatformApplicationValidator.createHistory().validate( + const { + error, + } = LeadPlatformApplicationValidator.createNewHistory().validate( { id, body, @@ -197,7 +199,7 @@ class Lead { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = LeadPlatformApplicationValidator.createHistory().validate( + } = LeadPlatformApplicationValidator.createNewHistory().validate( { id, body, @@ -207,7 +209,7 @@ class Lead { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Lead > createHistory \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Lead > createNewHistory \n ${warrning}`, }); } @@ -241,7 +243,86 @@ class Lead { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Lead > createHistory \n ${res_error}`, + message: `Response Validation Warnings for platform > Lead > createNewHistory \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {LeadPlatformApplicationValidator.DeleteCustomFormParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name deleteCustomForm + * @summary: Delete a custom form + * @description: Delete a custom form using it's slug - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/deleteCustomForm/). + */ + async deleteCustomForm( + { slug, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = LeadPlatformApplicationValidator.deleteCustomForm().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, + } = LeadPlatformApplicationValidator.deleteCustomForm().validate( + { + slug, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Lead > deleteCustomForm \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/lead/v1.0/company/${this.config.companyId}/application/${this.applicationId}/form/${slug}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = LeadPlatformModel.CustomForm().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 > Lead > deleteCustomForm \n ${res_error}`, }); } } @@ -331,19 +412,19 @@ class Lead { } /** - * @param {LeadPlatformApplicationValidator.EditTicketParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.EditNewTicketParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name editTicket + * @name editNewTicket * @summary: Edits ticket details of a application level ticket - * @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/editTicket/). + * @description: Edits ticket details of a application level ticket such as status, priority, category, tags, attachments, assigne & ticket content changes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/editNewTicket/). */ - async editTicket( + async editNewTicket( { id, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = LeadPlatformApplicationValidator.editTicket().validate( + const { error } = LeadPlatformApplicationValidator.editNewTicket().validate( { id, body, @@ -357,7 +438,7 @@ class Lead { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = LeadPlatformApplicationValidator.editTicket().validate( + } = LeadPlatformApplicationValidator.editNewTicket().validate( { id, body, @@ -367,7 +448,7 @@ class Lead { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Lead > editTicket \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Lead > editNewTicket \n ${warrning}`, }); } @@ -401,7 +482,7 @@ class Lead { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Lead > editTicket \n ${res_error}`, + message: `Response Validation Warnings for platform > Lead > editNewTicket \n ${res_error}`, }); } } @@ -562,19 +643,19 @@ class Lead { } /** - * @param {LeadPlatformApplicationValidator.GetTicketParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.GetNewTicketParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getTicket + * @name getNewTicket * @summary: Retreives ticket details of a application level ticket - * @description: Retreives ticket details of a application level ticket with ticket ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTicket/). + * @description: Retreives ticket details of a application level ticket with ticket ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewTicket/). */ - async getTicket( + async getNewTicket( { id, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = LeadPlatformApplicationValidator.getTicket().validate( + const { error } = LeadPlatformApplicationValidator.getNewTicket().validate( { id, }, @@ -587,7 +668,7 @@ class Lead { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = LeadPlatformApplicationValidator.getTicket().validate( + } = LeadPlatformApplicationValidator.getNewTicket().validate( { id, }, @@ -596,7 +677,7 @@ class Lead { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Lead > getTicket \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Lead > getNewTicket \n ${warrning}`, }); } @@ -630,7 +711,7 @@ class Lead { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Lead > getTicket \n ${res_error}`, + message: `Response Validation Warnings for platform > Lead > getNewTicket \n ${res_error}`, }); } } @@ -639,21 +720,21 @@ class Lead { } /** - * @param {LeadPlatformApplicationValidator.GetTicketHistoryParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.GetNewTicketHistoryParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getTicketHistory + * @name getNewTicketHistory * @summary: Gets history list for specific application level ticket - * @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTicketHistory/). + * @description: Gets history list for specific application level ticket, this history is seen on ticket detail page, this can be comment, log or rating. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewTicketHistory/). */ - async getTicketHistory( + async getNewTicketHistory( { id, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = LeadPlatformApplicationValidator.getTicketHistory().validate( + } = LeadPlatformApplicationValidator.getNewTicketHistory().validate( { id, }, @@ -666,7 +747,7 @@ class Lead { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = LeadPlatformApplicationValidator.getTicketHistory().validate( + } = LeadPlatformApplicationValidator.getNewTicketHistory().validate( { id, }, @@ -675,7 +756,7 @@ class Lead { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Lead > getTicketHistory \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Lead > getNewTicketHistory \n ${warrning}`, }); } @@ -709,7 +790,7 @@ class Lead { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Lead > getTicketHistory \n ${res_error}`, + message: `Response Validation Warnings for platform > Lead > getNewTicketHistory \n ${res_error}`, }); } } @@ -718,21 +799,21 @@ class Lead { } /** - * @param {LeadPlatformApplicationValidator.GetTicketsParam} arg - Arg object + * @param {LeadPlatformApplicationValidator.GetNewTicketsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getTickets + * @name getNewTickets * @summary: Gets the list of Application level Tickets and/or ticket filters depending on query params - * @description: Gets the list of Application level Tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTickets/). + * @description: Gets the list of Application level Tickets and/or ticket filters - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewTickets/). */ - async getTickets( + async getNewTickets( { items, filters, q, status, priority, category, requestHeaders } = { requestHeaders: {}, }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = LeadPlatformApplicationValidator.getTickets().validate( + const { error } = LeadPlatformApplicationValidator.getNewTickets().validate( { items, filters, @@ -750,7 +831,7 @@ class Lead { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = LeadPlatformApplicationValidator.getTickets().validate( + } = LeadPlatformApplicationValidator.getNewTickets().validate( { items, filters, @@ -764,7 +845,7 @@ class Lead { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Lead > getTickets \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Lead > getNewTickets \n ${warrning}`, }); } @@ -804,7 +885,7 @@ class Lead { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Lead > getTickets \n ${res_error}`, + message: `Response Validation Warnings for platform > Lead > getNewTickets \n ${res_error}`, }); } } @@ -813,24 +894,24 @@ class Lead { } /** - * @param {LeadPlatformApplicationValidator.GetTokenForVideoRoomParam} arg + * @param {LeadPlatformApplicationValidator.GetNewTokenForVideoRoomParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - * Success response - * @name getTokenForVideoRoom + * @name getNewTokenForVideoRoom * @summary: Get Token to join a specific Video Room using it's unqiue name - * @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getTokenForVideoRoom/). + * @description: Get Token to join a specific Video Room using it's unqiue name, this Token is your ticket to Room and also creates your identity there. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewTokenForVideoRoom/). */ - async getTokenForVideoRoom( + async getNewTokenForVideoRoom( { uniqueName, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = LeadPlatformApplicationValidator.getTokenForVideoRoom().validate( + } = LeadPlatformApplicationValidator.getNewTokenForVideoRoom().validate( { uniqueName, }, @@ -843,7 +924,7 @@ class Lead { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = LeadPlatformApplicationValidator.getTokenForVideoRoom().validate( + } = LeadPlatformApplicationValidator.getNewTokenForVideoRoom().validate( { uniqueName, }, @@ -852,7 +933,7 @@ class Lead { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Lead > getTokenForVideoRoom \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Lead > getNewTokenForVideoRoom \n ${warrning}`, }); } @@ -886,7 +967,7 @@ class Lead { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Lead > getTokenForVideoRoom \n ${res_error}`, + message: `Response Validation Warnings for platform > Lead > getNewTokenForVideoRoom \n ${res_error}`, }); } } @@ -895,7 +976,7 @@ class Lead { } /** - * @param {LeadPlatformApplicationValidator.GetVideoParticipantsParam} arg + * @param {LeadPlatformApplicationValidator.GetNewVideoParticipantsParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -903,17 +984,17 @@ class Lead { * @returns {Promise} * - Success response * - * @name getVideoParticipants + * @name getNewVideoParticipants * @summary: Get participants of a specific Video Room using it's unique name - * @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getVideoParticipants/). + * @description: Get participants of a specific Video Room using it's unique name, this can be used to check if people are already there in the room and also to show their names. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/lead/getNewVideoParticipants/). */ - async getVideoParticipants( + async getNewVideoParticipants( { uniqueName, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = LeadPlatformApplicationValidator.getVideoParticipants().validate( + } = LeadPlatformApplicationValidator.getNewVideoParticipants().validate( { uniqueName, }, @@ -926,7 +1007,7 @@ class Lead { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = LeadPlatformApplicationValidator.getVideoParticipants().validate( + } = LeadPlatformApplicationValidator.getNewVideoParticipants().validate( { uniqueName, }, @@ -935,7 +1016,7 @@ class Lead { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Lead > getVideoParticipants \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Lead > getNewVideoParticipants \n ${warrning}`, }); } @@ -969,7 +1050,7 @@ class Lead { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Lead > getVideoParticipants \n ${res_error}`, + message: `Response Validation Warnings for platform > Lead > getNewVideoParticipants \n ${res_error}`, }); } } diff --git a/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts b/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts index 032601162..b2762a111 100644 --- a/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +++ b/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts @@ -8,17 +8,21 @@ export = LeadPlatformApplicationValidator; * @property {LeadPlatformModel.CreateCustomFormPayload} body */ /** - * @typedef CreateHistoryParam + * @typedef CreateNewHistoryParam * @property {string} id - Ticket ID for which history is created * @property {LeadPlatformModel.TicketHistoryPayload} body */ +/** + * @typedef DeleteCustomFormParam + * @property {string} slug - Slug of form whose response is getting submitted + */ /** * @typedef EditCustomFormParam * @property {string} slug - Slug of form whose response is getting submitted * @property {LeadPlatformModel.EditCustomFormPayload} body */ /** - * @typedef EditTicketParam + * @typedef EditNewTicketParam * @property {string} id - Ticket ID of ticket to be edited * @property {LeadPlatformModel.EditTicketPayload} body */ @@ -28,15 +32,15 @@ export = LeadPlatformApplicationValidator; */ /** @typedef GetCustomFormsParam */ /** - * @typedef GetTicketParam + * @typedef GetNewTicketParam * @property {string} id - Tiket ID of the ticket to be fetched */ /** - * @typedef GetTicketHistoryParam + * @typedef GetNewTicketHistoryParam * @property {string} id - Ticket ID for which history is to be fetched */ /** - * @typedef GetTicketsParam + * @typedef GetNewTicketsParam * @property {boolean} [items] - Decides that the reponse will contain the list of tickets * @property {boolean} [filters] - Decides that the reponse will contain the * ticket filters @@ -46,11 +50,11 @@ export = LeadPlatformApplicationValidator; * @property {string} [category] - Filter tickets on category */ /** - * @typedef GetTokenForVideoRoomParam + * @typedef GetNewTokenForVideoRoomParam * @property {string} uniqueName - Unique name of video room */ /** - * @typedef GetVideoParticipantsParam + * @typedef GetNewVideoParticipantsParam * @property {string} uniqueName - Unique name of Video Room */ /** @@ -62,31 +66,33 @@ declare class LeadPlatformApplicationValidator { static closeVideoRoom(): CloseVideoRoomParam; /** @returns {CreateCustomFormParam} */ static createCustomForm(): CreateCustomFormParam; - /** @returns {CreateHistoryParam} */ - static createHistory(): CreateHistoryParam; + /** @returns {CreateNewHistoryParam} */ + static createNewHistory(): CreateNewHistoryParam; + /** @returns {DeleteCustomFormParam} */ + static deleteCustomForm(): DeleteCustomFormParam; /** @returns {EditCustomFormParam} */ static editCustomForm(): EditCustomFormParam; - /** @returns {EditTicketParam} */ - static editTicket(): EditTicketParam; + /** @returns {EditNewTicketParam} */ + static editNewTicket(): EditNewTicketParam; /** @returns {GetCustomFormParam} */ static getCustomForm(): GetCustomFormParam; /** @returns {GetCustomFormsParam} */ static getCustomForms(): any; - /** @returns {GetTicketParam} */ - static getTicket(): GetTicketParam; - /** @returns {GetTicketHistoryParam} */ - static getTicketHistory(): GetTicketHistoryParam; - /** @returns {GetTicketsParam} */ - static getTickets(): GetTicketsParam; - /** @returns {GetTokenForVideoRoomParam} */ - static getTokenForVideoRoom(): GetTokenForVideoRoomParam; - /** @returns {GetVideoParticipantsParam} */ - static getVideoParticipants(): GetVideoParticipantsParam; + /** @returns {GetNewTicketParam} */ + static getNewTicket(): GetNewTicketParam; + /** @returns {GetNewTicketHistoryParam} */ + static getNewTicketHistory(): GetNewTicketHistoryParam; + /** @returns {GetNewTicketsParam} */ + static getNewTickets(): GetNewTicketsParam; + /** @returns {GetNewTokenForVideoRoomParam} */ + static getNewTokenForVideoRoom(): GetNewTokenForVideoRoomParam; + /** @returns {GetNewVideoParticipantsParam} */ + static getNewVideoParticipants(): GetNewVideoParticipantsParam; /** @returns {OpenVideoRoomParam} */ static openVideoRoom(): OpenVideoRoomParam; } declare namespace LeadPlatformApplicationValidator { - export { CloseVideoRoomParam, CreateCustomFormParam, CreateHistoryParam, EditCustomFormParam, EditTicketParam, GetCustomFormParam, GetCustomFormsParam, GetTicketParam, GetTicketHistoryParam, GetTicketsParam, GetTokenForVideoRoomParam, GetVideoParticipantsParam, OpenVideoRoomParam }; + export { CloseVideoRoomParam, CreateCustomFormParam, CreateNewHistoryParam, DeleteCustomFormParam, EditCustomFormParam, EditNewTicketParam, GetCustomFormParam, GetCustomFormsParam, GetNewTicketParam, GetNewTicketHistoryParam, GetNewTicketsParam, GetNewTokenForVideoRoomParam, GetNewVideoParticipantsParam, OpenVideoRoomParam }; } type CloseVideoRoomParam = { /** @@ -97,13 +103,19 @@ type CloseVideoRoomParam = { type CreateCustomFormParam = { body: LeadPlatformModel.CreateCustomFormPayload; }; -type CreateHistoryParam = { +type CreateNewHistoryParam = { /** * - Ticket ID for which history is created */ id: string; body: LeadPlatformModel.TicketHistoryPayload; }; +type DeleteCustomFormParam = { + /** + * - Slug of form whose response is getting submitted + */ + slug: string; +}; type EditCustomFormParam = { /** * - Slug of form whose response is getting submitted @@ -111,7 +123,7 @@ type EditCustomFormParam = { slug: string; body: LeadPlatformModel.EditCustomFormPayload; }; -type EditTicketParam = { +type EditNewTicketParam = { /** * - Ticket ID of ticket to be edited */ @@ -124,19 +136,19 @@ type GetCustomFormParam = { */ slug: string; }; -type GetTicketParam = { +type GetNewTicketParam = { /** * - Tiket ID of the ticket to be fetched */ id: string; }; -type GetTicketHistoryParam = { +type GetNewTicketHistoryParam = { /** * - Ticket ID for which history is to be fetched */ id: string; }; -type GetTicketsParam = { +type GetNewTicketsParam = { /** * - Decides that the reponse will contain the list of tickets */ @@ -163,13 +175,13 @@ type GetTicketsParam = { */ category?: string; }; -type GetTokenForVideoRoomParam = { +type GetNewTokenForVideoRoomParam = { /** * - Unique name of video room */ uniqueName: string; }; -type GetVideoParticipantsParam = { +type GetNewVideoParticipantsParam = { /** * - Unique name of Video Room */ diff --git a/sdk/platform/Lead/LeadPlatformApplicationValidator.js b/sdk/platform/Lead/LeadPlatformApplicationValidator.js index 3bc0999a5..088218441 100644 --- a/sdk/platform/Lead/LeadPlatformApplicationValidator.js +++ b/sdk/platform/Lead/LeadPlatformApplicationValidator.js @@ -13,11 +13,16 @@ const LeadPlatformModel = require("./LeadPlatformModel"); */ /** - * @typedef CreateHistoryParam + * @typedef CreateNewHistoryParam * @property {string} id - Ticket ID for which history is created * @property {LeadPlatformModel.TicketHistoryPayload} body */ +/** + * @typedef DeleteCustomFormParam + * @property {string} slug - Slug of form whose response is getting submitted + */ + /** * @typedef EditCustomFormParam * @property {string} slug - Slug of form whose response is getting submitted @@ -25,7 +30,7 @@ const LeadPlatformModel = require("./LeadPlatformModel"); */ /** - * @typedef EditTicketParam + * @typedef EditNewTicketParam * @property {string} id - Ticket ID of ticket to be edited * @property {LeadPlatformModel.EditTicketPayload} body */ @@ -38,17 +43,17 @@ const LeadPlatformModel = require("./LeadPlatformModel"); /** @typedef GetCustomFormsParam */ /** - * @typedef GetTicketParam + * @typedef GetNewTicketParam * @property {string} id - Tiket ID of the ticket to be fetched */ /** - * @typedef GetTicketHistoryParam + * @typedef GetNewTicketHistoryParam * @property {string} id - Ticket ID for which history is to be fetched */ /** - * @typedef GetTicketsParam + * @typedef GetNewTicketsParam * @property {boolean} [items] - Decides that the reponse will contain the list of tickets * @property {boolean} [filters] - Decides that the reponse will contain the * ticket filters @@ -59,12 +64,12 @@ const LeadPlatformModel = require("./LeadPlatformModel"); */ /** - * @typedef GetTokenForVideoRoomParam + * @typedef GetNewTokenForVideoRoomParam * @property {string} uniqueName - Unique name of video room */ /** - * @typedef GetVideoParticipantsParam + * @typedef GetNewVideoParticipantsParam * @property {string} uniqueName - Unique name of Video Room */ @@ -88,14 +93,21 @@ class LeadPlatformApplicationValidator { }).required(); } - /** @returns {CreateHistoryParam} */ - static createHistory() { + /** @returns {CreateNewHistoryParam} */ + static createNewHistory() { return Joi.object({ id: Joi.string().allow("").required(), body: LeadPlatformModel.TicketHistoryPayload().required(), }).required(); } + /** @returns {DeleteCustomFormParam} */ + static deleteCustomForm() { + return Joi.object({ + slug: Joi.string().allow("").required(), + }).required(); + } + /** @returns {EditCustomFormParam} */ static editCustomForm() { return Joi.object({ @@ -104,8 +116,8 @@ class LeadPlatformApplicationValidator { }).required(); } - /** @returns {EditTicketParam} */ - static editTicket() { + /** @returns {EditNewTicketParam} */ + static editNewTicket() { return Joi.object({ id: Joi.string().allow("").required(), body: LeadPlatformModel.EditTicketPayload().required(), @@ -124,22 +136,22 @@ class LeadPlatformApplicationValidator { return Joi.object({}).required(); } - /** @returns {GetTicketParam} */ - static getTicket() { + /** @returns {GetNewTicketParam} */ + static getNewTicket() { return Joi.object({ id: Joi.string().allow("").required(), }).required(); } - /** @returns {GetTicketHistoryParam} */ - static getTicketHistory() { + /** @returns {GetNewTicketHistoryParam} */ + static getNewTicketHistory() { return Joi.object({ id: Joi.string().allow("").required(), }).required(); } - /** @returns {GetTicketsParam} */ - static getTickets() { + /** @returns {GetNewTicketsParam} */ + static getNewTickets() { return Joi.object({ items: Joi.boolean(), filters: Joi.boolean(), @@ -150,15 +162,15 @@ class LeadPlatformApplicationValidator { }).required(); } - /** @returns {GetTokenForVideoRoomParam} */ - static getTokenForVideoRoom() { + /** @returns {GetNewTokenForVideoRoomParam} */ + static getNewTokenForVideoRoom() { return Joi.object({ uniqueName: Joi.string().allow("").required(), }).required(); } - /** @returns {GetVideoParticipantsParam} */ - static getVideoParticipants() { + /** @returns {GetNewVideoParticipantsParam} */ + static getNewVideoParticipants() { return Joi.object({ uniqueName: Joi.string().allow("").required(), }).required(); diff --git a/sdk/platform/Lead/LeadPlatformModel.d.ts b/sdk/platform/Lead/LeadPlatformModel.d.ts index fad27e3f5..a4699ed3a 100644 --- a/sdk/platform/Lead/LeadPlatformModel.d.ts +++ b/sdk/platform/Lead/LeadPlatformModel.d.ts @@ -105,6 +105,10 @@ export = LeadPlatformModel; * @property {boolean} [primary] - Denotes it's the primary email for the account * @property {boolean} [verified] - Denotes it's a verified email */ +/** + * @typedef ErrorMessage + * @property {string} [message] + */ /** * @typedef FeedbackForm * @property {Object} [inputs] - Input details for the feed back form @@ -301,7 +305,7 @@ export = LeadPlatformModel; * @property {string} [user_id] * @property {string} [username] */ -/** @typedef {"rating" | "log" | "comment"} HistoryTypeEnum */ +/** @typedef {"rating" | "log" | "comment" | "thread"} HistoryTypeEnum */ /** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */ /** * @typedef {| "image" @@ -318,7 +322,7 @@ export = LeadPlatformModel; declare class LeadPlatformModel { } declare namespace LeadPlatformModel { - export { AddTicketPayload, AgentChangePayload, CloseVideoRoomResponse, CreateCustomFormPayload, CreatedOn, CreateVideoRoomPayload, CreateVideoRoomResponse, CustomForm, CustomFormList, Debug, EditCustomFormPayload, EditTicketPayload, Email, FeedbackForm, FeedbackResponseItem, Filter, GetParticipantsInsideVideoRoomResponse, GetTokenForVideoRoomResponse, NotifyUser, Page, Participant, PhoneNumber, PollForAssignment, Priority, Status, SubmitButton, Ticket, TicketAsset, TicketCategory, TicketContent, TicketContext, TicketFeedback, TicketFeedbackList, TicketFeedbackPayload, TicketHistory, TicketHistoryList, TicketHistoryPayload, TicketList, UserSchema, HistoryTypeEnum, PriorityEnum, TicketAssetTypeEnum, TicketSourceEnum }; + export { AddTicketPayload, AgentChangePayload, CloseVideoRoomResponse, CreateCustomFormPayload, CreatedOn, CreateVideoRoomPayload, CreateVideoRoomResponse, CustomForm, CustomFormList, Debug, EditCustomFormPayload, EditTicketPayload, Email, ErrorMessage, FeedbackForm, FeedbackResponseItem, Filter, GetParticipantsInsideVideoRoomResponse, GetTokenForVideoRoomResponse, NotifyUser, Page, Participant, PhoneNumber, PollForAssignment, Priority, Status, SubmitButton, Ticket, TicketAsset, TicketCategory, TicketContent, TicketContext, TicketFeedback, TicketFeedbackList, TicketFeedbackPayload, TicketHistory, TicketHistoryList, TicketHistoryPayload, TicketList, UserSchema, HistoryTypeEnum, PriorityEnum, TicketAssetTypeEnum, TicketSourceEnum }; } /** @returns {AddTicketPayload} */ declare function AddTicketPayload(): AddTicketPayload; @@ -577,6 +581,11 @@ type Email = { */ verified?: boolean; }; +/** @returns {ErrorMessage} */ +declare function ErrorMessage(): ErrorMessage; +type ErrorMessage = { + message?: string; +}; /** @returns {FeedbackForm} */ declare function FeedbackForm(): FeedbackForm; type FeedbackForm = { @@ -1024,7 +1033,7 @@ type UserSchema = { * @returns {HistoryTypeEnum} */ declare function HistoryTypeEnum(): HistoryTypeEnum; -type HistoryTypeEnum = "rating" | "log" | "comment"; +type HistoryTypeEnum = "rating" | "log" | "comment" | "thread"; /** * Enum: PriorityEnum Used By: Lead * diff --git a/sdk/platform/Lead/LeadPlatformModel.js b/sdk/platform/Lead/LeadPlatformModel.js index 9f4c4d8c3..ddeba0a7f 100644 --- a/sdk/platform/Lead/LeadPlatformModel.js +++ b/sdk/platform/Lead/LeadPlatformModel.js @@ -119,6 +119,11 @@ const Joi = require("joi"); * @property {boolean} [verified] - Denotes it's a verified email */ +/** + * @typedef ErrorMessage + * @property {string} [message] + */ + /** * @typedef FeedbackForm * @property {Object} [inputs] - Input details for the feed back form @@ -341,7 +346,7 @@ const Joi = require("joi"); * @property {string} [username] */ -/** @typedef {"rating" | "log" | "comment"} HistoryTypeEnum */ +/** @typedef {"rating" | "log" | "comment" | "thread"} HistoryTypeEnum */ /** @typedef {"low" | "medium" | "high" | "urgent"} PriorityEnum */ @@ -498,6 +503,13 @@ class LeadPlatformModel { }); } + /** @returns {ErrorMessage} */ + static ErrorMessage() { + return Joi.object({ + message: Joi.string().allow(""), + }); + } + /** @returns {FeedbackForm} */ static FeedbackForm() { return Joi.object({ @@ -784,7 +796,9 @@ class LeadPlatformModel { "log", - "comment" + "comment", + + "thread" ); } diff --git a/sdk/platform/Order/OrderPlatformApplicationClient.d.ts b/sdk/platform/Order/OrderPlatformApplicationClient.d.ts index 348735b17..61624783c 100644 --- a/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +++ b/sdk/platform/Order/OrderPlatformApplicationClient.d.ts @@ -3,6 +3,16 @@ declare class Order { constructor(config: any, applicationId: any); config: any; applicationId: any; + /** + * @param {OrderPlatformApplicationValidator.FailedOrderLogsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name failedOrderLogs + * @summary: Get failed order logs according to the filter provided + * @description: This endpoint allows users to get failed order logs listing for filters based on order id, user contact number, user email id and sales channel id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogs/). + */ + failedOrderLogs({ pageNo, pageSize, searchType, searchValue, requestHeaders }?: OrderPlatformApplicationValidator.FailedOrderLogsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformApplicationValidator.GetApplicationShipmentsParam} arg * - Arg object @@ -14,7 +24,7 @@ declare class Order { * * @name getApplicationShipments * @summary: - * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getApplicationShipments/). + * @description: Get cross selling platform shipments - 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; /** @@ -41,6 +51,18 @@ declare class Order { * @description: Use this API to retrieve the issues that led to the cancellation of bags within 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; + /** + * @param {OrderPlatformApplicationValidator.GetStateManagerStatesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateManagerStates + * @summary: Get all states for a company and channel + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerStates/). + */ + getStateManagerStates({ pageNo, pageSize, requestHeaders }?: OrderPlatformApplicationValidator.GetStateManagerStatesParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformApplicationValidator.TrackShipmentPlatformParam} arg * - Arg object diff --git a/sdk/platform/Order/OrderPlatformApplicationClient.js b/sdk/platform/Order/OrderPlatformApplicationClient.js index bc0478736..129978270 100644 --- a/sdk/platform/Order/OrderPlatformApplicationClient.js +++ b/sdk/platform/Order/OrderPlatformApplicationClient.js @@ -12,6 +12,98 @@ class Order { this.applicationId = applicationId; } + /** + * @param {OrderPlatformApplicationValidator.FailedOrderLogsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name failedOrderLogs + * @summary: Get failed order logs according to the filter provided + * @description: This endpoint allows users to get failed order logs listing for filters based on order id, user contact number, user email id and sales channel id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogs/). + */ + async failedOrderLogs( + { pageNo, pageSize, searchType, searchValue, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = OrderPlatformApplicationValidator.failedOrderLogs().validate( + { + pageNo, + pageSize, + searchType, + searchValue, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformApplicationValidator.failedOrderLogs().validate( + { + pageNo, + pageSize, + searchType, + searchValue, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > failedOrderLogs \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["application_id"] = applicationId; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["search_type"] = searchType; + query_params["search_value"] = searchValue; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders/failed`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.FailedOrderLogs().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 > failedOrderLogs \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {OrderPlatformApplicationValidator.GetApplicationShipmentsParam} arg * - Arg object @@ -23,7 +115,7 @@ class Order { * * @name getApplicationShipments * @summary: - * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getApplicationShipments/). + * @description: Get cross selling platform shipments - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getApplicationShipments/). */ async getApplicationShipments( { @@ -319,6 +411,91 @@ class Order { return response; } + /** + * @param {OrderPlatformApplicationValidator.GetStateManagerStatesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateManagerStates + * @summary: Get all states for a company and channel + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerStates/). + */ + async getStateManagerStates( + { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = OrderPlatformApplicationValidator.getStateManagerStates().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformApplicationValidator.getStateManagerStates().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getStateManagerStates \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/application/${this.applicationId}/states`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.PaginatedStates().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 > getStateManagerStates \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {OrderPlatformApplicationValidator.TrackShipmentPlatformParam} arg * - Arg object diff --git a/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts b/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts index ae4c1abe2..1f28d8969 100644 --- a/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +++ b/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts @@ -1,4 +1,11 @@ export = OrderPlatformApplicationValidator; +/** + * @typedef FailedOrderLogsParam + * @property {number} [pageNo] - Page Number + * @property {number} [pageSize] - Page Size + * @property {string} [searchType] - Search type for filter + * @property {string} [searchValue] - Search value for filter + */ /** * @typedef GetApplicationShipmentsParam * @property {string} [lane] @@ -27,23 +34,50 @@ export = OrderPlatformApplicationValidator; * items and may get divided into one or more shipment, each having its own ID. * @property {number} lineNumber - Line number of bag. */ +/** + * @typedef GetStateManagerStatesParam + * @property {number} [pageNo] + * @property {number} [pageSize] + */ /** * @typedef TrackShipmentPlatformParam * @property {string} shipmentId - Shipment Id */ declare class OrderPlatformApplicationValidator { + /** @returns {FailedOrderLogsParam} */ + static failedOrderLogs(): FailedOrderLogsParam; /** @returns {GetApplicationShipmentsParam} */ static getApplicationShipments(): GetApplicationShipmentsParam; /** @returns {GetPlatformShipmentReasonsParam} */ static getPlatformShipmentReasons(): GetPlatformShipmentReasonsParam; /** @returns {GetShipmentBagReasonsParam} */ static getShipmentBagReasons(): GetShipmentBagReasonsParam; + /** @returns {GetStateManagerStatesParam} */ + static getStateManagerStates(): GetStateManagerStatesParam; /** @returns {TrackShipmentPlatformParam} */ static trackShipmentPlatform(): TrackShipmentPlatformParam; } declare namespace OrderPlatformApplicationValidator { - export { GetApplicationShipmentsParam, GetPlatformShipmentReasonsParam, GetShipmentBagReasonsParam, TrackShipmentPlatformParam }; + export { FailedOrderLogsParam, GetApplicationShipmentsParam, GetPlatformShipmentReasonsParam, GetShipmentBagReasonsParam, GetStateManagerStatesParam, TrackShipmentPlatformParam }; } +type FailedOrderLogsParam = { + /** + * - Page Number + */ + pageNo?: number; + /** + * - Page Size + */ + pageSize?: number; + /** + * - Search type for filter + */ + searchType?: string; + /** + * - Search value for filter + */ + searchValue?: string; +}; type GetApplicationShipmentsParam = { lane?: string; searchType?: string; @@ -75,6 +109,10 @@ type GetShipmentBagReasonsParam = { */ lineNumber: number; }; +type GetStateManagerStatesParam = { + pageNo?: number; + pageSize?: number; +}; type TrackShipmentPlatformParam = { /** * - Shipment Id diff --git a/sdk/platform/Order/OrderPlatformApplicationValidator.js b/sdk/platform/Order/OrderPlatformApplicationValidator.js index f6004cbff..aba50389d 100644 --- a/sdk/platform/Order/OrderPlatformApplicationValidator.js +++ b/sdk/platform/Order/OrderPlatformApplicationValidator.js @@ -2,6 +2,14 @@ const Joi = require("joi"); const OrderPlatformModel = require("./OrderPlatformModel"); +/** + * @typedef FailedOrderLogsParam + * @property {number} [pageNo] - Page Number + * @property {number} [pageSize] - Page Size + * @property {string} [searchType] - Search type for filter + * @property {string} [searchValue] - Search value for filter + */ + /** * @typedef GetApplicationShipmentsParam * @property {string} [lane] @@ -33,12 +41,28 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {number} lineNumber - Line number of bag. */ +/** + * @typedef GetStateManagerStatesParam + * @property {number} [pageNo] + * @property {number} [pageSize] + */ + /** * @typedef TrackShipmentPlatformParam * @property {string} shipmentId - Shipment Id */ class OrderPlatformApplicationValidator { + /** @returns {FailedOrderLogsParam} */ + static failedOrderLogs() { + return Joi.object({ + pageNo: Joi.number(), + pageSize: Joi.number(), + searchType: Joi.string().allow(""), + searchValue: Joi.string().allow(""), + }).required(); + } + /** @returns {GetApplicationShipmentsParam} */ static getApplicationShipments() { return Joi.object({ @@ -75,6 +99,14 @@ class OrderPlatformApplicationValidator { }).required(); } + /** @returns {GetStateManagerStatesParam} */ + static getStateManagerStates() { + return Joi.object({ + pageNo: Joi.number(), + pageSize: Joi.number(), + }).required(); + } + /** @returns {TrackShipmentPlatformParam} */ static trackShipmentPlatform() { return Joi.object({ diff --git a/sdk/platform/Order/OrderPlatformClient.d.ts b/sdk/platform/Order/OrderPlatformClient.d.ts index 0c743cb60..838bb1f01 100644 --- a/sdk/platform/Order/OrderPlatformClient.d.ts +++ b/sdk/platform/Order/OrderPlatformClient.d.ts @@ -12,6 +12,28 @@ declare class Order { * @description: Attach Order User - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/attachOrderUser/). */ 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 + * @name bulkListing + * @summary: + * @description: Fetches of previous or running bulk jobs. + * - 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; + /** + * @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name bulkStateTransistion + * @summary: + * @description: Performs State Transisiton in Bulk for the given shipments in the excel/csv file url. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/). + */ + bulkStateTransistion({ body, requestHeaders }?: OrderPlatformValidator.BulkStateTransistionParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.CheckOrderStatusParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -54,15 +76,15 @@ declare class Order { */ createOrder({ body, requestHeaders }?: OrderPlatformValidator.CreateOrderParam, { responseHeaders }?: object): Promise; /** - * @param {OrderPlatformValidator.DispatchManifestParam} arg - Arg object + * @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name dispatchManifest + * @name dispatchManifests * @summary: - * @description: Dispatch Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifest/). + * @description: Dispatch Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifests/). */ - dispatchManifest({ body, requestHeaders }?: OrderPlatformValidator.DispatchManifestParam, { responseHeaders }?: object): Promise; + dispatchManifests({ manifestId, body, requestHeaders }?: OrderPlatformValidator.DispatchManifestsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.DownloadBulkActionTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -94,6 +116,16 @@ declare class Order { * @description: Retry e-invoice after failure - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/eInvoiceRetry/). */ eInvoiceRetry({ body, requestHeaders }?: OrderPlatformValidator.EInvoiceRetryParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.FailedOrderLogDetailsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name failedOrderLogDetails + * @summary: Get failed order logs according to the filter provided + * @description: This endpoint allows users to get the exact error trace from the log id provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogDetails/). + */ + failedOrderLogDetails({ logId, requestHeaders }?: OrderPlatformValidator.FailedOrderLogDetailsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.FetchCreditBalanceDetailParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -117,16 +149,6 @@ declare class Order { * @description: Fetch Refund Mode Config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/). */ fetchRefundModeConfig({ body, requestHeaders }?: OrderPlatformValidator.FetchRefundModeConfigParam, { responseHeaders }?: object): Promise; - /** - * @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name generateInvoiceID - * @summary: - * @description: This API is used to manually generate Invoice ID 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; /** * @param {OrderPlatformValidator.GeneratePOSReceiptByOrderIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -150,6 +172,16 @@ declare class Order { * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedStateTransition/). */ getAllowedStateTransition({ orderingChannel, status, requestHeaders }?: OrderPlatformValidator.GetAllowedStateTransitionParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getAllowedTemplatesForBulk + * @summary: + * @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; /** * @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -201,7 +233,7 @@ declare class Order { * @summary: * @description: Generate Bulk Shipment Excel Report. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBulkShipmentExcelFile/). */ - getBulkShipmentExcelFile({ salesChannels, dpIds, fromDate, toDate, stores, tags, bagStatus, paymentMethods, fileType, timeToDispatch, pageNo, pageSize, requestHeaders, }?: OrderPlatformValidator.GetBulkShipmentExcelFileParam, { responseHeaders }?: object): Promise; + 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 `{}` @@ -212,6 +244,16 @@ declare class Order { * @description: getChannelConfig - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getChannelConfig/). */ getChannelConfig({ requestHeaders }?: any, { 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 + * @name getFileByStatus + * @summary: + * @description: Get the file URL consisting Records of the provided status. - 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; /** * @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -221,7 +263,47 @@ declare class Order { * @summary: * @description: Get lane config for the order - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getLaneConfig/). */ - getLaneConfig({ superLane, groupEntity, fromDate, toDate, 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 `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getManifestDetails + * @summary: + * @description: get Manifest Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestDetails/). + */ + getManifestDetails({ manifestId, requestHeaders }?: OrderPlatformValidator.GetManifestDetailsParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetManifestShipmentsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getManifestShipments + * @summary: + * @description: get Manifest Shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestShipments/). + */ + getManifestShipments({ dpIds, stores, toDate, fromDate, dpName, salesChannels, searchType, searchValue, pageNo, pageSize, requestHeaders, }?: OrderPlatformValidator.GetManifestShipmentsParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getManifestfilters + * @summary: + * @description: get Manifest Filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/). + */ + getManifestfilters({ view, requestHeaders }?: OrderPlatformValidator.GetManifestfiltersParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetManifestsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getManifests + * @summary: + * @description: Fetch Manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifests/). + */ + getManifests({ status, startDate, endDate, searchType, storeId, searchValue, dpIds, pageNo, pageSize, requestHeaders, }?: OrderPlatformValidator.GetManifestsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -231,7 +313,7 @@ declare class Order { * @summary: * @description: Get Order Details by ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/). */ - getOrderById({ orderId, myOrders, 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 `{}` @@ -241,7 +323,7 @@ declare class Order { * @summary: * @description: Get Orders Listing - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/). */ - getOrders({ lane, searchType, bagStatus, timeToDispatch, paymentMethods, tags, searchValue, fromDate, toDate, dpIds, stores, salesChannels, pageNo, pageSize, isPrioritySort, customMeta, myOrders, showCrossCompanyData, customerId, orderType, 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, requestHeaders, }?: OrderPlatformValidator.GetOrdersParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} [arg.lane] - Lane refers to a section where orders are @@ -259,6 +341,8 @@ declare class Order { * field specified by the search_type * @param {string} [arg.fromDate] - * @param {string} [arg.toDate] - + * @param {string} [arg.startDate] - + * @param {string} [arg.endDate] - * @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned. * @param {string} [arg.stores] - * @param {string} [arg.salesChannels] - @@ -274,7 +358,7 @@ declare class Order { * @summary: * @description: Get Orders Listing */ - getOrdersPaginator({ lane, searchType, bagStatus, timeToDispatch, paymentMethods, tags, searchValue, fromDate, toDate, dpIds, stores, salesChannels, pageSize, isPrioritySort, customMeta, myOrders, showCrossCompanyData, customerId, orderType, }?: { + getOrdersPaginator({ lane, searchType, bagStatus, timeToDispatch, paymentMethods, tags, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageSize, isPrioritySort, customMeta, myOrders, showCrossCompanyData, customerId, orderType, }?: { lane?: string; searchType?: string; bagStatus?: string; @@ -284,6 +368,8 @@ declare class Order { searchValue?: string; fromDate?: string; toDate?: string; + startDate?: string; + endDate?: string; dpIds?: string; stores?: string; salesChannels?: string; @@ -347,7 +433,7 @@ declare class Order { * @summary: * @description: Get Shipments Listing for the company id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/). */ - getShipments({ lane, bagStatus, statusOverrideLane, timeToDispatch, searchType, searchValue, fromDate, toDate, dpIds, stores, salesChannels, pageNo, pageSize, fetchActiveShipment, allowInactive, excludeLockedShipments, paymentMethods, channelShipmentId, channelOrderId, customMeta, orderingChannel, companyAffiliateTag, myOrders, platformUserId, sortType, showCrossCompanyData, tags, customerId, orderType, 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, requestHeaders, }?: OrderPlatformValidator.GetShipmentsParam, { responseHeaders }?: object): Promise; /** * @param {Object} arg - Arg object. * @param {string} [arg.lane] - Name of lane for which data is to be fetched @@ -359,6 +445,8 @@ declare class Order { * @param {string} [arg.searchValue] - Search type value * @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format * @param {string} [arg.toDate] - End Date in DD-MM-YYYY format + * @param {string} [arg.startDate] - UTC Start Date in ISO format + * @param {string} [arg.endDate] - UTC End Date in ISO format * @param {string} [arg.dpIds] - Comma separated values of delivery partner ids * @param {string} [arg.stores] - Comma separated values of store ids * @param {string} [arg.salesChannels] - Comma separated values of sales channel ids @@ -384,7 +472,7 @@ declare class Order { * @summary: * @description: Get Shipments Listing for the company id */ - getShipmentsPaginator({ lane, bagStatus, statusOverrideLane, timeToDispatch, searchType, searchValue, fromDate, toDate, dpIds, stores, salesChannels, pageSize, fetchActiveShipment, allowInactive, excludeLockedShipments, paymentMethods, channelShipmentId, channelOrderId, customMeta, orderingChannel, companyAffiliateTag, myOrders, platformUserId, sortType, showCrossCompanyData, tags, customerId, orderType, }?: { + getShipmentsPaginator({ lane, bagStatus, statusOverrideLane, timeToDispatch, searchType, searchValue, fromDate, toDate, startDate, endDate, dpIds, stores, salesChannels, pageSize, fetchActiveShipment, allowInactive, excludeLockedShipments, paymentMethods, channelShipmentId, channelOrderId, customMeta, orderingChannel, companyAffiliateTag, myOrders, platformUserId, sortType, showCrossCompanyData, tags, customerId, orderType, }?: { lane?: string; bagStatus?: string; statusOverrideLane?: boolean; @@ -393,6 +481,8 @@ declare class Order { searchValue?: string; fromDate?: string; toDate?: string; + startDate?: string; + endDate?: string; dpIds?: string; stores?: string; salesChannels?: string; @@ -414,6 +504,66 @@ declare class Order { customerId?: string; orderType?: string; }): Paginator; + /** + * @param {OrderPlatformValidator.GetStateManagerTaskByIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateManagerTaskById + * @summary: Fetch a specific State Transition task + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerTaskById/). + */ + getStateManagerTaskById({ taskId, requestHeaders }?: OrderPlatformValidator.GetStateManagerTaskByIdParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetStateManagerTasksParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateManagerTasks + * @summary: Fetch all State Transition tasks + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerTasks/). + */ + getStateManagerTasks({ pageNo, pageSize, requestHeaders }?: OrderPlatformValidator.GetStateManagerTasksParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetStateTransitionFiltersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateTransitionFilters + * @summary: Fetch all State Transition filters + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionFilters/). + */ + getStateTransitionFilters({ pageNo, pageSize, requestHeaders }?: OrderPlatformValidator.GetStateTransitionFiltersParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetStateTransitionFiltersByIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateTransitionFiltersById + * @summary: Fetch a specific State Transition filter + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionFiltersById/). + */ + getStateTransitionFiltersById({ filterId, requestHeaders }?: OrderPlatformValidator.GetStateTransitionFiltersByIdParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetStateTransitionFlagsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateTransitionFlags + * @summary: + * @description: Fetch all state transition flags for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionFlags/). + */ + getStateTransitionFlags({ pageNo, pageSize, requestHeaders }?: OrderPlatformValidator.GetStateTransitionFlagsParam, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetStateTransitionFlagsByIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateTransitionFlagsById + * @summary: + * @description: Fetch a specific state transition flag for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionFlagsById/). + */ + getStateTransitionFlagsById({ flagId, requestHeaders }?: OrderPlatformValidator.GetStateTransitionFlagsByIdParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -424,6 +574,16 @@ declare class Order { * @description: Get State Transition Map - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/). */ getStateTransitionMap({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getTemplate + * @summary: + * @description: Get the Excel 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; /** * @param {OrderPlatformValidator.GetfiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -445,6 +605,16 @@ declare class Order { * @description: Invalidate shipment Cache - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/invalidateShipmentCache/). */ 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 + * @name jobDetails + * @summary: + * @description: Fetches details for the job of 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; /** * @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -466,15 +636,16 @@ declare class Order { */ postShipmentHistory({ body, requestHeaders }?: OrderPlatformValidator.PostShipmentHistoryParam, { responseHeaders }?: object): Promise; /** - * @param {OrderPlatformValidator.ProcessManifestParam} arg - Arg object + * @param {OrderPlatformValidator.ProcessManifestsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name processManifest + * @returns {Promise} - + * Success response + * @name processManifests * @summary: - * @description: Process Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/processManifest/). + * @description: Process Manifest. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/processManifests/). */ - processManifest({ body, requestHeaders }?: OrderPlatformValidator.ProcessManifestParam, { responseHeaders }?: object): Promise; + processManifests({ body, requestHeaders }?: OrderPlatformValidator.ProcessManifestsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.ReassignLocationParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -512,7 +683,7 @@ declare class Order { * @returns {Promise} - * Success response * @name trackShipment - * @summary: Get courier partner tracking details + * @summary: * @description: This endpoint allows users to get courier partner tracking details for a given shipment id or awb no. The service will fetch courier partner statuses that are pushed to oms. - 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; @@ -573,15 +744,15 @@ declare class Order { */ updateShipmentTracking({ body, requestHeaders }?: OrderPlatformValidator.UpdateShipmentTrackingParam, { responseHeaders }?: object): Promise; /** - * @param {OrderPlatformValidator.UploadConsentParam} arg - Arg object + * @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name uploadConsent + * @name uploadConsents * @summary: - * @description: Upload Consent - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsent/). + * @description: Upload Consent - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsents/). */ - uploadConsent({ body, requestHeaders }?: OrderPlatformValidator.UploadConsentParam, { responseHeaders }?: object): Promise; + uploadConsents({ manifestId, body, requestHeaders }?: OrderPlatformValidator.UploadConsentsParam, { responseHeaders }?: object): Promise; /** * @param {OrderPlatformValidator.VerifyMobileOTPParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/Order/OrderPlatformClient.js b/sdk/platform/Order/OrderPlatformClient.js index 0942fb9b9..9951f1772 100644 --- a/sdk/platform/Order/OrderPlatformClient.js +++ b/sdk/platform/Order/OrderPlatformClient.js @@ -93,6 +93,192 @@ class Order { return response; } + /** + * @param {OrderPlatformValidator.BulkListingParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name bulkListing + * @summary: + * @description: Fetches of previous or running bulk jobs. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkListing/). + */ + async bulkListing( + { + pageSize, + pageNo, + startDate, + endDate, + status, + bulkActionType, + searchKey, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.bulkListing().validate( + { + pageSize, + pageNo, + startDate, + endDate, + status, + bulkActionType, + searchKey, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = OrderPlatformValidator.bulkListing().validate( + { + pageSize, + pageNo, + startDate, + endDate, + status, + bulkActionType, + searchKey, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > bulkListing \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_size"] = pageSize; + query_params["page_no"] = pageNo; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; + query_params["status"] = status; + query_params["bulk_action_type"] = bulkActionType; + query_params["search_key"] = searchKey; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.BulkListingResponse().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 > bulkListing \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.BulkStateTransistionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name bulkStateTransistion + * @summary: + * @description: Performs State Transisiton in Bulk for the given shipments in the excel/csv file url. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/bulkStateTransistion/). + */ + async bulkStateTransistion( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.bulkStateTransistion().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.bulkStateTransistion().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > bulkStateTransistion \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}/jobs/state-transition`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.BulkStateTransistionResponse().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 > bulkStateTransistion \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {OrderPlatformValidator.CheckOrderStatusParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -424,20 +610,21 @@ class Order { } /** - * @param {OrderPlatformValidator.DispatchManifestParam} arg - Arg object + * @param {OrderPlatformValidator.DispatchManifestsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name dispatchManifest + * @name dispatchManifests * @summary: - * @description: Dispatch Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifest/). + * @description: Dispatch Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/dispatchManifests/). */ - async dispatchManifest( - { body, requestHeaders } = { requestHeaders: {} }, + async dispatchManifests( + { manifestId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.dispatchManifest().validate( + const { error } = OrderPlatformValidator.dispatchManifests().validate( { + manifestId, body, }, { abortEarly: false, allowUnknown: true } @@ -449,8 +636,9 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.dispatchManifest().validate( + } = OrderPlatformValidator.dispatchManifests().validate( { + manifestId, body, }, { abortEarly: false, allowUnknown: false } @@ -458,7 +646,7 @@ class Order { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > dispatchManifest \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > dispatchManifests \n ${warrning}`, }); } @@ -469,7 +657,7 @@ class Order { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/dispatch`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/${manifestId}/dispatch`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -494,7 +682,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > dispatchManifest \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > dispatchManifests \n ${res_error}`, }); } } @@ -742,25 +930,21 @@ class Order { } /** - * @param {OrderPlatformValidator.FetchCreditBalanceDetailParam} arg - Arg object + * @param {OrderPlatformValidator.FailedOrderLogDetailsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name fetchCreditBalanceDetail - * @summary: - * @description: Fetch Credit Balance Detail - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchCreditBalanceDetail/). + * @returns {Promise} - Success response + * @name failedOrderLogDetails + * @summary: Get failed order logs according to the filter provided + * @description: This endpoint allows users to get the exact error trace from the log id provided - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/failedOrderLogDetails/). */ - async fetchCreditBalanceDetail( - { body, requestHeaders } = { requestHeaders: {} }, + async failedOrderLogDetails( + { logId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = OrderPlatformValidator.fetchCreditBalanceDetail().validate( + const { error } = OrderPlatformValidator.failedOrderLogDetails().validate( { - body, + logId, }, { abortEarly: false, allowUnknown: true } ); @@ -771,16 +955,16 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.fetchCreditBalanceDetail().validate( + } = OrderPlatformValidator.failedOrderLogDetails().validate( { - body, + logId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > fetchCreditBalanceDetail \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > failedOrderLogDetails \n ${warrning}`, }); } @@ -790,10 +974,10 @@ class Order { const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/customer-credit-balance`, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/orders/failed/logs/${logId}`, query_params, - body, + undefined, { ...xHeaders, ...requestHeaders }, { responseHeaders } ); @@ -805,10 +989,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.FetchCreditBalanceResponsePayload().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.FailedOrderLogDetails().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -816,7 +1000,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > fetchCreditBalanceDetail \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > failedOrderLogDetails \n ${res_error}`, }); } } @@ -825,20 +1009,23 @@ class Order { } /** - * @param {OrderPlatformValidator.FetchRefundModeConfigParam} arg - Arg object + * @param {OrderPlatformValidator.FetchCreditBalanceDetailParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name fetchRefundModeConfig + * @returns {Promise} + * - Success response + * + * @name fetchCreditBalanceDetail * @summary: - * @description: Fetch Refund Mode Config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/). + * @description: Fetch Credit Balance Detail - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchCreditBalanceDetail/). */ - async fetchRefundModeConfig( + async fetchCreditBalanceDetail( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.fetchRefundModeConfig().validate( + const { + error, + } = OrderPlatformValidator.fetchCreditBalanceDetail().validate( { body, }, @@ -851,7 +1038,7 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.fetchRefundModeConfig().validate( + } = OrderPlatformValidator.fetchCreditBalanceDetail().validate( { body, }, @@ -860,7 +1047,7 @@ class Order { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > fetchRefundModeConfig \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > fetchCreditBalanceDetail \n ${warrning}`, }); } @@ -871,7 +1058,7 @@ class Order { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund-mode-config`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/customer-credit-balance`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -885,7 +1072,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.RefundModeConfigResponsePayload().validate( + } = OrderPlatformModel.FetchCreditBalanceResponsePayload().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -896,7 +1083,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > fetchRefundModeConfig \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > fetchCreditBalanceDetail \n ${res_error}`, }); } } @@ -905,21 +1092,21 @@ class Order { } /** - * @param {OrderPlatformValidator.GenerateInvoiceIDParam} arg - Arg object + * @param {OrderPlatformValidator.FetchRefundModeConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name generateInvoiceID + * @returns {Promise} - + * Success response + * @name fetchRefundModeConfig * @summary: - * @description: This API is used to manually generate Invoice ID against shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/generateInvoiceID/). + * @description: Fetch Refund Mode Config - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/fetchRefundModeConfig/). */ - async generateInvoiceID( - { invoiceType, body, requestHeaders } = { requestHeaders: {} }, + async fetchRefundModeConfig( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.generateInvoiceID().validate( + const { error } = OrderPlatformValidator.fetchRefundModeConfig().validate( { - invoiceType, body, }, { abortEarly: false, allowUnknown: true } @@ -931,9 +1118,8 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.generateInvoiceID().validate( + } = OrderPlatformValidator.fetchRefundModeConfig().validate( { - invoiceType, body, }, { abortEarly: false, allowUnknown: false } @@ -941,7 +1127,7 @@ class Order { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > generateInvoiceID \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > fetchRefundModeConfig \n ${warrning}`, }); } @@ -952,7 +1138,7 @@ class Order { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/${invoiceType}/id/generate`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/refund-mode-config`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -966,10 +1152,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.GenerateInvoiceIDResponse().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = OrderPlatformModel.RefundModeConfigResponsePayload().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -977,7 +1163,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > generateInvoiceID \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > fetchRefundModeConfig \n ${res_error}`, }); } } @@ -1163,22 +1349,22 @@ class Order { } /** - * @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object + * @param {OrderPlatformValidator.GetAllowedTemplatesForBulkParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getAnnouncements + * @returns {Promise} - Success response + * @name getAllowedTemplatesForBulk * @summary: - * @description: Get Announcements - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/). + * @description: Gets All the allowed Templates to perform Bulk Operations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAllowedTemplatesForBulk/). */ - async getAnnouncements( - { date, requestHeaders } = { requestHeaders: {} }, + async getAllowedTemplatesForBulk( + { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.getAnnouncements().validate( - { - date, - }, + const { + error, + } = OrderPlatformValidator.getAllowedTemplatesForBulk().validate( + {}, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -1188,28 +1374,25 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.getAnnouncements().validate( - { - date, - }, + } = OrderPlatformValidator.getAllowedTemplatesForBulk().validate( + {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getAnnouncements \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > getAllowedTemplatesForBulk \n ${warrning}`, }); } const query_params = {}; - query_params["date"] = date; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/announcements`, + `/service/platform/order/v1.0/company/${this.config.companyId}/jobs/templates`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1223,7 +1406,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.AnnouncementsResponse().validate(responseData, { + } = OrderPlatformModel.AllowedTemplatesResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1234,7 +1417,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getAnnouncements \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getAllowedTemplatesForBulk \n ${res_error}`, }); } } @@ -1243,16 +1426,96 @@ class Order { } /** - * @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object + * @param {OrderPlatformValidator.GetAnnouncementsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getBagById + * @returns {Promise} - Success response + * @name getAnnouncements * @summary: - * @description: Get Order Bag Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/). + * @description: Get Announcements - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getAnnouncements/). */ - async getBagById( + async getAnnouncements( + { date, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getAnnouncements().validate( + { + date, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformValidator.getAnnouncements().validate( + { + date, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getAnnouncements \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["date"] = date; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/announcements`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.AnnouncementsResponse().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 > getAnnouncements \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetBagByIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getBagById + * @summary: + * @description: Get Order Bag Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getBagById/). + */ + async getBagById( { bagId, channelBagId, channelId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { @@ -1529,8 +1792,8 @@ class Order { { salesChannels, dpIds, - fromDate, - toDate, + startDate, + endDate, stores, tags, bagStatus, @@ -1549,8 +1812,8 @@ class Order { { salesChannels, dpIds, - fromDate, - toDate, + startDate, + endDate, stores, tags, bagStatus, @@ -1573,8 +1836,8 @@ class Order { { salesChannels, dpIds, - fromDate, - toDate, + startDate, + endDate, stores, tags, bagStatus, @@ -1596,8 +1859,8 @@ class Order { const query_params = {}; query_params["sales_channels"] = salesChannels; query_params["dp_ids"] = dpIds; - query_params["from_date"] = fromDate; - query_params["to_date"] = toDate; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; query_params["stores"] = stores; query_params["tags"] = tags; query_params["bag_status"] = bagStatus; @@ -1720,6 +1983,96 @@ class Order { 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 + * @name getFileByStatus + * @summary: + * @description: Get the file URL consisting Records of the provided status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getFileByStatus/). + */ + async getFileByStatus( + { batchId, status, fileType, reportType, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getFileByStatus().validate( + { + batchId, + status, + fileType, + reportType, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformValidator.getFileByStatus().validate( + { + batchId, + status, + fileType, + reportType, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getFileByStatus \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["status"] = status; + query_params["file_type"] = fileType; + query_params["report_type"] = reportType; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/jobs/${batchId}/file`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.JobFailedResponse().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 > getFileByStatus \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {OrderPlatformValidator.GetLaneConfigParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -1735,6 +2088,8 @@ class Order { groupEntity, fromDate, toDate, + startDate, + endDate, dpIds, stores, salesChannels, @@ -1758,6 +2113,8 @@ class Order { groupEntity, fromDate, toDate, + startDate, + endDate, dpIds, stores, salesChannels, @@ -1785,6 +2142,8 @@ class Order { groupEntity, fromDate, toDate, + startDate, + endDate, dpIds, stores, salesChannels, @@ -1813,6 +2172,8 @@ class Order { query_params["group_entity"] = groupEntity; query_params["from_date"] = fromDate; query_params["to_date"] = toDate; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; query_params["dp_ids"] = dpIds; query_params["stores"] = stores; query_params["sales_channels"] = salesChannels; @@ -1866,22 +2227,21 @@ class Order { } /** - * @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object + * @param {OrderPlatformValidator.GetManifestDetailsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getOrderById + * @returns {Promise} - Success response + * @name getManifestDetails * @summary: - * @description: Get Order Details by ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/). + * @description: get Manifest Details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestDetails/). */ - async getOrderById( - { orderId, myOrders, requestHeaders } = { requestHeaders: {} }, + async getManifestDetails( + { manifestId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.getOrderById().validate( + const { error } = OrderPlatformValidator.getManifestDetails().validate( { - orderId, - myOrders, + manifestId, }, { abortEarly: false, allowUnknown: true } ); @@ -1890,30 +2250,29 @@ class Order { } // Showing warrnings if extra unknown parameters are found - const { error: warrning } = OrderPlatformValidator.getOrderById().validate( + const { + error: warrning, + } = OrderPlatformValidator.getManifestDetails().validate( { - orderId, - myOrders, + manifestId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getOrderById \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > getManifestDetails \n ${warrning}`, }); } const query_params = {}; - query_params["order_id"] = orderId; - query_params["my_orders"] = myOrders; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/order/v1.0/company/${this.config.companyId}/order-details`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifests/${manifestId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1927,7 +2286,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.OrderDetailsResponse().validate(responseData, { + } = OrderPlatformModel.ManifestDetails().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1938,7 +2297,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getOrderById \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getManifestDetails \n ${res_error}`, }); } } @@ -1947,62 +2306,42 @@ class Order { } /** - * @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object + * @param {OrderPlatformValidator.GetManifestShipmentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getOrders + * @returns {Promise} - Success response + * @name getManifestShipments * @summary: - * @description: Get Orders Listing - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/). + * @description: get Manifest Shipments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestShipments/). */ - async getOrders( + async getManifestShipments( { - lane, - searchType, - bagStatus, - timeToDispatch, - paymentMethods, - tags, - searchValue, - fromDate, - toDate, dpIds, stores, + toDate, + fromDate, + dpName, salesChannels, + searchType, + searchValue, pageNo, pageSize, - isPrioritySort, - customMeta, - myOrders, - showCrossCompanyData, - customerId, - orderType, requestHeaders, } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.getOrders().validate( + const { error } = OrderPlatformValidator.getManifestShipments().validate( { - lane, - searchType, - bagStatus, - timeToDispatch, - paymentMethods, - tags, - searchValue, - fromDate, - toDate, dpIds, stores, + toDate, + fromDate, + dpName, salesChannels, + searchType, + searchValue, pageNo, pageSize, - isPrioritySort, - customMeta, - myOrders, - showCrossCompanyData, - customerId, - orderType, }, { abortEarly: false, allowUnknown: true } ); @@ -2011,57 +2350,1107 @@ class Order { } // Showing warrnings if extra unknown parameters are found - const { error: warrning } = OrderPlatformValidator.getOrders().validate( + const { + error: warrning, + } = OrderPlatformValidator.getManifestShipments().validate( { - lane, - searchType, - bagStatus, - timeToDispatch, - paymentMethods, - tags, - searchValue, - fromDate, - toDate, dpIds, stores, + toDate, + fromDate, + dpName, salesChannels, + searchType, + searchValue, pageNo, pageSize, - isPrioritySort, - customMeta, - myOrders, - showCrossCompanyData, - customerId, - orderType, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getOrders \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > getManifestShipments \n ${warrning}`, }); } const query_params = {}; - query_params["lane"] = lane; + query_params["dp_ids"] = dpIds; + query_params["stores"] = stores; + query_params["to_date"] = toDate; + query_params["from_date"] = fromDate; + query_params["dp_name"] = dpName; + query_params["sales_channels"] = salesChannels; query_params["search_type"] = searchType; - query_params["bag_status"] = bagStatus; + query_params["search_value"] = searchValue; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifests/shipments`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.ManifestShipmentListing().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 > getManifestShipments \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetManifestfiltersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getManifestfilters + * @summary: + * @description: get Manifest Filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifestfilters/). + */ + async getManifestfilters( + { view, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getManifestfilters().validate( + { + view, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformValidator.getManifestfilters().validate( + { + view, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getManifestfilters \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["view"] = view; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/filter/listing`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.ManifestFiltersResponse().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 > getManifestfilters \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetManifestsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getManifests + * @summary: + * @description: Fetch Manifests - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getManifests/). + */ + async getManifests( + { + status, + startDate, + endDate, + searchType, + storeId, + searchValue, + dpIds, + pageNo, + pageSize, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getManifests().validate( + { + status, + startDate, + endDate, + searchType, + storeId, + searchValue, + dpIds, + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = OrderPlatformValidator.getManifests().validate( + { + status, + startDate, + endDate, + searchType, + storeId, + searchValue, + dpIds, + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getManifests \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["status"] = status; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; + query_params["search_type"] = searchType; + query_params["store_id"] = storeId; + query_params["search_value"] = searchValue; + query_params["dp_ids"] = dpIds; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifests`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.ManifestList().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 > getManifests \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetOrderByIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getOrderById + * @summary: + * @description: Get Order Details by ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrderById/). + */ + async getOrderById( + { orderId, myOrders, allowInactive, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getOrderById().validate( + { + orderId, + myOrders, + allowInactive, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = OrderPlatformValidator.getOrderById().validate( + { + orderId, + myOrders, + allowInactive, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getOrderById \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["order_id"] = orderId; + query_params["my_orders"] = myOrders; + query_params["allow_inactive"] = allowInactive; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order/v1.0/company/${this.config.companyId}/order-details`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.OrderDetailsResponse().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 > getOrderById \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetOrdersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getOrders + * @summary: + * @description: Get Orders Listing - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getOrders/). + */ + async getOrders( + { + lane, + searchType, + bagStatus, + timeToDispatch, + paymentMethods, + tags, + searchValue, + fromDate, + toDate, + startDate, + endDate, + dpIds, + stores, + salesChannels, + pageNo, + pageSize, + isPrioritySort, + customMeta, + myOrders, + showCrossCompanyData, + customerId, + orderType, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getOrders().validate( + { + lane, + searchType, + bagStatus, + timeToDispatch, + paymentMethods, + tags, + searchValue, + fromDate, + toDate, + startDate, + endDate, + dpIds, + stores, + salesChannels, + pageNo, + pageSize, + isPrioritySort, + customMeta, + myOrders, + showCrossCompanyData, + customerId, + orderType, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = OrderPlatformValidator.getOrders().validate( + { + lane, + searchType, + bagStatus, + timeToDispatch, + paymentMethods, + tags, + searchValue, + fromDate, + toDate, + startDate, + endDate, + dpIds, + stores, + salesChannels, + pageNo, + pageSize, + isPrioritySort, + customMeta, + myOrders, + showCrossCompanyData, + customerId, + orderType, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getOrders \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["lane"] = lane; + query_params["search_type"] = searchType; + query_params["bag_status"] = bagStatus; + query_params["time_to_dispatch"] = timeToDispatch; + query_params["payment_methods"] = paymentMethods; + query_params["tags"] = tags; + query_params["search_value"] = searchValue; + query_params["from_date"] = fromDate; + query_params["to_date"] = toDate; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; + query_params["dp_ids"] = dpIds; + query_params["stores"] = stores; + query_params["sales_channels"] = salesChannels; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["is_priority_sort"] = isPrioritySort; + query_params["custom_meta"] = customMeta; + query_params["my_orders"] = myOrders; + query_params["show_cross_company_data"] = showCrossCompanyData; + query_params["customer_id"] = customerId; + query_params["order_type"] = orderType; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order/v1.0/company/${this.config.companyId}/orders-listing`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.OrderListingResponse().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 > getOrders \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {Object} arg - Arg object. + * @param {string} [arg.lane] - Lane refers to a section where orders are + * assigned, indicating its grouping + * @param {string} [arg.searchType] - Search_type refers to the field that + * will be used as the target for the search operation + * @param {string} [arg.bagStatus] - Bag_status refers to status of the + * entity. Filters orders based on the status. + * @param {number} [arg.timeToDispatch] - Time_to_dispatch refers to + * estimated SLA time. + * @param {string} [arg.paymentMethods] - + * @param {string} [arg.tags] - Tags refers to additional descriptive labels + * associated with the order + * @param {string} [arg.searchValue] - Search_value is matched against the + * field specified by the search_type + * @param {string} [arg.fromDate] - + * @param {string} [arg.toDate] - + * @param {string} [arg.startDate] - + * @param {string} [arg.endDate] - + * @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned. + * @param {string} [arg.stores] - + * @param {string} [arg.salesChannels] - + * @param {number} [arg.pageSize] - + * @param {boolean} [arg.isPrioritySort] - + * @param {string} [arg.customMeta] - + * @param {boolean} [arg.myOrders] - + * @param {boolean} [arg.showCrossCompanyData] - Flag to view cross & + * non-cross company order + * @param {string} [arg.customerId] - + * @param {string} [arg.orderType] - + * @returns {Paginator} + * @summary: + * @description: Get Orders Listing + */ + getOrdersPaginator({ + lane, + searchType, + bagStatus, + timeToDispatch, + paymentMethods, + tags, + searchValue, + fromDate, + toDate, + startDate, + endDate, + dpIds, + stores, + salesChannels, + pageSize, + isPrioritySort, + customMeta, + myOrders, + showCrossCompanyData, + customerId, + orderType, + } = {}) { + const paginator = new Paginator(); + const callback = async () => { + const pageId = paginator.nextId; + const pageNo = paginator.pageNo; + const pageType = "number"; + const data = await this.getOrders({ + lane: lane, + searchType: searchType, + bagStatus: bagStatus, + timeToDispatch: timeToDispatch, + paymentMethods: paymentMethods, + tags: tags, + searchValue: searchValue, + fromDate: fromDate, + toDate: toDate, + startDate: startDate, + endDate: endDate, + dpIds: dpIds, + stores: stores, + salesChannels: salesChannels, + pageNo: pageNo, + pageSize: pageSize, + isPrioritySort: isPrioritySort, + customMeta: customMeta, + myOrders: myOrders, + showCrossCompanyData: showCrossCompanyData, + customerId: customerId, + orderType: orderType, + }); + paginator.setPaginator({ + hasNext: data.page.has_next ? true : false, + nextId: data.page.next_id, + }); + return data; + }; + paginator.setCallback(callback.bind(this)); + return paginator; + } + + /** + * @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getRoleBasedActions + * @summary: + * @description: Get Role Based Actions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/). + */ + async getRoleBasedActions( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getRoleBasedActions().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.getRoleBasedActions().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getRoleBasedActions \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}/roles`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.GetActionsResponse().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 > getRoleBasedActions \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getShipmentById + * @summary: + * @description: Get shipment details for the given shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/). + */ + async getShipmentById( + { channelShipmentId, shipmentId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getShipmentById().validate( + { + channelShipmentId, + shipmentId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformValidator.getShipmentById().validate( + { + channelShipmentId, + shipmentId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getShipmentById \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["channel_shipment_id"] = channelShipmentId; + query_params["shipment_id"] = shipmentId; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order/v1.0/company/${this.config.companyId}/shipment-details`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.ShipmentInfoResponse().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 > getShipmentById \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getShipmentHistory + * @summary: + * @description: Get Shipment History - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/). + */ + async getShipmentHistory( + { shipmentId, bagId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getShipmentHistory().validate( + { + shipmentId, + bagId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformValidator.getShipmentHistory().validate( + { + shipmentId, + bagId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getShipmentHistory \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["shipment_id"] = shipmentId; + query_params["bag_id"] = bagId; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/history`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.ShipmentHistoryResponse().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 > getShipmentHistory \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getShipmentReasons + * @summary: Get reasons behind full or partial cancellation of a shipment + * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/). + */ + async getShipmentReasons( + { shipmentId, bagId, state, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getShipmentReasons().validate( + { + shipmentId, + bagId, + state, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformValidator.getShipmentReasons().validate( + { + shipmentId, + bagId, + state, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getShipmentReasons \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order/v1.0/company/${this.config.companyId}/shipments/${shipmentId}/bags/${bagId}/state/${state}/reasons`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.PlatformShipmentReasonsResponse().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 > getShipmentReasons \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getShipments + * @summary: + * @description: Get Shipments Listing for the company id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/). + */ + async 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, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getShipments().validate( + { + 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, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = OrderPlatformValidator.getShipments().validate( + { + 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, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getShipments \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["lane"] = lane; + query_params["bag_status"] = bagStatus; + query_params["status_override_lane"] = statusOverrideLane; query_params["time_to_dispatch"] = timeToDispatch; - query_params["payment_methods"] = paymentMethods; - query_params["tags"] = tags; + query_params["search_type"] = searchType; query_params["search_value"] = searchValue; query_params["from_date"] = fromDate; query_params["to_date"] = toDate; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; query_params["dp_ids"] = dpIds; query_params["stores"] = stores; query_params["sales_channels"] = salesChannels; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; - query_params["is_priority_sort"] = isPrioritySort; + query_params["fetch_active_shipment"] = fetchActiveShipment; + query_params["allow_inactive"] = allowInactive; + query_params["exclude_locked_shipments"] = excludeLockedShipments; + query_params["payment_methods"] = paymentMethods; + query_params["channel_shipment_id"] = channelShipmentId; + query_params["channel_order_id"] = channelOrderId; query_params["custom_meta"] = customMeta; + query_params["ordering_channel"] = orderingChannel; + query_params["company_affiliate_tag"] = companyAffiliateTag; query_params["my_orders"] = myOrders; + query_params["platform_user_id"] = platformUserId; + query_params["sort_type"] = sortType; query_params["show_cross_company_data"] = showCrossCompanyData; + query_params["tags"] = tags; query_params["customer_id"] = customerId; query_params["order_type"] = orderType; @@ -2070,7 +3459,7 @@ class Order { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/order/v1.0/company/${this.config.companyId}/orders-listing`, + `/service/platform/order/v1.0/company/${this.config.companyId}/shipments-listing`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -2084,10 +3473,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.OrderListingResponse().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2095,7 +3484,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getOrders \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getShipments \n ${res_error}`, }); } } @@ -2105,54 +3494,71 @@ class Order { /** * @param {Object} arg - Arg object. - * @param {string} [arg.lane] - Lane refers to a section where orders are - * assigned, indicating its grouping - * @param {string} [arg.searchType] - Search_type refers to the field that - * will be used as the target for the search operation - * @param {string} [arg.bagStatus] - Bag_status refers to status of the - * entity. Filters orders based on the status. - * @param {number} [arg.timeToDispatch] - Time_to_dispatch refers to - * estimated SLA time. - * @param {string} [arg.paymentMethods] - - * @param {string} [arg.tags] - Tags refers to additional descriptive labels - * associated with the order - * @param {string} [arg.searchValue] - Search_value is matched against the - * field specified by the search_type - * @param {string} [arg.fromDate] - - * @param {string} [arg.toDate] - - * @param {string} [arg.dpIds] - Delivery Partner IDs to which shipments are assigned. - * @param {string} [arg.stores] - - * @param {string} [arg.salesChannels] - - * @param {number} [arg.pageSize] - - * @param {boolean} [arg.isPrioritySort] - + * @param {string} [arg.lane] - Name of lane for which data is to be fetched + * @param {string} [arg.bagStatus] - Comma separated values of bag statuses + * @param {boolean} [arg.statusOverrideLane] - Use this flag to fetch by + * bag_status and override lane + * @param {number} [arg.timeToDispatch] - + * @param {string} [arg.searchType] - Search type key + * @param {string} [arg.searchValue] - Search type value + * @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format + * @param {string} [arg.toDate] - End Date in DD-MM-YYYY format + * @param {string} [arg.startDate] - UTC Start Date in ISO format + * @param {string} [arg.endDate] - UTC End Date in ISO format + * @param {string} [arg.dpIds] - Comma separated values of delivery partner ids + * @param {string} [arg.stores] - Comma separated values of store ids + * @param {string} [arg.salesChannels] - Comma separated values of sales channel ids + * @param {number} [arg.pageSize] - Page size of data received per page + * @param {boolean} [arg.fetchActiveShipment] - Flag to fetch active shipments + * @param {boolean} [arg.allowInactive] - Flag to allow inactive shipments + * @param {boolean} [arg.excludeLockedShipments] - Flag to fetch locked shipments + * @param {string} [arg.paymentMethods] - Comma separated values of payment methods + * @param {string} [arg.channelShipmentId] - App Shipment Id + * @param {string} [arg.channelOrderId] - App Order Id * @param {string} [arg.customMeta] - + * @param {string} [arg.orderingChannel] - + * @param {string} [arg.companyAffiliateTag] - * @param {boolean} [arg.myOrders] - + * @param {string} [arg.platformUserId] - + * @param {string} [arg.sortType] - Sort the result data on basis of input * @param {boolean} [arg.showCrossCompanyData] - Flag to view cross & * non-cross company order + * @param {string} [arg.tags] - Comma separated values of tags * @param {string} [arg.customerId] - * @param {string} [arg.orderType] - - * @returns {Paginator} + * @returns {Paginator} * @summary: - * @description: Get Orders Listing + * @description: Get Shipments Listing for the company id */ - getOrdersPaginator({ + getShipmentsPaginator({ lane, - searchType, bagStatus, + statusOverrideLane, timeToDispatch, - paymentMethods, - tags, + searchType, searchValue, fromDate, toDate, + startDate, + endDate, dpIds, stores, salesChannels, pageSize, - isPrioritySort, + fetchActiveShipment, + allowInactive, + excludeLockedShipments, + paymentMethods, + channelShipmentId, + channelOrderId, customMeta, + orderingChannel, + companyAffiliateTag, myOrders, + platformUserId, + sortType, showCrossCompanyData, + tags, customerId, orderType, } = {}) { @@ -2161,25 +3567,36 @@ class Order { const pageId = paginator.nextId; const pageNo = paginator.pageNo; const pageType = "number"; - const data = await this.getOrders({ + const data = await this.getShipments({ lane: lane, - searchType: searchType, bagStatus: bagStatus, + statusOverrideLane: statusOverrideLane, timeToDispatch: timeToDispatch, - paymentMethods: paymentMethods, - tags: tags, + searchType: searchType, searchValue: searchValue, fromDate: fromDate, toDate: toDate, + startDate: startDate, + endDate: endDate, dpIds: dpIds, stores: stores, salesChannels: salesChannels, pageNo: pageNo, pageSize: pageSize, - isPrioritySort: isPrioritySort, + fetchActiveShipment: fetchActiveShipment, + allowInactive: allowInactive, + excludeLockedShipments: excludeLockedShipments, + paymentMethods: paymentMethods, + channelShipmentId: channelShipmentId, + channelOrderId: channelOrderId, customMeta: customMeta, + orderingChannel: orderingChannel, + companyAffiliateTag: companyAffiliateTag, myOrders: myOrders, + platformUserId: platformUserId, + sortType: sortType, showCrossCompanyData: showCrossCompanyData, + tags: tags, customerId: customerId, orderType: orderType, }); @@ -2194,20 +3611,183 @@ class Order { } /** - * @param {OrderPlatformValidator.GetRoleBasedActionsParam} arg - Arg object + * @param {OrderPlatformValidator.GetStateManagerTaskByIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateManagerTaskById + * @summary: Fetch a specific State Transition task + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerTaskById/). + */ + async getStateManagerTaskById( + { taskId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getStateManagerTaskById().validate( + { + taskId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformValidator.getStateManagerTaskById().validate( + { + taskId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getStateManagerTaskById \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}/state/transition/tasks/${taskId}`, + query_params, + undefined, + { ...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 > getStateManagerTaskById \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetStateManagerTasksParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStateManagerTasks + * @summary: Fetch all State Transition tasks + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateManagerTasks/). + */ + async getStateManagerTasks( + { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.getStateManagerTasks().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformValidator.getStateManagerTasks().validate( + { + pageNo, + pageSize, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > getStateManagerTasks \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/state/transition/tasks`, + query_params, + undefined, + { ...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 > getStateManagerTasks \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {OrderPlatformValidator.GetStateTransitionFiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getRoleBasedActions - * @summary: - * @description: Get Role Based Actions - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getRoleBasedActions/). + * @returns {Promise} - Success response + * @name getStateTransitionFilters + * @summary: Fetch all State Transition filters + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionFilters/). */ - async getRoleBasedActions( - { requestHeaders } = { requestHeaders: {} }, + async getStateTransitionFilters( + { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.getRoleBasedActions().validate( - {}, + const { + error, + } = OrderPlatformValidator.getStateTransitionFilters().validate( + { + pageNo, + pageSize, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -2217,25 +3797,30 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.getRoleBasedActions().validate( - {}, + } = OrderPlatformValidator.getStateTransitionFilters().validate( + { + pageNo, + pageSize, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getRoleBasedActions \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > getStateTransitionFilters \n ${warrning}`, }); } const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/roles`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/state/transition/filters`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -2247,9 +3832,7 @@ class Order { responseData = response[0]; } - const { - error: res_error, - } = OrderPlatformModel.GetActionsResponse().validate(responseData, { + const { error: res_error } = Joi.any().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2260,7 +3843,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getRoleBasedActions \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getStateTransitionFilters \n ${res_error}`, }); } } @@ -2269,22 +3852,23 @@ class Order { } /** - * @param {OrderPlatformValidator.GetShipmentByIdParam} arg - Arg object + * @param {OrderPlatformValidator.GetStateTransitionFiltersByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getShipmentById - * @summary: - * @description: Get shipment details for the given shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentById/). + * @returns {Promise} - Success response + * @name getStateTransitionFiltersById + * @summary: Fetch a specific State Transition filter + * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionFiltersById/). */ - async getShipmentById( - { channelShipmentId, shipmentId, requestHeaders } = { requestHeaders: {} }, + async getStateTransitionFiltersById( + { filterId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.getShipmentById().validate( + const { + error, + } = OrderPlatformValidator.getStateTransitionFiltersById().validate( { - channelShipmentId, - shipmentId, + filterId, }, { abortEarly: false, allowUnknown: true } ); @@ -2295,30 +3879,27 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.getShipmentById().validate( + } = OrderPlatformValidator.getStateTransitionFiltersById().validate( { - channelShipmentId, - shipmentId, + filterId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getShipmentById \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > getStateTransitionFiltersById \n ${warrning}`, }); } const query_params = {}; - query_params["channel_shipment_id"] = channelShipmentId; - query_params["shipment_id"] = shipmentId; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/order/v1.0/company/${this.config.companyId}/shipment-details`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/state/transition/filters/${filterId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -2330,9 +3911,7 @@ class Order { responseData = response[0]; } - const { - error: res_error, - } = OrderPlatformModel.ShipmentInfoResponse().validate(responseData, { + const { error: res_error } = Joi.any().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2343,7 +3922,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getShipmentById \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getStateTransitionFiltersById \n ${res_error}`, }); } } @@ -2352,22 +3931,22 @@ class Order { } /** - * @param {OrderPlatformValidator.GetShipmentHistoryParam} arg - Arg object + * @param {OrderPlatformValidator.GetStateTransitionFlagsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getShipmentHistory + * @returns {Promise} - Success response + * @name getStateTransitionFlags * @summary: - * @description: Get Shipment History - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentHistory/). + * @description: Fetch all state transition flags for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionFlags/). */ - async getShipmentHistory( - { shipmentId, bagId, requestHeaders } = { requestHeaders: {} }, + async getStateTransitionFlags( + { pageNo, pageSize, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.getShipmentHistory().validate( + const { error } = OrderPlatformValidator.getStateTransitionFlags().validate( { - shipmentId, - bagId, + pageNo, + pageSize, }, { abortEarly: false, allowUnknown: true } ); @@ -2378,30 +3957,30 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.getShipmentHistory().validate( + } = OrderPlatformValidator.getStateTransitionFlags().validate( { - shipmentId, - bagId, + pageNo, + pageSize, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getShipmentHistory \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > getStateTransitionFlags \n ${warrning}`, }); } const query_params = {}; - query_params["shipment_id"] = shipmentId; - query_params["bag_id"] = bagId; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/shipment/history`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/state/transition/flags`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -2413,9 +3992,7 @@ class Order { responseData = response[0]; } - const { - error: res_error, - } = OrderPlatformModel.ShipmentHistoryResponse().validate(responseData, { + const { error: res_error } = Joi.any().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2426,7 +4003,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getShipmentHistory \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getStateTransitionFlags \n ${res_error}`, }); } } @@ -2435,24 +4012,23 @@ class Order { } /** - * @param {OrderPlatformValidator.GetShipmentReasonsParam} arg - Arg object + * @param {OrderPlatformValidator.GetStateTransitionFlagsByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getShipmentReasons - * @summary: Get reasons behind full or partial cancellation of a shipment - * @description: Use this API to retrieve the issues that led to the cancellation of bags within a shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipmentReasons/). + * @returns {Promise} - Success response + * @name getStateTransitionFlagsById + * @summary: + * @description: Fetch a specific state transition flag for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionFlagsById/). */ - async getShipmentReasons( - { shipmentId, bagId, state, requestHeaders } = { requestHeaders: {} }, + async getStateTransitionFlagsById( + { flagId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.getShipmentReasons().validate( + const { + error, + } = OrderPlatformValidator.getStateTransitionFlagsById().validate( { - shipmentId, - bagId, - state, + flagId, }, { abortEarly: false, allowUnknown: true } ); @@ -2463,18 +4039,16 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.getShipmentReasons().validate( + } = OrderPlatformValidator.getStateTransitionFlagsById().validate( { - shipmentId, - bagId, - state, + flagId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getShipmentReasons \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > getStateTransitionFlagsById \n ${warrning}`, }); } @@ -2485,7 +4059,7 @@ class Order { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/order/v1.0/company/${this.config.companyId}/shipments/${shipmentId}/bags/${bagId}/state/${state}/reasons`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/state/transition/flags/${flagId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -2497,12 +4071,10 @@ class Order { responseData = response[0]; } - const { - error: res_error, - } = OrderPlatformModel.PlatformShipmentReasonsResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + const { error: res_error } = Joi.any().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2510,7 +4082,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getShipmentReasons \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getStateTransitionFlagsById \n ${res_error}`, }); } } @@ -2519,168 +4091,48 @@ class Order { } /** - * @param {OrderPlatformValidator.GetShipmentsParam} arg - Arg object + * @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getShipments + * @returns {Promise} - Success response + * @name getStateTransitionMap * @summary: - * @description: Get Shipments Listing for the company id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getShipments/). + * @description: Get State Transition Map - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/). */ - async getShipments( - { - lane, - bagStatus, - statusOverrideLane, - timeToDispatch, - searchType, - searchValue, - fromDate, - toDate, - dpIds, - stores, - salesChannels, - pageNo, - pageSize, - fetchActiveShipment, - allowInactive, - excludeLockedShipments, - paymentMethods, - channelShipmentId, - channelOrderId, - customMeta, - orderingChannel, - companyAffiliateTag, - myOrders, - platformUserId, - sortType, - showCrossCompanyData, - tags, - customerId, - orderType, - requestHeaders, - } = { requestHeaders: {} }, + async getStateTransitionMap( + { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.getShipments().validate( - { - lane, - bagStatus, - statusOverrideLane, - timeToDispatch, - searchType, - searchValue, - fromDate, - toDate, - dpIds, - stores, - salesChannels, - pageNo, - pageSize, - fetchActiveShipment, - allowInactive, - excludeLockedShipments, - paymentMethods, - channelShipmentId, - channelOrderId, - customMeta, - orderingChannel, - companyAffiliateTag, - myOrders, - platformUserId, - sortType, - showCrossCompanyData, - tags, - customerId, - orderType, - }, + const { error } = OrderPlatformValidator.getStateTransitionMap().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.getShipments().validate( - { - lane, - bagStatus, - statusOverrideLane, - timeToDispatch, - searchType, - searchValue, - fromDate, - toDate, - dpIds, - stores, - salesChannels, - pageNo, - pageSize, - fetchActiveShipment, - allowInactive, - excludeLockedShipments, - paymentMethods, - channelShipmentId, - channelOrderId, - customMeta, - orderingChannel, - companyAffiliateTag, - myOrders, - platformUserId, - sortType, - showCrossCompanyData, - tags, - customerId, - orderType, - }, + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = OrderPlatformValidator.getStateTransitionMap().validate( + {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getShipments \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > getStateTransitionMap \n ${warrning}`, }); } const query_params = {}; - query_params["lane"] = lane; - query_params["bag_status"] = bagStatus; - query_params["status_override_lane"] = statusOverrideLane; - query_params["time_to_dispatch"] = timeToDispatch; - query_params["search_type"] = searchType; - query_params["search_value"] = searchValue; - query_params["from_date"] = fromDate; - query_params["to_date"] = toDate; - query_params["dp_ids"] = dpIds; - query_params["stores"] = stores; - query_params["sales_channels"] = salesChannels; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - query_params["fetch_active_shipment"] = fetchActiveShipment; - query_params["allow_inactive"] = allowInactive; - query_params["exclude_locked_shipments"] = excludeLockedShipments; - query_params["payment_methods"] = paymentMethods; - query_params["channel_shipment_id"] = channelShipmentId; - query_params["channel_order_id"] = channelOrderId; - query_params["custom_meta"] = customMeta; - query_params["ordering_channel"] = orderingChannel; - query_params["company_affiliate_tag"] = companyAffiliateTag; - query_params["my_orders"] = myOrders; - query_params["platform_user_id"] = platformUserId; - query_params["sort_type"] = sortType; - query_params["show_cross_company_data"] = showCrossCompanyData; - query_params["tags"] = tags; - query_params["customer_id"] = customerId; - query_params["order_type"] = orderType; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/order/v1.0/company/${this.config.companyId}/shipments-listing`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/bag/state/transition`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -2694,10 +4146,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.ShipmentInternalPlatformViewResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = OrderPlatformModel.BagStateTransitionMap().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -2705,7 +4157,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getShipments \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getStateTransitionMap \n ${res_error}`, }); } } @@ -2714,132 +4166,22 @@ class Order { } /** - * @param {Object} arg - Arg object. - * @param {string} [arg.lane] - Name of lane for which data is to be fetched - * @param {string} [arg.bagStatus] - Comma separated values of bag statuses - * @param {boolean} [arg.statusOverrideLane] - Use this flag to fetch by - * bag_status and override lane - * @param {number} [arg.timeToDispatch] - - * @param {string} [arg.searchType] - Search type key - * @param {string} [arg.searchValue] - Search type value - * @param {string} [arg.fromDate] - Start Date in DD-MM-YYYY format - * @param {string} [arg.toDate] - End Date in DD-MM-YYYY format - * @param {string} [arg.dpIds] - Comma separated values of delivery partner ids - * @param {string} [arg.stores] - Comma separated values of store ids - * @param {string} [arg.salesChannels] - Comma separated values of sales channel ids - * @param {number} [arg.pageSize] - Page size of data received per page - * @param {boolean} [arg.fetchActiveShipment] - Flag to fetch active shipments - * @param {boolean} [arg.allowInactive] - Flag to allow inactive shipments - * @param {boolean} [arg.excludeLockedShipments] - Flag to fetch locked shipments - * @param {string} [arg.paymentMethods] - Comma separated values of payment methods - * @param {string} [arg.channelShipmentId] - App Shipment Id - * @param {string} [arg.channelOrderId] - App Order Id - * @param {string} [arg.customMeta] - - * @param {string} [arg.orderingChannel] - - * @param {string} [arg.companyAffiliateTag] - - * @param {boolean} [arg.myOrders] - - * @param {string} [arg.platformUserId] - - * @param {string} [arg.sortType] - Sort the result data on basis of input - * @param {boolean} [arg.showCrossCompanyData] - Flag to view cross & - * non-cross company order - * @param {string} [arg.tags] - Comma separated values of tags - * @param {string} [arg.customerId] - - * @param {string} [arg.orderType] - - * @returns {Paginator} - * @summary: - * @description: Get Shipments Listing for the company id - */ - getShipmentsPaginator({ - lane, - bagStatus, - statusOverrideLane, - timeToDispatch, - searchType, - searchValue, - fromDate, - toDate, - dpIds, - stores, - salesChannels, - pageSize, - fetchActiveShipment, - allowInactive, - excludeLockedShipments, - paymentMethods, - channelShipmentId, - channelOrderId, - customMeta, - orderingChannel, - companyAffiliateTag, - myOrders, - platformUserId, - sortType, - showCrossCompanyData, - tags, - customerId, - orderType, - } = {}) { - const paginator = new Paginator(); - const callback = async () => { - const pageId = paginator.nextId; - const pageNo = paginator.pageNo; - const pageType = "number"; - const data = await this.getShipments({ - lane: lane, - bagStatus: bagStatus, - statusOverrideLane: statusOverrideLane, - timeToDispatch: timeToDispatch, - searchType: searchType, - searchValue: searchValue, - fromDate: fromDate, - toDate: toDate, - dpIds: dpIds, - stores: stores, - salesChannels: salesChannels, - pageNo: pageNo, - pageSize: pageSize, - fetchActiveShipment: fetchActiveShipment, - allowInactive: allowInactive, - excludeLockedShipments: excludeLockedShipments, - paymentMethods: paymentMethods, - channelShipmentId: channelShipmentId, - channelOrderId: channelOrderId, - customMeta: customMeta, - orderingChannel: orderingChannel, - companyAffiliateTag: companyAffiliateTag, - myOrders: myOrders, - platformUserId: platformUserId, - sortType: sortType, - showCrossCompanyData: showCrossCompanyData, - tags: tags, - customerId: customerId, - orderType: orderType, - }); - paginator.setPaginator({ - hasNext: data.page.has_next ? true : false, - nextId: data.page.next_id, - }); - return data; - }; - paginator.setCallback(callback.bind(this)); - return paginator; - } - - /** - * @param {OrderPlatformValidator.GetStateTransitionMapParam} arg - Arg object + * @param {OrderPlatformValidator.GetTemplateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getStateTransitionMap + * @returns {Promise} - Success response + * @name getTemplate * @summary: - * @description: Get State Transition Map - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getStateTransitionMap/). + * @description: Get the Excel file URL for the Template. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/getTemplate/). */ - async getStateTransitionMap( - { requestHeaders } = { requestHeaders: {} }, + async getTemplate( + { templateName, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.getStateTransitionMap().validate( - {}, + const { error } = OrderPlatformValidator.getTemplate().validate( + { + templateName, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -2847,16 +4189,16 @@ class Order { } // Showing warrnings if extra unknown parameters are found - const { - error: warrning, - } = OrderPlatformValidator.getStateTransitionMap().validate( - {}, + const { error: warrning } = OrderPlatformValidator.getTemplate().validate( + { + templateName, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > getStateTransitionMap \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > getTemplate \n ${warrning}`, }); } @@ -2867,7 +4209,7 @@ class Order { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/bag/state/transition`, + `/service/platform/order/v1.0/company/${this.config.companyId}/jobs/templates/${templateName}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -2881,7 +4223,7 @@ class Order { const { error: res_error, - } = OrderPlatformModel.BagStateTransitionMap().validate(responseData, { + } = OrderPlatformModel.TemplateDownloadResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2892,7 +4234,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > getStateTransitionMap \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > getTemplate \n ${res_error}`, }); } } @@ -3061,6 +4403,83 @@ class Order { return response; } + /** + * @param {OrderPlatformValidator.JobDetailsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name jobDetails + * @summary: + * @description: Fetches details for the job of the provided batch_id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/jobDetails/). + */ + async jobDetails( + { batchId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = OrderPlatformValidator.jobDetails().validate( + { + batchId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { error: warrning } = OrderPlatformValidator.jobDetails().validate( + { + batchId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Order > jobDetails \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}/jobs/${batchId}`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = OrderPlatformModel.JobDetailsResponse().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 > jobDetails \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {OrderPlatformValidator.OrderUpdateParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -3218,19 +4637,20 @@ class Order { } /** - * @param {OrderPlatformValidator.ProcessManifestParam} arg - Arg object + * @param {OrderPlatformValidator.ProcessManifestsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name processManifest + * @returns {Promise} - + * Success response + * @name processManifests * @summary: - * @description: Process Manifest - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/processManifest/). + * @description: Process Manifest. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/processManifests/). */ - async processManifest( + async processManifests( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.processManifest().validate( + const { error } = OrderPlatformValidator.processManifests().validate( { body, }, @@ -3243,7 +4663,7 @@ class Order { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = OrderPlatformValidator.processManifest().validate( + } = OrderPlatformValidator.processManifests().validate( { body, }, @@ -3252,7 +4672,7 @@ class Order { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > processManifest \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > processManifests \n ${warrning}`, }); } @@ -3263,7 +4683,7 @@ class Order { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/process-manifest`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifests`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -3277,10 +4697,10 @@ class Order { const { error: res_error, - } = OrderPlatformModel.CreateOrderResponse().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = OrderPlatformModel.ProcessManifestItemResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -3288,7 +4708,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > processManifest \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > processManifests \n ${res_error}`, }); } } @@ -3538,7 +4958,7 @@ class Order { * @returns {Promise} - * Success response * @name trackShipment - * @summary: Get courier partner tracking details + * @summary: * @description: This endpoint allows users to get courier partner tracking details for a given shipment id or awb no. The service will fetch courier partner statuses that are pushed to oms. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/trackShipment/). */ async trackShipment( @@ -4073,20 +5493,21 @@ class Order { } /** - * @param {OrderPlatformValidator.UploadConsentParam} arg - Arg object + * @param {OrderPlatformValidator.UploadConsentsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name uploadConsent + * @name uploadConsents * @summary: - * @description: Upload Consent - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsent/). + * @description: Upload Consent - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/order/uploadConsents/). */ - async uploadConsent( - { body, requestHeaders } = { requestHeaders: {} }, + async uploadConsents( + { manifestId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = OrderPlatformValidator.uploadConsent().validate( + const { error } = OrderPlatformValidator.uploadConsents().validate( { + manifestId, body, }, { abortEarly: false, allowUnknown: true } @@ -4096,8 +5517,11 @@ class Order { } // Showing warrnings if extra unknown parameters are found - const { error: warrning } = OrderPlatformValidator.uploadConsent().validate( + const { + error: warrning, + } = OrderPlatformValidator.uploadConsents().validate( { + manifestId, body, }, { abortEarly: false, allowUnknown: false } @@ -4105,7 +5529,7 @@ class Order { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Order > uploadConsent \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Order > uploadConsents \n ${warrning}`, }); } @@ -4116,7 +5540,7 @@ class Order { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/uploadConsent`, + `/service/platform/order-manage/v1.0/company/${this.config.companyId}/manifest/${manifestId}/upload-consent`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -4141,7 +5565,7 @@ class Order { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Order > uploadConsent \n ${res_error}`, + message: `Response Validation Warnings for platform > Order > uploadConsents \n ${res_error}`, }); } } diff --git a/sdk/platform/Order/OrderPlatformModel.d.ts b/sdk/platform/Order/OrderPlatformModel.d.ts index 9bc5c20b7..405281712 100644 --- a/sdk/platform/Order/OrderPlatformModel.d.ts +++ b/sdk/platform/Order/OrderPlatformModel.d.ts @@ -152,6 +152,10 @@ export = OrderPlatformModel; * @property {string} marketplace_store_id * @property {number} store_id */ +/** + * @typedef AllowedTemplatesResponse + * @property {Templates[]} [template_x_slug] + */ /** * @typedef AnnouncementResponse * @property {number} [company_id] @@ -208,9 +212,12 @@ export = OrderPlatformModel; * @property {Object} category * @property {Object} dimension * @property {number} quantity - * @property {Object} [status] * @property {Object} weight */ +/** + * @typedef ArticleStatusDetails + * @property {Object} [status] + */ /** * @typedef AttachOrderUser * @property {string} fynd_order_id @@ -245,15 +252,6 @@ export = OrderPlatformModel; * @property {string} [primary_color_hex] * @property {string} [primary_material] */ -/** - * @typedef B2BPODetails - * @property {string} [docker_number] - * @property {number} [item_base_price] - * @property {boolean} [partial_can_ret] - * @property {number} [po_line_amount] - * @property {number} [po_tax_amount] - * @property {number} [total_gst_percentage] - */ /** * @typedef BagConfigs * @property {boolean} allow_force_return @@ -269,7 +267,7 @@ export = OrderPlatformModel; * @property {AffiliateDetails} [affiliate_details] * @property {Object[]} [applied_promos] * @property {Article} [article] - * @property {ArticleDetails} [article_details] + * @property {ArticleStatusDetails} [article_details] * @property {BagStatusHistory[]} [bag_status] * @property {BagStatusHistory} [bag_status_history] * @property {number} [bag_update_time] @@ -301,59 +299,10 @@ export = OrderPlatformModel; * @property {Object} [restore_promos] * @property {string} [seller_identifier] * @property {string} [shipment_id] - * @property {BagReturnableCancelableStatus1} [status] + * @property {BagReturnableCancelableStatus} [status] * @property {string[]} [tags] * @property {string} [type] */ -/** - * @typedef BagGST - * @property {number} [brand_calculated_amount] - * @property {string} [cgst_gst_fee] - * @property {number} [cgst_tax_percentage] - * @property {number} [gst_fee] - * @property {string} [gst_tag] - * @property {number} [gst_tax_percentage] - * @property {string} [gstin_code] - * @property {string} [hsn_code] - * @property {string} [hsn_code_id] - * @property {string} [igst_gst_fee] - * @property {number} [igst_tax_percentage] - * @property {boolean} [is_default_hsn_code] - * @property {string} [sgst_gst_fee] - * @property {number} [sgst_tax_percentage] - * @property {number} [tax_collected_at_source] - * @property {number} [value_of_good] - */ -/** - * @typedef BagGSTDetails - * @property {number} brand_calculated_amount - * @property {string} cgst_gst_fee - * @property {number} cgst_tax_percentage - * @property {number} gst_fee - * @property {string} gst_tag - * @property {number} gst_tax_percentage - * @property {string} [gstin_code] - * @property {string} hsn_code - * @property {string} hsn_code_id - * @property {string} igst_gst_fee - * @property {number} igst_tax_percentage - * @property {boolean} [is_default_hsn_code] - * @property {string} sgst_gst_fee - * @property {number} sgst_tax_percentage - * @property {number} tax_collected_at_source - * @property {number} value_of_good - */ -/** - * @typedef BagMeta - * @property {B2BPODetails} [b2b_po_details] - * @property {Object} [custom_json] - * @property {string} [custom_message] - * @property {string} [docket_number] - * @property {Object} [extra_meta] - * @property {GiftCard} [gift_card] - * @property {string} [group_id] - * @property {boolean} [partial_can_ret] - */ /** * @typedef BagPaymentMethods * @property {number} [amount] @@ -380,14 +329,6 @@ export = OrderPlatformModel; * @property {boolean} is_customer_return_allowed * @property {boolean} is_returnable */ -/** - * @typedef BagReturnableCancelableStatus1 - * @property {boolean} can_be_cancelled - * @property {boolean} enable_tracking - * @property {boolean} is_active - * @property {boolean} is_customer_return_allowed - * @property {boolean} is_returnable - */ /** * @typedef Bags * @property {string} [affiliate_bag_id] - Application/Affiliate Bag ID, @@ -430,6 +371,7 @@ export = OrderPlatformModel; * @property {BagStateMapper} [bag_state_mapper] * @property {number} [bsh_id] * @property {string} [created_at] + * @property {string} [created_ts] * @property {string} [delivery_awb_number] * @property {number} [delivery_partner_id] * @property {string} [display_name] @@ -442,6 +384,7 @@ export = OrderPlatformModel; * @property {string} status * @property {number} [store_id] * @property {string} [updated_at] + * @property {string} [updated_ts] */ /** * @typedef BagUnit @@ -477,36 +420,29 @@ export = OrderPlatformModel; */ /** * @typedef BillingInfo - * @property {string} address1 + * @property {string} [address] + * @property {string} [address1] * @property {string} [address2] * @property {string} [alternate_email] * @property {string} [alternate_mobile_number] - * @property {string} city - * @property {string} country + * @property {string} [city] + * @property {string} [country] * @property {string} [country_code] * @property {string} [customer_code] * @property {string} [external_customer_code] - * @property {string} first_name + * @property {string} [first_name] * @property {string} [floor_no] * @property {string} [gender] * @property {string} [house_no] * @property {string} [last_name] * @property {string} [middle_name] - * @property {string} pincode - * @property {string} primary_email - * @property {string} primary_mobile_number - * @property {string} state + * @property {string} [pincode] + * @property {string} [primary_email] + * @property {string} [primary_mobile_number] + * @property {string} [state] * @property {string} [state_code] * @property {string} [title] */ -/** - * @typedef BillingStaffDetails - * @property {string} [employee_code] - * @property {string} [first_name] - * @property {string} [last_name] - * @property {number} [staff_id] - * @property {string} [user] - */ /** * @typedef Brand * @property {number} brand_id @@ -523,6 +459,33 @@ export = OrderPlatformModel; * @property {string} [script_last_ran] * @property {string} [start_date] */ +/** + * @typedef BulkActionListingData + * @property {string} [batch_id] + * @property {string} [bulk_action_type] + * @property {number} [company_id] + * @property {string} [created_ts] + * @property {boolean} [do_invoice_label_generated] + * @property {string} [file_name] + * @property {string} [file_url] + * @property {number} [id] + * @property {string} [invoice_document_type] + * @property {string} [invoice_status] + * @property {boolean} [is_invoiceable] + * @property {string} [label_document_type] + * @property {string} [last_selected_invoice_label_type] + * @property {Object} [meta] + * @property {ShipmentActionInfo} [shipments_action_info] + * @property {boolean} [status] + * @property {string} [store_code] + * @property {number} [store_id] + * @property {string} [store_name] + * @property {number} [updated_ts] + * @property {string} [uploaded_by] + * @property {string} [uploaded_on] + * @property {string} [user_id] + * @property {string} [user_name] + */ /** * @typedef BulkActionTemplate * @property {string} [text] @@ -533,29 +496,57 @@ export = OrderPlatformModel; * @property {BulkActionTemplate[]} [template_x_slug] - Allowed bulk action template slugs */ /** - * @typedef BulkReportsDownloadFailedResponse + * @typedef BulkFailedResponse * @property {string} [error] * @property {boolean} [status] */ +/** + * @typedef BulkListingResponse + * @property {BulkActionListingData[]} [data] + * @property {BulkListinPage} [page] + * @property {boolean} [success] + * @property {number} [total_count] + */ +/** + * @typedef BulkListinPage + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {number} [size] + * @property {number} [total] + * @property {string} [type] + */ /** * @typedef BulkReportsDownloadRequest * @property {Object} [custom_filters_for_lane] * @property {string} [custom_headers] - Download report with specific headers + * @property {string} [end_date] - UTC end date in ISO format * @property {string[]} [entities] - Download for specific enitites, entities * can be bag, shipment or order_id, etc. * @property {string} [filter_type] - * @property {string} [from_date] * @property {boolean} [is_cross_company_enabled] - Download lanes for cross company. * @property {string} [lane_type] * @property {string} [report_type] - Type of report + * @property {string} [start_date] - UTC start date in ISO format * @property {string[]} [store_ids] - Download for specific store ids. - * @property {string} [to_date] */ /** * @typedef BulkReportsDownloadResponse * @property {string} [batch_id] * @property {boolean} [success] */ +/** + * @typedef BulkStateTransistionRequest + * @property {string} [file_name] + * @property {string} [url] + */ +/** + * @typedef BulkStateTransistionResponse + * @property {string} [batch_id] + * @property {string} [message] + * @property {boolean} [status] + */ /** * @typedef BuyerDetails * @property {string} address @@ -611,6 +602,11 @@ export = OrderPlatformModel; * @property {string[]} [emails] * @property {PhoneDetails[]} [phone] */ +/** + * @typedef ConversionRate + * @property {string} [base] + * @property {Object} [rates] + */ /** * @typedef CourierPartnerTrackingDetails * @property {string} awb - AWB Number @@ -706,11 +702,22 @@ export = OrderPlatformModel; * @property {string} [reason] * @property {string} [total_credited_balance] */ +/** + * @typedef Currency + * @property {string} [currency_code] + * @property {string} [currency_symbol] + */ +/** + * @typedef CurrencyInfo + * @property {ConversionRate} [conversion_rate] + * @property {OrderingCurrency} [ordering_currency] + */ /** * @typedef CurrentStatus * @property {number} [bag_id] * @property {BagStateMapper} [bag_state_mapper] * @property {string} [created_at] + * @property {string} [created_ts] * @property {string} [delivery_awb_number] * @property {number} [delivery_partner_id] * @property {number} id @@ -728,6 +735,11 @@ export = OrderPlatformModel; * @property {OrderItemDataUpdates[]} [order_item_status] * @property {ProductsDataUpdates[]} [products] */ +/** + * @typedef DateRange + * @property {string} [from_date] + * @property {string} [to_date] + */ /** * @typedef Dates * @property {string} [delivery_date] @@ -785,11 +797,51 @@ export = OrderPlatformModel; * @property {string} [pincode] * @property {string} [track_url] */ +/** + * @typedef EInvoiceDetails + * @property {EInvoiceErrorDetails[]} [error_details] + * @property {EInvoiceIrnDetails} [irn_details] + */ +/** + * @typedef EInvoiceErrorDetails + * @property {string} [error_code] + * @property {string} error_message + */ +/** + * @typedef EInvoiceErrorInfo + * @property {EInvoiceErrorDetails[]} [error_details] + */ +/** + * @typedef EInvoiceErrorResponse + * @property {string} [message] + * @property {EInvoiceErrorResponseData[]} [response_data] + */ +/** + * @typedef EInvoiceErrorResponseData + * @property {EInvoiceErrorInfo} [einvoice_info] + * @property {string} einvoice_type + * @property {string} message + * @property {string} shipment_id + * @property {number} status + */ +/** + * @typedef EInvoiceErrorResponseDetails + * @property {string} [message] + * @property {EInvoiceErrorResponseData[]} response_data + */ /** * @typedef EinvoiceInfo * @property {Object} [credit_note] * @property {Object} [invoice] */ +/** + * @typedef EInvoiceIrnDetails + * @property {string} ack_dt + * @property {string} ack_no + * @property {string} irn + * @property {string} signed_invoice + * @property {string} signed_qr_code + */ /** * @typedef EInvoicePortalDetails * @property {string} [password] @@ -798,14 +850,11 @@ export = OrderPlatformModel; */ /** * @typedef EInvoiceResponseData - * @property {string} [ack_dt] - * @property {string} [ack_no] - * @property {string} [irn] + * @property {EInvoiceDetails} [einvoice_info] + * @property {string} einvoice_type * @property {string} message * @property {string} shipment_id - * @property {boolean} success - * @property {number} [timeout] - * @property {string} [timeout_unit] + * @property {number} status */ /** * @typedef EInvoiceRetry @@ -813,13 +862,11 @@ export = OrderPlatformModel; */ /** * @typedef EInvoiceRetryResponse - * @property {string} [message] * @property {EInvoiceResponseData[]} response_data - * @property {boolean} [success] - * @property {number} success_count */ /** * @typedef EInvoiceRetryShipmentData + * @property {string} einvoice_type * @property {string} shipment_id */ /** @@ -863,12 +910,34 @@ export = OrderPlatformModel; */ /** * @typedef ErrorResponse - * @property {string} error + * @property {string} [error] * @property {string} [error_trace] * @property {string} message * @property {number} [status] * @property {boolean} [success] */ +/** + * @typedef FailedOrderLogDetails + * @property {string} error_trace + * @property {string} exception + */ +/** + * @typedef FailedOrderLogs + * @property {FailedOrdersItem} items + * @property {PageDetails} page + */ +/** + * @typedef FailedOrdersItem + * @property {LogsChannelDetails} channel + * @property {string} created_at + * @property {string} display_message + * @property {string} error_message + * @property {number} log_id + * @property {Object} meta + * @property {string} method_name + * @property {string} order_id + * @property {LogPaymentDetails} payment + */ /** * @typedef FetchCreditBalanceRequestPayload * @property {string} affiliate_id @@ -894,6 +963,19 @@ export = OrderPlatformModel; * @property {string} [text] * @property {string} [value] */ +/** + * @typedef Filters + * @property {DateRange} [date_range] + * @property {number} [dp_ids] + * @property {string} [dp_name] + * @property {string} [from_date] + * @property {string} [lane] + * @property {string} [logo] + * @property {string} [selected_shipments] + * @property {string} [store_name] + * @property {number} [stores] + * @property {string} [to_date] + */ /** * @typedef FiltersInfo * @property {FilterInfoOption[]} [options] @@ -903,6 +985,16 @@ export = OrderPlatformModel; * @property {string} type * @property {string} value */ +/** + * @typedef FiltersRequest + * @property {DateRange} [date_range] + * @property {number} dp_ids + * @property {string} dp_name + * @property {string} lane + * @property {string} [logo] + * @property {string} store_name + * @property {number} stores + */ /** * @typedef FiltersResponse * @property {AdvanceFilterInfo} [advance_filter] @@ -962,39 +1054,16 @@ export = OrderPlatformModel; * @typedef FyndOrderIdList * @property {string[]} [fynd_order_id] */ -/** - * @typedef GenerateInvoiceIDErrorResponse - * @property {GenerateInvoiceIDErrorResponseData[]} [items] - */ -/** - * @typedef GenerateInvoiceIDErrorResponseData - * @property {string} [error_message] - * @property {boolean} [invoice_id] - * @property {string} [shipment_id] - * @property {boolean} [success] - */ -/** - * @typedef GenerateInvoiceIDRequest - * @property {string[]} shipment_ids - */ -/** - * @typedef GenerateInvoiceIDResponse - * @property {GenerateInvoiceIDResponseData[]} [items] - */ -/** - * @typedef GenerateInvoiceIDResponseData - * @property {boolean} [error_message] - * @property {string} [invoice_id] - * @property {string} [shipment_id] - * @property {boolean} [success] - */ /** * @typedef GeneratePosOrderReceiptResponse * @property {string} [customer_cn_receipt] + * @property {string} [customer_cn_receipt_template] * @property {string} [invoice_receipt] + * @property {string} [invoice_receipt_template] * @property {string} [merchant_cn_receipt] * @property {string} [order_id] * @property {string} [payment_receipt] + * @property {string} [payment_receipt_template] * @property {boolean} [success] */ /** @@ -1006,13 +1075,6 @@ export = OrderPlatformModel; * @property {BagDetailsPlatformResponse[]} items * @property {BagsPage} page */ -/** - * @typedef GiftCard - * @property {string} [display_text] - * @property {string} [gift_message] - * @property {number} [gift_price] - * @property {boolean} [is_gift_applied] - */ /** * @typedef GSTDetailsData * @property {number} brand_calculated_amount @@ -1152,6 +1214,34 @@ export = OrderPlatformModel; * @typedef ItemCriterias * @property {number[]} [item_brand] */ +/** + * @typedef JobDetailsData + * @property {string} [batch_id] + * @property {string} [company_id] + * @property {number} [failed_shipments_count] + * @property {number} [processing_shipments_count] + * @property {string[]} [successful_shipment_ids] + * @property {number} [successful_shipments_count] + * @property {number} [total_shipments_count] + */ +/** + * @typedef JobDetailsResponse + * @property {string} [created_ts] + * @property {JobDetailsData[]} [data] + * @property {Object[]} [failed_records] + * @property {string} [file_url] + * @property {string} [message] + * @property {string} [status] + * @property {boolean} [success] + * @property {string} [uploaded_by] + * @property {string} [uploaded_on] + * @property {string} [user_id] + */ +/** + * @typedef JobFailedResponse + * @property {string} [file_name] + * @property {string} [url] + */ /** * @typedef LaneConfigResponse * @property {SuperLane[]} [super_lanes] @@ -1177,6 +1267,99 @@ export = OrderPlatformModel; * @property {boolean} [locked] * @property {boolean} [mto] */ +/** + * @typedef LogPaymentDetails + * @property {string} [amount_paid] + * @property {string} [payment_mode] + */ +/** + * @typedef LogsChannelDetails + * @property {string} [channel_id] + * @property {string} [channel_shipment_id] + * @property {string} [logo] + * @property {string} [name] + */ +/** + * @typedef Manifest + * @property {number} company_id + * @property {string} created_at + * @property {string} created_by + * @property {string} [created_ts] + * @property {Filters} [filters] + * @property {number} id + * @property {boolean} is_active + * @property {string} manifest_id + * @property {ManifestMeta} [meta] + * @property {PDFMeta} [pdf_meta] + * @property {string} status + * @property {string} uid + * @property {string} user_id + */ +/** + * @typedef ManifestDetails + * @property {number} [additional_shipment_count] + * @property {ManifestItemDetails[]} [items] + * @property {Manifest[]} [manifest_details] + * @property {ManifestPageInfo} [page] + */ +/** + * @typedef ManifestFile + * @property {string} [bucket] + * @property {string} [key] + * @property {string} [region] + */ +/** + * @typedef ManifestFiltersResponse + * @property {FiltersInfo[]} [advance_filter] + * @property {FiltersInfo[]} [global_filter] + */ +/** + * @typedef ManifestItemDetails + * @property {string} [awb_number] + * @property {string} [invoice_id] + * @property {string} order_id + * @property {number} [quantity] + * @property {string} [shipment_created_at] + * @property {string} shipment_id + */ +/** + * @typedef ManifestList + * @property {Manifest[]} [items] + * @property {ManifestPageInfo} [page] + */ +/** + * @typedef ManifestMediaUpdate + * @property {number} [code] + * @property {string} [entity] + * @property {ManifestFile} [file] + * @property {string} [link] + * @property {string} [media_type] + * @property {boolean} [status] + */ +/** + * @typedef ManifestMeta + * @property {Filters} [filters] + * @property {TotalShipmentPricesCount} [total_shipment_prices_count] + */ +/** + * @typedef ManifestPageInfo + * @property {number} current + * @property {boolean} has_next + * @property {boolean} has_previous + * @property {number} size + * @property {number} total + * @property {string} type + */ +/** + * @typedef ManifestShipmentListing + * @property {ManifestItemDetails[]} [items] + * @property {string} [lane] + * @property {string} [message] + * @property {ManifestPageInfo} page + * @property {number} status + * @property {boolean} success + * @property {number} total_count + */ /** * @typedef MarketPlacePdf * @property {string} [invoice] @@ -1190,7 +1373,7 @@ export = OrderPlatformModel; /** * @typedef OrderBagArticle * @property {Object} [identifiers] - * @property {ReturnConfig1} [return_config] + * @property {ReturnConfig} [return_config] * @property {string} [size] * @property {string} [uid] */ @@ -1243,6 +1426,7 @@ export = OrderPlatformModel; */ /** * @typedef OrderData + * @property {string} [created_ts] * @property {string} fynd_order_id * @property {Object} [meta] * @property {string} order_date @@ -1259,6 +1443,7 @@ export = OrderPlatformModel; * @typedef OrderDetailsData * @property {string} [affiliate_id] * @property {string} [cod_charges] + * @property {string} [created_ts] * @property {string} fynd_order_id * @property {Object} [meta] * @property {string} [order_date] @@ -1292,6 +1477,13 @@ export = OrderPlatformModel; * @property {OrderUser} shipping_address * @property {UserData} user */ +/** + * @typedef OrderingCurrency + * @property {string} [currency_code] + * @property {string} [currency_name] + * @property {string} [currency_sub_unit] + * @property {string} [currency_symbol] + */ /** * @typedef OrderingStoreDetails * @property {string} [address] @@ -1319,29 +1511,6 @@ export = OrderPlatformModel; * @property {boolean} [success] * @property {number} [total_count] */ -/** - * @typedef OrderMeta - * @property {BillingStaffDetails} [billing_staff_details] - * @property {number} [cart_id] - * @property {string} [cart_object_id] - * @property {string} [comment] - * @property {string} [company_logo] - * @property {string} [currency_symbol] - * @property {string} [customer_note] - * @property {string} [employee_id] - * @property {Object} [extra_meta] - * @property {Object[]} [files] - * @property {number} [mongo_cart_id] - * @property {string[]} [order_child_entities] - * @property {string} [order_platform] - * @property {Object[]} [order_tags] - * @property {string} [order_type] - * @property {number} [ordering_store] - * @property {string} [payment_type] - * @property {PlatformUserDetails} [platform_user_details] - * @property {Object} [staff] - * @property {TransactionData} [transaction_data] - */ /** * @typedef OrderPriority * @property {string} [affiliate_priority_code] @@ -1399,11 +1568,27 @@ export = OrderPlatformModel; * @typedef PageDetails * @property {number} [current] - Current page number * @property {boolean} [has_next] - If next page contains any result + * @property {boolean} [has_previous] - If previous page contains any result * @property {number} item_total - Total count of the results present in the * requested filter * @property {number} [size] - Page size * @property {string} [type] - Type of the page */ +/** + * @typedef PaginatedStates + * @property {StateManagerState[]} [items] + * @property {PaginationInfo} [page] + */ +/** + * @typedef PaginationInfo + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {number} [size] + * @property {number} [total] + * @property {string} [type] + */ /** * @typedef PaymentInfo * @property {PaymentMethod[]} [payment_methods] @@ -1444,6 +1629,11 @@ export = OrderPlatformModel; * @property {string} label_type * @property {string} [po_invoice] */ +/** + * @typedef PDFMeta + * @property {string} [consent] + * @property {ManifestMediaUpdate[]} [media_updates] + */ /** * @typedef PhoneDetails * @property {number} [country_code] @@ -1513,8 +1703,11 @@ export = OrderPlatformModel; * @typedef PlatformOrderItems * @property {PlatformBreakupValues[]} [breakup_values] * @property {PlatformChannel} [channel] + * @property {Currency} [currency] + * @property {CurrencyInfo} [currency_info] * @property {Object} [meta] * @property {string} [order_created_time] + * @property {string} [order_created_ts] * @property {string} [order_id] * @property {number} [order_value] * @property {string} [payment_mode] @@ -1536,6 +1729,8 @@ export = OrderPlatformModel; * @property {CompanyDetails} [company_details] * @property {Object} [coupon] * @property {string} [credit_note_id] + * @property {Currency} [currency] + * @property {CurrencyInfo} [currency_info] * @property {string} [custom_message] * @property {Object[]} [custom_meta] * @property {UserDetailsData} [delivery_details] @@ -1544,6 +1739,7 @@ export = OrderPlatformModel; * @property {DPDetailsData} [dp_details] * @property {boolean} [enable_dp_tracking] * @property {string} [estimated_sla_time] + * @property {string} [estimated_sla_ts] * @property {string} [forward_shipment_id] * @property {FulfillingStore} [fulfilling_store] * @property {number} [fulfilment_priority] @@ -1571,7 +1767,8 @@ export = OrderPlatformModel; * @property {string} [priority_text] * @property {PlatformDeliveryAddress} [rto_address] * @property {string} [shipment_created_at] - * @property {ShipmentDetails} [shipment_details] + * @property {string} [shipment_created_ts] + * @property {ShipmentLockDetails} [shipment_details] * @property {string} shipment_id * @property {string[]} [shipment_images] * @property {number} [shipment_quantity] @@ -1608,13 +1805,6 @@ export = OrderPlatformModel; * @property {string} [updated_at] * @property {string} [updated_time] */ -/** - * @typedef PlatformUserDetails - * @property {string} [platform_user_employee_code] - * @property {string} [platform_user_first_name] - * @property {string} [platform_user_id] - * @property {string} [platform_user_last_name] - */ /** * @typedef PointBlankOtpData * @property {string} [message] @@ -1679,6 +1869,27 @@ export = OrderPlatformModel; * @property {Object} [dp_pickup_slot] * @property {string} [pack_by_date] */ +/** + * @typedef ProcessManifest + * @property {string} action + * @property {FiltersRequest} filters + * @property {string} [manifest_id] + * @property {string} unique_id + */ +/** + * @typedef ProcessManifestItemResponse + * @property {ProcessManifestResponse} [items] + */ +/** + * @typedef ProcessManifestResponse + * @property {string} [action] + * @property {number} [company_id] + * @property {string} [created_by] + * @property {Filters} [filters] + * @property {string} [manifest_id] + * @property {string} [uid] + * @property {string} [user_id] + */ /** * @typedef Products * @property {string} [identifier] - Product/Bag Article/Item Identifier @@ -1773,12 +1984,6 @@ export = OrderPlatformModel; * @property {number} [time] * @property {string} [unit] */ -/** - * @typedef ReturnConfig1 - * @property {boolean} [returnable] - * @property {number} [time] - * @property {string} [unit] - */ /** * @typedef RoleBaseStateTransitionMapping * @property {string[]} [next_statuses] @@ -1811,6 +2016,18 @@ export = OrderPlatformModel; * @property {number} [priority] * @property {ProcessingDates} [processing_dates] */ +/** + * @typedef ShipmentActionInfo + * @property {Object} [failed_invoiced_shipments] + * @property {Object[]} [failed_shipments] + * @property {string[]} [invoice] + * @property {string[]} [invoiceable_shipments] + * @property {string[]} [label] + * @property {string[]} [processing_invoice_shipments] + * @property {string[]} [processing_shipments] + * @property {string[]} [successful_invoiced_shipments] + * @property {string[]} [successful_shipments] + */ /** * @typedef ShipmentBagReasons * @property {BagReasons[]} [reasons] @@ -1842,14 +2059,11 @@ export = OrderPlatformModel; */ /** * @typedef ShipmentDetails - * @property {Object} [action_to_status] * @property {string} affiliate_shipment_id * @property {ArticleDetails[]} articles * @property {string} [box_type] * @property {number} [dp_id] * @property {number} fulfillment_id - * @property {string} [lock_message] - * @property {boolean} [lock_status] * @property {Object} [meta] * @property {number} shipments */ @@ -1878,15 +2092,19 @@ export = OrderPlatformModel; * @property {BagUnit[]} [bags] * @property {boolean} [can_process] * @property {ShipmentListingChannel} [channel] + * @property {Currency} [currency] + * @property {CurrencyInfo} [currency_info] * @property {string} [customer_note] * @property {PlatformDeliveryAddress} [delivery_address] * @property {string} [display_name] * @property {string} [estimated_sla_time] + * @property {string} [estimated_sla_ts] * @property {ShipmentItemFulFillingStore} [fulfilling_store] * @property {string} [invoice_id] * @property {boolean} [lock_status] * @property {Object} [meta] * @property {string} [mode_of_payment] + * @property {string} [order_created_ts] * @property {string} [order_date] * @property {string} order_id * @property {string} [ordering_channnel] @@ -1895,16 +2113,18 @@ export = OrderPlatformModel; * @property {string} [previous_shipment_id] * @property {Prices} [prices] * @property {string} shipment_created_at + * @property {string} [shipment_created_ts] * @property {string} [shipment_id] * @property {ShipmentStatus} [shipment_status] * @property {string} [status_created_at] + * @property {string} [status_created_ts] * @property {number} total_bags * @property {UserDataInfo} [user] */ /** * @typedef ShipmentItemFulFillingStore * @property {string} [address] - * @property {string} [brand_store_tags] + * @property {string[]} [brand_store_tags] * @property {string} [city] * @property {string} code * @property {number} id @@ -1915,39 +2135,7 @@ export = OrderPlatformModel; * @property {string} [pincode] * @property {string} [state] * @property {string} [store_email] - */ -/** - * @typedef ShipmentItemMeta - * @property {string} [activity_comment] - * @property {boolean} [assign_dp_from_sb] - * @property {boolean} auto_trigger_dp_assignment_acf - * @property {Object} [bag_weight] - * @property {Object} [debug_info] - * @property {Object} [dp_options] - * @property {string} [dp_sort_key] - * @property {Object} [ewaybill_info] - * @property {string[]} [existing_dp_list] - * @property {Object} [external] - * @property {Formatted} [formatted] - * @property {string} [fulfilment_priority_text] - * @property {boolean} [is_international] - * @property {boolean} [is_self_ship] - * @property {LockData} [lock_data] - * @property {string} [order_type] - * @property {string} [packaging_name] - * @property {string} [parent_dp_id] - * @property {Object[]} [pdf_media] - * @property {boolean} [same_store_available] - * @property {number} [shipment_chargeable_weight] - * @property {ShipmentTags[]} [shipment_tags] - * @property {number} [shipment_volumetric_weight] - * @property {number} [shipment_weight] - * @property {string} [shipping_zone] - * @property {number} [sla] - * @property {string} [store_invoice_updated_date] - * @property {Object[]} [tags] - * @property {ShipmentTimeStamp} [timestamp] - * @property {number} [weight] + * @property {string[]} [tags] */ /** * @typedef ShipmentListingBrand @@ -1963,6 +2151,12 @@ export = OrderPlatformModel; * @property {string} [logo] * @property {string} [name] */ +/** + * @typedef ShipmentLockDetails + * @property {Object} [action_to_status] + * @property {string} [lock_message] + * @property {boolean} [lock_status] + */ /** * @typedef ShipmentMeta * @property {boolean} [assign_dp_from_sb] @@ -2048,18 +2242,21 @@ export = OrderPlatformModel; * @typedef ShipmentStatus * @property {string[]} [bag_list] * @property {string} [created_at] + * @property {string} [created_ts] * @property {string} [current_shipment_status] * @property {Object} [meta] * @property {string} [shipment_id] * @property {number} [shipment_status_id] * @property {string} status * @property {string} [status_created_at] + * @property {string} [status_created_ts] * @property {string} title */ /** * @typedef ShipmentStatusData * @property {string[]} [bag_list] * @property {string} [created_at] + * @property {string} [created_ts] * @property {string} [current_shipment_status] * @property {string} [display_name] * @property {number} [id] @@ -2080,17 +2277,18 @@ export = OrderPlatformModel; */ /** * @typedef ShippingInfo + * @property {string} [address] * @property {string} [address_type] - * @property {string} address1 + * @property {string} [address1] * @property {string} [address2] * @property {string} [alternate_email] * @property {string} [alternate_mobile_number] - * @property {string} city - * @property {string} country + * @property {string} [city] + * @property {string} [country] * @property {string} [country_code] * @property {string} [customer_code] * @property {string} [external_customer_code] - * @property {string} first_name + * @property {string} [first_name] * @property {string} [floor_no] * @property {string} [gender] * @property {Object} [geo_location] @@ -2098,12 +2296,12 @@ export = OrderPlatformModel; * @property {string} [landmark] * @property {string} [last_name] * @property {string} [middle_name] - * @property {string} pincode - * @property {string} primary_email - * @property {string} primary_mobile_number + * @property {string} [pincode] + * @property {string} [primary_email] + * @property {string} [primary_mobile_number] * @property {string} [shipping_type] * @property {Object[]} [slot] - * @property {string} state + * @property {string} [state] * @property {string} [state_code] * @property {string} [title] */ @@ -2120,6 +2318,46 @@ export = OrderPlatformModel; * @property {number} phone_number - Phone number for communication * @property {number} shipment_id - ShipmentId */ +/** + * @typedef StateManagerFilter + * @property {string} [default_value] + * @property {string} [description] + * @property {string} [display_name] + * @property {number} [id] + * @property {string} [name] + * @property {Object} [options] + * @property {string} [type] + */ +/** + * @typedef StateManagerState + * @property {string} [app_display_name] - The application display name + * @property {boolean} [app_facing] - Whether state is for app facing or not + * @property {number} [id] - Unique identifier for the state + * @property {boolean} [is_active] - Whether state is active or not + * @property {string} [journey_type] - Type of the journey + * @property {string} [platform_display_name] - The platform display name + * @property {string} [state] - The name of the state + * @property {string} [state_type] - Type of the state + */ +/** + * @typedef StateManagerTask + * @property {string} [description] + * @property {string} [display_name] + * @property {string} [doc_string] + * @property {number} [id] + * @property {Object} [kwargs] + * @property {string} [name] + */ +/** + * @typedef StateTransitionFlag + * @property {string} [default_value] + * @property {string} [description] + * @property {string} [display_name] + * @property {number} [id] + * @property {string} [name] + * @property {Object} [options] + * @property {string} [type] + */ /** * @typedef StatuesRequest * @property {string} [exclude_bags_next_state] - State to be change for @@ -2282,25 +2520,30 @@ export = OrderPlatformModel; * @property {string} [gstin] * @property {string} [pan_no] */ +/** + * @typedef TemplateDownloadResponse + * @property {string} [file_name] + * @property {string} [url] + */ +/** + * @typedef Templates + * @property {string} [text] + * @property {string} [value] + */ +/** + * @typedef TotalShipmentPricesCount + * @property {number} [shipment_count] + * @property {number} [total_price] + */ /** * @typedef TrackingList + * @property {string} [created_ts] * @property {boolean} [is_current] * @property {boolean} [is_passed] * @property {string} status * @property {string} text * @property {string} [time] */ -/** - * @typedef TransactionData - * @property {number} [amount_paid] - * @property {string} [currency] - * @property {string} [entity] - * @property {string} [payment_id] - * @property {string} [status] - * @property {string} [terminal_id] - * @property {string} [transaction_id] - * @property {string} [unique_reference_number] - */ /** * @typedef UpdatePackagingDimensionsPayload * @property {string} current_status @@ -2374,12 +2617,15 @@ export = OrderPlatformModel; * @property {string} [area] * @property {string} city * @property {string} country + * @property {string} [country_iso_code] + * @property {string} [country_phone_code] * @property {string} [email] * @property {string} [landmark] * @property {string} name * @property {string} phone * @property {string} pincode * @property {string} state + * @property {string} [state_code] */ /** * @typedef UserInfo @@ -2425,7 +2671,7 @@ export = OrderPlatformModel; declare class OrderPlatformModel { } declare namespace OrderPlatformModel { - export { ActionInfo, AdvanceFilterInfo, Affiliate, AffiliateAppConfig, AffiliateAppConfigMeta, AffiliateBag, AffiliateBagDetails, AffiliateBagsDetails, AffiliateConfig, AffiliateDetails, AffiliateInventoryArticleAssignmentConfig, AffiliateInventoryConfig, AffiliateInventoryLogisticsConfig, AffiliateInventoryOrderConfig, AffiliateInventoryPaymentConfig, AffiliateInventoryStoreConfig, AffiliateMeta, AffiliateStoreIdMapping, AnnouncementResponse, AnnouncementsResponse, AppliedPromos, Article, ArticleDetails, AttachOrderUser, AttachOrderUserResponse, AttachUserInfo, AttachUserOtpData, Attributes, B2BPODetails, BagConfigs, BagDetailsPlatformResponse, BagGST, BagGSTDetails, BagMeta, BagPaymentMethods, BagReasonMeta, BagReasons, BagReturnableCancelableStatus, BagReturnableCancelableStatus1, Bags, BagsPage, BagStateMapper, BagStateTransitionMap, BagStatusHistory, BagUnit, BaseResponse, BillingInfo, BillingStaffDetails, Brand, BulkActionTemplate, BulkActionTemplateResponse, BulkReportsDownloadFailedResponse, BulkReportsDownloadRequest, BulkReportsDownloadResponse, BuyerDetails, BuyRules, Charge, CheckResponse, Click2CallResponse, CompanyDetails, ContactDetails, CourierPartnerTrackingDetails, CourierPartnerTrackingResponse, CreateChannelConfig, CreateChannelConfigData, CreateChannelConfigResponse, CreateChannelConifgErrorResponse, CreateChannelPaymentInfo, CreateOrderAPI, CreateOrderErrorReponse, CreateOrderPayload, CreateOrderResponse, CreditBalanceInfo, CurrentStatus, DataUpdates, Dates, DebugInfo, Dimension, Dimensions, DiscountRules, DispatchManifest, Document, DpConfiguration, DPDetailsData, EinvoiceInfo, EInvoicePortalDetails, EInvoiceResponseData, EInvoiceRetry, EInvoiceRetryResponse, EInvoiceRetryShipmentData, Entities, EntitiesDataUpdates, EntitiesReasons, EntityReasonData, Error, ErrorDetail, ErrorResponse, FetchCreditBalanceRequestPayload, FetchCreditBalanceResponsePayload, FileResponse, FilterInfoOption, FiltersInfo, FiltersResponse, FinancialBreakup, Formatted, FulfillingStore, FyndOrderIdList, GenerateInvoiceIDErrorResponse, GenerateInvoiceIDErrorResponseData, GenerateInvoiceIDRequest, GenerateInvoiceIDResponse, GenerateInvoiceIDResponseData, GeneratePosOrderReceiptResponse, GetActionsResponse, GetBagsPlatformResponse, GiftCard, GSTDetailsData, HistoryDict, HistoryMeta, HistoryReason, Identifier, InvalidateShipmentCacheNestedResponse, InvalidateShipmentCachePayload, InvalidateShipmentCacheResponse, InvoiceInfo, Item, ItemCriterias, LaneConfigResponse, LineItem, LocationDetails, LockData, MarketPlacePdf, Meta, OrderBagArticle, OrderBags, OrderBrandName, OrderConfig, OrderData, OrderDetails, OrderDetailsData, OrderDetailsResponse, OrderInfo, OrderingStoreDetails, OrderItemDataUpdates, OrderListingResponse, OrderMeta, OrderPriority, OrderStatus, OrderStatusData, OrderStatusResult, OrderUser, OriginalFilter, Page, PageDetails, PaymentInfo, PaymentMethod, PaymentMethods, PDFLinks, PhoneDetails, PlatformArticleAttributes, PlatformBreakupValues, PlatformChannel, PlatformDeliveryAddress, PlatformItem, PlatformOrderItems, PlatformOrderUpdate, PlatformShipment, PlatformShipmentReasonsResponse, PlatformShipmentTrack, PlatformTrack, PlatformUserDetails, PointBlankOtpData, PostActivityHistory, PostHistoryData, PostHistoryDict, PostHistoryFilters, PostShipmentHistory, Prices, ProcessingDates, Products, ProductsDataUpdates, ProductsDataUpdatesFilters, ProductsReasons, ProductsReasonsData, ProductsReasonsFilters, QuestionSet, Reason, ReasonsData, RefundModeConfigRequestPayload, RefundModeConfigResponsePayload, RefundModeInfo, RefundOption, ReplacementDetails, ResponseDetail, ReturnConfig, ReturnConfig1, RoleBaseStateTransitionMapping, SendSmsPayload, SendUserMobileOTP, SendUserMobileOtpResponse, Shipment, ShipmentBagReasons, ShipmentConfig, ShipmentData, ShipmentDetail, ShipmentDetails, ShipmentHistoryResponse, ShipmentInfoResponse, ShipmentInternalPlatformViewResponse, ShipmentItem, ShipmentItemFulFillingStore, ShipmentItemMeta, ShipmentListingBrand, ShipmentListingChannel, ShipmentMeta, ShipmentPayments, ShipmentReasonsResponse, ShipmentResponseReasons, ShipmentsRequest, ShipmentsResponse, ShipmentStatus, ShipmentStatusData, ShipmentTags, ShipmentTimeStamp, ShippingInfo, SmsDataPayload, StatuesRequest, StatuesResponse, Store, StoreAddress, StoreDocuments, StoreEinvoice, StoreEwaybill, StoreGstCredentials, StoreMeta, StoreReassign, StoreReassignResponse, SubLane, SuccessResponse, SuperLane, Tax, TaxDetails, TaxInfo, TrackingList, TransactionData, UpdatePackagingDimensionsPayload, UpdatePackagingDimensionsResponse, UpdateShipmentLockPayload, UpdateShipmentLockResponse, UpdateShipmentStatusRequest, UpdateShipmentStatusResponseBody, UploadConsent, URL, UserData, UserDataInfo, UserDetailsData, UserInfo, VerifyMobileOTP, VerifyOtpData, VerifyOtpResponse, VerifyOtpResponseData, Weight }; + export { ActionInfo, AdvanceFilterInfo, Affiliate, AffiliateAppConfig, AffiliateAppConfigMeta, AffiliateBag, AffiliateBagDetails, AffiliateBagsDetails, AffiliateConfig, AffiliateDetails, AffiliateInventoryArticleAssignmentConfig, AffiliateInventoryConfig, AffiliateInventoryLogisticsConfig, AffiliateInventoryOrderConfig, AffiliateInventoryPaymentConfig, AffiliateInventoryStoreConfig, AffiliateMeta, AffiliateStoreIdMapping, AllowedTemplatesResponse, AnnouncementResponse, AnnouncementsResponse, AppliedPromos, Article, ArticleDetails, ArticleStatusDetails, AttachOrderUser, AttachOrderUserResponse, AttachUserInfo, AttachUserOtpData, Attributes, BagConfigs, BagDetailsPlatformResponse, BagPaymentMethods, BagReasonMeta, BagReasons, BagReturnableCancelableStatus, Bags, BagsPage, BagStateMapper, BagStateTransitionMap, BagStatusHistory, BagUnit, BaseResponse, BillingInfo, Brand, BulkActionListingData, BulkActionTemplate, BulkActionTemplateResponse, BulkFailedResponse, BulkListingResponse, BulkListinPage, BulkReportsDownloadRequest, BulkReportsDownloadResponse, BulkStateTransistionRequest, BulkStateTransistionResponse, BuyerDetails, BuyRules, Charge, CheckResponse, Click2CallResponse, CompanyDetails, ContactDetails, ConversionRate, CourierPartnerTrackingDetails, CourierPartnerTrackingResponse, CreateChannelConfig, CreateChannelConfigData, CreateChannelConfigResponse, CreateChannelConifgErrorResponse, CreateChannelPaymentInfo, CreateOrderAPI, CreateOrderErrorReponse, CreateOrderPayload, CreateOrderResponse, CreditBalanceInfo, Currency, CurrencyInfo, CurrentStatus, DataUpdates, DateRange, Dates, DebugInfo, Dimension, Dimensions, DiscountRules, DispatchManifest, Document, DpConfiguration, DPDetailsData, EInvoiceDetails, EInvoiceErrorDetails, EInvoiceErrorInfo, EInvoiceErrorResponse, EInvoiceErrorResponseData, EInvoiceErrorResponseDetails, EinvoiceInfo, EInvoiceIrnDetails, EInvoicePortalDetails, EInvoiceResponseData, EInvoiceRetry, EInvoiceRetryResponse, EInvoiceRetryShipmentData, Entities, EntitiesDataUpdates, EntitiesReasons, EntityReasonData, Error, ErrorDetail, ErrorResponse, FailedOrderLogDetails, FailedOrderLogs, FailedOrdersItem, FetchCreditBalanceRequestPayload, FetchCreditBalanceResponsePayload, FileResponse, FilterInfoOption, Filters, FiltersInfo, FiltersRequest, FiltersResponse, FinancialBreakup, Formatted, FulfillingStore, FyndOrderIdList, GeneratePosOrderReceiptResponse, GetActionsResponse, GetBagsPlatformResponse, GSTDetailsData, HistoryDict, HistoryMeta, HistoryReason, Identifier, InvalidateShipmentCacheNestedResponse, InvalidateShipmentCachePayload, InvalidateShipmentCacheResponse, InvoiceInfo, Item, ItemCriterias, JobDetailsData, JobDetailsResponse, JobFailedResponse, LaneConfigResponse, LineItem, LocationDetails, LockData, LogPaymentDetails, LogsChannelDetails, Manifest, ManifestDetails, ManifestFile, ManifestFiltersResponse, ManifestItemDetails, ManifestList, ManifestMediaUpdate, ManifestMeta, ManifestPageInfo, ManifestShipmentListing, MarketPlacePdf, Meta, OrderBagArticle, OrderBags, OrderBrandName, OrderConfig, OrderData, OrderDetails, OrderDetailsData, OrderDetailsResponse, OrderInfo, OrderingCurrency, OrderingStoreDetails, OrderItemDataUpdates, OrderListingResponse, OrderPriority, OrderStatus, OrderStatusData, OrderStatusResult, OrderUser, OriginalFilter, Page, PageDetails, PaginatedStates, PaginationInfo, PaymentInfo, PaymentMethod, PaymentMethods, PDFLinks, PDFMeta, PhoneDetails, PlatformArticleAttributes, PlatformBreakupValues, PlatformChannel, PlatformDeliveryAddress, PlatformItem, PlatformOrderItems, PlatformOrderUpdate, PlatformShipment, PlatformShipmentReasonsResponse, PlatformShipmentTrack, PlatformTrack, PointBlankOtpData, PostActivityHistory, PostHistoryData, PostHistoryDict, PostHistoryFilters, PostShipmentHistory, Prices, ProcessingDates, ProcessManifest, ProcessManifestItemResponse, ProcessManifestResponse, Products, ProductsDataUpdates, ProductsDataUpdatesFilters, ProductsReasons, ProductsReasonsData, ProductsReasonsFilters, QuestionSet, Reason, ReasonsData, RefundModeConfigRequestPayload, RefundModeConfigResponsePayload, RefundModeInfo, RefundOption, ReplacementDetails, ResponseDetail, ReturnConfig, RoleBaseStateTransitionMapping, SendSmsPayload, SendUserMobileOTP, SendUserMobileOtpResponse, Shipment, ShipmentActionInfo, ShipmentBagReasons, ShipmentConfig, ShipmentData, ShipmentDetail, ShipmentDetails, ShipmentHistoryResponse, ShipmentInfoResponse, ShipmentInternalPlatformViewResponse, ShipmentItem, ShipmentItemFulFillingStore, ShipmentListingBrand, ShipmentListingChannel, ShipmentLockDetails, ShipmentMeta, ShipmentPayments, ShipmentReasonsResponse, ShipmentResponseReasons, ShipmentsRequest, ShipmentsResponse, ShipmentStatus, ShipmentStatusData, ShipmentTags, ShipmentTimeStamp, ShippingInfo, SmsDataPayload, StateManagerFilter, StateManagerState, StateManagerTask, StateTransitionFlag, StatuesRequest, StatuesResponse, Store, StoreAddress, StoreDocuments, StoreEinvoice, StoreEwaybill, StoreGstCredentials, StoreMeta, StoreReassign, StoreReassignResponse, SubLane, SuccessResponse, SuperLane, Tax, TaxDetails, TaxInfo, TemplateDownloadResponse, Templates, TotalShipmentPricesCount, TrackingList, UpdatePackagingDimensionsPayload, UpdatePackagingDimensionsResponse, UpdateShipmentLockPayload, UpdateShipmentLockResponse, UpdateShipmentStatusRequest, UpdateShipmentStatusResponseBody, UploadConsent, URL, UserData, UserDataInfo, UserDetailsData, UserInfo, VerifyMobileOTP, VerifyOtpData, VerifyOtpResponse, VerifyOtpResponseData, Weight }; } /** @returns {ActionInfo} */ declare function ActionInfo(): ActionInfo; @@ -2598,6 +2844,11 @@ type AffiliateStoreIdMapping = { marketplace_store_id: string; store_id: number; }; +/** @returns {AllowedTemplatesResponse} */ +declare function AllowedTemplatesResponse(): AllowedTemplatesResponse; +type AllowedTemplatesResponse = { + template_x_slug?: Templates[]; +}; /** @returns {AnnouncementResponse} */ declare function AnnouncementResponse(): AnnouncementResponse; type AnnouncementResponse = { @@ -2659,9 +2910,13 @@ type ArticleDetails = { category: any; dimension: any; quantity: number; - status?: any; weight: any; }; +/** @returns {ArticleStatusDetails} */ +declare function ArticleStatusDetails(): ArticleStatusDetails; +type ArticleStatusDetails = { + status?: any; +}; /** @returns {AttachOrderUser} */ declare function AttachOrderUser(): AttachOrderUser; type AttachOrderUser = { @@ -2701,16 +2956,6 @@ type Attributes = { primary_color_hex?: string; primary_material?: string; }; -/** @returns {B2BPODetails} */ -declare function B2BPODetails(): B2BPODetails; -type B2BPODetails = { - docker_number?: string; - item_base_price?: number; - partial_can_ret?: boolean; - po_line_amount?: number; - po_tax_amount?: number; - total_gst_percentage?: number; -}; /** @returns {BagConfigs} */ declare function BagConfigs(): BagConfigs; type BagConfigs = { @@ -2728,7 +2973,7 @@ type BagDetailsPlatformResponse = { affiliate_details?: AffiliateDetails; applied_promos?: any[]; article?: Article; - article_details?: ArticleDetails; + article_details?: ArticleStatusDetails; bag_status?: BagStatusHistory[]; bag_status_history?: BagStatusHistory; bag_update_time?: number; @@ -2760,62 +3005,10 @@ type BagDetailsPlatformResponse = { restore_promos?: any; seller_identifier?: string; shipment_id?: string; - status?: BagReturnableCancelableStatus1; + status?: BagReturnableCancelableStatus; tags?: string[]; type?: string; }; -/** @returns {BagGST} */ -declare function BagGST(): BagGST; -type BagGST = { - brand_calculated_amount?: number; - cgst_gst_fee?: string; - cgst_tax_percentage?: number; - gst_fee?: number; - gst_tag?: string; - gst_tax_percentage?: number; - gstin_code?: string; - hsn_code?: string; - hsn_code_id?: string; - igst_gst_fee?: string; - igst_tax_percentage?: number; - is_default_hsn_code?: boolean; - sgst_gst_fee?: string; - sgst_tax_percentage?: number; - tax_collected_at_source?: number; - value_of_good?: number; -}; -/** @returns {BagGSTDetails} */ -declare function BagGSTDetails(): BagGSTDetails; -type BagGSTDetails = { - brand_calculated_amount: number; - cgst_gst_fee: string; - cgst_tax_percentage: number; - gst_fee: number; - gst_tag: string; - gst_tax_percentage: number; - gstin_code?: string; - hsn_code: string; - hsn_code_id: string; - igst_gst_fee: string; - igst_tax_percentage: number; - is_default_hsn_code?: boolean; - sgst_gst_fee: string; - sgst_tax_percentage: number; - tax_collected_at_source: number; - value_of_good: number; -}; -/** @returns {BagMeta} */ -declare function BagMeta(): BagMeta; -type BagMeta = { - b2b_po_details?: B2BPODetails; - custom_json?: any; - custom_message?: string; - docket_number?: string; - extra_meta?: any; - gift_card?: GiftCard; - group_id?: string; - partial_can_ret?: boolean; -}; /** @returns {BagPaymentMethods} */ declare function BagPaymentMethods(): BagPaymentMethods; type BagPaymentMethods = { @@ -2846,15 +3039,6 @@ type BagReturnableCancelableStatus = { is_customer_return_allowed: boolean; is_returnable: boolean; }; -/** @returns {BagReturnableCancelableStatus1} */ -declare function BagReturnableCancelableStatus1(): BagReturnableCancelableStatus1; -type BagReturnableCancelableStatus1 = { - can_be_cancelled: boolean; - enable_tracking: boolean; - is_active: boolean; - is_customer_return_allowed: boolean; - is_returnable: boolean; -}; /** @returns {Bags} */ declare function Bags(): Bags; type Bags = { @@ -2914,6 +3098,7 @@ type BagStatusHistory = { bag_state_mapper?: BagStateMapper; bsh_id?: number; created_at?: string; + created_ts?: string; delivery_awb_number?: string; delivery_partner_id?: number; display_name?: string; @@ -2926,6 +3111,7 @@ type BagStatusHistory = { status: string; store_id?: number; updated_at?: string; + updated_ts?: string; }; /** @returns {BagUnit} */ declare function BagUnit(): BagUnit; @@ -2964,37 +3150,29 @@ type BaseResponse = { /** @returns {BillingInfo} */ declare function BillingInfo(): BillingInfo; type BillingInfo = { - address1: string; + address?: string; + address1?: string; address2?: string; alternate_email?: string; alternate_mobile_number?: string; - city: string; - country: string; + city?: string; + country?: string; country_code?: string; customer_code?: string; external_customer_code?: string; - first_name: string; + first_name?: string; floor_no?: string; gender?: string; house_no?: string; last_name?: string; middle_name?: string; - pincode: string; - primary_email: string; - primary_mobile_number: string; - state: string; + pincode?: string; + primary_email?: string; + primary_mobile_number?: string; + state?: string; state_code?: string; title?: string; }; -/** @returns {BillingStaffDetails} */ -declare function BillingStaffDetails(): BillingStaffDetails; -type BillingStaffDetails = { - employee_code?: string; - first_name?: string; - last_name?: string; - staff_id?: number; - user?: string; -}; /** @returns {Brand} */ declare function Brand(): Brand; type Brand = { @@ -3012,6 +3190,34 @@ type Brand = { script_last_ran?: string; start_date?: string; }; +/** @returns {BulkActionListingData} */ +declare function BulkActionListingData(): BulkActionListingData; +type BulkActionListingData = { + batch_id?: string; + bulk_action_type?: string; + company_id?: number; + created_ts?: string; + do_invoice_label_generated?: boolean; + file_name?: string; + file_url?: string; + id?: number; + invoice_document_type?: string; + invoice_status?: string; + is_invoiceable?: boolean; + label_document_type?: string; + last_selected_invoice_label_type?: string; + meta?: any; + shipments_action_info?: ShipmentActionInfo; + status?: boolean; + store_code?: string; + store_id?: number; + store_name?: string; + updated_ts?: number; + uploaded_by?: string; + uploaded_on?: string; + user_id?: string; + user_name?: string; +}; /** @returns {BulkActionTemplate} */ declare function BulkActionTemplate(): BulkActionTemplate; type BulkActionTemplate = { @@ -3026,12 +3232,31 @@ type BulkActionTemplateResponse = { */ template_x_slug?: BulkActionTemplate[]; }; -/** @returns {BulkReportsDownloadFailedResponse} */ -declare function BulkReportsDownloadFailedResponse(): BulkReportsDownloadFailedResponse; -type BulkReportsDownloadFailedResponse = { +/** @returns {BulkFailedResponse} */ +declare function BulkFailedResponse(): BulkFailedResponse; +type BulkFailedResponse = { error?: string; status?: boolean; }; +/** @returns {BulkListingResponse} */ +declare function BulkListingResponse(): BulkListingResponse; +type BulkListingResponse = { + data?: BulkActionListingData[]; + page?: BulkListinPage; + success?: boolean; + total_count?: number; +}; +/** @returns {BulkListinPage} */ +declare function BulkListinPage(): BulkListinPage; +type BulkListinPage = { + current?: number; + has_next?: boolean; + has_previous?: boolean; + item_total?: number; + size?: number; + total?: number; + type?: string; +}; /** @returns {BulkReportsDownloadRequest} */ declare function BulkReportsDownloadRequest(): BulkReportsDownloadRequest; type BulkReportsDownloadRequest = { @@ -3040,13 +3265,16 @@ type BulkReportsDownloadRequest = { * - Download report with specific headers */ custom_headers?: string; + /** + * - UTC end date in ISO format + */ + end_date?: string; /** * - Download for specific enitites, entities * can be bag, shipment or order_id, etc. */ entities?: string[]; filter_type?: string; - from_date?: string; /** * - Download lanes for cross company. */ @@ -3056,11 +3284,14 @@ type BulkReportsDownloadRequest = { * - Type of report */ report_type?: string; + /** + * - UTC start date in ISO format + */ + start_date?: string; /** * - Download for specific store ids. */ store_ids?: string[]; - to_date?: string; }; /** @returns {BulkReportsDownloadResponse} */ declare function BulkReportsDownloadResponse(): BulkReportsDownloadResponse; @@ -3068,6 +3299,19 @@ type BulkReportsDownloadResponse = { batch_id?: string; success?: boolean; }; +/** @returns {BulkStateTransistionRequest} */ +declare function BulkStateTransistionRequest(): BulkStateTransistionRequest; +type BulkStateTransistionRequest = { + file_name?: string; + url?: string; +}; +/** @returns {BulkStateTransistionResponse} */ +declare function BulkStateTransistionResponse(): BulkStateTransistionResponse; +type BulkStateTransistionResponse = { + batch_id?: string; + message?: string; + status?: boolean; +}; /** @returns {BuyerDetails} */ declare function BuyerDetails(): BuyerDetails; type BuyerDetails = { @@ -3160,6 +3404,12 @@ type ContactDetails = { emails?: string[]; phone?: PhoneDetails[]; }; +/** @returns {ConversionRate} */ +declare function ConversionRate(): ConversionRate; +type ConversionRate = { + base?: string; + rates?: any; +}; /** @returns {CourierPartnerTrackingDetails} */ declare function CourierPartnerTrackingDetails(): CourierPartnerTrackingDetails; type CourierPartnerTrackingDetails = { @@ -3306,12 +3556,25 @@ type CreditBalanceInfo = { reason?: string; total_credited_balance?: string; }; +/** @returns {Currency} */ +declare function Currency(): Currency; +type Currency = { + currency_code?: string; + currency_symbol?: string; +}; +/** @returns {CurrencyInfo} */ +declare function CurrencyInfo(): CurrencyInfo; +type CurrencyInfo = { + conversion_rate?: ConversionRate; + ordering_currency?: OrderingCurrency; +}; /** @returns {CurrentStatus} */ declare function CurrentStatus(): CurrentStatus; type CurrentStatus = { bag_id?: number; bag_state_mapper?: BagStateMapper; created_at?: string; + created_ts?: string; delivery_awb_number?: string; delivery_partner_id?: number; id: number; @@ -3330,6 +3593,12 @@ type DataUpdates = { order_item_status?: OrderItemDataUpdates[]; products?: ProductsDataUpdates[]; }; +/** @returns {DateRange} */ +declare function DateRange(): DateRange; +type DateRange = { + from_date?: string; + to_date?: string; +}; /** @returns {Dates} */ declare function Dates(): Dates; type Dates = { @@ -3396,12 +3665,59 @@ type DPDetailsData = { pincode?: string; track_url?: string; }; +/** @returns {EInvoiceDetails} */ +declare function EInvoiceDetails(): EInvoiceDetails; +type EInvoiceDetails = { + error_details?: EInvoiceErrorDetails[]; + irn_details?: EInvoiceIrnDetails; +}; +/** @returns {EInvoiceErrorDetails} */ +declare function EInvoiceErrorDetails(): EInvoiceErrorDetails; +type EInvoiceErrorDetails = { + error_code?: string; + error_message: string; +}; +/** @returns {EInvoiceErrorInfo} */ +declare function EInvoiceErrorInfo(): EInvoiceErrorInfo; +type EInvoiceErrorInfo = { + error_details?: EInvoiceErrorDetails[]; +}; +/** @returns {EInvoiceErrorResponse} */ +declare function EInvoiceErrorResponse(): EInvoiceErrorResponse; +type EInvoiceErrorResponse = { + message?: string; + response_data?: EInvoiceErrorResponseData[]; +}; +/** @returns {EInvoiceErrorResponseData} */ +declare function EInvoiceErrorResponseData(): EInvoiceErrorResponseData; +type EInvoiceErrorResponseData = { + einvoice_info?: EInvoiceErrorInfo; + einvoice_type: string; + message: string; + shipment_id: string; + status: number; +}; +/** @returns {EInvoiceErrorResponseDetails} */ +declare function EInvoiceErrorResponseDetails(): EInvoiceErrorResponseDetails; +type EInvoiceErrorResponseDetails = { + message?: string; + response_data: EInvoiceErrorResponseData[]; +}; /** @returns {EinvoiceInfo} */ declare function EinvoiceInfo(): EinvoiceInfo; type EinvoiceInfo = { credit_note?: any; invoice?: any; }; +/** @returns {EInvoiceIrnDetails} */ +declare function EInvoiceIrnDetails(): EInvoiceIrnDetails; +type EInvoiceIrnDetails = { + ack_dt: string; + ack_no: string; + irn: string; + signed_invoice: string; + signed_qr_code: string; +}; /** @returns {EInvoicePortalDetails} */ declare function EInvoicePortalDetails(): EInvoicePortalDetails; type EInvoicePortalDetails = { @@ -3412,14 +3728,11 @@ type EInvoicePortalDetails = { /** @returns {EInvoiceResponseData} */ declare function EInvoiceResponseData(): EInvoiceResponseData; type EInvoiceResponseData = { - ack_dt?: string; - ack_no?: string; - irn?: string; + einvoice_info?: EInvoiceDetails; + einvoice_type: string; message: string; shipment_id: string; - success: boolean; - timeout?: number; - timeout_unit?: string; + status: number; }; /** @returns {EInvoiceRetry} */ declare function EInvoiceRetry(): EInvoiceRetry; @@ -3429,14 +3742,12 @@ type EInvoiceRetry = { /** @returns {EInvoiceRetryResponse} */ declare function EInvoiceRetryResponse(): EInvoiceRetryResponse; type EInvoiceRetryResponse = { - message?: string; response_data: EInvoiceResponseData[]; - success?: boolean; - success_count: number; }; /** @returns {EInvoiceRetryShipmentData} */ declare function EInvoiceRetryShipmentData(): EInvoiceRetryShipmentData; type EInvoiceRetryShipmentData = { + einvoice_type: string; shipment_id: string; }; /** @returns {Entities} */ @@ -3505,12 +3816,37 @@ type ErrorDetail = { /** @returns {ErrorResponse} */ declare function ErrorResponse(): ErrorResponse; type ErrorResponse = { - error: string; + error?: string; error_trace?: string; message: string; status?: number; success?: boolean; }; +/** @returns {FailedOrderLogDetails} */ +declare function FailedOrderLogDetails(): FailedOrderLogDetails; +type FailedOrderLogDetails = { + error_trace: string; + exception: string; +}; +/** @returns {FailedOrderLogs} */ +declare function FailedOrderLogs(): FailedOrderLogs; +type FailedOrderLogs = { + items: FailedOrdersItem; + page: PageDetails; +}; +/** @returns {FailedOrdersItem} */ +declare function FailedOrdersItem(): FailedOrdersItem; +type FailedOrdersItem = { + channel: LogsChannelDetails; + created_at: string; + display_message: string; + error_message: string; + log_id: number; + meta: any; + method_name: string; + order_id: string; + payment: LogPaymentDetails; +}; /** @returns {FetchCreditBalanceRequestPayload} */ declare function FetchCreditBalanceRequestPayload(): FetchCreditBalanceRequestPayload; type FetchCreditBalanceRequestPayload = { @@ -3543,6 +3879,20 @@ type FilterInfoOption = { text?: string; value?: string; }; +/** @returns {Filters} */ +declare function Filters(): Filters; +type Filters = { + date_range?: DateRange; + dp_ids?: number; + dp_name?: string; + from_date?: string; + lane?: string; + logo?: string; + selected_shipments?: string; + store_name?: string; + stores?: number; + to_date?: string; +}; /** @returns {FiltersInfo} */ declare function FiltersInfo(): FiltersInfo; type FiltersInfo = { @@ -3553,6 +3903,17 @@ type FiltersInfo = { type: string; value: string; }; +/** @returns {FiltersRequest} */ +declare function FiltersRequest(): FiltersRequest; +type FiltersRequest = { + date_range?: DateRange; + dp_ids: number; + dp_name: string; + lane: string; + logo?: string; + store_name: string; + stores: number; +}; /** @returns {FiltersResponse} */ declare function FiltersResponse(): FiltersResponse; type FiltersResponse = { @@ -3617,45 +3978,17 @@ declare function FyndOrderIdList(): FyndOrderIdList; type FyndOrderIdList = { fynd_order_id?: string[]; }; -/** @returns {GenerateInvoiceIDErrorResponse} */ -declare function GenerateInvoiceIDErrorResponse(): GenerateInvoiceIDErrorResponse; -type GenerateInvoiceIDErrorResponse = { - items?: GenerateInvoiceIDErrorResponseData[]; -}; -/** @returns {GenerateInvoiceIDErrorResponseData} */ -declare function GenerateInvoiceIDErrorResponseData(): GenerateInvoiceIDErrorResponseData; -type GenerateInvoiceIDErrorResponseData = { - error_message?: string; - invoice_id?: boolean; - shipment_id?: string; - success?: boolean; -}; -/** @returns {GenerateInvoiceIDRequest} */ -declare function GenerateInvoiceIDRequest(): GenerateInvoiceIDRequest; -type GenerateInvoiceIDRequest = { - shipment_ids: string[]; -}; -/** @returns {GenerateInvoiceIDResponse} */ -declare function GenerateInvoiceIDResponse(): GenerateInvoiceIDResponse; -type GenerateInvoiceIDResponse = { - items?: GenerateInvoiceIDResponseData[]; -}; -/** @returns {GenerateInvoiceIDResponseData} */ -declare function GenerateInvoiceIDResponseData(): GenerateInvoiceIDResponseData; -type GenerateInvoiceIDResponseData = { - error_message?: boolean; - invoice_id?: string; - shipment_id?: string; - success?: boolean; -}; /** @returns {GeneratePosOrderReceiptResponse} */ declare function GeneratePosOrderReceiptResponse(): GeneratePosOrderReceiptResponse; type GeneratePosOrderReceiptResponse = { customer_cn_receipt?: string; + customer_cn_receipt_template?: string; invoice_receipt?: string; + invoice_receipt_template?: string; merchant_cn_receipt?: string; order_id?: string; payment_receipt?: string; + payment_receipt_template?: string; success?: boolean; }; /** @returns {GetActionsResponse} */ @@ -3669,14 +4002,6 @@ type GetBagsPlatformResponse = { items: BagDetailsPlatformResponse[]; page: BagsPage; }; -/** @returns {GiftCard} */ -declare function GiftCard(): GiftCard; -type GiftCard = { - display_text?: string; - gift_message?: string; - gift_price?: number; - is_gift_applied?: boolean; -}; /** @returns {GSTDetailsData} */ declare function GSTDetailsData(): GSTDetailsData; type GSTDetailsData = { @@ -3875,6 +4200,37 @@ declare function ItemCriterias(): ItemCriterias; type ItemCriterias = { item_brand?: number[]; }; +/** @returns {JobDetailsData} */ +declare function JobDetailsData(): JobDetailsData; +type JobDetailsData = { + batch_id?: string; + company_id?: string; + failed_shipments_count?: number; + processing_shipments_count?: number; + successful_shipment_ids?: string[]; + successful_shipments_count?: number; + total_shipments_count?: number; +}; +/** @returns {JobDetailsResponse} */ +declare function JobDetailsResponse(): JobDetailsResponse; +type JobDetailsResponse = { + created_ts?: string; + data?: JobDetailsData[]; + failed_records?: any[]; + file_url?: string; + message?: string; + status?: string; + success?: boolean; + uploaded_by?: string; + uploaded_on?: string; + user_id?: string; +}; +/** @returns {JobFailedResponse} */ +declare function JobFailedResponse(): JobFailedResponse; +type JobFailedResponse = { + file_name?: string; + url?: string; +}; /** @returns {LaneConfigResponse} */ declare function LaneConfigResponse(): LaneConfigResponse; type LaneConfigResponse = { @@ -3904,6 +4260,111 @@ type LockData = { locked?: boolean; mto?: boolean; }; +/** @returns {LogPaymentDetails} */ +declare function LogPaymentDetails(): LogPaymentDetails; +type LogPaymentDetails = { + amount_paid?: string; + payment_mode?: string; +}; +/** @returns {LogsChannelDetails} */ +declare function LogsChannelDetails(): LogsChannelDetails; +type LogsChannelDetails = { + channel_id?: string; + channel_shipment_id?: string; + logo?: string; + name?: string; +}; +/** @returns {Manifest} */ +declare function Manifest(): Manifest; +type Manifest = { + company_id: number; + created_at: string; + created_by: string; + created_ts?: string; + filters?: Filters; + id: number; + is_active: boolean; + manifest_id: string; + meta?: ManifestMeta; + pdf_meta?: PDFMeta; + status: string; + uid: string; + user_id: string; +}; +/** @returns {ManifestDetails} */ +declare function ManifestDetails(): ManifestDetails; +type ManifestDetails = { + additional_shipment_count?: number; + items?: ManifestItemDetails[]; + manifest_details?: Manifest[]; + page?: ManifestPageInfo; +}; +/** @returns {ManifestFile} */ +declare function ManifestFile(): ManifestFile; +type ManifestFile = { + bucket?: string; + key?: string; + region?: string; +}; +/** @returns {ManifestFiltersResponse} */ +declare function ManifestFiltersResponse(): ManifestFiltersResponse; +type ManifestFiltersResponse = { + advance_filter?: FiltersInfo[]; + global_filter?: FiltersInfo[]; +}; +/** @returns {ManifestItemDetails} */ +declare function ManifestItemDetails(): ManifestItemDetails; +type ManifestItemDetails = { + awb_number?: string; + invoice_id?: string; + order_id: string; + quantity?: number; + shipment_created_at?: string; + shipment_id: string; +}; +/** @returns {ManifestList} */ +declare function ManifestList(): ManifestList; +type ManifestList = { + items?: Manifest[]; + page?: ManifestPageInfo; +}; +/** @returns {ManifestMediaUpdate} */ +declare function ManifestMediaUpdate(): ManifestMediaUpdate; +type ManifestMediaUpdate = { + code?: number; + entity?: string; + file?: ManifestFile; + link?: string; + media_type?: string; + status?: boolean; +}; +/** @returns {ManifestMeta} */ +declare function ManifestMeta(): ManifestMeta; +type ManifestMeta = { + filters?: Filters; + total_shipment_prices_count?: TotalShipmentPricesCount; +}; +/** @returns {ManifestPageInfo} */ +declare function ManifestPageInfo(): ManifestPageInfo; +type ManifestPageInfo = { + current: number; + has_next: boolean; + has_previous: boolean; + size: number; + total: number; + type: string; +}; +/** @returns {ManifestShipmentListing} */ +declare function ManifestShipmentListing(): ManifestShipmentListing; +type ManifestShipmentListing = { + items?: ManifestItemDetails[]; + lane?: string; + message?: string; + page: ManifestPageInfo; + status: number; + success: boolean; + total_count: number; +}; /** @returns {MarketPlacePdf} */ declare function MarketPlacePdf(): MarketPlacePdf; type MarketPlacePdf = { @@ -3920,7 +4381,7 @@ type Meta = { declare function OrderBagArticle(): OrderBagArticle; type OrderBagArticle = { identifiers?: any; - return_config?: ReturnConfig1; + return_config?: ReturnConfig; size?: string; uid?: string; }; @@ -3977,6 +4438,7 @@ type OrderConfig = { /** @returns {OrderData} */ declare function OrderData(): OrderData; type OrderData = { + created_ts?: string; fynd_order_id: string; meta?: any; order_date: string; @@ -3995,6 +4457,7 @@ declare function OrderDetailsData(): OrderDetailsData; type OrderDetailsData = { affiliate_id?: string; cod_charges?: string; + created_ts?: string; fynd_order_id: string; meta?: any; order_date?: string; @@ -4030,6 +4493,14 @@ type OrderInfo = { shipping_address: OrderUser; user: UserData; }; +/** @returns {OrderingCurrency} */ +declare function OrderingCurrency(): OrderingCurrency; +type OrderingCurrency = { + currency_code?: string; + currency_name?: string; + currency_sub_unit?: string; + currency_symbol?: string; +}; /** @returns {OrderingStoreDetails} */ declare function OrderingStoreDetails(): OrderingStoreDetails; type OrderingStoreDetails = { @@ -4060,30 +4531,6 @@ type OrderListingResponse = { success?: boolean; total_count?: number; }; -/** @returns {OrderMeta} */ -declare function OrderMeta(): OrderMeta; -type OrderMeta = { - billing_staff_details?: BillingStaffDetails; - cart_id?: number; - cart_object_id?: string; - comment?: string; - company_logo?: string; - currency_symbol?: string; - customer_note?: string; - employee_id?: string; - extra_meta?: any; - files?: any[]; - mongo_cart_id?: number; - order_child_entities?: string[]; - order_platform?: string; - order_tags?: any[]; - order_type?: string; - ordering_store?: number; - payment_type?: string; - platform_user_details?: PlatformUserDetails; - staff?: any; - transaction_data?: TransactionData; -}; /** @returns {OrderPriority} */ declare function OrderPriority(): OrderPriority; type OrderPriority = { @@ -4161,6 +4608,10 @@ type PageDetails = { * - If next page contains any result */ has_next?: boolean; + /** + * - If previous page contains any result + */ + has_previous?: boolean; /** * - Total count of the results present in the * requested filter @@ -4175,6 +4626,23 @@ type PageDetails = { */ type?: string; }; +/** @returns {PaginatedStates} */ +declare function PaginatedStates(): PaginatedStates; +type PaginatedStates = { + items?: StateManagerState[]; + page?: PaginationInfo; +}; +/** @returns {PaginationInfo} */ +declare function PaginationInfo(): PaginationInfo; +type PaginationInfo = { + current?: number; + has_next?: boolean; + has_previous?: boolean; + item_total?: number; + size?: number; + total?: number; + type?: string; +}; /** @returns {PaymentInfo} */ declare function PaymentInfo(): PaymentInfo; type PaymentInfo = { @@ -4219,6 +4687,12 @@ type PDFLinks = { label_type: string; po_invoice?: string; }; +/** @returns {PDFMeta} */ +declare function PDFMeta(): PDFMeta; +type PDFMeta = { + consent?: string; + media_updates?: ManifestMediaUpdate[]; +}; /** @returns {PhoneDetails} */ declare function PhoneDetails(): PhoneDetails; type PhoneDetails = { @@ -4295,8 +4769,11 @@ declare function PlatformOrderItems(): PlatformOrderItems; type PlatformOrderItems = { breakup_values?: PlatformBreakupValues[]; channel?: PlatformChannel; + currency?: Currency; + currency_info?: CurrencyInfo; meta?: any; order_created_time?: string; + order_created_ts?: string; order_id?: string; order_value?: number; payment_mode?: string; @@ -4320,6 +4797,8 @@ type PlatformShipment = { company_details?: CompanyDetails; coupon?: any; credit_note_id?: string; + currency?: Currency; + currency_info?: CurrencyInfo; custom_message?: string; custom_meta?: any[]; delivery_details?: UserDetailsData; @@ -4328,6 +4807,7 @@ type PlatformShipment = { dp_details?: DPDetailsData; enable_dp_tracking?: boolean; estimated_sla_time?: string; + estimated_sla_ts?: string; forward_shipment_id?: string; fulfilling_store?: FulfillingStore; fulfilment_priority?: number; @@ -4355,7 +4835,8 @@ type PlatformShipment = { priority_text?: string; rto_address?: PlatformDeliveryAddress; shipment_created_at?: string; - shipment_details?: ShipmentDetails; + shipment_created_ts?: string; + shipment_details?: ShipmentLockDetails; shipment_id: string; shipment_images?: string[]; shipment_quantity?: number; @@ -4395,14 +4876,6 @@ type PlatformTrack = { updated_at?: string; updated_time?: string; }; -/** @returns {PlatformUserDetails} */ -declare function PlatformUserDetails(): PlatformUserDetails; -type PlatformUserDetails = { - platform_user_employee_code?: string; - platform_user_first_name?: string; - platform_user_id?: string; - platform_user_last_name?: string; -}; /** @returns {PointBlankOtpData} */ declare function PointBlankOtpData(): PointBlankOtpData; type PointBlankOtpData = { @@ -4475,6 +4948,30 @@ type ProcessingDates = { dp_pickup_slot?: any; pack_by_date?: string; }; +/** @returns {ProcessManifest} */ +declare function ProcessManifest(): ProcessManifest; +type ProcessManifest = { + action: string; + filters: FiltersRequest; + manifest_id?: string; + unique_id: string; +}; +/** @returns {ProcessManifestItemResponse} */ +declare function ProcessManifestItemResponse(): ProcessManifestItemResponse; +type ProcessManifestItemResponse = { + items?: ProcessManifestResponse; +}; +/** @returns {ProcessManifestResponse} */ +declare function ProcessManifestResponse(): ProcessManifestResponse; +type ProcessManifestResponse = { + action?: string; + company_id?: number; + created_by?: string; + filters?: Filters; + manifest_id?: string; + uid?: string; + user_id?: string; +}; /** @returns {Products} */ declare function Products(): Products; type Products = { @@ -4606,13 +5103,6 @@ type ReturnConfig = { time?: number; unit?: string; }; -/** @returns {ReturnConfig1} */ -declare function ReturnConfig1(): ReturnConfig1; -type ReturnConfig1 = { - returnable?: boolean; - time?: number; - unit?: string; -}; /** @returns {RoleBaseStateTransitionMapping} */ declare function RoleBaseStateTransitionMapping(): RoleBaseStateTransitionMapping; type RoleBaseStateTransitionMapping = { @@ -4659,6 +5149,19 @@ type Shipment = { priority?: number; processing_dates?: ProcessingDates; }; +/** @returns {ShipmentActionInfo} */ +declare function ShipmentActionInfo(): ShipmentActionInfo; +type ShipmentActionInfo = { + failed_invoiced_shipments?: any; + failed_shipments?: any[]; + invoice?: string[]; + invoiceable_shipments?: string[]; + label?: string[]; + processing_invoice_shipments?: string[]; + processing_shipments?: string[]; + successful_invoiced_shipments?: string[]; + successful_shipments?: string[]; +}; /** @returns {ShipmentBagReasons} */ declare function ShipmentBagReasons(): ShipmentBagReasons; type ShipmentBagReasons = { @@ -4695,14 +5198,11 @@ type ShipmentDetail = { /** @returns {ShipmentDetails} */ declare function ShipmentDetails(): ShipmentDetails; type ShipmentDetails = { - action_to_status?: any; affiliate_shipment_id: string; articles: ArticleDetails[]; box_type?: string; dp_id?: number; fulfillment_id: number; - lock_message?: string; - lock_status?: boolean; meta?: any; shipments: number; }; @@ -4735,15 +5235,19 @@ type ShipmentItem = { bags?: BagUnit[]; can_process?: boolean; channel?: ShipmentListingChannel; + currency?: Currency; + currency_info?: CurrencyInfo; customer_note?: string; delivery_address?: PlatformDeliveryAddress; display_name?: string; estimated_sla_time?: string; + estimated_sla_ts?: string; fulfilling_store?: ShipmentItemFulFillingStore; invoice_id?: string; lock_status?: boolean; meta?: any; mode_of_payment?: string; + order_created_ts?: string; order_date?: string; order_id: string; ordering_channnel?: string; @@ -4752,9 +5256,11 @@ type ShipmentItem = { previous_shipment_id?: string; prices?: Prices; shipment_created_at: string; + shipment_created_ts?: string; shipment_id?: string; shipment_status?: ShipmentStatus; status_created_at?: string; + status_created_ts?: string; total_bags: number; user?: UserDataInfo; }; @@ -4762,7 +5268,7 @@ type ShipmentItem = { declare function ShipmentItemFulFillingStore(): ShipmentItemFulFillingStore; type ShipmentItemFulFillingStore = { address?: string; - brand_store_tags?: string; + brand_store_tags?: string[]; city?: string; code: string; id: number; @@ -4773,40 +5279,7 @@ type ShipmentItemFulFillingStore = { pincode?: string; state?: string; store_email?: string; -}; -/** @returns {ShipmentItemMeta} */ -declare function ShipmentItemMeta(): ShipmentItemMeta; -type ShipmentItemMeta = { - activity_comment?: string; - assign_dp_from_sb?: boolean; - auto_trigger_dp_assignment_acf: boolean; - bag_weight?: any; - debug_info?: any; - dp_options?: any; - dp_sort_key?: string; - ewaybill_info?: any; - existing_dp_list?: string[]; - external?: any; - formatted?: Formatted; - fulfilment_priority_text?: string; - is_international?: boolean; - is_self_ship?: boolean; - lock_data?: LockData; - order_type?: string; - packaging_name?: string; - parent_dp_id?: string; - pdf_media?: any[]; - same_store_available?: boolean; - shipment_chargeable_weight?: number; - shipment_tags?: ShipmentTags[]; - shipment_volumetric_weight?: number; - shipment_weight?: number; - shipping_zone?: string; - sla?: number; - store_invoice_updated_date?: string; - tags?: any[]; - timestamp?: ShipmentTimeStamp; - weight?: number; + tags?: string[]; }; /** @returns {ShipmentListingBrand} */ declare function ShipmentListingBrand(): ShipmentListingBrand; @@ -4824,6 +5297,13 @@ type ShipmentListingChannel = { logo?: string; name?: string; }; +/** @returns {ShipmentLockDetails} */ +declare function ShipmentLockDetails(): ShipmentLockDetails; +type ShipmentLockDetails = { + action_to_status?: any; + lock_message?: string; + lock_status?: boolean; +}; /** @returns {ShipmentMeta} */ declare function ShipmentMeta(): ShipmentMeta; type ShipmentMeta = { @@ -4922,12 +5402,14 @@ declare function ShipmentStatus(): ShipmentStatus; type ShipmentStatus = { bag_list?: string[]; created_at?: string; + created_ts?: string; current_shipment_status?: string; meta?: any; shipment_id?: string; shipment_status_id?: number; status: string; status_created_at?: string; + status_created_ts?: string; title: string; }; /** @returns {ShipmentStatusData} */ @@ -4935,6 +5417,7 @@ declare function ShipmentStatusData(): ShipmentStatusData; type ShipmentStatusData = { bag_list?: string[]; created_at?: string; + created_ts?: string; current_shipment_status?: string; display_name?: string; id?: number; @@ -4958,17 +5441,18 @@ type ShipmentTimeStamp = { /** @returns {ShippingInfo} */ declare function ShippingInfo(): ShippingInfo; type ShippingInfo = { + address?: string; address_type?: string; - address1: string; + address1?: string; address2?: string; alternate_email?: string; alternate_mobile_number?: string; - city: string; - country: string; + city?: string; + country?: string; country_code?: string; customer_code?: string; external_customer_code?: string; - first_name: string; + first_name?: string; floor_no?: string; gender?: string; geo_location?: any; @@ -4976,12 +5460,12 @@ type ShippingInfo = { landmark?: string; last_name?: string; middle_name?: string; - pincode: string; - primary_email: string; - primary_mobile_number: string; + pincode?: string; + primary_email?: string; + primary_mobile_number?: string; shipping_type?: string; slot?: any[]; - state: string; + state?: string; state_code?: string; title?: string; }; @@ -5026,6 +5510,74 @@ type SmsDataPayload = { */ shipment_id: number; }; +/** @returns {StateManagerFilter} */ +declare function StateManagerFilter(): StateManagerFilter; +type StateManagerFilter = { + default_value?: string; + description?: string; + display_name?: string; + id?: number; + name?: string; + options?: any; + type?: string; +}; +/** @returns {StateManagerState} */ +declare function StateManagerState(): StateManagerState; +type StateManagerState = { + /** + * - The application display name + */ + app_display_name?: string; + /** + * - Whether state is for app facing or not + */ + app_facing?: boolean; + /** + * - Unique identifier for the state + */ + id?: number; + /** + * - Whether state is active or not + */ + is_active?: boolean; + /** + * - Type of the journey + */ + journey_type?: string; + /** + * - The platform display name + */ + platform_display_name?: string; + /** + * - The name of the state + */ + state?: string; + /** + * - Type of the state + */ + state_type?: string; +}; +/** @returns {StateManagerTask} */ +declare function StateManagerTask(): StateManagerTask; +type StateManagerTask = { + description?: string; + display_name?: string; + doc_string?: string; + id?: number; + kwargs?: any; + name?: string; +}; +/** @returns {StateTransitionFlag} */ +declare function StateTransitionFlag(): StateTransitionFlag; +type StateTransitionFlag = { + default_value?: string; + description?: string; + display_name?: string; + id?: number; + name?: string; + options?: any; + type?: string; +}; /** @returns {StatuesRequest} */ declare function StatuesRequest(): StatuesRequest; type StatuesRequest = { @@ -5211,27 +5763,34 @@ type TaxInfo = { gstin?: string; pan_no?: string; }; +/** @returns {TemplateDownloadResponse} */ +declare function TemplateDownloadResponse(): TemplateDownloadResponse; +type TemplateDownloadResponse = { + file_name?: string; + url?: string; +}; +/** @returns {Templates} */ +declare function Templates(): Templates; +type Templates = { + text?: string; + value?: string; +}; +/** @returns {TotalShipmentPricesCount} */ +declare function TotalShipmentPricesCount(): TotalShipmentPricesCount; +type TotalShipmentPricesCount = { + shipment_count?: number; + total_price?: number; +}; /** @returns {TrackingList} */ declare function TrackingList(): TrackingList; type TrackingList = { + created_ts?: string; is_current?: boolean; is_passed?: boolean; status: string; text: string; time?: string; }; -/** @returns {TransactionData} */ -declare function TransactionData(): TransactionData; -type TransactionData = { - amount_paid?: number; - currency?: string; - entity?: string; - payment_id?: string; - status?: string; - terminal_id?: string; - transaction_id?: string; - unique_reference_number?: string; -}; /** @returns {UpdatePackagingDimensionsPayload} */ declare function UpdatePackagingDimensionsPayload(): UpdatePackagingDimensionsPayload; type UpdatePackagingDimensionsPayload = { @@ -5343,12 +5902,15 @@ type UserDetailsData = { area?: string; city: string; country: string; + country_iso_code?: string; + country_phone_code?: string; email?: string; landmark?: string; name: string; phone: string; pincode: string; state: string; + state_code?: string; }; /** @returns {UserInfo} */ declare function UserInfo(): UserInfo; diff --git a/sdk/platform/Order/OrderPlatformModel.js b/sdk/platform/Order/OrderPlatformModel.js index 85c15a910..bcd7a1a6e 100644 --- a/sdk/platform/Order/OrderPlatformModel.js +++ b/sdk/platform/Order/OrderPlatformModel.js @@ -171,6 +171,11 @@ const Joi = require("joi"); * @property {number} store_id */ +/** + * @typedef AllowedTemplatesResponse + * @property {Templates[]} [template_x_slug] + */ + /** * @typedef AnnouncementResponse * @property {number} [company_id] @@ -231,10 +236,14 @@ const Joi = require("joi"); * @property {Object} category * @property {Object} dimension * @property {number} quantity - * @property {Object} [status] * @property {Object} weight */ +/** + * @typedef ArticleStatusDetails + * @property {Object} [status] + */ + /** * @typedef AttachOrderUser * @property {string} fynd_order_id @@ -274,16 +283,6 @@ const Joi = require("joi"); * @property {string} [primary_material] */ -/** - * @typedef B2BPODetails - * @property {string} [docker_number] - * @property {number} [item_base_price] - * @property {boolean} [partial_can_ret] - * @property {number} [po_line_amount] - * @property {number} [po_tax_amount] - * @property {number} [total_gst_percentage] - */ - /** * @typedef BagConfigs * @property {boolean} allow_force_return @@ -300,7 +299,7 @@ const Joi = require("joi"); * @property {AffiliateDetails} [affiliate_details] * @property {Object[]} [applied_promos] * @property {Article} [article] - * @property {ArticleDetails} [article_details] + * @property {ArticleStatusDetails} [article_details] * @property {BagStatusHistory[]} [bag_status] * @property {BagStatusHistory} [bag_status_history] * @property {number} [bag_update_time] @@ -332,63 +331,11 @@ const Joi = require("joi"); * @property {Object} [restore_promos] * @property {string} [seller_identifier] * @property {string} [shipment_id] - * @property {BagReturnableCancelableStatus1} [status] + * @property {BagReturnableCancelableStatus} [status] * @property {string[]} [tags] * @property {string} [type] */ -/** - * @typedef BagGST - * @property {number} [brand_calculated_amount] - * @property {string} [cgst_gst_fee] - * @property {number} [cgst_tax_percentage] - * @property {number} [gst_fee] - * @property {string} [gst_tag] - * @property {number} [gst_tax_percentage] - * @property {string} [gstin_code] - * @property {string} [hsn_code] - * @property {string} [hsn_code_id] - * @property {string} [igst_gst_fee] - * @property {number} [igst_tax_percentage] - * @property {boolean} [is_default_hsn_code] - * @property {string} [sgst_gst_fee] - * @property {number} [sgst_tax_percentage] - * @property {number} [tax_collected_at_source] - * @property {number} [value_of_good] - */ - -/** - * @typedef BagGSTDetails - * @property {number} brand_calculated_amount - * @property {string} cgst_gst_fee - * @property {number} cgst_tax_percentage - * @property {number} gst_fee - * @property {string} gst_tag - * @property {number} gst_tax_percentage - * @property {string} [gstin_code] - * @property {string} hsn_code - * @property {string} hsn_code_id - * @property {string} igst_gst_fee - * @property {number} igst_tax_percentage - * @property {boolean} [is_default_hsn_code] - * @property {string} sgst_gst_fee - * @property {number} sgst_tax_percentage - * @property {number} tax_collected_at_source - * @property {number} value_of_good - */ - -/** - * @typedef BagMeta - * @property {B2BPODetails} [b2b_po_details] - * @property {Object} [custom_json] - * @property {string} [custom_message] - * @property {string} [docket_number] - * @property {Object} [extra_meta] - * @property {GiftCard} [gift_card] - * @property {string} [group_id] - * @property {boolean} [partial_can_ret] - */ - /** * @typedef BagPaymentMethods * @property {number} [amount] @@ -419,15 +366,6 @@ const Joi = require("joi"); * @property {boolean} is_returnable */ -/** - * @typedef BagReturnableCancelableStatus1 - * @property {boolean} can_be_cancelled - * @property {boolean} enable_tracking - * @property {boolean} is_active - * @property {boolean} is_customer_return_allowed - * @property {boolean} is_returnable - */ - /** * @typedef Bags * @property {string} [affiliate_bag_id] - Application/Affiliate Bag ID, @@ -474,6 +412,7 @@ const Joi = require("joi"); * @property {BagStateMapper} [bag_state_mapper] * @property {number} [bsh_id] * @property {string} [created_at] + * @property {string} [created_ts] * @property {string} [delivery_awb_number] * @property {number} [delivery_partner_id] * @property {string} [display_name] @@ -486,6 +425,7 @@ const Joi = require("joi"); * @property {string} status * @property {number} [store_id] * @property {string} [updated_at] + * @property {string} [updated_ts] */ /** @@ -524,38 +464,30 @@ const Joi = require("joi"); /** * @typedef BillingInfo - * @property {string} address1 + * @property {string} [address] + * @property {string} [address1] * @property {string} [address2] * @property {string} [alternate_email] * @property {string} [alternate_mobile_number] - * @property {string} city - * @property {string} country + * @property {string} [city] + * @property {string} [country] * @property {string} [country_code] * @property {string} [customer_code] * @property {string} [external_customer_code] - * @property {string} first_name + * @property {string} [first_name] * @property {string} [floor_no] * @property {string} [gender] * @property {string} [house_no] * @property {string} [last_name] * @property {string} [middle_name] - * @property {string} pincode - * @property {string} primary_email - * @property {string} primary_mobile_number - * @property {string} state + * @property {string} [pincode] + * @property {string} [primary_email] + * @property {string} [primary_mobile_number] + * @property {string} [state] * @property {string} [state_code] * @property {string} [title] */ -/** - * @typedef BillingStaffDetails - * @property {string} [employee_code] - * @property {string} [first_name] - * @property {string} [last_name] - * @property {number} [staff_id] - * @property {string} [user] - */ - /** * @typedef Brand * @property {number} brand_id @@ -573,6 +505,34 @@ const Joi = require("joi"); * @property {string} [start_date] */ +/** + * @typedef BulkActionListingData + * @property {string} [batch_id] + * @property {string} [bulk_action_type] + * @property {number} [company_id] + * @property {string} [created_ts] + * @property {boolean} [do_invoice_label_generated] + * @property {string} [file_name] + * @property {string} [file_url] + * @property {number} [id] + * @property {string} [invoice_document_type] + * @property {string} [invoice_status] + * @property {boolean} [is_invoiceable] + * @property {string} [label_document_type] + * @property {string} [last_selected_invoice_label_type] + * @property {Object} [meta] + * @property {ShipmentActionInfo} [shipments_action_info] + * @property {boolean} [status] + * @property {string} [store_code] + * @property {number} [store_id] + * @property {string} [store_name] + * @property {number} [updated_ts] + * @property {string} [uploaded_by] + * @property {string} [uploaded_on] + * @property {string} [user_id] + * @property {string} [user_name] + */ + /** * @typedef BulkActionTemplate * @property {string} [text] @@ -585,24 +545,43 @@ const Joi = require("joi"); */ /** - * @typedef BulkReportsDownloadFailedResponse + * @typedef BulkFailedResponse * @property {string} [error] * @property {boolean} [status] */ +/** + * @typedef BulkListingResponse + * @property {BulkActionListingData[]} [data] + * @property {BulkListinPage} [page] + * @property {boolean} [success] + * @property {number} [total_count] + */ + +/** + * @typedef BulkListinPage + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {number} [size] + * @property {number} [total] + * @property {string} [type] + */ + /** * @typedef BulkReportsDownloadRequest * @property {Object} [custom_filters_for_lane] * @property {string} [custom_headers] - Download report with specific headers + * @property {string} [end_date] - UTC end date in ISO format * @property {string[]} [entities] - Download for specific enitites, entities * can be bag, shipment or order_id, etc. * @property {string} [filter_type] - * @property {string} [from_date] * @property {boolean} [is_cross_company_enabled] - Download lanes for cross company. * @property {string} [lane_type] * @property {string} [report_type] - Type of report + * @property {string} [start_date] - UTC start date in ISO format * @property {string[]} [store_ids] - Download for specific store ids. - * @property {string} [to_date] */ /** @@ -611,6 +590,19 @@ const Joi = require("joi"); * @property {boolean} [success] */ +/** + * @typedef BulkStateTransistionRequest + * @property {string} [file_name] + * @property {string} [url] + */ + +/** + * @typedef BulkStateTransistionResponse + * @property {string} [batch_id] + * @property {string} [message] + * @property {boolean} [status] + */ + /** * @typedef BuyerDetails * @property {string} address @@ -673,6 +665,12 @@ const Joi = require("joi"); * @property {PhoneDetails[]} [phone] */ +/** + * @typedef ConversionRate + * @property {string} [base] + * @property {Object} [rates] + */ + /** * @typedef CourierPartnerTrackingDetails * @property {string} awb - AWB Number @@ -780,11 +778,24 @@ const Joi = require("joi"); * @property {string} [total_credited_balance] */ +/** + * @typedef Currency + * @property {string} [currency_code] + * @property {string} [currency_symbol] + */ + +/** + * @typedef CurrencyInfo + * @property {ConversionRate} [conversion_rate] + * @property {OrderingCurrency} [ordering_currency] + */ + /** * @typedef CurrentStatus * @property {number} [bag_id] * @property {BagStateMapper} [bag_state_mapper] * @property {string} [created_at] + * @property {string} [created_ts] * @property {string} [delivery_awb_number] * @property {number} [delivery_partner_id] * @property {number} id @@ -804,6 +815,12 @@ const Joi = require("joi"); * @property {ProductsDataUpdates[]} [products] */ +/** + * @typedef DateRange + * @property {string} [from_date] + * @property {string} [to_date] + */ + /** * @typedef Dates * @property {string} [delivery_date] @@ -870,12 +887,59 @@ const Joi = require("joi"); * @property {string} [track_url] */ +/** + * @typedef EInvoiceDetails + * @property {EInvoiceErrorDetails[]} [error_details] + * @property {EInvoiceIrnDetails} [irn_details] + */ + +/** + * @typedef EInvoiceErrorDetails + * @property {string} [error_code] + * @property {string} error_message + */ + +/** + * @typedef EInvoiceErrorInfo + * @property {EInvoiceErrorDetails[]} [error_details] + */ + +/** + * @typedef EInvoiceErrorResponse + * @property {string} [message] + * @property {EInvoiceErrorResponseData[]} [response_data] + */ + +/** + * @typedef EInvoiceErrorResponseData + * @property {EInvoiceErrorInfo} [einvoice_info] + * @property {string} einvoice_type + * @property {string} message + * @property {string} shipment_id + * @property {number} status + */ + +/** + * @typedef EInvoiceErrorResponseDetails + * @property {string} [message] + * @property {EInvoiceErrorResponseData[]} response_data + */ + /** * @typedef EinvoiceInfo * @property {Object} [credit_note] * @property {Object} [invoice] */ +/** + * @typedef EInvoiceIrnDetails + * @property {string} ack_dt + * @property {string} ack_no + * @property {string} irn + * @property {string} signed_invoice + * @property {string} signed_qr_code + */ + /** * @typedef EInvoicePortalDetails * @property {string} [password] @@ -885,14 +949,11 @@ const Joi = require("joi"); /** * @typedef EInvoiceResponseData - * @property {string} [ack_dt] - * @property {string} [ack_no] - * @property {string} [irn] + * @property {EInvoiceDetails} [einvoice_info] + * @property {string} einvoice_type * @property {string} message * @property {string} shipment_id - * @property {boolean} success - * @property {number} [timeout] - * @property {string} [timeout_unit] + * @property {number} status */ /** @@ -902,14 +963,12 @@ const Joi = require("joi"); /** * @typedef EInvoiceRetryResponse - * @property {string} [message] * @property {EInvoiceResponseData[]} response_data - * @property {boolean} [success] - * @property {number} success_count */ /** * @typedef EInvoiceRetryShipmentData + * @property {string} einvoice_type * @property {string} shipment_id */ @@ -960,13 +1019,38 @@ const Joi = require("joi"); /** * @typedef ErrorResponse - * @property {string} error + * @property {string} [error] * @property {string} [error_trace] * @property {string} message * @property {number} [status] * @property {boolean} [success] */ +/** + * @typedef FailedOrderLogDetails + * @property {string} error_trace + * @property {string} exception + */ + +/** + * @typedef FailedOrderLogs + * @property {FailedOrdersItem} items + * @property {PageDetails} page + */ + +/** + * @typedef FailedOrdersItem + * @property {LogsChannelDetails} channel + * @property {string} created_at + * @property {string} display_message + * @property {string} error_message + * @property {number} log_id + * @property {Object} meta + * @property {string} method_name + * @property {string} order_id + * @property {LogPaymentDetails} payment + */ + /** * @typedef FetchCreditBalanceRequestPayload * @property {string} affiliate_id @@ -996,6 +1080,20 @@ const Joi = require("joi"); * @property {string} [value] */ +/** + * @typedef Filters + * @property {DateRange} [date_range] + * @property {number} [dp_ids] + * @property {string} [dp_name] + * @property {string} [from_date] + * @property {string} [lane] + * @property {string} [logo] + * @property {string} [selected_shipments] + * @property {string} [store_name] + * @property {number} [stores] + * @property {string} [to_date] + */ + /** * @typedef FiltersInfo * @property {FilterInfoOption[]} [options] @@ -1006,6 +1104,17 @@ const Joi = require("joi"); * @property {string} value */ +/** + * @typedef FiltersRequest + * @property {DateRange} [date_range] + * @property {number} dp_ids + * @property {string} dp_name + * @property {string} lane + * @property {string} [logo] + * @property {string} store_name + * @property {number} stores + */ + /** * @typedef FiltersResponse * @property {AdvanceFilterInfo} [advance_filter] @@ -1070,44 +1179,16 @@ const Joi = require("joi"); * @property {string[]} [fynd_order_id] */ -/** - * @typedef GenerateInvoiceIDErrorResponse - * @property {GenerateInvoiceIDErrorResponseData[]} [items] - */ - -/** - * @typedef GenerateInvoiceIDErrorResponseData - * @property {string} [error_message] - * @property {boolean} [invoice_id] - * @property {string} [shipment_id] - * @property {boolean} [success] - */ - -/** - * @typedef GenerateInvoiceIDRequest - * @property {string[]} shipment_ids - */ - -/** - * @typedef GenerateInvoiceIDResponse - * @property {GenerateInvoiceIDResponseData[]} [items] - */ - -/** - * @typedef GenerateInvoiceIDResponseData - * @property {boolean} [error_message] - * @property {string} [invoice_id] - * @property {string} [shipment_id] - * @property {boolean} [success] - */ - /** * @typedef GeneratePosOrderReceiptResponse * @property {string} [customer_cn_receipt] + * @property {string} [customer_cn_receipt_template] * @property {string} [invoice_receipt] + * @property {string} [invoice_receipt_template] * @property {string} [merchant_cn_receipt] * @property {string} [order_id] * @property {string} [payment_receipt] + * @property {string} [payment_receipt_template] * @property {boolean} [success] */ @@ -1122,14 +1203,6 @@ const Joi = require("joi"); * @property {BagsPage} page */ -/** - * @typedef GiftCard - * @property {string} [display_text] - * @property {string} [gift_message] - * @property {number} [gift_price] - * @property {boolean} [is_gift_applied] - */ - /** * @typedef GSTDetailsData * @property {number} brand_calculated_amount @@ -1280,6 +1353,37 @@ const Joi = require("joi"); * @property {number[]} [item_brand] */ +/** + * @typedef JobDetailsData + * @property {string} [batch_id] + * @property {string} [company_id] + * @property {number} [failed_shipments_count] + * @property {number} [processing_shipments_count] + * @property {string[]} [successful_shipment_ids] + * @property {number} [successful_shipments_count] + * @property {number} [total_shipments_count] + */ + +/** + * @typedef JobDetailsResponse + * @property {string} [created_ts] + * @property {JobDetailsData[]} [data] + * @property {Object[]} [failed_records] + * @property {string} [file_url] + * @property {string} [message] + * @property {string} [status] + * @property {boolean} [success] + * @property {string} [uploaded_by] + * @property {string} [uploaded_on] + * @property {string} [user_id] + */ + +/** + * @typedef JobFailedResponse + * @property {string} [file_name] + * @property {string} [url] + */ + /** * @typedef LaneConfigResponse * @property {SuperLane[]} [super_lanes] @@ -1309,6 +1413,111 @@ const Joi = require("joi"); * @property {boolean} [mto] */ +/** + * @typedef LogPaymentDetails + * @property {string} [amount_paid] + * @property {string} [payment_mode] + */ + +/** + * @typedef LogsChannelDetails + * @property {string} [channel_id] + * @property {string} [channel_shipment_id] + * @property {string} [logo] + * @property {string} [name] + */ + +/** + * @typedef Manifest + * @property {number} company_id + * @property {string} created_at + * @property {string} created_by + * @property {string} [created_ts] + * @property {Filters} [filters] + * @property {number} id + * @property {boolean} is_active + * @property {string} manifest_id + * @property {ManifestMeta} [meta] + * @property {PDFMeta} [pdf_meta] + * @property {string} status + * @property {string} uid + * @property {string} user_id + */ + +/** + * @typedef ManifestDetails + * @property {number} [additional_shipment_count] + * @property {ManifestItemDetails[]} [items] + * @property {Manifest[]} [manifest_details] + * @property {ManifestPageInfo} [page] + */ + +/** + * @typedef ManifestFile + * @property {string} [bucket] + * @property {string} [key] + * @property {string} [region] + */ + +/** + * @typedef ManifestFiltersResponse + * @property {FiltersInfo[]} [advance_filter] + * @property {FiltersInfo[]} [global_filter] + */ + +/** + * @typedef ManifestItemDetails + * @property {string} [awb_number] + * @property {string} [invoice_id] + * @property {string} order_id + * @property {number} [quantity] + * @property {string} [shipment_created_at] + * @property {string} shipment_id + */ + +/** + * @typedef ManifestList + * @property {Manifest[]} [items] + * @property {ManifestPageInfo} [page] + */ + +/** + * @typedef ManifestMediaUpdate + * @property {number} [code] + * @property {string} [entity] + * @property {ManifestFile} [file] + * @property {string} [link] + * @property {string} [media_type] + * @property {boolean} [status] + */ + +/** + * @typedef ManifestMeta + * @property {Filters} [filters] + * @property {TotalShipmentPricesCount} [total_shipment_prices_count] + */ + +/** + * @typedef ManifestPageInfo + * @property {number} current + * @property {boolean} has_next + * @property {boolean} has_previous + * @property {number} size + * @property {number} total + * @property {string} type + */ + +/** + * @typedef ManifestShipmentListing + * @property {ManifestItemDetails[]} [items] + * @property {string} [lane] + * @property {string} [message] + * @property {ManifestPageInfo} page + * @property {number} status + * @property {boolean} success + * @property {number} total_count + */ + /** * @typedef MarketPlacePdf * @property {string} [invoice] @@ -1324,7 +1533,7 @@ const Joi = require("joi"); /** * @typedef OrderBagArticle * @property {Object} [identifiers] - * @property {ReturnConfig1} [return_config] + * @property {ReturnConfig} [return_config] * @property {string} [size] * @property {string} [uid] */ @@ -1381,6 +1590,7 @@ const Joi = require("joi"); /** * @typedef OrderData + * @property {string} [created_ts] * @property {string} fynd_order_id * @property {Object} [meta] * @property {string} order_date @@ -1399,6 +1609,7 @@ const Joi = require("joi"); * @typedef OrderDetailsData * @property {string} [affiliate_id] * @property {string} [cod_charges] + * @property {string} [created_ts] * @property {string} fynd_order_id * @property {Object} [meta] * @property {string} [order_date] @@ -1435,6 +1646,14 @@ const Joi = require("joi"); * @property {UserData} user */ +/** + * @typedef OrderingCurrency + * @property {string} [currency_code] + * @property {string} [currency_name] + * @property {string} [currency_sub_unit] + * @property {string} [currency_symbol] + */ + /** * @typedef OrderingStoreDetails * @property {string} [address] @@ -1465,30 +1684,6 @@ const Joi = require("joi"); * @property {number} [total_count] */ -/** - * @typedef OrderMeta - * @property {BillingStaffDetails} [billing_staff_details] - * @property {number} [cart_id] - * @property {string} [cart_object_id] - * @property {string} [comment] - * @property {string} [company_logo] - * @property {string} [currency_symbol] - * @property {string} [customer_note] - * @property {string} [employee_id] - * @property {Object} [extra_meta] - * @property {Object[]} [files] - * @property {number} [mongo_cart_id] - * @property {string[]} [order_child_entities] - * @property {string} [order_platform] - * @property {Object[]} [order_tags] - * @property {string} [order_type] - * @property {number} [ordering_store] - * @property {string} [payment_type] - * @property {PlatformUserDetails} [platform_user_details] - * @property {Object} [staff] - * @property {TransactionData} [transaction_data] - */ - /** * @typedef OrderPriority * @property {string} [affiliate_priority_code] @@ -1553,12 +1748,30 @@ const Joi = require("joi"); * @typedef PageDetails * @property {number} [current] - Current page number * @property {boolean} [has_next] - If next page contains any result + * @property {boolean} [has_previous] - If previous page contains any result * @property {number} item_total - Total count of the results present in the * requested filter * @property {number} [size] - Page size * @property {string} [type] - Type of the page */ +/** + * @typedef PaginatedStates + * @property {StateManagerState[]} [items] + * @property {PaginationInfo} [page] + */ + +/** + * @typedef PaginationInfo + * @property {number} [current] + * @property {boolean} [has_next] + * @property {boolean} [has_previous] + * @property {number} [item_total] + * @property {number} [size] + * @property {number} [total] + * @property {string} [type] + */ + /** * @typedef PaymentInfo * @property {PaymentMethod[]} [payment_methods] @@ -1603,6 +1816,12 @@ const Joi = require("joi"); * @property {string} [po_invoice] */ +/** + * @typedef PDFMeta + * @property {string} [consent] + * @property {ManifestMediaUpdate[]} [media_updates] + */ + /** * @typedef PhoneDetails * @property {number} [country_code] @@ -1678,8 +1897,11 @@ const Joi = require("joi"); * @typedef PlatformOrderItems * @property {PlatformBreakupValues[]} [breakup_values] * @property {PlatformChannel} [channel] + * @property {Currency} [currency] + * @property {CurrencyInfo} [currency_info] * @property {Object} [meta] * @property {string} [order_created_time] + * @property {string} [order_created_ts] * @property {string} [order_id] * @property {number} [order_value] * @property {string} [payment_mode] @@ -1703,6 +1925,8 @@ const Joi = require("joi"); * @property {CompanyDetails} [company_details] * @property {Object} [coupon] * @property {string} [credit_note_id] + * @property {Currency} [currency] + * @property {CurrencyInfo} [currency_info] * @property {string} [custom_message] * @property {Object[]} [custom_meta] * @property {UserDetailsData} [delivery_details] @@ -1711,6 +1935,7 @@ const Joi = require("joi"); * @property {DPDetailsData} [dp_details] * @property {boolean} [enable_dp_tracking] * @property {string} [estimated_sla_time] + * @property {string} [estimated_sla_ts] * @property {string} [forward_shipment_id] * @property {FulfillingStore} [fulfilling_store] * @property {number} [fulfilment_priority] @@ -1738,7 +1963,8 @@ const Joi = require("joi"); * @property {string} [priority_text] * @property {PlatformDeliveryAddress} [rto_address] * @property {string} [shipment_created_at] - * @property {ShipmentDetails} [shipment_details] + * @property {string} [shipment_created_ts] + * @property {ShipmentLockDetails} [shipment_details] * @property {string} shipment_id * @property {string[]} [shipment_images] * @property {number} [shipment_quantity] @@ -1779,14 +2005,6 @@ const Joi = require("joi"); * @property {string} [updated_time] */ -/** - * @typedef PlatformUserDetails - * @property {string} [platform_user_employee_code] - * @property {string} [platform_user_first_name] - * @property {string} [platform_user_id] - * @property {string} [platform_user_last_name] - */ - /** * @typedef PointBlankOtpData * @property {string} [message] @@ -1859,6 +2077,30 @@ const Joi = require("joi"); * @property {string} [pack_by_date] */ +/** + * @typedef ProcessManifest + * @property {string} action + * @property {FiltersRequest} filters + * @property {string} [manifest_id] + * @property {string} unique_id + */ + +/** + * @typedef ProcessManifestItemResponse + * @property {ProcessManifestResponse} [items] + */ + +/** + * @typedef ProcessManifestResponse + * @property {string} [action] + * @property {number} [company_id] + * @property {string} [created_by] + * @property {Filters} [filters] + * @property {string} [manifest_id] + * @property {string} [uid] + * @property {string} [user_id] + */ + /** * @typedef Products * @property {string} [identifier] - Product/Bag Article/Item Identifier @@ -1969,13 +2211,6 @@ const Joi = require("joi"); * @property {string} [unit] */ -/** - * @typedef ReturnConfig1 - * @property {boolean} [returnable] - * @property {number} [time] - * @property {string} [unit] - */ - /** * @typedef RoleBaseStateTransitionMapping * @property {string[]} [next_statuses] @@ -2013,6 +2248,19 @@ const Joi = require("joi"); * @property {ProcessingDates} [processing_dates] */ +/** + * @typedef ShipmentActionInfo + * @property {Object} [failed_invoiced_shipments] + * @property {Object[]} [failed_shipments] + * @property {string[]} [invoice] + * @property {string[]} [invoiceable_shipments] + * @property {string[]} [label] + * @property {string[]} [processing_invoice_shipments] + * @property {string[]} [processing_shipments] + * @property {string[]} [successful_invoiced_shipments] + * @property {string[]} [successful_shipments] + */ + /** * @typedef ShipmentBagReasons * @property {BagReasons[]} [reasons] @@ -2048,14 +2296,11 @@ const Joi = require("joi"); /** * @typedef ShipmentDetails - * @property {Object} [action_to_status] * @property {string} affiliate_shipment_id * @property {ArticleDetails[]} articles * @property {string} [box_type] * @property {number} [dp_id] * @property {number} fulfillment_id - * @property {string} [lock_message] - * @property {boolean} [lock_status] * @property {Object} [meta] * @property {number} shipments */ @@ -2088,15 +2333,19 @@ const Joi = require("joi"); * @property {BagUnit[]} [bags] * @property {boolean} [can_process] * @property {ShipmentListingChannel} [channel] + * @property {Currency} [currency] + * @property {CurrencyInfo} [currency_info] * @property {string} [customer_note] * @property {PlatformDeliveryAddress} [delivery_address] * @property {string} [display_name] * @property {string} [estimated_sla_time] + * @property {string} [estimated_sla_ts] * @property {ShipmentItemFulFillingStore} [fulfilling_store] * @property {string} [invoice_id] * @property {boolean} [lock_status] * @property {Object} [meta] * @property {string} [mode_of_payment] + * @property {string} [order_created_ts] * @property {string} [order_date] * @property {string} order_id * @property {string} [ordering_channnel] @@ -2105,9 +2354,11 @@ const Joi = require("joi"); * @property {string} [previous_shipment_id] * @property {Prices} [prices] * @property {string} shipment_created_at + * @property {string} [shipment_created_ts] * @property {string} [shipment_id] * @property {ShipmentStatus} [shipment_status] * @property {string} [status_created_at] + * @property {string} [status_created_ts] * @property {number} total_bags * @property {UserDataInfo} [user] */ @@ -2115,7 +2366,7 @@ const Joi = require("joi"); /** * @typedef ShipmentItemFulFillingStore * @property {string} [address] - * @property {string} [brand_store_tags] + * @property {string[]} [brand_store_tags] * @property {string} [city] * @property {string} code * @property {number} id @@ -2126,40 +2377,7 @@ const Joi = require("joi"); * @property {string} [pincode] * @property {string} [state] * @property {string} [store_email] - */ - -/** - * @typedef ShipmentItemMeta - * @property {string} [activity_comment] - * @property {boolean} [assign_dp_from_sb] - * @property {boolean} auto_trigger_dp_assignment_acf - * @property {Object} [bag_weight] - * @property {Object} [debug_info] - * @property {Object} [dp_options] - * @property {string} [dp_sort_key] - * @property {Object} [ewaybill_info] - * @property {string[]} [existing_dp_list] - * @property {Object} [external] - * @property {Formatted} [formatted] - * @property {string} [fulfilment_priority_text] - * @property {boolean} [is_international] - * @property {boolean} [is_self_ship] - * @property {LockData} [lock_data] - * @property {string} [order_type] - * @property {string} [packaging_name] - * @property {string} [parent_dp_id] - * @property {Object[]} [pdf_media] - * @property {boolean} [same_store_available] - * @property {number} [shipment_chargeable_weight] - * @property {ShipmentTags[]} [shipment_tags] - * @property {number} [shipment_volumetric_weight] - * @property {number} [shipment_weight] - * @property {string} [shipping_zone] - * @property {number} [sla] - * @property {string} [store_invoice_updated_date] - * @property {Object[]} [tags] - * @property {ShipmentTimeStamp} [timestamp] - * @property {number} [weight] + * @property {string[]} [tags] */ /** @@ -2178,6 +2396,13 @@ const Joi = require("joi"); * @property {string} [name] */ +/** + * @typedef ShipmentLockDetails + * @property {Object} [action_to_status] + * @property {string} [lock_message] + * @property {boolean} [lock_status] + */ + /** * @typedef ShipmentMeta * @property {boolean} [assign_dp_from_sb] @@ -2269,12 +2494,14 @@ const Joi = require("joi"); * @typedef ShipmentStatus * @property {string[]} [bag_list] * @property {string} [created_at] + * @property {string} [created_ts] * @property {string} [current_shipment_status] * @property {Object} [meta] * @property {string} [shipment_id] * @property {number} [shipment_status_id] * @property {string} status * @property {string} [status_created_at] + * @property {string} [status_created_ts] * @property {string} title */ @@ -2282,6 +2509,7 @@ const Joi = require("joi"); * @typedef ShipmentStatusData * @property {string[]} [bag_list] * @property {string} [created_at] + * @property {string} [created_ts] * @property {string} [current_shipment_status] * @property {string} [display_name] * @property {number} [id] @@ -2305,17 +2533,18 @@ const Joi = require("joi"); /** * @typedef ShippingInfo + * @property {string} [address] * @property {string} [address_type] - * @property {string} address1 + * @property {string} [address1] * @property {string} [address2] * @property {string} [alternate_email] * @property {string} [alternate_mobile_number] - * @property {string} city - * @property {string} country + * @property {string} [city] + * @property {string} [country] * @property {string} [country_code] * @property {string} [customer_code] * @property {string} [external_customer_code] - * @property {string} first_name + * @property {string} [first_name] * @property {string} [floor_no] * @property {string} [gender] * @property {Object} [geo_location] @@ -2323,12 +2552,12 @@ const Joi = require("joi"); * @property {string} [landmark] * @property {string} [last_name] * @property {string} [middle_name] - * @property {string} pincode - * @property {string} primary_email - * @property {string} primary_mobile_number + * @property {string} [pincode] + * @property {string} [primary_email] + * @property {string} [primary_mobile_number] * @property {string} [shipping_type] * @property {Object[]} [slot] - * @property {string} state + * @property {string} [state] * @property {string} [state_code] * @property {string} [title] */ @@ -2347,6 +2576,50 @@ const Joi = require("joi"); * @property {number} shipment_id - ShipmentId */ +/** + * @typedef StateManagerFilter + * @property {string} [default_value] + * @property {string} [description] + * @property {string} [display_name] + * @property {number} [id] + * @property {string} [name] + * @property {Object} [options] + * @property {string} [type] + */ + +/** + * @typedef StateManagerState + * @property {string} [app_display_name] - The application display name + * @property {boolean} [app_facing] - Whether state is for app facing or not + * @property {number} [id] - Unique identifier for the state + * @property {boolean} [is_active] - Whether state is active or not + * @property {string} [journey_type] - Type of the journey + * @property {string} [platform_display_name] - The platform display name + * @property {string} [state] - The name of the state + * @property {string} [state_type] - Type of the state + */ + +/** + * @typedef StateManagerTask + * @property {string} [description] + * @property {string} [display_name] + * @property {string} [doc_string] + * @property {number} [id] + * @property {Object} [kwargs] + * @property {string} [name] + */ + +/** + * @typedef StateTransitionFlag + * @property {string} [default_value] + * @property {string} [description] + * @property {string} [display_name] + * @property {number} [id] + * @property {string} [name] + * @property {Object} [options] + * @property {string} [type] + */ + /** * @typedef StatuesRequest * @property {string} [exclude_bags_next_state] - State to be change for @@ -2520,14 +2793,33 @@ const Joi = require("joi"); */ /** - * @typedef TaxInfo - * @property {string} [b2b_gstin_number] - * @property {string} [gstin] - * @property {string} [pan_no] + * @typedef TaxInfo + * @property {string} [b2b_gstin_number] + * @property {string} [gstin] + * @property {string} [pan_no] + */ + +/** + * @typedef TemplateDownloadResponse + * @property {string} [file_name] + * @property {string} [url] + */ + +/** + * @typedef Templates + * @property {string} [text] + * @property {string} [value] + */ + +/** + * @typedef TotalShipmentPricesCount + * @property {number} [shipment_count] + * @property {number} [total_price] */ /** * @typedef TrackingList + * @property {string} [created_ts] * @property {boolean} [is_current] * @property {boolean} [is_passed] * @property {string} status @@ -2535,18 +2827,6 @@ const Joi = require("joi"); * @property {string} [time] */ -/** - * @typedef TransactionData - * @property {number} [amount_paid] - * @property {string} [currency] - * @property {string} [entity] - * @property {string} [payment_id] - * @property {string} [status] - * @property {string} [terminal_id] - * @property {string} [transaction_id] - * @property {string} [unique_reference_number] - */ - /** * @typedef UpdatePackagingDimensionsPayload * @property {string} current_status @@ -2630,12 +2910,15 @@ const Joi = require("joi"); * @property {string} [area] * @property {string} city * @property {string} country + * @property {string} [country_iso_code] + * @property {string} [country_phone_code] * @property {string} [email] * @property {string} [landmark] * @property {string} name * @property {string} phone * @property {string} pincode * @property {string} state + * @property {string} [state_code] */ /** @@ -2893,6 +3176,13 @@ class OrderPlatformModel { }); } + /** @returns {AllowedTemplatesResponse} */ + static AllowedTemplatesResponse() { + return Joi.object({ + template_x_slug: Joi.array().items(OrderPlatformModel.Templates()), + }); + } + /** @returns {AnnouncementResponse} */ static AnnouncementResponse() { return Joi.object({ @@ -2964,11 +3254,17 @@ class OrderPlatformModel { category: Joi.any().required(), dimension: Joi.any().required(), quantity: Joi.number().required(), - status: Joi.any().allow(null), weight: Joi.any().required(), }); } + /** @returns {ArticleStatusDetails} */ + static ArticleStatusDetails() { + return Joi.object({ + status: Joi.any().allow(null), + }); + } + /** @returns {AttachOrderUser} */ static AttachOrderUser() { return Joi.object({ @@ -3018,18 +3314,6 @@ class OrderPlatformModel { }); } - /** @returns {B2BPODetails} */ - static B2BPODetails() { - return Joi.object({ - docker_number: Joi.string().allow("").allow(null), - item_base_price: Joi.number().allow(null), - partial_can_ret: Joi.boolean().allow(null), - po_line_amount: Joi.number().allow(null), - po_tax_amount: Joi.number().allow(null), - total_gst_percentage: Joi.number().allow(null), - }); - } - /** @returns {BagConfigs} */ static BagConfigs() { return Joi.object({ @@ -3049,7 +3333,7 @@ class OrderPlatformModel { affiliate_details: OrderPlatformModel.AffiliateDetails(), applied_promos: Joi.array().items(Joi.any()), article: OrderPlatformModel.Article(), - article_details: OrderPlatformModel.ArticleDetails(), + article_details: OrderPlatformModel.ArticleStatusDetails(), bag_status: Joi.array().items(OrderPlatformModel.BagStatusHistory()), bag_status_history: OrderPlatformModel.BagStatusHistory(), bag_update_time: Joi.number().allow(null), @@ -3083,70 +3367,12 @@ class OrderPlatformModel { restore_promos: Joi.any().allow(null), seller_identifier: Joi.string().allow("").allow(null), shipment_id: Joi.string().allow("").allow(null), - status: OrderPlatformModel.BagReturnableCancelableStatus1(), + status: OrderPlatformModel.BagReturnableCancelableStatus(), tags: Joi.array().items(Joi.string().allow("")), type: Joi.string().allow("").allow(null), }); } - /** @returns {BagGST} */ - static BagGST() { - return Joi.object({ - brand_calculated_amount: Joi.number().allow(null), - cgst_gst_fee: Joi.string().allow("").allow(null), - cgst_tax_percentage: Joi.number().allow(null), - gst_fee: Joi.number().allow(null), - gst_tag: Joi.string().allow("").allow(null), - gst_tax_percentage: Joi.number().allow(null), - gstin_code: Joi.string().allow("").allow(null), - hsn_code: Joi.string().allow("").allow(null), - hsn_code_id: Joi.string().allow("").allow(null), - igst_gst_fee: Joi.string().allow("").allow(null), - igst_tax_percentage: Joi.number().allow(null), - is_default_hsn_code: Joi.boolean().allow(null), - sgst_gst_fee: Joi.string().allow("").allow(null), - sgst_tax_percentage: Joi.number().allow(null), - tax_collected_at_source: Joi.number().allow(null), - value_of_good: Joi.number().allow(null), - }); - } - - /** @returns {BagGSTDetails} */ - static BagGSTDetails() { - return Joi.object({ - brand_calculated_amount: Joi.number().required(), - cgst_gst_fee: Joi.string().allow("").required(), - cgst_tax_percentage: Joi.number().required(), - gst_fee: Joi.number().required(), - gst_tag: Joi.string().allow("").required(), - gst_tax_percentage: Joi.number().required(), - gstin_code: Joi.string().allow("").allow(null), - hsn_code: Joi.string().allow("").required(), - hsn_code_id: Joi.string().allow("").required(), - igst_gst_fee: Joi.string().allow("").required(), - igst_tax_percentage: Joi.number().required(), - is_default_hsn_code: Joi.boolean().allow(null), - sgst_gst_fee: Joi.string().allow("").required(), - sgst_tax_percentage: Joi.number().required(), - tax_collected_at_source: Joi.number().required(), - value_of_good: Joi.number().required(), - }); - } - - /** @returns {BagMeta} */ - static BagMeta() { - return Joi.object({ - b2b_po_details: OrderPlatformModel.B2BPODetails(), - custom_json: Joi.any().allow(null), - custom_message: Joi.string().allow("").allow(null), - docket_number: Joi.string().allow("").allow(null), - extra_meta: Joi.any().allow(null), - gift_card: OrderPlatformModel.GiftCard(), - group_id: Joi.string().allow("").allow(null), - partial_can_ret: Joi.boolean().allow(null), - }); - } - /** @returns {BagPaymentMethods} */ static BagPaymentMethods() { return Joi.object({ @@ -3185,17 +3411,6 @@ class OrderPlatformModel { }); } - /** @returns {BagReturnableCancelableStatus1} */ - static BagReturnableCancelableStatus1() { - return Joi.object({ - can_be_cancelled: Joi.boolean().required(), - enable_tracking: Joi.boolean().required(), - is_active: Joi.boolean().required(), - is_customer_return_allowed: Joi.boolean().required(), - is_returnable: Joi.boolean().required(), - }); - } - /** @returns {Bags} */ static Bags() { return Joi.object({ @@ -3249,6 +3464,7 @@ class OrderPlatformModel { bag_state_mapper: OrderPlatformModel.BagStateMapper(), bsh_id: Joi.number().allow(null), created_at: Joi.string().allow("").allow(null), + created_ts: Joi.string().allow("").allow(null), delivery_awb_number: Joi.string().allow("").allow(null), delivery_partner_id: Joi.number().allow(null), display_name: Joi.string().allow("").allow(null), @@ -3261,6 +3477,7 @@ class OrderPlatformModel { status: Joi.string().allow("").required(), store_id: Joi.number().allow(null), updated_at: Joi.string().allow("").allow(null), + updated_ts: Joi.string().allow("").allow(null), }); } @@ -3307,41 +3524,31 @@ class OrderPlatformModel { /** @returns {BillingInfo} */ static BillingInfo() { return Joi.object({ - address1: Joi.string().allow("").required(), + address: Joi.string().allow(""), + address1: Joi.string().allow(""), address2: Joi.string().allow(""), alternate_email: Joi.string().allow(""), alternate_mobile_number: Joi.string().allow(""), - city: Joi.string().allow("").required(), - country: Joi.string().allow("").required(), + city: Joi.string().allow(""), + country: Joi.string().allow(""), country_code: Joi.string().allow(""), customer_code: Joi.string().allow(""), external_customer_code: Joi.string().allow(""), - first_name: Joi.string().allow("").required(), + first_name: Joi.string().allow(""), floor_no: Joi.string().allow(""), gender: Joi.string().allow(""), house_no: Joi.string().allow(""), last_name: Joi.string().allow(""), middle_name: Joi.string().allow(""), - pincode: Joi.string().allow("").required(), - primary_email: Joi.string().allow("").required(), - primary_mobile_number: Joi.string().allow("").required(), - state: Joi.string().allow("").required(), + pincode: Joi.string().allow(""), + primary_email: Joi.string().allow(""), + primary_mobile_number: Joi.string().allow(""), + state: Joi.string().allow(""), state_code: Joi.string().allow(""), title: Joi.string().allow(""), }); } - /** @returns {BillingStaffDetails} */ - static BillingStaffDetails() { - return Joi.object({ - employee_code: Joi.string().allow("").allow(null), - first_name: Joi.string().allow("").allow(null), - last_name: Joi.string().allow("").allow(null), - staff_id: Joi.number().allow(null), - user: Joi.string().allow("").allow(null), - }); - } - /** @returns {Brand} */ static Brand() { return Joi.object({ @@ -3361,6 +3568,36 @@ class OrderPlatformModel { }); } + /** @returns {BulkActionListingData} */ + static BulkActionListingData() { + return Joi.object({ + batch_id: Joi.string().allow(""), + bulk_action_type: Joi.string().allow(""), + company_id: Joi.number(), + created_ts: Joi.string().allow(""), + do_invoice_label_generated: Joi.boolean(), + file_name: Joi.string().allow(""), + file_url: Joi.string().allow(""), + id: Joi.number(), + invoice_document_type: Joi.string().allow(""), + invoice_status: Joi.string().allow(""), + is_invoiceable: Joi.boolean(), + label_document_type: Joi.string().allow(""), + last_selected_invoice_label_type: Joi.string().allow(""), + meta: Joi.any(), + shipments_action_info: OrderPlatformModel.ShipmentActionInfo(), + status: Joi.boolean(), + store_code: Joi.string().allow(""), + store_id: Joi.number(), + store_name: Joi.string().allow(""), + updated_ts: Joi.number(), + uploaded_by: Joi.string().allow(""), + uploaded_on: Joi.string().allow(""), + user_id: Joi.string().allow(""), + user_name: Joi.string().allow(""), + }); + } + /** @returns {BulkActionTemplate} */ static BulkActionTemplate() { return Joi.object({ @@ -3378,27 +3615,50 @@ class OrderPlatformModel { }); } - /** @returns {BulkReportsDownloadFailedResponse} */ - static BulkReportsDownloadFailedResponse() { + /** @returns {BulkFailedResponse} */ + static BulkFailedResponse() { return Joi.object({ error: Joi.string().allow(""), status: Joi.boolean(), }); } + /** @returns {BulkListingResponse} */ + static BulkListingResponse() { + return Joi.object({ + data: Joi.array().items(OrderPlatformModel.BulkActionListingData()), + page: OrderPlatformModel.BulkListinPage(), + success: Joi.boolean(), + total_count: Joi.number(), + }); + } + + /** @returns {BulkListinPage} */ + static BulkListinPage() { + return Joi.object({ + current: Joi.number(), + has_next: Joi.boolean(), + has_previous: Joi.boolean(), + item_total: Joi.number(), + size: Joi.number(), + total: Joi.number(), + type: Joi.string().allow(""), + }); + } + /** @returns {BulkReportsDownloadRequest} */ static BulkReportsDownloadRequest() { return Joi.object({ custom_filters_for_lane: Joi.any(), custom_headers: Joi.string().allow(""), + end_date: Joi.string().allow(""), entities: Joi.array().items(Joi.string().allow("")), filter_type: Joi.string().allow(""), - from_date: Joi.string().allow(""), is_cross_company_enabled: Joi.boolean(), lane_type: Joi.string().allow(""), report_type: Joi.string().allow(""), + start_date: Joi.string().allow(""), store_ids: Joi.array().items(Joi.string().allow("")), - to_date: Joi.string().allow(""), }); } @@ -3410,6 +3670,23 @@ class OrderPlatformModel { }); } + /** @returns {BulkStateTransistionRequest} */ + static BulkStateTransistionRequest() { + return Joi.object({ + file_name: Joi.string().allow(""), + url: Joi.string().allow(""), + }); + } + + /** @returns {BulkStateTransistionResponse} */ + static BulkStateTransistionResponse() { + return Joi.object({ + batch_id: Joi.string().allow(""), + message: Joi.string().allow(""), + status: Joi.boolean(), + }); + } + /** @returns {BuyerDetails} */ static BuyerDetails() { return Joi.object({ @@ -3485,6 +3762,14 @@ class OrderPlatformModel { }); } + /** @returns {ConversionRate} */ + static ConversionRate() { + return Joi.object({ + base: Joi.string().allow(""), + rates: Joi.any(), + }); + } + /** @returns {CourierPartnerTrackingDetails} */ static CourierPartnerTrackingDetails() { return Joi.object({ @@ -3615,12 +3900,29 @@ class OrderPlatformModel { }); } + /** @returns {Currency} */ + static Currency() { + return Joi.object({ + currency_code: Joi.string().allow(""), + currency_symbol: Joi.string().allow(""), + }); + } + + /** @returns {CurrencyInfo} */ + static CurrencyInfo() { + return Joi.object({ + conversion_rate: OrderPlatformModel.ConversionRate(), + ordering_currency: OrderPlatformModel.OrderingCurrency(), + }); + } + /** @returns {CurrentStatus} */ static CurrentStatus() { return Joi.object({ bag_id: Joi.number().allow(null), bag_state_mapper: OrderPlatformModel.BagStateMapper(), created_at: Joi.string().allow("").allow(null), + created_ts: Joi.string().allow("").allow(null), delivery_awb_number: Joi.string().allow("").allow(null), delivery_partner_id: Joi.number().allow(null), id: Joi.number().required(), @@ -3645,6 +3947,14 @@ class OrderPlatformModel { }); } + /** @returns {DateRange} */ + static DateRange() { + return Joi.object({ + from_date: Joi.string().allow(""), + to_date: Joi.string().allow(""), + }); + } + /** @returns {Dates} */ static Dates() { return Joi.object({ @@ -3729,6 +4039,64 @@ class OrderPlatformModel { }); } + /** @returns {EInvoiceDetails} */ + static EInvoiceDetails() { + return Joi.object({ + error_details: Joi.array().items( + OrderPlatformModel.EInvoiceErrorDetails() + ), + irn_details: OrderPlatformModel.EInvoiceIrnDetails(), + }); + } + + /** @returns {EInvoiceErrorDetails} */ + static EInvoiceErrorDetails() { + return Joi.object({ + error_code: Joi.string().allow(""), + error_message: Joi.string().allow("").required(), + }); + } + + /** @returns {EInvoiceErrorInfo} */ + static EInvoiceErrorInfo() { + return Joi.object({ + error_details: Joi.array().items( + OrderPlatformModel.EInvoiceErrorDetails() + ), + }); + } + + /** @returns {EInvoiceErrorResponse} */ + static EInvoiceErrorResponse() { + return Joi.object({ + message: Joi.string().allow(""), + response_data: Joi.array().items( + OrderPlatformModel.EInvoiceErrorResponseData() + ), + }); + } + + /** @returns {EInvoiceErrorResponseData} */ + static EInvoiceErrorResponseData() { + return Joi.object({ + einvoice_info: OrderPlatformModel.EInvoiceErrorInfo(), + einvoice_type: Joi.string().allow("").required(), + message: Joi.string().allow("").required(), + shipment_id: Joi.string().allow("").required(), + status: Joi.number().required(), + }); + } + + /** @returns {EInvoiceErrorResponseDetails} */ + static EInvoiceErrorResponseDetails() { + return Joi.object({ + message: Joi.string().allow(""), + response_data: Joi.array() + .items(OrderPlatformModel.EInvoiceErrorResponseData()) + .required(), + }); + } + /** @returns {EinvoiceInfo} */ static EinvoiceInfo() { return Joi.object({ @@ -3737,6 +4105,17 @@ class OrderPlatformModel { }); } + /** @returns {EInvoiceIrnDetails} */ + static EInvoiceIrnDetails() { + return Joi.object({ + ack_dt: Joi.string().allow("").required(), + ack_no: Joi.string().allow("").required(), + irn: Joi.string().allow("").required(), + signed_invoice: Joi.string().allow("").required(), + signed_qr_code: Joi.string().allow("").required(), + }); + } + /** @returns {EInvoicePortalDetails} */ static EInvoicePortalDetails() { return Joi.object({ @@ -3749,14 +4128,11 @@ class OrderPlatformModel { /** @returns {EInvoiceResponseData} */ static EInvoiceResponseData() { return Joi.object({ - ack_dt: Joi.string().allow(""), - ack_no: Joi.string().allow(""), - irn: Joi.string().allow(""), + einvoice_info: OrderPlatformModel.EInvoiceDetails(), + einvoice_type: Joi.string().allow("").required(), message: Joi.string().allow("").required(), shipment_id: Joi.string().allow("").required(), - success: Joi.boolean().required(), - timeout: Joi.number(), - timeout_unit: Joi.string().allow(""), + status: Joi.number().required(), }); } @@ -3772,18 +4148,16 @@ class OrderPlatformModel { /** @returns {EInvoiceRetryResponse} */ static EInvoiceRetryResponse() { return Joi.object({ - message: Joi.string().allow(""), response_data: Joi.array() .items(OrderPlatformModel.EInvoiceResponseData()) .required(), - success: Joi.boolean(), - success_count: Joi.number().required(), }); } /** @returns {EInvoiceRetryShipmentData} */ static EInvoiceRetryShipmentData() { return Joi.object({ + einvoice_type: Joi.string().allow("").required(), shipment_id: Joi.string().allow("").required(), }); } @@ -3843,7 +4217,7 @@ class OrderPlatformModel { /** @returns {ErrorResponse} */ static ErrorResponse() { return Joi.object({ - error: Joi.string().allow("").required(), + error: Joi.string().allow(""), error_trace: Joi.string().allow("").allow(null), message: Joi.string().allow("").allow(null).required(), status: Joi.number().allow(null), @@ -3851,6 +4225,37 @@ class OrderPlatformModel { }); } + /** @returns {FailedOrderLogDetails} */ + static FailedOrderLogDetails() { + return Joi.object({ + error_trace: Joi.string().allow("").allow(null).required(), + exception: Joi.string().allow("").allow(null).required(), + }); + } + + /** @returns {FailedOrderLogs} */ + static FailedOrderLogs() { + return Joi.object({ + items: OrderPlatformModel.FailedOrdersItem().required(), + page: OrderPlatformModel.PageDetails().required(), + }); + } + + /** @returns {FailedOrdersItem} */ + static FailedOrdersItem() { + return Joi.object({ + channel: OrderPlatformModel.LogsChannelDetails().required(), + created_at: Joi.string().allow("").required(), + display_message: Joi.string().allow("").allow(null).required(), + error_message: Joi.string().allow("").allow(null).required(), + log_id: Joi.number().required(), + meta: Joi.any().allow(null).required(), + method_name: Joi.string().allow("").required(), + order_id: Joi.string().allow("").required(), + payment: OrderPlatformModel.LogPaymentDetails().required(), + }); + } + /** @returns {FetchCreditBalanceRequestPayload} */ static FetchCreditBalanceRequestPayload() { return Joi.object({ @@ -3888,6 +4293,22 @@ class OrderPlatformModel { }); } + /** @returns {Filters} */ + static Filters() { + return Joi.object({ + date_range: OrderPlatformModel.DateRange(), + dp_ids: Joi.number(), + dp_name: Joi.string().allow(""), + from_date: Joi.string().allow(""), + lane: Joi.string().allow(""), + logo: Joi.string().allow(""), + selected_shipments: Joi.string().allow(""), + store_name: Joi.string().allow(""), + stores: Joi.number(), + to_date: Joi.string().allow(""), + }); + } + /** @returns {FiltersInfo} */ static FiltersInfo() { return Joi.object({ @@ -3900,6 +4321,19 @@ class OrderPlatformModel { }); } + /** @returns {FiltersRequest} */ + static FiltersRequest() { + return Joi.object({ + date_range: OrderPlatformModel.DateRange(), + dp_ids: Joi.number().required(), + dp_name: Joi.string().allow("").required(), + lane: Joi.string().allow("").required(), + logo: Joi.string().allow(""), + store_name: Joi.string().allow("").required(), + stores: Joi.number().required(), + }); + } + /** @returns {FiltersResponse} */ static FiltersResponse() { return Joi.object({ @@ -3974,59 +4408,17 @@ class OrderPlatformModel { }); } - /** @returns {GenerateInvoiceIDErrorResponse} */ - static GenerateInvoiceIDErrorResponse() { - return Joi.object({ - items: Joi.array().items( - OrderPlatformModel.GenerateInvoiceIDErrorResponseData() - ), - }); - } - - /** @returns {GenerateInvoiceIDErrorResponseData} */ - static GenerateInvoiceIDErrorResponseData() { - return Joi.object({ - error_message: Joi.string().allow("").allow(null), - invoice_id: Joi.boolean().allow(null), - shipment_id: Joi.string().allow(""), - success: Joi.boolean(), - }); - } - - /** @returns {GenerateInvoiceIDRequest} */ - static GenerateInvoiceIDRequest() { - return Joi.object({ - shipment_ids: Joi.array().items(Joi.string().allow("")).required(), - }); - } - - /** @returns {GenerateInvoiceIDResponse} */ - static GenerateInvoiceIDResponse() { - return Joi.object({ - items: Joi.array().items( - OrderPlatformModel.GenerateInvoiceIDResponseData() - ), - }); - } - - /** @returns {GenerateInvoiceIDResponseData} */ - static GenerateInvoiceIDResponseData() { - return Joi.object({ - error_message: Joi.boolean().allow(null), - invoice_id: Joi.string().allow("").allow(null), - shipment_id: Joi.string().allow(""), - success: Joi.boolean(), - }); - } - /** @returns {GeneratePosOrderReceiptResponse} */ static GeneratePosOrderReceiptResponse() { return Joi.object({ customer_cn_receipt: Joi.string().allow(""), + customer_cn_receipt_template: Joi.string().allow(""), invoice_receipt: Joi.string().allow(""), + invoice_receipt_template: Joi.string().allow(""), merchant_cn_receipt: Joi.string().allow(""), order_id: Joi.string().allow(""), payment_receipt: Joi.string().allow(""), + payment_receipt_template: Joi.string().allow(""), success: Joi.boolean(), }); } @@ -4040,21 +4432,11 @@ class OrderPlatformModel { /** @returns {GetBagsPlatformResponse} */ static GetBagsPlatformResponse() { - return Joi.object({ - items: Joi.array() - .items(OrderPlatformModel.BagDetailsPlatformResponse()) - .required(), - page: OrderPlatformModel.BagsPage().required(), - }); - } - - /** @returns {GiftCard} */ - static GiftCard() { - return Joi.object({ - display_text: Joi.string().allow("").allow(null), - gift_message: Joi.string().allow("").allow(null), - gift_price: Joi.number().allow(null), - is_gift_applied: Joi.boolean().allow(null), + return Joi.object({ + items: Joi.array() + .items(OrderPlatformModel.BagDetailsPlatformResponse()) + .required(), + page: OrderPlatformModel.BagsPage().required(), }); } @@ -4229,6 +4611,45 @@ class OrderPlatformModel { }); } + /** @returns {JobDetailsData} */ + static JobDetailsData() { + return Joi.object({ + batch_id: Joi.string().allow(""), + company_id: Joi.string().allow(""), + failed_shipments_count: Joi.number(), + processing_shipments_count: Joi.number(), + successful_shipment_ids: Joi.array().items(Joi.string().allow("")), + successful_shipments_count: Joi.number(), + total_shipments_count: Joi.number(), + }); + } + + /** @returns {JobDetailsResponse} */ + static JobDetailsResponse() { + return Joi.object({ + created_ts: Joi.string().allow(""), + data: Joi.array().items(OrderPlatformModel.JobDetailsData()), + failed_records: Joi.array().items( + Joi.object().pattern(/\S/, Joi.string().allow("")) + ), + file_url: Joi.string().allow(""), + message: Joi.string().allow(""), + status: Joi.string().allow(""), + success: Joi.boolean(), + uploaded_by: Joi.string().allow(""), + uploaded_on: Joi.string().allow(""), + user_id: Joi.string().allow(""), + }); + } + + /** @returns {JobFailedResponse} */ + static JobFailedResponse() { + return Joi.object({ + file_name: Joi.string().allow(""), + url: Joi.string().allow(""), + }); + } + /** @returns {LaneConfigResponse} */ static LaneConfigResponse() { return Joi.object({ @@ -4268,6 +4689,135 @@ class OrderPlatformModel { }); } + /** @returns {LogPaymentDetails} */ + static LogPaymentDetails() { + return Joi.object({ + amount_paid: Joi.string().allow("").allow(null), + payment_mode: Joi.string().allow("").allow(null), + }); + } + + /** @returns {LogsChannelDetails} */ + static LogsChannelDetails() { + return Joi.object({ + channel_id: Joi.string().allow("").allow(null), + channel_shipment_id: Joi.string().allow("").allow(null), + logo: Joi.string().allow("").allow(null), + name: Joi.string().allow("").allow(null), + }); + } + + /** @returns {Manifest} */ + static Manifest() { + return Joi.object({ + company_id: Joi.number().required(), + created_at: Joi.string().allow("").required(), + created_by: Joi.string().allow("").required(), + created_ts: Joi.string().allow(""), + filters: OrderPlatformModel.Filters(), + id: Joi.number().required(), + is_active: Joi.boolean().required(), + manifest_id: Joi.string().allow("").required(), + meta: OrderPlatformModel.ManifestMeta(), + pdf_meta: OrderPlatformModel.PDFMeta(), + status: Joi.string().allow("").required(), + uid: Joi.string().allow("").required(), + user_id: Joi.string().allow("").required(), + }); + } + + /** @returns {ManifestDetails} */ + static ManifestDetails() { + return Joi.object({ + additional_shipment_count: Joi.number(), + items: Joi.array().items(OrderPlatformModel.ManifestItemDetails()), + manifest_details: Joi.array().items(OrderPlatformModel.Manifest()), + page: OrderPlatformModel.ManifestPageInfo(), + }); + } + + /** @returns {ManifestFile} */ + static ManifestFile() { + return Joi.object({ + bucket: Joi.string().allow(""), + key: Joi.string().allow(""), + region: Joi.string().allow(""), + }); + } + + /** @returns {ManifestFiltersResponse} */ + static ManifestFiltersResponse() { + return Joi.object({ + advance_filter: Joi.array().items(OrderPlatformModel.FiltersInfo()), + global_filter: Joi.array().items(OrderPlatformModel.FiltersInfo()), + }); + } + + /** @returns {ManifestItemDetails} */ + static ManifestItemDetails() { + return Joi.object({ + awb_number: Joi.string().allow(""), + invoice_id: Joi.string().allow(""), + order_id: Joi.string().allow("").required(), + quantity: Joi.number(), + shipment_created_at: Joi.string().allow(""), + shipment_id: Joi.string().allow("").required(), + }); + } + + /** @returns {ManifestList} */ + static ManifestList() { + return Joi.object({ + items: Joi.array().items(OrderPlatformModel.Manifest()), + page: OrderPlatformModel.ManifestPageInfo(), + }); + } + + /** @returns {ManifestMediaUpdate} */ + static ManifestMediaUpdate() { + return Joi.object({ + code: Joi.number(), + entity: Joi.string().allow(""), + file: OrderPlatformModel.ManifestFile(), + link: Joi.string().allow(""), + media_type: Joi.string().allow(""), + status: Joi.boolean(), + }); + } + + /** @returns {ManifestMeta} */ + static ManifestMeta() { + return Joi.object({ + filters: OrderPlatformModel.Filters(), + total_shipment_prices_count: OrderPlatformModel.TotalShipmentPricesCount(), + }); + } + + /** @returns {ManifestPageInfo} */ + static ManifestPageInfo() { + return Joi.object({ + current: Joi.number().required(), + has_next: Joi.boolean().required(), + has_previous: Joi.boolean().required(), + size: Joi.number().required(), + total: Joi.number().required(), + type: Joi.string().allow("").required(), + }); + } + + /** @returns {ManifestShipmentListing} */ + static ManifestShipmentListing() { + return Joi.object({ + items: Joi.array().items(OrderPlatformModel.ManifestItemDetails()), + lane: Joi.string().allow(""), + message: Joi.string().allow(""), + page: OrderPlatformModel.ManifestPageInfo().required(), + status: Joi.number().required(), + success: Joi.boolean().required(), + total_count: Joi.number().required(), + }); + } + /** @returns {MarketPlacePdf} */ static MarketPlacePdf() { return Joi.object({ @@ -4288,7 +4838,7 @@ class OrderPlatformModel { static OrderBagArticle() { return Joi.object({ identifiers: Joi.any().allow(null), - return_config: OrderPlatformModel.ReturnConfig1(), + return_config: OrderPlatformModel.ReturnConfig(), size: Joi.string().allow("").allow(null), uid: Joi.string().allow("").allow(null), }); @@ -4357,6 +4907,7 @@ class OrderPlatformModel { /** @returns {OrderData} */ static OrderData() { return Joi.object({ + created_ts: Joi.string().allow(""), fynd_order_id: Joi.string().allow("").required(), meta: Joi.object().pattern(/\S/, Joi.any()), order_date: Joi.string().allow("").required(), @@ -4379,6 +4930,7 @@ class OrderPlatformModel { return Joi.object({ affiliate_id: Joi.string().allow("").allow(null), cod_charges: Joi.string().allow("").allow(null), + created_ts: Joi.string().allow("").allow(null), fynd_order_id: Joi.string().allow("").required(), meta: Joi.object().pattern(/\S/, Joi.any()), order_date: Joi.string().allow("").allow(null), @@ -4420,6 +4972,16 @@ class OrderPlatformModel { }); } + /** @returns {OrderingCurrency} */ + static OrderingCurrency() { + return Joi.object({ + currency_code: Joi.string().allow(""), + currency_name: Joi.string().allow(""), + currency_sub_unit: Joi.string().allow(""), + currency_symbol: Joi.string().allow(""), + }); + } + /** @returns {OrderingStoreDetails} */ static OrderingStoreDetails() { return Joi.object({ @@ -4456,32 +5018,6 @@ class OrderPlatformModel { }); } - /** @returns {OrderMeta} */ - static OrderMeta() { - return Joi.object({ - billing_staff_details: OrderPlatformModel.BillingStaffDetails(), - cart_id: Joi.number().allow(null), - cart_object_id: Joi.string().allow("").allow(null), - comment: Joi.string().allow("").allow(null), - company_logo: Joi.string().allow("").allow(null), - currency_symbol: Joi.string().allow("").allow(null), - customer_note: Joi.string().allow("").allow(null), - employee_id: Joi.string().allow("").allow(null), - extra_meta: Joi.any().allow(null), - files: Joi.array().items(Joi.any()), - mongo_cart_id: Joi.number().allow(null), - order_child_entities: Joi.array().items(Joi.string().allow("")), - order_platform: Joi.string().allow("").allow(null), - order_tags: Joi.array().items(Joi.any().allow(null)), - order_type: Joi.string().allow("").allow(null), - ordering_store: Joi.number().allow(null), - payment_type: Joi.string().allow("").allow(null), - platform_user_details: OrderPlatformModel.PlatformUserDetails(), - staff: Joi.any().allow(null), - transaction_data: OrderPlatformModel.TransactionData(), - }); - } - /** @returns {OrderPriority} */ static OrderPriority() { return Joi.object({ @@ -4558,11 +5094,33 @@ class OrderPlatformModel { /** @returns {PageDetails} */ static PageDetails() { + return Joi.object({ + current: Joi.number().allow(null), + has_next: Joi.boolean().allow(null), + has_previous: Joi.boolean().allow(null), + item_total: Joi.number().allow(null).required(), + size: Joi.number().allow(null), + type: Joi.string().allow("").allow(null), + }); + } + + /** @returns {PaginatedStates} */ + static PaginatedStates() { + return Joi.object({ + items: Joi.array().items(OrderPlatformModel.StateManagerState()), + page: OrderPlatformModel.PaginationInfo(), + }); + } + + /** @returns {PaginationInfo} */ + static PaginationInfo() { return Joi.object({ current: Joi.number(), has_next: Joi.boolean(), - item_total: Joi.number().required(), + has_previous: Joi.boolean(), + item_total: Joi.number(), size: Joi.number(), + total: Joi.number(), type: Joi.string().allow(""), }); } @@ -4619,6 +5177,16 @@ class OrderPlatformModel { }); } + /** @returns {PDFMeta} */ + static PDFMeta() { + return Joi.object({ + consent: Joi.string().allow("").allow(null), + media_updates: Joi.array().items( + OrderPlatformModel.ManifestMediaUpdate() + ), + }); + } + /** @returns {PhoneDetails} */ static PhoneDetails() { return Joi.object({ @@ -4709,8 +5277,11 @@ class OrderPlatformModel { OrderPlatformModel.PlatformBreakupValues() ), channel: OrderPlatformModel.PlatformChannel(), + currency: OrderPlatformModel.Currency(), + currency_info: OrderPlatformModel.CurrencyInfo(), meta: Joi.any().allow(null), order_created_time: Joi.string().allow("").allow(null), + order_created_ts: Joi.string().allow("").allow(null), order_id: Joi.string().allow("").allow(null), order_value: Joi.number().allow(null), payment_mode: Joi.string().allow("").allow(null), @@ -4740,6 +5311,8 @@ class OrderPlatformModel { company_details: OrderPlatformModel.CompanyDetails(), coupon: Joi.any().allow(null), credit_note_id: Joi.string().allow("").allow(null), + currency: OrderPlatformModel.Currency(), + currency_info: OrderPlatformModel.CurrencyInfo(), custom_message: Joi.string().allow("").allow(null), custom_meta: Joi.array().items(Joi.any()), delivery_details: OrderPlatformModel.UserDetailsData(), @@ -4748,6 +5321,7 @@ class OrderPlatformModel { dp_details: OrderPlatformModel.DPDetailsData(), enable_dp_tracking: Joi.boolean().allow(null), estimated_sla_time: Joi.string().allow("").allow(null), + estimated_sla_ts: Joi.string().allow("").allow(null), forward_shipment_id: Joi.string().allow("").allow(null), fulfilling_store: OrderPlatformModel.FulfillingStore(), fulfilment_priority: Joi.number().allow(null), @@ -4775,7 +5349,8 @@ class OrderPlatformModel { priority_text: Joi.string().allow("").allow(null), rto_address: OrderPlatformModel.PlatformDeliveryAddress(), shipment_created_at: Joi.string().allow("").allow(null), - shipment_details: OrderPlatformModel.ShipmentDetails(), + shipment_created_ts: Joi.string().allow("").allow(null), + shipment_details: OrderPlatformModel.ShipmentLockDetails(), shipment_id: Joi.string().allow("").required(), shipment_images: Joi.array().items(Joi.string().allow("")), shipment_quantity: Joi.number().allow(null), @@ -4823,16 +5398,6 @@ class OrderPlatformModel { }); } - /** @returns {PlatformUserDetails} */ - static PlatformUserDetails() { - return Joi.object({ - platform_user_employee_code: Joi.string().allow("").allow(null), - platform_user_first_name: Joi.string().allow("").allow(null), - platform_user_id: Joi.string().allow("").allow(null), - platform_user_last_name: Joi.string().allow("").allow(null), - }); - } - /** @returns {PointBlankOtpData} */ static PointBlankOtpData() { return Joi.object({ @@ -4923,6 +5488,36 @@ class OrderPlatformModel { }); } + /** @returns {ProcessManifest} */ + static ProcessManifest() { + return Joi.object({ + action: Joi.string().allow("").required(), + filters: OrderPlatformModel.FiltersRequest().required(), + manifest_id: Joi.string().allow(""), + unique_id: Joi.string().allow("").required(), + }); + } + + /** @returns {ProcessManifestItemResponse} */ + static ProcessManifestItemResponse() { + return Joi.object({ + items: OrderPlatformModel.ProcessManifestResponse(), + }); + } + + /** @returns {ProcessManifestResponse} */ + static ProcessManifestResponse() { + return Joi.object({ + action: Joi.string().allow(""), + company_id: Joi.number(), + created_by: Joi.string().allow(""), + filters: OrderPlatformModel.Filters(), + manifest_id: Joi.string().allow(""), + uid: Joi.string().allow(""), + user_id: Joi.string().allow(""), + }); + } + /** @returns {Products} */ static Products() { return Joi.object({ @@ -5064,15 +5659,6 @@ class OrderPlatformModel { }); } - /** @returns {ReturnConfig1} */ - static ReturnConfig1() { - return Joi.object({ - returnable: Joi.boolean().allow(null), - time: Joi.number().allow(null), - unit: Joi.string().allow("").allow(null), - }); - } - /** @returns {RoleBaseStateTransitionMapping} */ static RoleBaseStateTransitionMapping() { return Joi.object({ @@ -5120,6 +5706,26 @@ class OrderPlatformModel { }); } + /** @returns {ShipmentActionInfo} */ + static ShipmentActionInfo() { + return Joi.object({ + failed_invoiced_shipments: Joi.object().pattern( + /\S/, + Joi.string().allow("") + ), + failed_shipments: Joi.array().items( + Joi.object().pattern(/\S/, Joi.string().allow("")) + ), + invoice: Joi.array().items(Joi.string().allow("")), + invoiceable_shipments: Joi.array().items(Joi.string().allow("")), + label: Joi.array().items(Joi.string().allow("")), + processing_invoice_shipments: Joi.array().items(Joi.string().allow("")), + processing_shipments: Joi.array().items(Joi.string().allow("")), + successful_invoiced_shipments: Joi.array().items(Joi.string().allow("")), + successful_shipments: Joi.array().items(Joi.string().allow("")), + }); + } + /** @returns {ShipmentBagReasons} */ static ShipmentBagReasons() { return Joi.object({ @@ -5166,7 +5772,6 @@ class OrderPlatformModel { /** @returns {ShipmentDetails} */ static ShipmentDetails() { return Joi.object({ - action_to_status: Joi.any().allow(null), affiliate_shipment_id: Joi.string().allow("").required(), articles: Joi.array() .items(OrderPlatformModel.ArticleDetails()) @@ -5174,8 +5779,6 @@ class OrderPlatformModel { box_type: Joi.string().allow("").allow(null), dp_id: Joi.number().allow(null), fulfillment_id: Joi.number().required(), - lock_message: Joi.string().allow("").allow(null), - lock_status: Joi.boolean().allow(null), meta: Joi.any(), shipments: Joi.number().required(), }); @@ -5218,15 +5821,19 @@ class OrderPlatformModel { bags: Joi.array().items(OrderPlatformModel.BagUnit()), can_process: Joi.boolean().allow(null), channel: OrderPlatformModel.ShipmentListingChannel(), + currency: OrderPlatformModel.Currency(), + currency_info: OrderPlatformModel.CurrencyInfo(), customer_note: Joi.string().allow("").allow(null), delivery_address: OrderPlatformModel.PlatformDeliveryAddress(), display_name: Joi.string().allow("").allow(null), estimated_sla_time: Joi.string().allow("").allow(null), + estimated_sla_ts: Joi.string().allow("").allow(null), fulfilling_store: OrderPlatformModel.ShipmentItemFulFillingStore(), invoice_id: Joi.string().allow("").allow(null), lock_status: Joi.boolean().allow(null), meta: Joi.object().pattern(/\S/, Joi.any()), mode_of_payment: Joi.string().allow(""), + order_created_ts: Joi.string().allow("").allow(null), order_date: Joi.string().allow("").allow(null), order_id: Joi.string().allow("").required(), ordering_channnel: Joi.string().allow("").allow(null), @@ -5235,9 +5842,11 @@ class OrderPlatformModel { previous_shipment_id: Joi.string().allow("").allow(null), prices: OrderPlatformModel.Prices(), shipment_created_at: Joi.string().allow("").required(), + shipment_created_ts: Joi.string().allow(""), shipment_id: Joi.string().allow("").allow(null), shipment_status: OrderPlatformModel.ShipmentStatus(), status_created_at: Joi.string().allow(""), + status_created_ts: Joi.string().allow(""), total_bags: Joi.number().allow(null).required(), user: OrderPlatformModel.UserDataInfo(), }); @@ -5247,7 +5856,7 @@ class OrderPlatformModel { static ShipmentItemFulFillingStore() { return Joi.object({ address: Joi.string().allow("").allow(null), - brand_store_tags: Joi.string().allow("").allow(null), + brand_store_tags: Joi.array().items(Joi.string().allow("")), city: Joi.string().allow("").allow(null), code: Joi.string().allow("").required(), id: Joi.number().required(), @@ -5258,42 +5867,7 @@ class OrderPlatformModel { pincode: Joi.string().allow("").allow(null), state: Joi.string().allow("").allow(null), store_email: Joi.string().allow("").allow(null), - }); - } - - /** @returns {ShipmentItemMeta} */ - static ShipmentItemMeta() { - return Joi.object({ - activity_comment: Joi.string().allow("").allow(null), - assign_dp_from_sb: Joi.boolean().allow(null), - auto_trigger_dp_assignment_acf: Joi.boolean().required(), - bag_weight: Joi.any().allow(null), - debug_info: Joi.any().allow(null), - dp_options: Joi.any().allow(null), - dp_sort_key: Joi.string().allow("").allow(null), - ewaybill_info: Joi.any().allow(null), - existing_dp_list: Joi.array().items(Joi.string().allow("")), - external: Joi.any().allow(null), - formatted: OrderPlatformModel.Formatted(), - fulfilment_priority_text: Joi.string().allow("").allow(null), - is_international: Joi.boolean().allow(null), - is_self_ship: Joi.boolean().allow(null), - lock_data: OrderPlatformModel.LockData(), - order_type: Joi.string().allow("").allow(null), - packaging_name: Joi.string().allow("").allow(null), - parent_dp_id: Joi.string().allow("").allow(null), - pdf_media: Joi.array().items(Joi.any()), - same_store_available: Joi.boolean().allow(null), - shipment_chargeable_weight: Joi.number().allow(null), - shipment_tags: Joi.array().items(OrderPlatformModel.ShipmentTags()), - shipment_volumetric_weight: Joi.number().allow(null), - shipment_weight: Joi.number().allow(null), - shipping_zone: Joi.string().allow("").allow(null), - sla: Joi.number().allow(null), - store_invoice_updated_date: Joi.string().allow("").allow(null), - tags: Joi.array().items(Joi.any()), - timestamp: OrderPlatformModel.ShipmentTimeStamp(), - weight: Joi.number().allow(null), + tags: Joi.array().items(Joi.string().allow("")), }); } @@ -5317,6 +5891,15 @@ class OrderPlatformModel { }); } + /** @returns {ShipmentLockDetails} */ + static ShipmentLockDetails() { + return Joi.object({ + action_to_status: Joi.any().allow(null), + lock_message: Joi.string().allow("").allow(null), + lock_status: Joi.boolean().allow(null), + }); + } + /** @returns {ShipmentMeta} */ static ShipmentMeta() { return Joi.object({ @@ -5423,12 +6006,14 @@ class OrderPlatformModel { return Joi.object({ bag_list: Joi.array().items(Joi.string().allow("")), created_at: Joi.string().allow("").allow(null), + created_ts: Joi.string().allow("").allow(null), current_shipment_status: Joi.string().allow("").allow(null), meta: Joi.any().allow(null), shipment_id: Joi.string().allow("").allow(null), shipment_status_id: Joi.number().allow(null), - status: Joi.string().allow("").required(), + status: Joi.string().allow("").allow(null).required(), status_created_at: Joi.string().allow("").allow(null), + status_created_ts: Joi.string().allow("").allow(null), title: Joi.string().allow("").required(), }); } @@ -5438,6 +6023,7 @@ class OrderPlatformModel { return Joi.object({ bag_list: Joi.array().items(Joi.string().allow("")), created_at: Joi.string().allow("").allow(null), + created_ts: Joi.string().allow("").allow(null), current_shipment_status: Joi.string().allow("").allow(null), display_name: Joi.string().allow("").allow(null), id: Joi.number().allow(null), @@ -5467,17 +6053,18 @@ class OrderPlatformModel { /** @returns {ShippingInfo} */ static ShippingInfo() { return Joi.object({ + address: Joi.string().allow(""), address_type: Joi.string().allow(""), - address1: Joi.string().allow("").required(), + address1: Joi.string().allow(""), address2: Joi.string().allow(""), alternate_email: Joi.string().allow(""), alternate_mobile_number: Joi.string().allow(""), - city: Joi.string().allow("").required(), - country: Joi.string().allow("").required(), + city: Joi.string().allow(""), + country: Joi.string().allow(""), country_code: Joi.string().allow(""), customer_code: Joi.string().allow(""), external_customer_code: Joi.string().allow(""), - first_name: Joi.string().allow("").required(), + first_name: Joi.string().allow(""), floor_no: Joi.string().allow(""), gender: Joi.string().allow(""), geo_location: Joi.any(), @@ -5485,12 +6072,12 @@ class OrderPlatformModel { landmark: Joi.string().allow(""), last_name: Joi.string().allow(""), middle_name: Joi.string().allow(""), - pincode: Joi.string().allow("").required(), - primary_email: Joi.string().allow("").required(), - primary_mobile_number: Joi.string().allow("").required(), + pincode: Joi.string().allow(""), + primary_email: Joi.string().allow(""), + primary_mobile_number: Joi.string().allow(""), shipping_type: Joi.string().allow(""), slot: Joi.array().items(Joi.any()), - state: Joi.string().allow("").required(), + state: Joi.string().allow(""), state_code: Joi.string().allow(""), title: Joi.string().allow(""), }); @@ -5511,6 +6098,58 @@ class OrderPlatformModel { }); } + /** @returns {StateManagerFilter} */ + static StateManagerFilter() { + return Joi.object({ + default_value: Joi.string().allow(""), + description: Joi.string().allow(""), + display_name: Joi.string().allow(""), + id: Joi.number(), + name: Joi.string().allow(""), + options: Joi.object().pattern(/\S/, Joi.any()), + type: Joi.string().allow(""), + }); + } + + /** @returns {StateManagerState} */ + static StateManagerState() { + return Joi.object({ + app_display_name: Joi.string().allow(""), + app_facing: Joi.boolean(), + id: Joi.number(), + is_active: Joi.boolean(), + journey_type: Joi.string().allow(""), + platform_display_name: Joi.string().allow(""), + state: Joi.string().allow(""), + state_type: Joi.string().allow(""), + }); + } + + /** @returns {StateManagerTask} */ + static StateManagerTask() { + return Joi.object({ + description: Joi.string().allow(""), + display_name: Joi.string().allow(""), + doc_string: Joi.string().allow(""), + id: Joi.number(), + kwargs: Joi.any(), + name: Joi.string().allow(""), + }); + } + + /** @returns {StateTransitionFlag} */ + static StateTransitionFlag() { + return Joi.object({ + default_value: Joi.string().allow(""), + description: Joi.string().allow(""), + display_name: Joi.string().allow(""), + id: Joi.number(), + name: Joi.string().allow(""), + options: Joi.object().pattern(/\S/, Joi.any()), + type: Joi.string().allow(""), + }); + } + /** @returns {StatuesRequest} */ static StatuesRequest() { return Joi.object({ @@ -5723,9 +6362,34 @@ class OrderPlatformModel { }); } + /** @returns {TemplateDownloadResponse} */ + static TemplateDownloadResponse() { + return Joi.object({ + file_name: Joi.string().allow(""), + url: Joi.string().allow(""), + }); + } + + /** @returns {Templates} */ + static Templates() { + return Joi.object({ + text: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {TotalShipmentPricesCount} */ + static TotalShipmentPricesCount() { + return Joi.object({ + shipment_count: Joi.number(), + total_price: Joi.number(), + }); + } + /** @returns {TrackingList} */ static TrackingList() { return Joi.object({ + created_ts: Joi.string().allow("").allow(null), is_current: Joi.boolean().allow(null), is_passed: Joi.boolean().allow(null), status: Joi.string().allow("").required(), @@ -5734,20 +6398,6 @@ class OrderPlatformModel { }); } - /** @returns {TransactionData} */ - static TransactionData() { - return Joi.object({ - amount_paid: Joi.number().allow(null), - currency: Joi.string().allow("").allow(null), - entity: Joi.string().allow("").allow(null), - payment_id: Joi.string().allow("").allow(null), - status: Joi.string().allow("").allow(null), - terminal_id: Joi.string().allow("").allow(null), - transaction_id: Joi.string().allow("").allow(null), - unique_reference_number: Joi.string().allow("").allow(null), - }); - } - /** @returns {UpdatePackagingDimensionsPayload} */ static UpdatePackagingDimensionsPayload() { return Joi.object({ @@ -5850,12 +6500,15 @@ class OrderPlatformModel { area: Joi.string().allow("").allow(null), city: Joi.string().allow("").required(), country: Joi.string().allow("").required(), + country_iso_code: Joi.string().allow(""), + country_phone_code: Joi.string().allow(""), email: Joi.string().allow("").allow(null), landmark: Joi.string().allow("").allow(null), name: Joi.string().allow("").required(), phone: Joi.string().allow("").required(), pincode: Joi.string().allow("").required(), state: Joi.string().allow("").required(), + state_code: Joi.string().allow(""), }); } diff --git a/sdk/platform/Order/OrderPlatformValidator.d.ts b/sdk/platform/Order/OrderPlatformValidator.d.ts index eac0a0e03..8d2b285d0 100644 --- a/sdk/platform/Order/OrderPlatformValidator.d.ts +++ b/sdk/platform/Order/OrderPlatformValidator.d.ts @@ -3,6 +3,20 @@ export = OrderPlatformValidator; * @typedef AttachOrderUserParam * @property {OrderPlatformModel.AttachOrderUser} body */ +/** + * @typedef BulkListingParam + * @property {number} pageSize - Page size + * @property {number} pageNo - Page number + * @property {string} startDate - UTC start date in ISO format + * @property {string} endDate - UTC end date in ISO format + * @property {string} [status] - Status for which to fetch the jobs. + * @property {string} [bulkActionType] - Job type. + * @property {string} [searchKey] - Search_key. + */ +/** + * @typedef BulkStateTransistionParam + * @property {OrderPlatformModel.BulkStateTransistionRequest} body + */ /** * @typedef CheckOrderStatusParam * @property {OrderPlatformModel.OrderStatus} body @@ -24,7 +38,8 @@ export = OrderPlatformValidator; * @property {OrderPlatformModel.CreateOrderAPI} body */ /** - * @typedef DispatchManifestParam + * @typedef DispatchManifestsParam + * @property {string} manifestId * @property {OrderPlatformModel.DispatchManifest} body */ /** @@ -39,6 +54,10 @@ export = OrderPlatformValidator; * @typedef EInvoiceRetryParam * @property {OrderPlatformModel.EInvoiceRetry} body */ +/** + * @typedef FailedOrderLogDetailsParam + * @property {string} logId - Log Error ID + */ /** * @typedef FetchCreditBalanceDetailParam * @property {OrderPlatformModel.FetchCreditBalanceRequestPayload} body @@ -47,11 +66,6 @@ export = OrderPlatformValidator; * @typedef FetchRefundModeConfigParam * @property {OrderPlatformModel.RefundModeConfigRequestPayload} body */ -/** - * @typedef GenerateInvoiceIDParam - * @property {string} invoiceType - Mention the type of invoice id to generate - * @property {OrderPlatformModel.GenerateInvoiceIDRequest} body - */ /** * @typedef GeneratePOSReceiptByOrderIdParam * @property {string} orderId @@ -63,6 +77,7 @@ export = OrderPlatformValidator; * @property {string} orderingChannel - Ordering channel * @property {string} status - Current status of a shipment */ +/** @typedef GetAllowedTemplatesForBulkParam */ /** * @typedef GetAnnouncementsParam * @property {string} [date] - Date On which the announcement is Active (Date @@ -91,8 +106,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} [fromDate] - Start Date in DD-MM-YYYY format - * @property {string} [toDate] - End Date in DD-MM-YYYY 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 @@ -103,12 +118,21 @@ export = OrderPlatformValidator; * @property {number} [pageSize] */ /** @typedef GetChannelConfigParam */ +/** + * @typedef GetFileByStatusParam + * @property {string} batchId + * @property {string} status + * @property {string} fileType + * @property {string} [reportType] + */ /** * @typedef GetLaneConfigParam * @property {string} [superLane] - Name of lane for which data is to be fetched * @property {string} [groupEntity] - Name of group entity * @property {string} [fromDate] - Start Date in DD-MM-YYYY format * @property {string} [toDate] - End Date in DD-MM-YYYY format + * @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] @@ -124,10 +148,45 @@ export = OrderPlatformValidator; * company order * @property {string} [orderType] */ +/** + * @typedef GetManifestDetailsParam + * @property {string} manifestId + */ +/** + * @typedef GetManifestShipmentsParam + * @property {number} dpIds + * @property {string} stores + * @property {string} toDate + * @property {string} fromDate + * @property {string} [dpName] + * @property {string} [salesChannels] + * @property {string} [searchType] + * @property {string} [searchValue] + * @property {string} [pageNo] + * @property {string} [pageSize] + */ +/** + * @typedef GetManifestfiltersParam + * @property {string} view - Name of View + */ +/** + * @typedef GetManifestsParam + * @property {string} [status] - Possible Status [ active, closed ] + * @property {string} [startDate] - UTC Start Date in ISO format + * @property {string} [endDate] - UTC End Date in ISO format + * @property {string} [searchType] - Search type options [ fynd_order_id, + * shipment_id, manifest_id, dp_name, awb_no ] + * @property {number} [storeId] - Fetch manifests for a Store. + * @property {string} [searchValue] - Search value for selected search type + * @property {string} [dpIds] - DP Ids separated by ',' (comma) + * @property {number} [pageNo] + * @property {number} [pageSize] + */ /** * @typedef GetOrderByIdParam * @property {string} orderId * @property {boolean} [myOrders] + * @property {boolean} [allowInactive] - Flag to allow inactive shipments */ /** * @typedef GetOrdersParam @@ -145,6 +204,8 @@ export = OrderPlatformValidator; * specified by the search_type * @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] * @property {string} [salesChannels] @@ -189,6 +250,8 @@ export = OrderPlatformValidator; * @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] - 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 @@ -212,7 +275,39 @@ export = OrderPlatformValidator; * @property {string} [customerId] * @property {string} [orderType] */ +/** + * @typedef GetStateManagerTaskByIdParam + * @property {number} taskId + */ +/** + * @typedef GetStateManagerTasksParam + * @property {number} [pageNo] + * @property {number} [pageSize] + */ +/** + * @typedef GetStateTransitionFiltersParam + * @property {number} [pageNo] + * @property {number} [pageSize] + */ +/** + * @typedef GetStateTransitionFiltersByIdParam + * @property {number} filterId + */ +/** + * @typedef GetStateTransitionFlagsParam + * @property {number} [pageNo] - The page number for pagination. + * @property {number} [pageSize] - The number of items to be returned per page + * for pagination. + */ +/** + * @typedef GetStateTransitionFlagsByIdParam + * @property {number} flagId + */ /** @typedef GetStateTransitionMapParam */ +/** + * @typedef GetTemplateParam + * @property {string} templateName + */ /** * @typedef GetfiltersParam * @property {string} view - Name of view @@ -222,6 +317,10 @@ export = OrderPlatformValidator; * @typedef InvalidateShipmentCacheParam * @property {OrderPlatformModel.InvalidateShipmentCachePayload} body */ +/** + * @typedef JobDetailsParam + * @property {string} batchId + */ /** * @typedef OrderUpdateParam * @property {OrderPlatformModel.PlatformOrderUpdate} body @@ -231,8 +330,8 @@ export = OrderPlatformValidator; * @property {OrderPlatformModel.PostShipmentHistory} body */ /** - * @typedef ProcessManifestParam - * @property {OrderPlatformModel.CreateOrderPayload} body + * @typedef ProcessManifestsParam + * @property {OrderPlatformModel.ProcessManifest} body */ /** * @typedef ReassignLocationParam @@ -285,7 +384,8 @@ export = OrderPlatformValidator; * @property {OrderPlatformModel.CourierPartnerTrackingDetails} body */ /** - * @typedef UploadConsentParam + * @typedef UploadConsentsParam + * @property {string} manifestId * @property {OrderPlatformModel.UploadConsent} body */ /** @@ -295,6 +395,10 @@ export = OrderPlatformValidator; declare class OrderPlatformValidator { /** @returns {AttachOrderUserParam} */ static attachOrderUser(): AttachOrderUserParam; + /** @returns {BulkListingParam} */ + static bulkListing(): BulkListingParam; + /** @returns {BulkStateTransistionParam} */ + static bulkStateTransistion(): BulkStateTransistionParam; /** @returns {CheckOrderStatusParam} */ static checkOrderStatus(): CheckOrderStatusParam; /** @returns {Click2CallParam} */ @@ -303,24 +407,26 @@ declare class OrderPlatformValidator { static createChannelConfig(): CreateChannelConfigParam; /** @returns {CreateOrderParam} */ static createOrder(): CreateOrderParam; - /** @returns {DispatchManifestParam} */ - static dispatchManifest(): DispatchManifestParam; + /** @returns {DispatchManifestsParam} */ + static dispatchManifests(): DispatchManifestsParam; /** @returns {DownloadBulkActionTemplateParam} */ static downloadBulkActionTemplate(): DownloadBulkActionTemplateParam; /** @returns {DownloadLanesReportParam} */ static downloadLanesReport(): DownloadLanesReportParam; /** @returns {EInvoiceRetryParam} */ static eInvoiceRetry(): EInvoiceRetryParam; + /** @returns {FailedOrderLogDetailsParam} */ + static failedOrderLogDetails(): FailedOrderLogDetailsParam; /** @returns {FetchCreditBalanceDetailParam} */ static fetchCreditBalanceDetail(): FetchCreditBalanceDetailParam; /** @returns {FetchRefundModeConfigParam} */ static fetchRefundModeConfig(): FetchRefundModeConfigParam; - /** @returns {GenerateInvoiceIDParam} */ - static generateInvoiceID(): GenerateInvoiceIDParam; /** @returns {GeneratePOSReceiptByOrderIdParam} */ static generatePOSReceiptByOrderId(): GeneratePOSReceiptByOrderIdParam; /** @returns {GetAllowedStateTransitionParam} */ static getAllowedStateTransition(): GetAllowedStateTransitionParam; + /** @returns {GetAllowedTemplatesForBulkParam} */ + static getAllowedTemplatesForBulk(): any; /** @returns {GetAnnouncementsParam} */ static getAnnouncements(): GetAnnouncementsParam; /** @returns {GetBagByIdParam} */ @@ -333,8 +439,18 @@ declare class OrderPlatformValidator { static getBulkShipmentExcelFile(): GetBulkShipmentExcelFileParam; /** @returns {GetChannelConfigParam} */ static getChannelConfig(): any; + /** @returns {GetFileByStatusParam} */ + static getFileByStatus(): GetFileByStatusParam; /** @returns {GetLaneConfigParam} */ static getLaneConfig(): GetLaneConfigParam; + /** @returns {GetManifestDetailsParam} */ + static getManifestDetails(): GetManifestDetailsParam; + /** @returns {GetManifestShipmentsParam} */ + static getManifestShipments(): GetManifestShipmentsParam; + /** @returns {GetManifestfiltersParam} */ + static getManifestfilters(): GetManifestfiltersParam; + /** @returns {GetManifestsParam} */ + static getManifests(): GetManifestsParam; /** @returns {GetOrderByIdParam} */ static getOrderById(): GetOrderByIdParam; /** @returns {GetOrdersParam} */ @@ -349,18 +465,34 @@ declare class OrderPlatformValidator { static getShipmentReasons(): GetShipmentReasonsParam; /** @returns {GetShipmentsParam} */ static getShipments(): GetShipmentsParam; + /** @returns {GetStateManagerTaskByIdParam} */ + static getStateManagerTaskById(): GetStateManagerTaskByIdParam; + /** @returns {GetStateManagerTasksParam} */ + static getStateManagerTasks(): GetStateManagerTasksParam; + /** @returns {GetStateTransitionFiltersParam} */ + static getStateTransitionFilters(): GetStateTransitionFiltersParam; + /** @returns {GetStateTransitionFiltersByIdParam} */ + static getStateTransitionFiltersById(): GetStateTransitionFiltersByIdParam; + /** @returns {GetStateTransitionFlagsParam} */ + static getStateTransitionFlags(): GetStateTransitionFlagsParam; + /** @returns {GetStateTransitionFlagsByIdParam} */ + static getStateTransitionFlagsById(): GetStateTransitionFlagsByIdParam; /** @returns {GetStateTransitionMapParam} */ static getStateTransitionMap(): any; + /** @returns {GetTemplateParam} */ + static getTemplate(): GetTemplateParam; /** @returns {GetfiltersParam} */ static getfilters(): GetfiltersParam; /** @returns {InvalidateShipmentCacheParam} */ static invalidateShipmentCache(): InvalidateShipmentCacheParam; + /** @returns {JobDetailsParam} */ + static jobDetails(): JobDetailsParam; /** @returns {OrderUpdateParam} */ static orderUpdate(): OrderUpdateParam; /** @returns {PostShipmentHistoryParam} */ static postShipmentHistory(): PostShipmentHistoryParam; - /** @returns {ProcessManifestParam} */ - static processManifest(): ProcessManifestParam; + /** @returns {ProcessManifestsParam} */ + static processManifests(): ProcessManifestsParam; /** @returns {ReassignLocationParam} */ static reassignLocation(): ReassignLocationParam; /** @returns {SendSmsNinjaParam} */ @@ -379,17 +511,50 @@ declare class OrderPlatformValidator { static updateShipmentStatus(): UpdateShipmentStatusParam; /** @returns {UpdateShipmentTrackingParam} */ static updateShipmentTracking(): UpdateShipmentTrackingParam; - /** @returns {UploadConsentParam} */ - static uploadConsent(): UploadConsentParam; + /** @returns {UploadConsentsParam} */ + static uploadConsents(): UploadConsentsParam; /** @returns {VerifyMobileOTPParam} */ static verifyMobileOTP(): VerifyMobileOTPParam; } declare namespace OrderPlatformValidator { - export { AttachOrderUserParam, CheckOrderStatusParam, Click2CallParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GenerateInvoiceIDParam, GeneratePOSReceiptByOrderIdParam, GetAllowedStateTransitionParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetLaneConfigParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateTransitionMapParam, GetfiltersParam, InvalidateShipmentCacheParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentParam, VerifyMobileOTPParam }; + export { AttachOrderUserParam, BulkListingParam, BulkStateTransistionParam, CheckOrderStatusParam, Click2CallParam, CreateChannelConfigParam, CreateOrderParam, DispatchManifestsParam, DownloadBulkActionTemplateParam, DownloadLanesReportParam, EInvoiceRetryParam, FailedOrderLogDetailsParam, FetchCreditBalanceDetailParam, FetchRefundModeConfigParam, GeneratePOSReceiptByOrderIdParam, GetAllowedStateTransitionParam, GetAllowedTemplatesForBulkParam, GetAnnouncementsParam, GetBagByIdParam, GetBagsParam, GetBulkActionTemplateParam, GetBulkShipmentExcelFileParam, GetChannelConfigParam, GetFileByStatusParam, GetLaneConfigParam, GetManifestDetailsParam, GetManifestShipmentsParam, GetManifestfiltersParam, GetManifestsParam, GetOrderByIdParam, GetOrdersParam, GetRoleBasedActionsParam, GetShipmentByIdParam, GetShipmentHistoryParam, GetShipmentReasonsParam, GetShipmentsParam, GetStateManagerTaskByIdParam, GetStateManagerTasksParam, GetStateTransitionFiltersParam, GetStateTransitionFiltersByIdParam, GetStateTransitionFlagsParam, GetStateTransitionFlagsByIdParam, GetStateTransitionMapParam, GetTemplateParam, GetfiltersParam, InvalidateShipmentCacheParam, JobDetailsParam, OrderUpdateParam, PostShipmentHistoryParam, ProcessManifestsParam, ReassignLocationParam, SendSmsNinjaParam, SendUserMobileOTPParam, TrackShipmentParam, UpdateAddressParam, UpdatePackagingDimensionsParam, UpdateShipmentLockParam, UpdateShipmentStatusParam, UpdateShipmentTrackingParam, UploadConsentsParam, VerifyMobileOTPParam }; } type AttachOrderUserParam = { body: OrderPlatformModel.AttachOrderUser; }; +type BulkListingParam = { + /** + * - Page size + */ + pageSize: number; + /** + * - Page number + */ + pageNo: number; + /** + * - UTC start date in ISO format + */ + startDate: string; + /** + * - UTC end date in ISO format + */ + endDate: string; + /** + * - Status for which to fetch the jobs. + */ + status?: string; + /** + * - Job type. + */ + bulkActionType?: string; + /** + * - Search_key. + */ + searchKey?: string; +}; +type BulkStateTransistionParam = { + body: OrderPlatformModel.BulkStateTransistionRequest; +}; type CheckOrderStatusParam = { body: OrderPlatformModel.OrderStatus; }; @@ -421,7 +586,8 @@ type CreateChannelConfigParam = { type CreateOrderParam = { body: OrderPlatformModel.CreateOrderAPI; }; -type DispatchManifestParam = { +type DispatchManifestsParam = { + manifestId: string; body: OrderPlatformModel.DispatchManifest; }; type DownloadBulkActionTemplateParam = { @@ -436,19 +602,18 @@ type DownloadLanesReportParam = { type EInvoiceRetryParam = { body: OrderPlatformModel.EInvoiceRetry; }; +type FailedOrderLogDetailsParam = { + /** + * - Log Error ID + */ + logId: string; +}; type FetchCreditBalanceDetailParam = { body: OrderPlatformModel.FetchCreditBalanceRequestPayload; }; type FetchRefundModeConfigParam = { body: OrderPlatformModel.RefundModeConfigRequestPayload; }; -type GenerateInvoiceIDParam = { - /** - * - Mention the type of invoice id to generate - */ - invoiceType: string; - body: OrderPlatformModel.GenerateInvoiceIDRequest; -}; type GeneratePOSReceiptByOrderIdParam = { orderId: string; shipmentId?: string; @@ -533,13 +698,13 @@ type GetBulkShipmentExcelFileParam = { */ dpIds?: string; /** - * - Start Date in DD-MM-YYYY format + * - UTC start date in ISO format */ - fromDate?: string; + startDate?: string; /** - * - End Date in DD-MM-YYYY format + * - UTC end date in ISO format */ - toDate?: string; + endDate?: string; /** * - Comma separated values of store ids */ @@ -567,6 +732,12 @@ type GetBulkShipmentExcelFileParam = { pageNo?: number; pageSize?: number; }; +type GetFileByStatusParam = { + batchId: string; + status: string; + fileType: string; + reportType?: string; +}; type GetLaneConfigParam = { /** * - Name of lane for which data is to be fetched @@ -584,6 +755,14 @@ type GetLaneConfigParam = { * - End Date in DD-MM-YYYY format */ toDate?: string; + /** + * - UTC Start Date in ISO format + */ + startDate?: string; + /** + * - UTC End Date in ISO format + */ + endDate?: string; /** * - Comma separated values of delivery partner ids */ @@ -614,9 +793,67 @@ type GetLaneConfigParam = { showCrossCompanyData?: boolean; orderType?: string; }; +type GetManifestDetailsParam = { + manifestId: string; +}; +type GetManifestShipmentsParam = { + dpIds: number; + stores: string; + toDate: string; + fromDate: string; + dpName?: string; + salesChannels?: string; + searchType?: string; + searchValue?: string; + pageNo?: string; + pageSize?: string; +}; +type GetManifestfiltersParam = { + /** + * - Name of View + */ + view: string; +}; +type GetManifestsParam = { + /** + * - Possible Status [ active, closed ] + */ + status?: string; + /** + * - UTC Start Date in ISO format + */ + startDate?: string; + /** + * - UTC End Date in ISO format + */ + endDate?: string; + /** + * - Search type options [ fynd_order_id, + * shipment_id, manifest_id, dp_name, awb_no ] + */ + searchType?: string; + /** + * - Fetch manifests for a Store. + */ + storeId?: number; + /** + * - Search value for selected search type + */ + searchValue?: string; + /** + * - DP Ids separated by ',' (comma) + */ + dpIds?: string; + pageNo?: number; + pageSize?: number; +}; type GetOrderByIdParam = { orderId: string; myOrders?: boolean; + /** + * - Flag to allow inactive shipments + */ + allowInactive?: boolean; }; type GetOrdersParam = { /** @@ -651,6 +888,8 @@ type GetOrdersParam = { searchValue?: string; fromDate?: string; toDate?: string; + startDate?: string; + endDate?: string; /** * - Delivery Partner IDs to which shipments are assigned. */ @@ -738,6 +977,14 @@ type GetShipmentsParam = { * - End Date in DD-MM-YYYY format */ toDate?: string; + /** + * - UTC Start Date in ISO format + */ + startDate?: string; + /** + * - UTC End Date in ISO format + */ + endDate?: string; /** * - Comma separated values of delivery partner ids */ @@ -803,6 +1050,37 @@ type GetShipmentsParam = { customerId?: string; orderType?: string; }; +type GetStateManagerTaskByIdParam = { + taskId: number; +}; +type GetStateManagerTasksParam = { + pageNo?: number; + pageSize?: number; +}; +type GetStateTransitionFiltersParam = { + pageNo?: number; + pageSize?: number; +}; +type GetStateTransitionFiltersByIdParam = { + filterId: number; +}; +type GetStateTransitionFlagsParam = { + /** + * - The page number for pagination. + */ + pageNo?: number; + /** + * - The number of items to be returned per page + * for pagination. + */ + pageSize?: number; +}; +type GetStateTransitionFlagsByIdParam = { + flagId: number; +}; +type GetTemplateParam = { + templateName: string; +}; type GetfiltersParam = { /** * - Name of view @@ -816,14 +1094,17 @@ type GetfiltersParam = { type InvalidateShipmentCacheParam = { body: OrderPlatformModel.InvalidateShipmentCachePayload; }; +type JobDetailsParam = { + batchId: string; +}; type OrderUpdateParam = { body: OrderPlatformModel.PlatformOrderUpdate; }; type PostShipmentHistoryParam = { body: OrderPlatformModel.PostShipmentHistory; }; -type ProcessManifestParam = { - body: OrderPlatformModel.CreateOrderPayload; +type ProcessManifestsParam = { + body: OrderPlatformModel.ProcessManifest; }; type ReassignLocationParam = { body: OrderPlatformModel.StoreReassign; @@ -878,12 +1159,14 @@ type UpdateShipmentStatusParam = { type UpdateShipmentTrackingParam = { body: OrderPlatformModel.CourierPartnerTrackingDetails; }; -type UploadConsentParam = { +type UploadConsentsParam = { + manifestId: string; body: OrderPlatformModel.UploadConsent; }; type VerifyMobileOTPParam = { body: OrderPlatformModel.VerifyMobileOTP; }; +type GetAllowedTemplatesForBulkParam = any; type GetBulkActionTemplateParam = any; type GetChannelConfigParam = any; type GetRoleBasedActionsParam = any; diff --git a/sdk/platform/Order/OrderPlatformValidator.js b/sdk/platform/Order/OrderPlatformValidator.js index 3cffb6d0f..b94f355dd 100644 --- a/sdk/platform/Order/OrderPlatformValidator.js +++ b/sdk/platform/Order/OrderPlatformValidator.js @@ -7,6 +7,22 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {OrderPlatformModel.AttachOrderUser} body */ +/** + * @typedef BulkListingParam + * @property {number} pageSize - Page size + * @property {number} pageNo - Page number + * @property {string} startDate - UTC start date in ISO format + * @property {string} endDate - UTC end date in ISO format + * @property {string} [status] - Status for which to fetch the jobs. + * @property {string} [bulkActionType] - Job type. + * @property {string} [searchKey] - Search_key. + */ + +/** + * @typedef BulkStateTransistionParam + * @property {OrderPlatformModel.BulkStateTransistionRequest} body + */ + /** * @typedef CheckOrderStatusParam * @property {OrderPlatformModel.OrderStatus} body @@ -32,7 +48,8 @@ const OrderPlatformModel = require("./OrderPlatformModel"); */ /** - * @typedef DispatchManifestParam + * @typedef DispatchManifestsParam + * @property {string} manifestId * @property {OrderPlatformModel.DispatchManifest} body */ @@ -51,6 +68,11 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {OrderPlatformModel.EInvoiceRetry} body */ +/** + * @typedef FailedOrderLogDetailsParam + * @property {string} logId - Log Error ID + */ + /** * @typedef FetchCreditBalanceDetailParam * @property {OrderPlatformModel.FetchCreditBalanceRequestPayload} body @@ -61,12 +83,6 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {OrderPlatformModel.RefundModeConfigRequestPayload} body */ -/** - * @typedef GenerateInvoiceIDParam - * @property {string} invoiceType - Mention the type of invoice id to generate - * @property {OrderPlatformModel.GenerateInvoiceIDRequest} body - */ - /** * @typedef GeneratePOSReceiptByOrderIdParam * @property {string} orderId @@ -80,6 +96,8 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {string} status - Current status of a shipment */ +/** @typedef GetAllowedTemplatesForBulkParam */ + /** * @typedef GetAnnouncementsParam * @property {string} [date] - Date On which the announcement is Active (Date @@ -112,8 +130,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} [fromDate] - Start Date in DD-MM-YYYY format - * @property {string} [toDate] - End Date in DD-MM-YYYY 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 @@ -126,12 +144,22 @@ const OrderPlatformModel = require("./OrderPlatformModel"); /** @typedef GetChannelConfigParam */ +/** + * @typedef GetFileByStatusParam + * @property {string} batchId + * @property {string} status + * @property {string} fileType + * @property {string} [reportType] + */ + /** * @typedef GetLaneConfigParam * @property {string} [superLane] - Name of lane for which data is to be fetched * @property {string} [groupEntity] - Name of group entity * @property {string} [fromDate] - Start Date in DD-MM-YYYY format * @property {string} [toDate] - End Date in DD-MM-YYYY format + * @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] @@ -148,10 +176,49 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {string} [orderType] */ +/** + * @typedef GetManifestDetailsParam + * @property {string} manifestId + */ + +/** + * @typedef GetManifestShipmentsParam + * @property {number} dpIds + * @property {string} stores + * @property {string} toDate + * @property {string} fromDate + * @property {string} [dpName] + * @property {string} [salesChannels] + * @property {string} [searchType] + * @property {string} [searchValue] + * @property {string} [pageNo] + * @property {string} [pageSize] + */ + +/** + * @typedef GetManifestfiltersParam + * @property {string} view - Name of View + */ + +/** + * @typedef GetManifestsParam + * @property {string} [status] - Possible Status [ active, closed ] + * @property {string} [startDate] - UTC Start Date in ISO format + * @property {string} [endDate] - UTC End Date in ISO format + * @property {string} [searchType] - Search type options [ fynd_order_id, + * shipment_id, manifest_id, dp_name, awb_no ] + * @property {number} [storeId] - Fetch manifests for a Store. + * @property {string} [searchValue] - Search value for selected search type + * @property {string} [dpIds] - DP Ids separated by ',' (comma) + * @property {number} [pageNo] + * @property {number} [pageSize] + */ + /** * @typedef GetOrderByIdParam * @property {string} orderId * @property {boolean} [myOrders] + * @property {boolean} [allowInactive] - Flag to allow inactive shipments */ /** @@ -170,6 +237,8 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * specified by the search_type * @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] * @property {string} [salesChannels] @@ -219,6 +288,8 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @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] - 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 @@ -243,8 +314,47 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {string} [orderType] */ +/** + * @typedef GetStateManagerTaskByIdParam + * @property {number} taskId + */ + +/** + * @typedef GetStateManagerTasksParam + * @property {number} [pageNo] + * @property {number} [pageSize] + */ + +/** + * @typedef GetStateTransitionFiltersParam + * @property {number} [pageNo] + * @property {number} [pageSize] + */ + +/** + * @typedef GetStateTransitionFiltersByIdParam + * @property {number} filterId + */ + +/** + * @typedef GetStateTransitionFlagsParam + * @property {number} [pageNo] - The page number for pagination. + * @property {number} [pageSize] - The number of items to be returned per page + * for pagination. + */ + +/** + * @typedef GetStateTransitionFlagsByIdParam + * @property {number} flagId + */ + /** @typedef GetStateTransitionMapParam */ +/** + * @typedef GetTemplateParam + * @property {string} templateName + */ + /** * @typedef GetfiltersParam * @property {string} view - Name of view @@ -256,6 +366,11 @@ const OrderPlatformModel = require("./OrderPlatformModel"); * @property {OrderPlatformModel.InvalidateShipmentCachePayload} body */ +/** + * @typedef JobDetailsParam + * @property {string} batchId + */ + /** * @typedef OrderUpdateParam * @property {OrderPlatformModel.PlatformOrderUpdate} body @@ -267,8 +382,8 @@ const OrderPlatformModel = require("./OrderPlatformModel"); */ /** - * @typedef ProcessManifestParam - * @property {OrderPlatformModel.CreateOrderPayload} body + * @typedef ProcessManifestsParam + * @property {OrderPlatformModel.ProcessManifest} body */ /** @@ -331,7 +446,8 @@ const OrderPlatformModel = require("./OrderPlatformModel"); */ /** - * @typedef UploadConsentParam + * @typedef UploadConsentsParam + * @property {string} manifestId * @property {OrderPlatformModel.UploadConsent} body */ @@ -348,6 +464,26 @@ class OrderPlatformValidator { }).required(); } + /** @returns {BulkListingParam} */ + static bulkListing() { + return Joi.object({ + pageSize: Joi.number().required(), + pageNo: Joi.number().required(), + startDate: Joi.string().allow("").required(), + endDate: Joi.string().allow("").required(), + status: Joi.string().allow(""), + bulkActionType: Joi.string().allow(""), + searchKey: Joi.string().allow(""), + }).required(); + } + + /** @returns {BulkStateTransistionParam} */ + static bulkStateTransistion() { + return Joi.object({ + body: OrderPlatformModel.BulkStateTransistionRequest().required(), + }).required(); + } + /** @returns {CheckOrderStatusParam} */ static checkOrderStatus() { return Joi.object({ @@ -380,9 +516,10 @@ class OrderPlatformValidator { }).required(); } - /** @returns {DispatchManifestParam} */ - static dispatchManifest() { + /** @returns {DispatchManifestsParam} */ + static dispatchManifests() { return Joi.object({ + manifestId: Joi.string().allow("").required(), body: OrderPlatformModel.DispatchManifest().required(), }).required(); } @@ -408,6 +545,13 @@ class OrderPlatformValidator { }).required(); } + /** @returns {FailedOrderLogDetailsParam} */ + static failedOrderLogDetails() { + return Joi.object({ + logId: Joi.string().allow("").required(), + }).required(); + } + /** @returns {FetchCreditBalanceDetailParam} */ static fetchCreditBalanceDetail() { return Joi.object({ @@ -422,14 +566,6 @@ class OrderPlatformValidator { }).required(); } - /** @returns {GenerateInvoiceIDParam} */ - static generateInvoiceID() { - return Joi.object({ - invoiceType: Joi.string().allow("").required(), - body: OrderPlatformModel.GenerateInvoiceIDRequest().required(), - }).required(); - } - /** @returns {GeneratePOSReceiptByOrderIdParam} */ static generatePOSReceiptByOrderId() { return Joi.object({ @@ -447,6 +583,11 @@ class OrderPlatformValidator { }).required(); } + /** @returns {GetAllowedTemplatesForBulkParam} */ + static getAllowedTemplatesForBulk() { + return Joi.object({}).required(); + } + /** @returns {GetAnnouncementsParam} */ static getAnnouncements() { return Joi.object({ @@ -488,8 +629,8 @@ class OrderPlatformValidator { return Joi.object({ salesChannels: Joi.string().allow(""), dpIds: Joi.string().allow(""), - fromDate: Joi.string().allow(""), - toDate: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), stores: Joi.string().allow(""), tags: Joi.string().allow(""), bagStatus: Joi.string().allow(""), @@ -506,6 +647,16 @@ class OrderPlatformValidator { return Joi.object({}).required(); } + /** @returns {GetFileByStatusParam} */ + static getFileByStatus() { + return Joi.object({ + batchId: Joi.string().allow("").required(), + status: Joi.string().allow("").required(), + fileType: Joi.string().allow("").required(), + reportType: Joi.string().allow(""), + }).required(); + } + /** @returns {GetLaneConfigParam} */ static getLaneConfig() { return Joi.object({ @@ -513,6 +664,8 @@ class OrderPlatformValidator { groupEntity: Joi.string().allow(""), fromDate: Joi.string().allow(""), toDate: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), dpIds: Joi.string().allow(""), stores: Joi.string().allow(""), salesChannels: Joi.string().allow(""), @@ -529,11 +682,57 @@ class OrderPlatformValidator { }).required(); } + /** @returns {GetManifestDetailsParam} */ + static getManifestDetails() { + return Joi.object({ + manifestId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetManifestShipmentsParam} */ + static getManifestShipments() { + return Joi.object({ + dpIds: Joi.number().required(), + stores: Joi.string().allow("").required(), + toDate: Joi.string().allow("").required(), + fromDate: Joi.string().allow("").required(), + dpName: Joi.string().allow(""), + salesChannels: Joi.string().allow(""), + searchType: Joi.string().allow(""), + searchValue: Joi.string().allow(""), + pageNo: Joi.string().allow(""), + pageSize: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetManifestfiltersParam} */ + static getManifestfilters() { + return Joi.object({ + view: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetManifestsParam} */ + static getManifests() { + return Joi.object({ + status: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), + searchType: Joi.string().allow(""), + storeId: Joi.number(), + searchValue: Joi.string().allow(""), + dpIds: Joi.string().allow(""), + pageNo: Joi.number(), + pageSize: Joi.number(), + }).required(); + } + /** @returns {GetOrderByIdParam} */ static getOrderById() { return Joi.object({ orderId: Joi.string().allow("").required(), myOrders: Joi.boolean(), + allowInactive: Joi.boolean(), }).required(); } @@ -549,6 +748,8 @@ class OrderPlatformValidator { searchValue: Joi.string().allow(""), fromDate: Joi.string().allow(""), toDate: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), dpIds: Joi.string().allow(""), stores: Joi.string().allow(""), salesChannels: Joi.string().allow(""), @@ -604,6 +805,8 @@ class OrderPlatformValidator { searchValue: Joi.string().allow(""), fromDate: Joi.string().allow(""), toDate: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), dpIds: Joi.string().allow(""), stores: Joi.string().allow(""), salesChannels: Joi.string().allow(""), @@ -628,11 +831,63 @@ class OrderPlatformValidator { }).required(); } + /** @returns {GetStateManagerTaskByIdParam} */ + static getStateManagerTaskById() { + return Joi.object({ + taskId: Joi.number().required(), + }).required(); + } + + /** @returns {GetStateManagerTasksParam} */ + static getStateManagerTasks() { + return Joi.object({ + pageNo: Joi.number(), + pageSize: Joi.number(), + }).required(); + } + + /** @returns {GetStateTransitionFiltersParam} */ + static getStateTransitionFilters() { + return Joi.object({ + pageNo: Joi.number(), + pageSize: Joi.number(), + }).required(); + } + + /** @returns {GetStateTransitionFiltersByIdParam} */ + static getStateTransitionFiltersById() { + return Joi.object({ + filterId: Joi.number().required(), + }).required(); + } + + /** @returns {GetStateTransitionFlagsParam} */ + static getStateTransitionFlags() { + return Joi.object({ + pageNo: Joi.number(), + pageSize: Joi.number(), + }).required(); + } + + /** @returns {GetStateTransitionFlagsByIdParam} */ + static getStateTransitionFlagsById() { + return Joi.object({ + flagId: Joi.number().required(), + }).required(); + } + /** @returns {GetStateTransitionMapParam} */ static getStateTransitionMap() { return Joi.object({}).required(); } + /** @returns {GetTemplateParam} */ + static getTemplate() { + return Joi.object({ + templateName: Joi.string().allow("").required(), + }).required(); + } + /** @returns {GetfiltersParam} */ static getfilters() { return Joi.object({ @@ -648,6 +903,13 @@ class OrderPlatformValidator { }).required(); } + /** @returns {JobDetailsParam} */ + static jobDetails() { + return Joi.object({ + batchId: Joi.string().allow("").required(), + }).required(); + } + /** @returns {OrderUpdateParam} */ static orderUpdate() { return Joi.object({ @@ -662,10 +924,10 @@ class OrderPlatformValidator { }).required(); } - /** @returns {ProcessManifestParam} */ - static processManifest() { + /** @returns {ProcessManifestsParam} */ + static processManifests() { return Joi.object({ - body: OrderPlatformModel.CreateOrderPayload().required(), + body: OrderPlatformModel.ProcessManifest().required(), }).required(); } @@ -746,9 +1008,10 @@ class OrderPlatformValidator { }).required(); } - /** @returns {UploadConsentParam} */ - static uploadConsent() { + /** @returns {UploadConsentsParam} */ + static uploadConsents() { return Joi.object({ + manifestId: Joi.string().allow("").required(), body: OrderPlatformModel.UploadConsent().required(), }).required(); } diff --git a/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts b/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts index 44b417b2f..6aab4b8c4 100644 --- a/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +++ b/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts @@ -89,6 +89,18 @@ declare class Payment { * @description: Use this API to create a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createPaymentLink/). */ 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 + * @name createPaymentOrder + * @summary: Create Order + * @description: Use this API to create a order and payment on aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createPaymentOrder/). + */ + createPaymentOrder({ body, requestHeaders }?: PaymentPlatformApplicationValidator.CreatePaymentOrderParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.EdcAggregatorsAndModelListParam} arg * - Arg object @@ -159,32 +171,45 @@ declare class Payment { * @description: Use this API to get details of a single edc device - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getEdcDevice/). */ 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} - + * Success response + * @name getMerchantAggregatorAppVersion + * @summary: Get app version required for Payment Mode. + * @description: This api provide read operations on the app version required for Payment Mode or sub payment mode for an Aggregator. - 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; /** * @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 Aggregator, payment mode and sub payment mode. * @description: Get Aggregator, payment mode and sub payment mode details. - 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 Payment modes and COD details. * @description: This api fetches all the available PGs for merchant and its offline payment mode details. - 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 @@ -205,13 +230,13 @@ declare 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 Aggregators available to be added as PG. * @description: Get Aggregators available to be added as PG. - 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 @@ -234,6 +259,33 @@ declare class Payment { * @description: Use this API to get a payment link - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentLink/). */ 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} - + * Success response + * @name getPaymentModeControlRoutes + * @summary: Get details for the given offline / advance payment mode for merchant + * @description: Use this API to get details for the given offline / advance payment mode for merchant - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeControlRoutes/). + */ + getPaymentModeControlRoutes({ mode, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentModeControlRoutesParam, { responseHeaders }?: object): Promise; + /** + * @param {PaymentPlatformApplicationValidator.GetPaymentModeCustomConfigParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getPaymentModeCustomConfig + * @summary: Get details of advance payment custom configurations of merchant + * @description: Use this API to Get details of advance payment custom configurations of merchant - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeCustomConfig/). + */ + getPaymentModeCustomConfig({ mode, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentModeCustomConfigParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam} arg * - Arg object @@ -245,19 +297,33 @@ declare class Payment { * @summary: Get All Valid Payment Options * @description: Use this API to get Get All Valid Payment Options for making payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeRoutes/). */ - getPaymentModeRoutes({ refresh, requestType, requestHeaders }?: PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam, { responseHeaders }?: object): Promise; + getPaymentModeRoutes({ refresh, requestType, orderId, shipmentId, 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} - + * Success response + * @name getPaymentSession + * @summary: API to get payment session details + * @description: Use this API to fetch the payment session details for 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; /** * @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: Get All Valid Payment Options * @description: Use this API to get Get All Valid Payment Options for making payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPosPaymentModeRoutes/). */ - getPosPaymentModeRoutes({ amount, cartId, pincode, checkoutMode, orderType, refresh, cardReference, userDetails, 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 @@ -338,26 +404,39 @@ declare 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 Aggregator, payment mode and sub payment mode. * @description: Update Aggregator, payment mode and sub payment mode details. - 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 modes and COD details. * @description: To updated online payment as active/inactive or offline payment configuration like cod charges, anonymous cod allowed flags. - 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} - + * Success response + * @name patchMerchantPaymentOptionVersion + * @summary: Update app version required for Payment Mode. + * @description: This api provide wrote operations on the app version required for Payment Mode or sub payment mode for an Aggregator. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/patchMerchantPaymentOptionVersion/). + */ + patchMerchantPaymentOptionVersion({ aggregatorId, body, requestHeaders }?: PaymentPlatformApplicationValidator.PatchMerchantPaymentOptionVersionParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.PaymentStatusBulkParam} arg * - Arg object @@ -444,6 +523,33 @@ declare class Payment { * @description: Save Config Secret For Brand Payment Gateway - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/saveBrandPaymentGatewayConfig/). */ saveBrandPaymentGatewayConfig({ body, requestHeaders }?: PaymentPlatformApplicationValidator.SaveBrandPaymentGatewayConfigParam, { responseHeaders }?: object): Promise; + /** + * @param {PaymentPlatformApplicationValidator.SetMerchantModeControlRoutesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name setMerchantModeControlRoutes + * @summary: Update offline payment mode details for the merchant + * @description: Use this API to update given offline / advance payment mode details for the merchant - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/setMerchantModeControlRoutes/). + */ + setMerchantModeControlRoutes({ mode, body, requestHeaders }?: PaymentPlatformApplicationValidator.SetMerchantModeControlRoutesParam, { responseHeaders }?: object): Promise; + /** + * @param {PaymentPlatformApplicationValidator.SetPaymentModeCustomConfigParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name setPaymentModeCustomConfig + * @summary: Update details of advance payment custom configurations of merchant + * @description: Use this API to update given details of advance payment custom configurations of merchant - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/setPaymentModeCustomConfig/). + */ + setPaymentModeCustomConfig({ mode, body, requestHeaders }?: PaymentPlatformApplicationValidator.SetPaymentModeCustomConfigParam, { responseHeaders }?: object): Promise; /** * @param {PaymentPlatformApplicationValidator.SetUserCODlimitRoutesParam} arg * - Arg object diff --git a/sdk/platform/Payment/PaymentPlatformApplicationClient.js b/sdk/platform/Payment/PaymentPlatformApplicationClient.js index 61aea19c8..8a070e675 100644 --- a/sdk/platform/Payment/PaymentPlatformApplicationClient.js +++ b/sdk/platform/Payment/PaymentPlatformApplicationClient.js @@ -585,6 +585,87 @@ class Payment { return response; } + /** + * @param {PaymentPlatformApplicationValidator.CreatePaymentOrderParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createPaymentOrder + * @summary: Create Order + * @description: Use this API to create a order and payment on aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createPaymentOrder/). + */ + async createPaymentOrder( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = PaymentPlatformApplicationValidator.createPaymentOrder().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, + } = PaymentPlatformApplicationValidator.createPaymentOrder().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Payment > createPaymentOrder \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment-orders/`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentPlatformModel.PaymentOrderResponse().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 > Payment > createPaymentOrder \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {PaymentPlatformApplicationValidator.EdcAggregatorsAndModelListParam} arg * - Arg object @@ -1086,13 +1167,114 @@ class Payment { return response; } + /** + * @param {PaymentPlatformApplicationValidator.GetMerchantAggregatorAppVersionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getMerchantAggregatorAppVersion + * @summary: Get app version required for Payment Mode. + * @description: This api provide read operations on the app version required for Payment Mode or sub payment mode for an Aggregator. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getMerchantAggregatorAppVersion/). + */ + async getMerchantAggregatorAppVersion( + { + aggregatorId, + businessUnit, + device, + paymentModeId, + subPaymentMode, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = PaymentPlatformApplicationValidator.getMerchantAggregatorAppVersion().validate( + { + aggregatorId, + businessUnit, + device, + paymentModeId, + subPaymentMode, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = PaymentPlatformApplicationValidator.getMerchantAggregatorAppVersion().validate( + { + aggregatorId, + businessUnit, + device, + paymentModeId, + subPaymentMode, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Payment > getMerchantAggregatorAppVersion \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["business_unit"] = businessUnit; + query_params["device"] = device; + query_params["payment_mode_id"] = paymentModeId; + query_params["sub_payment_mode"] = subPaymentMode; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/aggregators/${aggregatorId}/version`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentPlatformModel.AggregatorVersionResponse().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 > Payment > getMerchantAggregatorAppVersion \n ${res_error}`, + }); + } + } + + return response; + } + /** * @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 Aggregator, payment mode and sub payment mode. @@ -1157,7 +1339,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1182,7 +1364,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 Payment modes and COD details. @@ -1235,7 +1417,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1343,7 +1525,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 Aggregators available to be added as PG. @@ -1396,7 +1578,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1553,7 +1735,265 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.GetPaymentLinkResponse().validate(responseData, { + } = PaymentPlatformModel.GetPaymentLinkResponse().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 > Payment > getPaymentLink \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {PaymentPlatformApplicationValidator.GetPaymentModeControlRoutesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getPaymentModeControlRoutes + * @summary: Get details for the given offline / advance payment mode for merchant + * @description: Use this API to get details for the given offline / advance payment mode for merchant - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeControlRoutes/). + */ + async getPaymentModeControlRoutes( + { mode, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = PaymentPlatformApplicationValidator.getPaymentModeControlRoutes().validate( + { + mode, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = PaymentPlatformApplicationValidator.getPaymentModeControlRoutes().validate( + { + mode, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Payment > getPaymentModeControlRoutes \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/modes/${mode}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentPlatformModel.PlatformPaymentModeResponse().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 > Payment > getPaymentModeControlRoutes \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {PaymentPlatformApplicationValidator.GetPaymentModeCustomConfigParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getPaymentModeCustomConfig + * @summary: Get details of advance payment custom configurations of merchant + * @description: Use this API to Get details of advance payment custom configurations of merchant - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeCustomConfig/). + */ + async getPaymentModeCustomConfig( + { mode, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = PaymentPlatformApplicationValidator.getPaymentModeCustomConfig().validate( + { + mode, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = PaymentPlatformApplicationValidator.getPaymentModeCustomConfig().validate( + { + mode, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Payment > getPaymentModeCustomConfig \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/modes/${mode}/custom-config`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentPlatformModel.PaymentCustomConfigResponseSchema().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 > Payment > getPaymentModeCustomConfig \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getPaymentModeRoutes + * @summary: Get All Valid Payment Options + * @description: Use this API to get Get All Valid Payment Options for making payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeRoutes/). + */ + async getPaymentModeRoutes( + { refresh, requestType, orderId, shipmentId, requestHeaders } = { + requestHeaders: {}, + }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = PaymentPlatformApplicationValidator.getPaymentModeRoutes().validate( + { + refresh, + requestType, + orderId, + shipmentId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = PaymentPlatformApplicationValidator.getPaymentModeRoutes().validate( + { + refresh, + requestType, + orderId, + shipmentId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Payment > getPaymentModeRoutes \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["refresh"] = refresh; + query_params["request_type"] = requestType; + query_params["order_id"] = orderId; + query_params["shipment_id"] = shipmentId; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentPlatformModel.PaymentOptionsResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1564,7 +2004,7 @@ class Payment { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Payment > getPaymentLink \n ${res_error}`, + message: `Response Validation Warnings for platform > Payment > getPaymentModeRoutes \n ${res_error}`, }); } } @@ -1573,26 +2013,27 @@ class Payment { } /** - * @param {PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam} arg + * @param {PaymentPlatformApplicationValidator.GetPaymentSessionParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPaymentModeRoutes - * @summary: Get All Valid Payment Options - * @description: Use this API to get Get All Valid Payment Options for making payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeRoutes/). + * @returns {Promise} - + * Success response + * @name getPaymentSession + * @summary: API to get payment session details + * @description: Use this API to fetch the payment session details for given order ID or Transaction ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentSession/). */ - async getPaymentModeRoutes( - { refresh, requestType, requestHeaders } = { requestHeaders: {} }, + async getPaymentSession( + { gid, lineItem, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = PaymentPlatformApplicationValidator.getPaymentModeRoutes().validate( + } = PaymentPlatformApplicationValidator.getPaymentSession().validate( { - refresh, - requestType, + gid, + lineItem, }, { abortEarly: false, allowUnknown: true } ); @@ -1603,28 +2044,27 @@ class Payment { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = PaymentPlatformApplicationValidator.getPaymentModeRoutes().validate( + } = PaymentPlatformApplicationValidator.getPaymentSession().validate( { - refresh, - requestType, + gid, + lineItem, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Payment > getPaymentModeRoutes \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Payment > getPaymentSession \n ${warrning}`, }); } const query_params = {}; - query_params["refresh"] = refresh; - query_params["request_type"] = requestType; + query_params["line-item"] = lineItem; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options`, + `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/session/${gid}`, query_params, undefined, requestHeaders, @@ -1638,7 +2078,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentOptionsResponse().validate(responseData, { + } = PaymentPlatformModel.PaymentSessionSerializer().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1649,7 +2089,7 @@ class Payment { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Payment > getPaymentModeRoutes \n ${res_error}`, + message: `Response Validation Warnings for platform > Payment > getPaymentSession \n ${res_error}`, }); } } @@ -1663,7 +2103,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: Get All Valid Payment Options * @description: Use this API to get Get All Valid Payment Options for making payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPosPaymentModeRoutes/). @@ -1671,13 +2112,17 @@ class Payment { async getPosPaymentModeRoutes( { amount, - cartId, pincode, - checkoutMode, orderType, + cartId, + checkoutMode, refresh, + orderId, cardReference, userDetails, + displaySplit, + advancePayment, + shipmentId, requestHeaders, } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } @@ -1687,13 +2132,17 @@ class Payment { } = PaymentPlatformApplicationValidator.getPosPaymentModeRoutes().validate( { amount, - cartId, pincode, - checkoutMode, orderType, + cartId, + checkoutMode, refresh, + orderId, cardReference, userDetails, + displaySplit, + advancePayment, + shipmentId, }, { abortEarly: false, allowUnknown: true } ); @@ -1707,13 +2156,17 @@ class Payment { } = PaymentPlatformApplicationValidator.getPosPaymentModeRoutes().validate( { amount, - cartId, pincode, - checkoutMode, orderType, + cartId, + checkoutMode, refresh, + orderId, cardReference, userDetails, + displaySplit, + advancePayment, + shipmentId, }, { abortEarly: false, allowUnknown: false } ); @@ -1730,9 +2183,13 @@ class Payment { query_params["pincode"] = pincode; query_params["checkout_mode"] = checkoutMode; query_params["refresh"] = refresh; + query_params["order_id"] = orderId; query_params["card_reference"] = cardReference; query_params["order_type"] = orderType; query_params["user_details"] = userDetails; + query_params["display_split"] = displaySplit; + query_params["advance_payment"] = advancePayment; + query_params["shipment_id"] = shipmentId; const response = await PlatformAPIClient.execute( this.config, @@ -1751,7 +2208,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.PaymentOptionsResponse().validate(responseData, { + } = PaymentPlatformModel.PaymentModeRouteResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -2270,7 +2727,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 Aggregator, payment mode and sub payment mode. @@ -2329,7 +2786,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2354,7 +2811,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 modes and COD details. @@ -2411,7 +2868,7 @@ class Payment { const { error: res_error, - } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate( + } = PaymentPlatformModel.PlatformPaymentModeResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -2430,6 +2887,90 @@ class Payment { return response; } + /** + * @param {PaymentPlatformApplicationValidator.PatchMerchantPaymentOptionVersionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name patchMerchantPaymentOptionVersion + * @summary: Update app version required for Payment Mode. + * @description: This api provide wrote operations on the app version required for Payment Mode or sub payment mode for an Aggregator. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/patchMerchantPaymentOptionVersion/). + */ + async patchMerchantPaymentOptionVersion( + { aggregatorId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = PaymentPlatformApplicationValidator.patchMerchantPaymentOptionVersion().validate( + { + aggregatorId, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = PaymentPlatformApplicationValidator.patchMerchantPaymentOptionVersion().validate( + { + aggregatorId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Payment > patchMerchantPaymentOptionVersion \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "patch", + `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/aggregators/${aggregatorId}/version`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentPlatformModel.PlatformPaymentModeResponse().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 > Payment > patchMerchantPaymentOptionVersion \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {PaymentPlatformApplicationValidator.PaymentStatusBulkParam} arg * - Arg object @@ -3000,6 +3541,175 @@ class Payment { return response; } + /** + * @param {PaymentPlatformApplicationValidator.SetMerchantModeControlRoutesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name setMerchantModeControlRoutes + * @summary: Update offline payment mode details for the merchant + * @description: Use this API to update given offline / advance payment mode details for the merchant - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/setMerchantModeControlRoutes/). + */ + async setMerchantModeControlRoutes( + { mode, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = PaymentPlatformApplicationValidator.setMerchantModeControlRoutes().validate( + { + mode, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = PaymentPlatformApplicationValidator.setMerchantModeControlRoutes().validate( + { + mode, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Payment > setMerchantModeControlRoutes \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "patch", + `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/modes/${mode}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentPlatformModel.PlatformPaymentModeResponse().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 > Payment > setMerchantModeControlRoutes \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {PaymentPlatformApplicationValidator.SetPaymentModeCustomConfigParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name setPaymentModeCustomConfig + * @summary: Update details of advance payment custom configurations of merchant + * @description: Use this API to update given details of advance payment custom configurations of merchant - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/setPaymentModeCustomConfig/). + */ + async setPaymentModeCustomConfig( + { mode, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = PaymentPlatformApplicationValidator.setPaymentModeCustomConfig().validate( + { + mode, + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = PaymentPlatformApplicationValidator.setPaymentModeCustomConfig().validate( + { + mode, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Payment > setPaymentModeCustomConfig \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "patch", + `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/modes/${mode}/custom-config`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = PaymentPlatformModel.PaymentCustomConfigResponseSchema().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 > Payment > setPaymentModeCustomConfig \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {PaymentPlatformApplicationValidator.SetUserCODlimitRoutesParam} arg * - Arg object diff --git a/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts b/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts index 63cc4cac9..9cc729fde 100644 --- a/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +++ b/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts @@ -29,6 +29,10 @@ export = PaymentPlatformApplicationValidator; * @typedef CreatePaymentLinkParam * @property {PaymentPlatformModel.CreatePaymentLinkRequest} body */ +/** + * @typedef CreatePaymentOrderParam + * @property {PaymentPlatformModel.PaymentOrderRequest} body + */ /** @typedef EdcAggregatorsAndModelListParam */ /** * @typedef EdcDeviceListParam @@ -53,6 +57,14 @@ export = PaymentPlatformApplicationValidator; * @typedef GetEdcDeviceParam * @property {string} terminalUniqueIdentifier - Terminal unique identifier */ +/** + * @typedef GetMerchantAggregatorAppVersionParam + * @property {number} aggregatorId - Aggregators Id + * @property {string} businessUnit + * @property {string} device + * @property {number} [paymentModeId] + * @property {string} [subPaymentMode] + */ /** * @typedef GetMerchantAggregatorPaymentModeDetailsParam * @property {number} aggregatorId - Aggregators Id @@ -70,25 +82,47 @@ export = PaymentPlatformApplicationValidator; * @typedef GetPaymentLinkParam * @property {string} [paymentLinkId] */ +/** + * @typedef GetPaymentModeControlRoutesParam + * @property {string} mode - Offline / advance modes to get the payment modes + */ +/** + * @typedef GetPaymentModeCustomConfigParam + * @property {string} mode - Offline / advance mode + */ /** * @typedef GetPaymentModeRoutesParam * @property {boolean} refresh * @property {string} requestType + * @property {string} [orderId] + * @property {string} [shipmentId] + */ +/** + * @typedef GetPaymentSessionParam + * @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 {boolean} [lineItem] - Line-item to add extra data into response + * (e.g. cart details) */ /** * @typedef GetPosPaymentModeRoutesParam * @property {number} amount - Payable amount. - * @property {string} cartId - Identifier of the cart. + * @property {string} [cartId] - Identifier of the cart. * @property {string} pincode - The PIN Code of the destination address, e.g. 400059 - * @property {string} checkoutMode - Option to checkout for self or for others. + * @property {string} [checkoutMode] - Option to checkout for self or for others. * @property {boolean} [refresh] - This is a boolean value. Select `true` to * remove temporary cache files on payment gateway and replace with the latest one. + * @property {string} [orderId] * @property {string} [cardReference] - Card reference id of user's debit or credit card. * @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 {string} [userDetails] - URIencoded JSON containing details of an * anonymous user. + * @property {boolean} [displaySplit] - Display Split Payment Option or not + * @property {boolean} [advancePayment] - Display Advance Payment Options or Normal + * @property {string} [shipmentId] */ /** * @typedef GetUserBeneficiariesParam @@ -120,12 +154,17 @@ export = PaymentPlatformApplicationValidator; /** * @typedef PatchMerchantAggregatorPaymentModeDetailsParam * @property {number} aggregatorId - Aggregators Id - * @property {PaymentPlatformModel.MerchnatPaymentModeResponse} body + * @property {PaymentPlatformModel.PlatformPaymentModeResponse} body */ /** * @typedef PatchMerchantPaymentOptionParam * @property {PaymentPlatformModel.MerchnatPaymentModeRequest} body */ +/** + * @typedef PatchMerchantPaymentOptionVersionParam + * @property {number} aggregatorId - Aggregators Id + * @property {PaymentPlatformModel.AggregatorControlRequest} body + */ /** * @typedef PaymentStatusBulkParam * @property {PaymentPlatformModel.PaymentStatusBulkHandlerRequest} body @@ -154,6 +193,16 @@ export = PaymentPlatformApplicationValidator; * @typedef SaveBrandPaymentGatewayConfigParam * @property {PaymentPlatformModel.PaymentGatewayConfigRequest} body */ +/** + * @typedef SetMerchantModeControlRoutesParam + * @property {string} mode - Offline / advance payment mode + * @property {PaymentPlatformModel.MerchantPaymentModeRequest} body + */ +/** + * @typedef SetPaymentModeCustomConfigParam + * @property {string} mode - Offline / advance payment mode + * @property {PaymentPlatformModel.PaymentCustomConfigRequestSchema} body + */ /** * @typedef SetUserCODlimitRoutesParam * @property {PaymentPlatformModel.SetCODForUserRequest} body @@ -202,6 +251,8 @@ declare class PaymentPlatformApplicationValidator { static createMerchantRefundPriority(): CreateMerchantRefundPriorityParam; /** @returns {CreatePaymentLinkParam} */ static createPaymentLink(): CreatePaymentLinkParam; + /** @returns {CreatePaymentOrderParam} */ + static createPaymentOrder(): CreatePaymentOrderParam; /** @returns {EdcAggregatorsAndModelListParam} */ static edcAggregatorsAndModelList(): any; /** @returns {EdcDeviceListParam} */ @@ -214,6 +265,8 @@ declare class PaymentPlatformApplicationValidator { static getBrandPaymentGatewayConfig(): GetBrandPaymentGatewayConfigParam; /** @returns {GetEdcDeviceParam} */ static getEdcDevice(): GetEdcDeviceParam; + /** @returns {GetMerchantAggregatorAppVersionParam} */ + static getMerchantAggregatorAppVersion(): GetMerchantAggregatorAppVersionParam; /** @returns {GetMerchantAggregatorPaymentModeDetailsParam} */ static getMerchantAggregatorPaymentModeDetails(): GetMerchantAggregatorPaymentModeDetailsParam; /** @returns {GetMerchantPaymentOptionParam} */ @@ -226,8 +279,14 @@ declare class PaymentPlatformApplicationValidator { static getPaymentCodeOption(): any; /** @returns {GetPaymentLinkParam} */ static getPaymentLink(): GetPaymentLinkParam; + /** @returns {GetPaymentModeControlRoutesParam} */ + static getPaymentModeControlRoutes(): GetPaymentModeControlRoutesParam; + /** @returns {GetPaymentModeCustomConfigParam} */ + static getPaymentModeCustomConfig(): GetPaymentModeCustomConfigParam; /** @returns {GetPaymentModeRoutesParam} */ static getPaymentModeRoutes(): GetPaymentModeRoutesParam; + /** @returns {GetPaymentSessionParam} */ + static getPaymentSession(): GetPaymentSessionParam; /** @returns {GetPosPaymentModeRoutesParam} */ static getPosPaymentModeRoutes(): GetPosPaymentModeRoutesParam; /** @returns {GetUserBeneficiariesParam} */ @@ -246,6 +305,8 @@ declare class PaymentPlatformApplicationValidator { static patchMerchantAggregatorPaymentModeDetails(): PatchMerchantAggregatorPaymentModeDetailsParam; /** @returns {PatchMerchantPaymentOptionParam} */ static patchMerchantPaymentOption(): PatchMerchantPaymentOptionParam; + /** @returns {PatchMerchantPaymentOptionVersionParam} */ + static patchMerchantPaymentOptionVersion(): PatchMerchantPaymentOptionVersionParam; /** @returns {PaymentStatusBulkParam} */ static paymentStatusBulk(): PaymentStatusBulkParam; /** @returns {PollingPaymentLinkParam} */ @@ -260,6 +321,10 @@ declare class PaymentPlatformApplicationValidator { static revokeOauthToken(): RevokeOauthTokenParam; /** @returns {SaveBrandPaymentGatewayConfigParam} */ static saveBrandPaymentGatewayConfig(): SaveBrandPaymentGatewayConfigParam; + /** @returns {SetMerchantModeControlRoutesParam} */ + static setMerchantModeControlRoutes(): SetMerchantModeControlRoutesParam; + /** @returns {SetPaymentModeCustomConfigParam} */ + static setPaymentModeCustomConfig(): SetPaymentModeCustomConfigParam; /** @returns {SetUserCODlimitRoutesParam} */ static setUserCODlimitRoutes(): SetUserCODlimitRoutesParam; /** @returns {UpdateEdcDeviceParam} */ @@ -274,7 +339,7 @@ declare class PaymentPlatformApplicationValidator { static verifyCustomerForPayment(): VerifyCustomerForPaymentParam; } declare namespace PaymentPlatformApplicationValidator { - export { AddEdcDeviceParam, AddRefundBankAccountUsingOTPParam, CancelPaymentLinkParam, CheckAndUpdatePaymentStatusParam, ConfirmPaymentParam, CreateMerchantRefundPriorityParam, CreatePaymentLinkParam, EdcAggregatorsAndModelListParam, EdcDeviceListParam, EdcDeviceStatsParam, GetBankAccountDetailsOpenAPIParam, GetBrandPaymentGatewayConfigParam, GetEdcDeviceParam, GetMerchantAggregatorPaymentModeDetailsParam, GetMerchantPaymentOptionParam, GetMerchantRefundPriorityParam, GetPGConfigAggregatorsParam, GetPaymentCodeOptionParam, GetPaymentLinkParam, GetPaymentModeRoutesParam, GetPosPaymentModeRoutesParam, GetUserBeneficiariesParam, GetUserCODlimitRoutesParam, GetUserOrderBeneficiariesParam, InitialisePaymentParam, MerchantOnBoardingParam, OauthGetUrlParam, PatchMerchantAggregatorPaymentModeDetailsParam, PatchMerchantPaymentOptionParam, PaymentStatusBulkParam, PollingPaymentLinkParam, RepaymentDetailsParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, RevokeOauthTokenParam, SaveBrandPaymentGatewayConfigParam, SetUserCODlimitRoutesParam, UpdateEdcDeviceParam, UpdateMerchantRefundPriorityParam, UpdatePaymentSessionParam, UpdateRefundSessionParam, VerifyCustomerForPaymentParam }; + export { AddEdcDeviceParam, AddRefundBankAccountUsingOTPParam, CancelPaymentLinkParam, CheckAndUpdatePaymentStatusParam, ConfirmPaymentParam, CreateMerchantRefundPriorityParam, CreatePaymentLinkParam, CreatePaymentOrderParam, EdcAggregatorsAndModelListParam, EdcDeviceListParam, EdcDeviceStatsParam, GetBankAccountDetailsOpenAPIParam, GetBrandPaymentGatewayConfigParam, GetEdcDeviceParam, GetMerchantAggregatorAppVersionParam, GetMerchantAggregatorPaymentModeDetailsParam, GetMerchantPaymentOptionParam, GetMerchantRefundPriorityParam, GetPGConfigAggregatorsParam, GetPaymentCodeOptionParam, GetPaymentLinkParam, GetPaymentModeControlRoutesParam, GetPaymentModeCustomConfigParam, GetPaymentModeRoutesParam, GetPaymentSessionParam, GetPosPaymentModeRoutesParam, GetUserBeneficiariesParam, GetUserCODlimitRoutesParam, GetUserOrderBeneficiariesParam, InitialisePaymentParam, MerchantOnBoardingParam, OauthGetUrlParam, PatchMerchantAggregatorPaymentModeDetailsParam, PatchMerchantPaymentOptionParam, PatchMerchantPaymentOptionVersionParam, PaymentStatusBulkParam, PollingPaymentLinkParam, RepaymentDetailsParam, ResendOrCancelPaymentParam, ResendPaymentLinkParam, RevokeOauthTokenParam, SaveBrandPaymentGatewayConfigParam, SetMerchantModeControlRoutesParam, SetPaymentModeCustomConfigParam, SetUserCODlimitRoutesParam, UpdateEdcDeviceParam, UpdateMerchantRefundPriorityParam, UpdatePaymentSessionParam, UpdateRefundSessionParam, VerifyCustomerForPaymentParam }; } type AddEdcDeviceParam = { /** @@ -305,6 +370,9 @@ type CreateMerchantRefundPriorityParam = { type CreatePaymentLinkParam = { body: PaymentPlatformModel.CreatePaymentLinkRequest; }; +type CreatePaymentOrderParam = { + body: PaymentPlatformModel.PaymentOrderRequest; +}; type EdcDeviceListParam = { pageNo?: number; pageSize?: number; @@ -329,6 +397,16 @@ type GetEdcDeviceParam = { */ terminalUniqueIdentifier: string; }; +type GetMerchantAggregatorAppVersionParam = { + /** + * - Aggregators Id + */ + aggregatorId: number; + businessUnit: string; + device: string; + paymentModeId?: number; + subPaymentMode?: string; +}; type GetMerchantAggregatorPaymentModeDetailsParam = { /** * - Aggregators Id @@ -346,9 +424,36 @@ type GetMerchantRefundPriorityParam = { type GetPaymentLinkParam = { paymentLinkId?: string; }; +type GetPaymentModeControlRoutesParam = { + /** + * - Offline / advance modes to get the payment modes + */ + mode: string; +}; +type GetPaymentModeCustomConfigParam = { + /** + * - Offline / advance mode + */ + mode: string; +}; type GetPaymentModeRoutesParam = { refresh: boolean; requestType: string; + orderId?: string; + shipmentId?: string; +}; +type GetPaymentSessionParam = { + /** + * - 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. + */ + gid: string; + /** + * - Line-item to add extra data into response + * (e.g. cart details) + */ + lineItem?: boolean; }; type GetPosPaymentModeRoutesParam = { /** @@ -358,7 +463,7 @@ type GetPosPaymentModeRoutesParam = { /** * - Identifier of the cart. */ - cartId: string; + cartId?: string; /** * - The PIN Code of the destination address, e.g. 400059 */ @@ -366,12 +471,13 @@ type GetPosPaymentModeRoutesParam = { /** * - Option to checkout for self or for others. */ - checkoutMode: string; + checkoutMode?: string; /** * - This is a boolean value. Select `true` to * remove temporary cache files on payment gateway and replace with the latest one. */ refresh?: boolean; + orderId?: string; /** * - Card reference id of user's debit or credit card. */ @@ -387,6 +493,15 @@ type GetPosPaymentModeRoutesParam = { * anonymous user. */ userDetails?: string; + /** + * - Display Split Payment Option or not + */ + displaySplit?: boolean; + /** + * - Display Advance Payment Options or Normal + */ + advancePayment?: boolean; + shipmentId?: string; }; type GetUserBeneficiariesParam = { orderId: string; @@ -417,11 +532,18 @@ type PatchMerchantAggregatorPaymentModeDetailsParam = { * - Aggregators Id */ aggregatorId: number; - body: PaymentPlatformModel.MerchnatPaymentModeResponse; + body: PaymentPlatformModel.PlatformPaymentModeResponse; }; type PatchMerchantPaymentOptionParam = { body: PaymentPlatformModel.MerchnatPaymentModeRequest; }; +type PatchMerchantPaymentOptionVersionParam = { + /** + * - Aggregators Id + */ + aggregatorId: number; + body: PaymentPlatformModel.AggregatorControlRequest; +}; type PaymentStatusBulkParam = { body: PaymentPlatformModel.PaymentStatusBulkHandlerRequest; }; @@ -446,6 +568,20 @@ type RevokeOauthTokenParam = { type SaveBrandPaymentGatewayConfigParam = { body: PaymentPlatformModel.PaymentGatewayConfigRequest; }; +type SetMerchantModeControlRoutesParam = { + /** + * - Offline / advance payment mode + */ + mode: string; + body: PaymentPlatformModel.MerchantPaymentModeRequest; +}; +type SetPaymentModeCustomConfigParam = { + /** + * - Offline / advance payment mode + */ + mode: string; + body: PaymentPlatformModel.PaymentCustomConfigRequestSchema; +}; type SetUserCODlimitRoutesParam = { body: PaymentPlatformModel.SetCODForUserRequest; }; diff --git a/sdk/platform/Payment/PaymentPlatformApplicationValidator.js b/sdk/platform/Payment/PaymentPlatformApplicationValidator.js index 49c7be5b8..6b61d7c4f 100644 --- a/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +++ b/sdk/platform/Payment/PaymentPlatformApplicationValidator.js @@ -39,6 +39,11 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); * @property {PaymentPlatformModel.CreatePaymentLinkRequest} body */ +/** + * @typedef CreatePaymentOrderParam + * @property {PaymentPlatformModel.PaymentOrderRequest} body + */ + /** @typedef EdcAggregatorsAndModelListParam */ /** @@ -69,6 +74,15 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); * @property {string} terminalUniqueIdentifier - Terminal unique identifier */ +/** + * @typedef GetMerchantAggregatorAppVersionParam + * @property {number} aggregatorId - Aggregators Id + * @property {string} businessUnit + * @property {string} device + * @property {number} [paymentModeId] + * @property {string} [subPaymentMode] + */ + /** * @typedef GetMerchantAggregatorPaymentModeDetailsParam * @property {number} aggregatorId - Aggregators Id @@ -92,26 +106,51 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); * @property {string} [paymentLinkId] */ +/** + * @typedef GetPaymentModeControlRoutesParam + * @property {string} mode - Offline / advance modes to get the payment modes + */ + +/** + * @typedef GetPaymentModeCustomConfigParam + * @property {string} mode - Offline / advance mode + */ + /** * @typedef GetPaymentModeRoutesParam * @property {boolean} refresh * @property {string} requestType + * @property {string} [orderId] + * @property {string} [shipmentId] + */ + +/** + * @typedef GetPaymentSessionParam + * @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 {boolean} [lineItem] - Line-item to add extra data into response + * (e.g. cart details) */ /** * @typedef GetPosPaymentModeRoutesParam * @property {number} amount - Payable amount. - * @property {string} cartId - Identifier of the cart. + * @property {string} [cartId] - Identifier of the cart. * @property {string} pincode - The PIN Code of the destination address, e.g. 400059 - * @property {string} checkoutMode - Option to checkout for self or for others. + * @property {string} [checkoutMode] - Option to checkout for self or for others. * @property {boolean} [refresh] - This is a boolean value. Select `true` to * remove temporary cache files on payment gateway and replace with the latest one. + * @property {string} [orderId] * @property {string} [cardReference] - Card reference id of user's debit or credit card. * @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 {string} [userDetails] - URIencoded JSON containing details of an * anonymous user. + * @property {boolean} [displaySplit] - Display Split Payment Option or not + * @property {boolean} [advancePayment] - Display Advance Payment Options or Normal + * @property {string} [shipmentId] */ /** @@ -150,7 +189,7 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); /** * @typedef PatchMerchantAggregatorPaymentModeDetailsParam * @property {number} aggregatorId - Aggregators Id - * @property {PaymentPlatformModel.MerchnatPaymentModeResponse} body + * @property {PaymentPlatformModel.PlatformPaymentModeResponse} body */ /** @@ -158,6 +197,12 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); * @property {PaymentPlatformModel.MerchnatPaymentModeRequest} body */ +/** + * @typedef PatchMerchantPaymentOptionVersionParam + * @property {number} aggregatorId - Aggregators Id + * @property {PaymentPlatformModel.AggregatorControlRequest} body + */ + /** * @typedef PaymentStatusBulkParam * @property {PaymentPlatformModel.PaymentStatusBulkHandlerRequest} body @@ -193,6 +238,18 @@ const PaymentPlatformModel = require("./PaymentPlatformModel"); * @property {PaymentPlatformModel.PaymentGatewayConfigRequest} body */ +/** + * @typedef SetMerchantModeControlRoutesParam + * @property {string} mode - Offline / advance payment mode + * @property {PaymentPlatformModel.MerchantPaymentModeRequest} body + */ + +/** + * @typedef SetPaymentModeCustomConfigParam + * @property {string} mode - Offline / advance payment mode + * @property {PaymentPlatformModel.PaymentCustomConfigRequestSchema} body + */ + /** * @typedef SetUserCODlimitRoutesParam * @property {PaymentPlatformModel.SetCODForUserRequest} body @@ -284,6 +341,13 @@ class PaymentPlatformApplicationValidator { }).required(); } + /** @returns {CreatePaymentOrderParam} */ + static createPaymentOrder() { + return Joi.object({ + body: PaymentPlatformModel.PaymentOrderRequest().required(), + }).required(); + } + /** @returns {EdcAggregatorsAndModelListParam} */ static edcAggregatorsAndModelList() { return Joi.object({}).required(); @@ -328,6 +392,17 @@ class PaymentPlatformApplicationValidator { }).required(); } + /** @returns {GetMerchantAggregatorAppVersionParam} */ + static getMerchantAggregatorAppVersion() { + return Joi.object({ + aggregatorId: Joi.number().required(), + businessUnit: Joi.string().allow("").required(), + device: Joi.string().allow("").required(), + paymentModeId: Joi.number(), + subPaymentMode: Joi.string().allow(""), + }).required(); + } + /** @returns {GetMerchantAggregatorPaymentModeDetailsParam} */ static getMerchantAggregatorPaymentModeDetails() { return Joi.object({ @@ -366,11 +441,35 @@ class PaymentPlatformApplicationValidator { }).required(); } + /** @returns {GetPaymentModeControlRoutesParam} */ + static getPaymentModeControlRoutes() { + return Joi.object({ + mode: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetPaymentModeCustomConfigParam} */ + static getPaymentModeCustomConfig() { + return Joi.object({ + mode: Joi.string().allow("").required(), + }).required(); + } + /** @returns {GetPaymentModeRoutesParam} */ static getPaymentModeRoutes() { return Joi.object({ refresh: Joi.boolean().required(), requestType: Joi.string().allow("").required(), + orderId: Joi.string().allow(""), + shipmentId: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetPaymentSessionParam} */ + static getPaymentSession() { + return Joi.object({ + gid: Joi.string().allow("").required(), + lineItem: Joi.boolean(), }).required(); } @@ -378,13 +477,17 @@ class PaymentPlatformApplicationValidator { static getPosPaymentModeRoutes() { return Joi.object({ amount: Joi.number().required(), - cartId: Joi.string().allow("").required(), + cartId: Joi.string().allow(""), pincode: Joi.string().allow("").required(), - checkoutMode: Joi.string().allow("").required(), + checkoutMode: Joi.string().allow(""), refresh: Joi.boolean(), + orderId: Joi.string().allow(""), cardReference: Joi.string().allow(""), orderType: Joi.string().allow("").required(), userDetails: Joi.string().allow(""), + displaySplit: Joi.boolean(), + advancePayment: Joi.boolean(), + shipmentId: Joi.string().allow(""), }).required(); } @@ -437,7 +540,7 @@ class PaymentPlatformApplicationValidator { static patchMerchantAggregatorPaymentModeDetails() { return Joi.object({ aggregatorId: Joi.number().required(), - body: PaymentPlatformModel.MerchnatPaymentModeResponse().required(), + body: PaymentPlatformModel.PlatformPaymentModeResponse().required(), }).required(); } @@ -448,6 +551,14 @@ class PaymentPlatformApplicationValidator { }).required(); } + /** @returns {PatchMerchantPaymentOptionVersionParam} */ + static patchMerchantPaymentOptionVersion() { + return Joi.object({ + aggregatorId: Joi.number().required(), + body: PaymentPlatformModel.AggregatorControlRequest().required(), + }).required(); + } + /** @returns {PaymentStatusBulkParam} */ static paymentStatusBulk() { return Joi.object({ @@ -497,6 +608,22 @@ class PaymentPlatformApplicationValidator { }).required(); } + /** @returns {SetMerchantModeControlRoutesParam} */ + static setMerchantModeControlRoutes() { + return Joi.object({ + mode: Joi.string().allow("").required(), + body: PaymentPlatformModel.MerchantPaymentModeRequest().required(), + }).required(); + } + + /** @returns {SetPaymentModeCustomConfigParam} */ + static setPaymentModeCustomConfig() { + return Joi.object({ + mode: Joi.string().allow("").required(), + body: PaymentPlatformModel.PaymentCustomConfigRequestSchema().required(), + }).required(); + } + /** @returns {SetUserCODlimitRoutesParam} */ static setUserCODlimitRoutes() { return Joi.object({ diff --git a/sdk/platform/Payment/PaymentPlatformClient.d.ts b/sdk/platform/Payment/PaymentPlatformClient.d.ts index c9d4f0130..2f55142b9 100644 --- a/sdk/platform/Payment/PaymentPlatformClient.d.ts +++ b/sdk/platform/Payment/PaymentPlatformClient.d.ts @@ -110,7 +110,7 @@ declare class Payment { * @returns {Promise} - Success response * @name verifyIfscCode * @summary: Ifsc Code Verification - * @description: Get True/False for correct IFSC Code for adding bank details for refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyIfscCode/). + * @description: Get True or False for correct IFSC Code for adding bank details for refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyIfscCode/). */ verifyIfscCode({ ifscCode, requestHeaders }?: PaymentPlatformValidator.VerifyIfscCodeParam, { responseHeaders }?: object): Promise; } diff --git a/sdk/platform/Payment/PaymentPlatformClient.js b/sdk/platform/Payment/PaymentPlatformClient.js index 926b18cab..827665fac 100644 --- a/sdk/platform/Payment/PaymentPlatformClient.js +++ b/sdk/platform/Payment/PaymentPlatformClient.js @@ -757,7 +757,7 @@ class Payment { * @returns {Promise} - Success response * @name verifyIfscCode * @summary: Ifsc Code Verification - * @description: Get True/False for correct IFSC Code for adding bank details for refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyIfscCode/). + * @description: Get True or False for correct IFSC Code for adding bank details for refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/verifyIfscCode/). */ async verifyIfscCode( { ifscCode, requestHeaders } = { requestHeaders: {} }, diff --git a/sdk/platform/Payment/PaymentPlatformModel.d.ts b/sdk/platform/Payment/PaymentPlatformModel.d.ts index 1d87d2e58..14b4ace37 100644 --- a/sdk/platform/Payment/PaymentPlatformModel.d.ts +++ b/sdk/platform/Payment/PaymentPlatformModel.d.ts @@ -7,10 +7,11 @@ export = PaymentPlatformModel; /** * @typedef AddressDetail * @property {string} address - Address details - * @property {string} address_type - Address type e.g. home, office + * @property {string} [address_type] - Address type e.g. home, office * @property {string} area - Area details * @property {string} area_code - Customer pin/zip code - * @property {string} area_code_slug - Area slug code, use pin/zip code if not available + * @property {string} area_code_slug - Area slug code, use pin or zip code if + * not available * @property {string} city - City name * @property {string} country - Country name * @property {string} country_iso_code - Country's code name e.g. `IN`, `GB` @@ -26,6 +27,63 @@ export = PaymentPlatformModel; * @property {string} state - State of the customer * @property {Object[]} [tags] - Optional address tag */ +/** + * @typedef AdvanceObject + * @property {string[]} [all_prepayment_type] - All available types of prepayment + * @property {boolean} [allow_custom_advance_amount] - Is custom advance amount allowed? + * @property {number} [amount] - Amount for Payment Breakdown + * @property {string} [cancellation_type] - Type of cancellation + * @property {string} [description] - The description for Advance Payment (user + * configured) + * @property {string} [display_name] - The display name for Advance payment + * @property {boolean} [is_active] - Is Advance Payment active + * @property {string} [prepayment_type] - Type of prepayment value + * @property {number} [prepayment_value] - Value for prepayment in advance payment + * @property {number} [refund_time_limit] - Time limit for processing refund + * @property {string} [time_unit] - Time unit for refunds + */ +/** + * @typedef AdvancePaymentObject + * @property {AdvanceObject} [advance] + * @property {string} [display_name] - Display name for Advance Payment Mode + * @property {number} [display_priority] - Display Priority for Payment Option + * @property {PaymentModeList[]} [list] - Payment mode + * @property {string} [name] - Name of Advance Payment Mode + * @property {number} [payment_mode_id] - Payment Mode ID for Advance Payment Option + * @property {SplitObject} [split] + */ +/** + * @typedef AggregatorControlRequest + * @property {string} [business_unit] - Business unit + * @property {string} [device] - Device name + * @property {Object[]} [items] - List of item details with respect to payment_mode + * @property {AggregatorVersionRequestSchema} [version] + */ +/** + * @typedef AggregatorRoute + * @property {string} [api_link] - Api_link + * @property {Object} [data] - Data + * @property {string} [payment_flow] - Payment_flow + * @property {string} [payment_flow_data] - Payment_flow_data + */ +/** + * @typedef AggregatorVersionItemSchema + * @property {string} [is_equal_to] + * @property {string} [is_greater_than] + * @property {string} [is_less_than] + */ +/** + * @typedef AggregatorVersionRequestSchema + * @property {string} [is_equal_to] + * @property {string} [is_greater_than] + * @property {string} [is_less_than] + */ +/** + * @typedef AggregatorVersionResponse + * @property {AggregatorVersionItemSchema} [items] + * @property {string} message - Message + * @property {boolean} success - Successful or failure + */ /** * @typedef BankDetailsForOTP * @property {string} account_holder @@ -44,6 +102,13 @@ export = PaymentPlatformModel; * @property {number} status_code - HTTP status code * @property {boolean} success - Successful or failure */ +/** + * @typedef CartDetailsSerializer + * @property {Object[]} articles - List of articles that are added in cart + * @property {number} cart_value - Total cart value i.e. amount to be paid + * @property {Object} items - Items that are added in cart + * @property {number} [total_quantity] - Total number of items in cart + */ /** * @typedef CODChargesLimitsResponse * @property {number} [cod_charge] - Cod charges to be applied on order. @@ -70,15 +135,15 @@ export = PaymentPlatformModel; * @property {string} [assign_card_id] * @property {string} cart_id * @property {string} checkout_mode - * @property {string} pincode */ /** * @typedef CreatePaymentLinkRequest * @property {number} amount - Total value of order + * @property {string} [country_phone_code] - Phone country code for complete mobile number * @property {string} [description] - Merchant order id * @property {string} email - Email to which the payment link is to be sent * @property {string} external_order_id - Merchant order id - * @property {CreatePaymentLinkMeta} meta - Meta + * @property {CreatePaymentLinkMeta} meta * @property {string} mobile_number - Mobile number to which the payment link is * to be sent */ @@ -131,24 +196,24 @@ export = PaymentPlatformModel; */ /** * @typedef EdcDeviceAddResponse - * @property {EdcDevice} data - Details of the EDC Device that is added + * @property {EdcDevice} data * @property {boolean} success - Response is successful or not */ /** * @typedef EdcDeviceDetailsResponse - * @property {EdcDevice} data - Details of one EDC Device + * @property {EdcDevice} data * @property {boolean} success - Response is successful or not */ /** * @typedef EdcDeviceListResponse * @property {EdcDevice[]} items - List of all edc mapped to the application * options with their Details. - * @property {Page} page - Pagination Response + * @property {Page} page * @property {boolean} success - Response is successful or not */ /** * @typedef EdcDeviceStatsResponse - * @property {StatisticsData} statistics - Message + * @property {StatisticsData} statistics * @property {boolean} success - Response is successful or not */ /** @@ -195,11 +260,16 @@ export = PaymentPlatformModel; */ /** * @typedef ErrorResponse - * @property {Object} [error] + * @property {ErrorDescription} [error] * @property {string} message - Message * @property {number} status_code - HTTP status code * @property {boolean} success - Successful or failure */ +/** + * @typedef FromConfig + * @property {string} business_unit - Business unit name + * @property {string} device - Device name + */ /** * @typedef GetOauthUrlResponse * @property {boolean} success - Response is successful or not @@ -207,11 +277,11 @@ export = PaymentPlatformModel; */ /** * @typedef GetPaymentCode - * @property {PaymentCode} method_code - Payment method code + * @property {PaymentCode} method_code */ /** * @typedef GetPaymentCodeResponse - * @property {GetPaymentCode} data - Data about Payment Code. + * @property {GetPaymentCode} data * @property {boolean} success - Response is successful or not. */ /** @@ -229,7 +299,7 @@ export = PaymentPlatformModel; /** * @typedef GetUserCODLimitResponse * @property {boolean} success - Response is successful or not - * @property {CODdata} user_cod_data - User COD Data + * @property {CODdata} user_cod_data */ /** * @typedef HttpErrorCodeAndResponse @@ -246,7 +316,7 @@ export = PaymentPlatformModel; * @typedef IntentApp * @property {string} [code] - Code * @property {string} [display_name] - Display_name - * @property {Object} [logos] - Logos + * @property {PaymentModeLogo} [logos] * @property {string} [package_name] - Package_name */ /** @@ -257,7 +327,7 @@ export = PaymentPlatformModel; /** * @typedef LinkStatus * @property {string} message - Message - * @property {boolean} status - Link action status + * @property {string} status - Link action status */ /** * @typedef MerchantOnBoardingRequest @@ -265,24 +335,24 @@ export = PaymentPlatformModel; * @property {string} app_id - Application id * @property {string} credit_line_id - Merchant ID at Ajiodhan's end * @property {string} status - Status - * @property {string} user_id - Deadlock/Grimlock user id + * @property {string} user_id - Deadlock or Grimlock user id */ /** * @typedef MerchantOnBoardingResponse * @property {Object} data * @property {boolean} success - Success/Failure of the transaction */ +/** + * @typedef MerchantPaymentModeRequest + * @property {string} business_unit - Business unit + * @property {Object} device - List of devices and its activation status + * @property {Object[]} items - List of item details with respect to payment_mode + */ /** * @typedef MerchnatPaymentModeRequest * @property {Object} [offline] - Details to be updated for online payment configuration. * @property {Object} [online] - Details to be updated for offline payment configuration. */ -/** - * @typedef MerchnatPaymentModeResponse - * @property {Object[]} [items] - List of all aggregator and payment mode details. - * @property {string} [message] - Message - * @property {boolean} success - Response is successful or not. - */ /** * @typedef MultiTenderPaymentMeta * @property {string} [current_status] @@ -355,7 +425,7 @@ export = PaymentPlatformModel; */ /** * @typedef PaymentCode - * @property {Code} codes - List of dict that contains payment method data + * @property {Code} codes * @property {string} name - Name of payment name * @property {string} networks - Payment networks * @property {string} types - Type of payment mode @@ -371,10 +441,100 @@ export = PaymentPlatformModel; * @property {string} order_id - Unique order id * @property {boolean} success - Payment confirmation updated or not. */ +/** + * @typedef PaymentCustomConfigCustomerRequestSchema + * @property {number[]} [groups] - Customer groups. + * @property {string} restriction - Customer restriction type. + */ +/** + * @typedef PaymentCustomConfigCustomerSchema + * @property {number[]} [groups] - Customer groups. + * @property {string} restriction - Customer restriction type. + * @property {string[]} [types] - Customer types. + */ +/** + * @typedef PaymentCustomConfigDetailsRequestSchema + * @property {PaymentCustomConfigCustomerRequestSchema} customer + * @property {number} min_order_value - The minimum order value for the store + * @property {PaymentCustomConfigModeSchema} payment_mode + */ +/** + * @typedef PaymentCustomConfigDetailsSchema + * @property {PaymentCustomConfigCustomerSchema} customer + * @property {number} min_order_value - The minimum order value for the store + * @property {PaymentCustomConfigModeSchema} payment_mode + */ +/** + * @typedef PaymentCustomConfigModeSchema + * @property {boolean} available - Indicates whether the payment mode is available. + * @property {string[]} [post_order] - Payment modes available for post-order. + * @property {string[]} [pre_order] - Payment modes available for pre-order. + */ +/** + * @typedef PaymentCustomConfigRequestSchema + * @property {string} business_unit - The business unit to which the store belongs. + * @property {PaymentCustomConfigDetailsRequestSchema[]} items + */ +/** + * @typedef PaymentCustomConfigResponseSchema + * @property {PaymentModeCustomConfigSchema[]} items + * @property {string} message + * @property {boolean} success + */ +/** + * @typedef PaymentDetailsSerializer + * @property {string} [aggregator_customer_id] - Unique customer id generated by + * payment gateway, not required for standard checkout. + * @property {string} [aggregator_order_id] - Unique order id or payment request + * id generated by payment gateway + * @property {number} amount - Amount paid. + * @property {number} amount_captured - Amount which is captured or credited to + * merchant account + * @property {number} [amount_refunded] + * @property {string} [cancel_url] - Cancel url sent by Fynd platform at the + * time of payment creation + * @property {boolean} [captured] - Whether the payment is captured (credited to + * merchant account) by payment gateway. + * @property {string} [created] - Timestamp in epoch + * @property {string} currency - Currency of the payment. + * @property {string} g_user_id - Global user identifier - unique user id + * generated by Fynd platform + * @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 {string} [kind] - Optional kind of purchase/payment - one time + * payment (sale) or subcription. defaults to sale. + * @property {string} [locale] - User's locale + * @property {string} [merchant_locale] - Merchant's locale + * @property {Object} [meta] - Metadata + * @property {string} mode - Test or live, test mode uses test credentials so + * that actual payment is not created. + * @property {string} [payment_id] - Unique transaction id generated by payment gateway + * @property {Object[]} payment_methods - Method of payment + * @property {string} status - Stautus of the payment + * @property {string} [success_url] - Success url sent by Fynd platform at the + * time of payment creation + */ +/** + * @typedef PaymentFlow + * @property {AggregatorRoute} [ajiodhan] + * @property {AggregatorRoute} [bqr_razorpay] + * @property {AggregatorRoute} [ccavenue] + * @property {AggregatorRoute} [epaylater] + * @property {AggregatorRoute} [fynd] + * @property {AggregatorRoute} [jiopay] + * @property {AggregatorRoute} [juspay] + * @property {AggregatorRoute} [mswipe] + * @property {AggregatorRoute} [payubiz] + * @property {AggregatorRoute} [razorpay] + * @property {AggregatorRoute} [rupifi] + * @property {AggregatorRoute} [simpl] + * @property {AggregatorRoute} [stripe] + */ /** * @typedef PaymentGatewayConfig * @property {string} config_type - Config Type of the aggregator - * @property {boolean} [is_active] - Enable/ Disable Flag + * @property {boolean} [is_active] - Enable or Disable Flag * @property {string} key - Api key of the payment aggregator * @property {string} merchant_salt - Merchant key of the payment aggregator * @property {string} secret - Secret Key of the payment aggregator @@ -383,7 +543,7 @@ export = PaymentPlatformModel; * @typedef PaymentGatewayConfigRequest * @property {PaymentGatewayConfig} [aggregator_name] * @property {string} app_id - Application Id to which Payment config Mapped - * @property {boolean} [is_active] - Enable/ Disable Flag + * @property {boolean} [is_active] - Enable or Disable Flag */ /** * @typedef PaymentGatewayConfigResponse @@ -436,6 +596,18 @@ export = PaymentPlatformModel; * @property {string} [virtual_id] - Payment virtual address. * @property {string} [vpa] - Customer vpa address */ +/** + * @typedef PaymentMethodsMetaOrder + * @property {string} merchant_code - Merchant code + * @property {string} payment_gateway - Payment gateway name + * @property {string} payment_identifier - Payment identifier + */ +/** + * @typedef PaymentModeCustomConfigSchema + * @property {string} business_unit - The business unit to which the store belongs. + * @property {PaymentCustomConfigDetailsSchema} custom_config + * @property {string} display_name - The display name of the store. + */ /** * @typedef PaymentModeList * @property {string} aggregator_name - Aggregator_name @@ -467,11 +639,11 @@ export = PaymentPlatformModel; * Intent_app_error_dict_list * @property {string[]} [intent_app_error_list] - Intent_app_error_list * @property {boolean} [intent_flow] - Intent_flow - * @property {Object} [logo_url] - Logo + * @property {PaymentModeLogo} [logo_url] * @property {string} [merchant_code] - Merchant code * @property {string} [name] - Name * @property {string} [nickname] - Nickname - * @property {Object} [product_cod_data] - Product cod configurations. + * @property {ProductCODData} [product_cod_data] * @property {number} [remaining_limit] - Remaining limit * @property {number} [retry_count] - Retry_count * @property {number} [timeout] - Timeout @@ -481,6 +653,13 @@ export = PaymentPlatformModel; * @property {string} large - Large * @property {string} small - Smalll */ +/** + * @typedef PaymentModeRouteResponse + * @property {AdvancePaymentObject[]} [advance_payment] - Advance Payment Array + * @property {Object} [payment_breakup] - Payment Breakup for advance payment + * @property {PaymentOptionAndFlow} payment_options + * @property {boolean} success - Response is successful or not + */ /** * @typedef PaymentObjectListSerializer * @property {Object} [aggregator_payment_object] @@ -502,15 +681,58 @@ export = PaymentPlatformModel; * @property {string} refunded_by * @property {Object} user_object */ +/** + * @typedef PaymentOptionAndFlow + * @property {PaymentFlow} payment_flows + * @property {RootPaymentMode[]} payment_option - Payment options + */ /** * @typedef PaymentOptions * @property {RootPaymentMode[]} payment_option - Payment options */ /** * @typedef PaymentOptionsResponse - * @property {PaymentOptions} payment_options - Payment options + * @property {Object} [payment_breakup] - Payment Breakup for advance payment + * @property {PaymentOptions} payment_options * @property {boolean} success - Response is successful or not */ +/** + * @typedef PaymentOrderData + * @property {string} [aggregator] - Aggregator name + * @property {number} [amount] - Amount + * @property {string} [callback_url] - Callback url for aggregator + * @property {string} [contact] - Mobile number + * @property {string} [currency] - Currency + * @property {string} [customer_id] - Aggregator customer id + * @property {string} [email] - Email + * @property {string} [merchant_order_id] - Merchant order id + * @property {string} [method] - Method + * @property {string} [order_id] - Aggregator order id + */ +/** + * @typedef PaymentOrderMethods + * @property {number} amount - Amount to be collected + * @property {PaymentMethodsMetaOrder} meta + * @property {string} mode - Payment mode + * @property {string} name - Payment mode name + * @property {string} [payment] - Payment type i.e. Required / Blocked + */ +/** + * @typedef PaymentOrderRequest + * @property {string} order_id - Order id + * @property {PaymentOrderMethods[]} [payment_methods] + * @property {string} [shipment_id] - Shipment_id + */ +/** + * @typedef PaymentOrderResponse + * @property {string} [callback_url] - Callback url for aggregator + * @property {PaymentOrderData} [data] + * @property {string} message - Message + * @property {string} [order_id] - Merchant order id + * @property {string} [payment_confirm_url] - Payment confirm url for aggregator + * @property {number} status_code - HTTP status code + * @property {boolean} success - Successful or failure + */ /** * @typedef PaymentSessionDetail * @property {string} [aggregator_customer_id] - Unique customer id generated by @@ -533,10 +755,11 @@ 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 {string} [kind] - Optional kind of purchase/payment - one time + * @property {string} [kind] - Optional kind of purchase or payment - one time * payment (sale) or subcription. defaults to sale. * @property {string} [locale] - User's locale * @property {string} [merchant_locale] - Merchant's locale + * @property {Object} [meta] - Metadata * @property {string} mode - Test or live, test mode uses test credentials so * that actual payment is not created. * @property {string} payment_id - Unique transaction id generated by payment gateway @@ -569,6 +792,18 @@ export = PaymentPlatformModel; * @property {string} status - Status of the payment. * @property {number} total_amount - Amount paid. */ +/** + * @typedef PaymentSessionSerializer + * @property {CartDetailsSerializer} [cart_details] + * @property {string} [currency] - The currency of the payment. + * @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 {Object} payment_details - Object of payment details + * @property {RefundDetailsSerializer[]} refund_details - Object of refund details + * @property {string} status - The status of the payment session. + * @property {number} total_amount - Total amount to be paid + */ /** * @typedef PaymentStatusBulkHandlerRequest * @property {string[]} merchant_order_id - List of order ids @@ -612,10 +847,10 @@ export = PaymentPlatformModel; */ /** * @typedef Payout - * @property {PayoutCustomer} customers - Customers details object + * @property {PayoutCustomer} customers * @property {boolean} is_active - Enable/DIsable Flag Payout * @property {boolean} is_default - Default or not - * @property {PayoutMoreAttributes} more_attributes - Bank details object + * @property {PayoutMoreAttributes} more_attributes * @property {PayoutAggregator[]} [payouts_aggregators] * @property {string} transfer_type - Transafer type * @property {string} unique_transfer_no - Display priority of the payment mode @@ -651,7 +886,7 @@ export = PaymentPlatformModel; * @typedef PayoutMoreAttributes * @property {string} [account_holder] - Account Holder Name * @property {string} [account_no] - Account Number - * @property {string} [account_type] - Account Type Saving/Current + * @property {string} [account_type] - Account Type Saving or Current * @property {string} [bank_name] - Name of Bank * @property {string} [branch_name] - Branch Name * @property {string} [city] - City @@ -662,8 +897,8 @@ export = PaymentPlatformModel; /** * @typedef PayoutRequest * @property {string} aggregator - Aggregator Name - * @property {PayoutBankDetails} bank_details - Payout bank details object - * @property {boolean} is_active - Enable/Disable Flag Payout + * @property {PayoutBankDetails} bank_details + * @property {boolean} is_active - Enable or Disable Flag Payout * @property {string} transfer_type - Transafer type * @property {string} unique_external_id - Unique Id of Payout * @property {Object} users - Payout users object @@ -673,7 +908,7 @@ export = PaymentPlatformModel; * @property {string} aggregator - Aggregator Name * @property {Object} bank_details - Payout bank_details object * @property {boolean} created - Created flag - * @property {boolean} is_active - Enable/DIsable Flag Payout + * @property {boolean} is_active - Enable or DIsable Flag Payout * @property {string} payment_status - Status of payment * @property {Object} payouts - Payout object * @property {boolean} success - Response is successful or not @@ -686,6 +921,17 @@ export = PaymentPlatformModel; * @property {Payout[]} items - Contains list of PayoutSchema * @property {boolean} success - Response is successful or not */ +/** + * @typedef PlatformPaymentModeCopyConfigRequest + * @property {FromConfig} from_config + * @property {ToConfig} to_config + */ +/** + * @typedef PlatformPaymentModeResponse + * @property {Object[]} [items] - List of all aggregator and payment mode details. + * @property {string} [message] - Message + * @property {boolean} success - Response is successful or not. + */ /** * @typedef PollingPaymentLinkResponse * @property {string} [aggregator_name] - Aggregator name @@ -701,7 +947,7 @@ export = PaymentPlatformModel; */ /** * @typedef ProductCODData - * @property {Object} [cod_charges] - Cod charges and its allowed limits. + * @property {CODChargesLimitsResponse} [cod_charges] * @property {Object} [items] - Item id with its cod availability. */ /** @@ -711,6 +957,15 @@ export = PaymentPlatformModel; * @property {string} message - Response message * @property {boolean} success - Success or failure flag. */ +/** + * @typedef RefundDetailsSerializer + * @property {number} amount - Refunded amount + * @property {string} created - Timestamp in epoch. + * @property {string} currency - The currency of the payment. + * @property {string} refund_utr - Unique refund utr generated by payment gateway. + * @property {string} request_id - Refund request id, unique id generated by Fynd platform + * @property {string} status - The status of the refund. + */ /** * @typedef RefundPriorityRequestSerializer * @property {boolean} apportion - Apportion refund to multiple sources @@ -744,9 +999,11 @@ export = PaymentPlatformModel; /** * @typedef RefundSessionRequestSerializer * @property {string} currency - The currency of the payment. + * @property {ErrorDescription} [error] * @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 {string} [message] - The status of the refund. * @property {Object} [meta] - Meta * @property {PaymentSessionDetail} payment_details - Details of the payment * @property {RefundSessionDetail[]} [refund_details] - Details of the refund @@ -803,7 +1060,7 @@ export = PaymentPlatformModel; */ /** * @typedef ResendOrCancelPaymentResponse - * @property {LinkStatus} data - Data about link action status. + * @property {LinkStatus} data * @property {boolean} success - Response is successful or not. */ /** @@ -851,6 +1108,12 @@ export = PaymentPlatformModel; * @property {string} message - Message * @property {boolean} success - Response is successful or not */ +/** + * @typedef SplitObject + * @property {number} [amount_remaining] - Amount pending to be paid + * @property {number} [splits_remaining] - Number of splits remaining + * @property {number} [total_number_of_splits] - Maximum amount of splits allowed + */ /** * @typedef StatisticsData * @property {number} active_device_count - No of active devices @@ -867,16 +1130,21 @@ export = PaymentPlatformModel; * @property {Object[]} data - Subscription Payment Method Object * @property {boolean} success - Response is successful or not */ +/** + * @typedef ToConfig + * @property {string} business_unit - Business unit name + * @property {Object[]} device - Device name to copy the config to + */ /** * @typedef UpdatePayoutRequest - * @property {boolean} is_active - Enable/Disable Flag Payout - * @property {boolean} is_default - Enable/Disable Default Payout + * @property {boolean} is_active - Enable or Disable Flag Payout + * @property {boolean} is_default - Enable or Disable Default Payout * @property {string} unique_external_id - Unique Id of Payout */ /** * @typedef UpdatePayoutResponse - * @property {boolean} is_active - Enable/DIsable Flag Payout - * @property {boolean} is_default - Enable/Disable Default Payout + * @property {boolean} is_active - Enable or DIsable Flag Payout + * @property {boolean} is_default - Enable or Disable Default Payout * @property {boolean} success - Response is successful or not */ /** @@ -899,7 +1167,7 @@ export = PaymentPlatformModel; declare class PaymentPlatformModel { } declare namespace PaymentPlatformModel { - export { AddBeneficiaryDetailsOTPRequest, AddressDetail, BankDetailsForOTP, CancelOrResendPaymentLinkRequest, CancelPaymentLinkResponse, CODChargesLimitsResponse, CODdata, Code, CreatePaymentLinkMeta, CreatePaymentLinkRequest, CreatePaymentLinkResponse, DeletePayoutResponse, DeleteSubscriptionPaymentMethodResponse, EdcAddRequest, EdcAggregatorAndModelListResponse, EdcDevice, EdcDeviceAddResponse, EdcDeviceDetailsResponse, EdcDeviceListResponse, EdcDeviceStatsResponse, EdcDeviceUpdateResponse, EdcModelData, EdcUpdateRequest, ErrorCodeAndDescription, ErrorCodeDescription, ErrorDescription, ErrorResponse, GetOauthUrlResponse, GetPaymentCode, GetPaymentCodeResponse, GetPaymentLinkResponse, GetUserCODLimitResponse, HttpErrorCodeAndResponse, IfscCodeResponse, IntentApp, IntentAppErrorList, LinkStatus, MerchantOnBoardingRequest, MerchantOnBoardingResponse, MerchnatPaymentModeRequest, MerchnatPaymentModeResponse, MultiTenderPaymentMeta, MultiTenderPaymentMethod, NotFoundResourceError, OrderBeneficiaryDetails, OrderBeneficiaryResponse, OrderDetail, Page, PaymentCode, PaymentConfirmationRequest, PaymentConfirmationResponse, PaymentGatewayConfig, PaymentGatewayConfigRequest, PaymentGatewayConfigResponse, PaymentGatewayToBeReviewed, PaymentInitializationRequest, PaymentInitializationResponse, PaymentModeList, PaymentModeLogo, PaymentObjectListSerializer, PaymentOptions, PaymentOptionsResponse, PaymentSessionDetail, PaymentSessionRequestSerializer, PaymentSessionResponseSerializer, PaymentStatusBulkHandlerRequest, PaymentStatusBulkHandlerResponse, PaymentStatusObject, PaymentStatusUpdateRequest, PaymentStatusUpdateResponse, Payout, PayoutAggregator, PayoutBankDetails, PayoutCustomer, PayoutMoreAttributes, PayoutRequest, PayoutResponse, PayoutsResponse, PollingPaymentLinkResponse, ProductCODData, RefundAccountResponse, RefundPriorityRequestSerializer, RefundPriorityResponseSerializer, RefundSessionDetail, RefundSessionRequestSerializer, RefundSessionResponseSerializer, RefundSourcesPriority, RepaymentDetailsSerialiserPayAll, RepaymentRequestDetails, RepaymentResponse, ResendOrCancelPaymentRequest, ResendOrCancelPaymentResponse, ResendPaymentLinkResponse, RevokeOAuthToken, RootPaymentMode, SaveSubscriptionSetupIntentRequest, SaveSubscriptionSetupIntentResponse, SetCODForUserRequest, SetCODOptionResponse, StatisticsData, SubscriptionConfigResponse, SubscriptionPaymentMethodResponse, UpdatePayoutRequest, UpdatePayoutResponse, ValidateCustomerRequest, ValidateCustomerResponse }; + export { AddBeneficiaryDetailsOTPRequest, AddressDetail, AdvanceObject, AdvancePaymentObject, AggregatorControlRequest, AggregatorRoute, AggregatorVersionItemSchema, AggregatorVersionRequestSchema, AggregatorVersionResponse, BankDetailsForOTP, CancelOrResendPaymentLinkRequest, CancelPaymentLinkResponse, CartDetailsSerializer, CODChargesLimitsResponse, CODdata, Code, CreatePaymentLinkMeta, CreatePaymentLinkRequest, CreatePaymentLinkResponse, DeletePayoutResponse, DeleteSubscriptionPaymentMethodResponse, EdcAddRequest, EdcAggregatorAndModelListResponse, EdcDevice, EdcDeviceAddResponse, EdcDeviceDetailsResponse, EdcDeviceListResponse, EdcDeviceStatsResponse, EdcDeviceUpdateResponse, EdcModelData, EdcUpdateRequest, ErrorCodeAndDescription, ErrorCodeDescription, ErrorDescription, ErrorResponse, FromConfig, GetOauthUrlResponse, GetPaymentCode, GetPaymentCodeResponse, GetPaymentLinkResponse, GetUserCODLimitResponse, HttpErrorCodeAndResponse, IfscCodeResponse, IntentApp, IntentAppErrorList, LinkStatus, MerchantOnBoardingRequest, MerchantOnBoardingResponse, MerchantPaymentModeRequest, MerchnatPaymentModeRequest, MultiTenderPaymentMeta, MultiTenderPaymentMethod, NotFoundResourceError, OrderBeneficiaryDetails, OrderBeneficiaryResponse, OrderDetail, Page, PaymentCode, PaymentConfirmationRequest, PaymentConfirmationResponse, PaymentCustomConfigCustomerRequestSchema, PaymentCustomConfigCustomerSchema, PaymentCustomConfigDetailsRequestSchema, PaymentCustomConfigDetailsSchema, PaymentCustomConfigModeSchema, PaymentCustomConfigRequestSchema, PaymentCustomConfigResponseSchema, PaymentDetailsSerializer, PaymentFlow, PaymentGatewayConfig, PaymentGatewayConfigRequest, PaymentGatewayConfigResponse, PaymentGatewayToBeReviewed, PaymentInitializationRequest, PaymentInitializationResponse, PaymentMethodsMetaOrder, PaymentModeCustomConfigSchema, PaymentModeList, PaymentModeLogo, PaymentModeRouteResponse, PaymentObjectListSerializer, PaymentOptionAndFlow, PaymentOptions, PaymentOptionsResponse, PaymentOrderData, PaymentOrderMethods, PaymentOrderRequest, PaymentOrderResponse, PaymentSessionDetail, PaymentSessionRequestSerializer, PaymentSessionResponseSerializer, PaymentSessionSerializer, PaymentStatusBulkHandlerRequest, PaymentStatusBulkHandlerResponse, PaymentStatusObject, PaymentStatusUpdateRequest, PaymentStatusUpdateResponse, Payout, PayoutAggregator, PayoutBankDetails, PayoutCustomer, PayoutMoreAttributes, PayoutRequest, PayoutResponse, PayoutsResponse, PlatformPaymentModeCopyConfigRequest, PlatformPaymentModeResponse, PollingPaymentLinkResponse, ProductCODData, RefundAccountResponse, RefundDetailsSerializer, RefundPriorityRequestSerializer, RefundPriorityResponseSerializer, RefundSessionDetail, RefundSessionRequestSerializer, RefundSessionResponseSerializer, RefundSourcesPriority, RepaymentDetailsSerialiserPayAll, RepaymentRequestDetails, RepaymentResponse, ResendOrCancelPaymentRequest, ResendOrCancelPaymentResponse, ResendPaymentLinkResponse, RevokeOAuthToken, RootPaymentMode, SaveSubscriptionSetupIntentRequest, SaveSubscriptionSetupIntentResponse, SetCODForUserRequest, SetCODOptionResponse, SplitObject, StatisticsData, SubscriptionConfigResponse, SubscriptionPaymentMethodResponse, ToConfig, UpdatePayoutRequest, UpdatePayoutResponse, ValidateCustomerRequest, ValidateCustomerResponse }; } /** @returns {AddBeneficiaryDetailsOTPRequest} */ declare function AddBeneficiaryDetailsOTPRequest(): AddBeneficiaryDetailsOTPRequest; @@ -917,7 +1185,7 @@ type AddressDetail = { /** * - Address type e.g. home, office */ - address_type: string; + address_type?: string; /** * - Area details */ @@ -927,7 +1195,8 @@ type AddressDetail = { */ area_code: string; /** - * - Area slug code, use pin/zip code if not available + * - Area slug code, use pin or zip code if + * not available */ area_code_slug: string; /** @@ -987,6 +1256,145 @@ type AddressDetail = { */ tags?: any[]; }; +/** @returns {AdvanceObject} */ +declare function AdvanceObject(): AdvanceObject; +type AdvanceObject = { + /** + * - All available types of prepayment + */ + all_prepayment_type?: string[]; + /** + * - Is custom advance amount allowed? + */ + allow_custom_advance_amount?: boolean; + /** + * - Amount for Payment Breakdown + */ + amount?: number; + /** + * - Type of cancellation + */ + cancellation_type?: string; + /** + * - The description for Advance Payment (user + * configured) + */ + description?: string; + /** + * - The display name for Advance payment + */ + display_name?: string; + /** + * - Is Advance Payment active + */ + is_active?: boolean; + /** + * - Type of prepayment value + */ + prepayment_type?: string; + /** + * - Value for prepayment in advance payment + */ + prepayment_value?: number; + /** + * - Time limit for processing refund + */ + refund_time_limit?: number; + /** + * - Time unit for refunds + */ + time_unit?: string; +}; +/** @returns {AdvancePaymentObject} */ +declare function AdvancePaymentObject(): AdvancePaymentObject; +type AdvancePaymentObject = { + advance?: AdvanceObject; + /** + * - Display name for Advance Payment Mode + */ + display_name?: string; + /** + * - Display Priority for Payment Option + */ + display_priority?: number; + /** + * - Payment mode + */ + list?: PaymentModeList[]; + /** + * - Name of Advance Payment Mode + */ + name?: string; + /** + * - Payment Mode ID for Advance Payment Option + */ + payment_mode_id?: number; + split?: SplitObject; +}; +/** @returns {AggregatorControlRequest} */ +declare function AggregatorControlRequest(): AggregatorControlRequest; +type AggregatorControlRequest = { + /** + * - Business unit + */ + business_unit?: string; + /** + * - Device name + */ + device?: string; + /** + * - List of item details with respect to payment_mode + */ + items?: any[]; + version?: AggregatorVersionRequestSchema; +}; +/** @returns {AggregatorRoute} */ +declare function AggregatorRoute(): AggregatorRoute; +type AggregatorRoute = { + /** + * - Api_link + */ + api_link?: string; + /** + * - Data + */ + data?: any; + /** + * - Payment_flow + */ + payment_flow?: string; + /** + * - Payment_flow_data + */ + payment_flow_data?: string; +}; +/** @returns {AggregatorVersionItemSchema} */ +declare function AggregatorVersionItemSchema(): AggregatorVersionItemSchema; +type AggregatorVersionItemSchema = { + is_equal_to?: string; + is_greater_than?: string; + is_less_than?: string; +}; +/** @returns {AggregatorVersionRequestSchema} */ +declare function AggregatorVersionRequestSchema(): AggregatorVersionRequestSchema; +type AggregatorVersionRequestSchema = { + is_equal_to?: string; + is_greater_than?: string; + is_less_than?: string; +}; +/** @returns {AggregatorVersionResponse} */ +declare function AggregatorVersionResponse(): AggregatorVersionResponse; +type AggregatorVersionResponse = { + items?: AggregatorVersionItemSchema; + /** + * - Message + */ + message: string; + /** + * - Successful or failure + */ + success: boolean; +}; /** @returns {BankDetailsForOTP} */ declare function BankDetailsForOTP(): BankDetailsForOTP; type BankDetailsForOTP = { @@ -1020,6 +1428,26 @@ type CancelPaymentLinkResponse = { */ success: boolean; }; +/** @returns {CartDetailsSerializer} */ +declare function CartDetailsSerializer(): CartDetailsSerializer; +type CartDetailsSerializer = { + /** + * - List of articles that are added in cart + */ + articles: any[]; + /** + * - Total cart value i.e. amount to be paid + */ + cart_value: number; + /** + * - Items that are added in cart + */ + items: any; + /** + * - Total number of items in cart + */ + total_quantity?: number; +}; /** @returns {CODChargesLimitsResponse} */ declare function CODChargesLimitsResponse(): CODChargesLimitsResponse; type CODChargesLimitsResponse = { @@ -1083,7 +1511,6 @@ type CreatePaymentLinkMeta = { assign_card_id?: string; cart_id: string; checkout_mode: string; - pincode: string; }; /** @returns {CreatePaymentLinkRequest} */ declare function CreatePaymentLinkRequest(): CreatePaymentLinkRequest; @@ -1092,6 +1519,10 @@ type CreatePaymentLinkRequest = { * - Total value of order */ amount: number; + /** + * - Phone country code for complete mobile number + */ + country_phone_code?: string; /** * - Merchant order id */ @@ -1104,9 +1535,6 @@ type CreatePaymentLinkRequest = { * - Merchant order id */ external_order_id: string; - /** - * - Meta - */ meta: CreatePaymentLinkMeta; /** * - Mobile number to which the payment link is @@ -1251,9 +1679,6 @@ type EdcDevice = { /** @returns {EdcDeviceAddResponse} */ declare function EdcDeviceAddResponse(): EdcDeviceAddResponse; type EdcDeviceAddResponse = { - /** - * - Details of the EDC Device that is added - */ data: EdcDevice; /** * - Response is successful or not @@ -1263,9 +1688,6 @@ type EdcDeviceAddResponse = { /** @returns {EdcDeviceDetailsResponse} */ declare function EdcDeviceDetailsResponse(): EdcDeviceDetailsResponse; type EdcDeviceDetailsResponse = { - /** - * - Details of one EDC Device - */ data: EdcDevice; /** * - Response is successful or not @@ -1280,9 +1702,6 @@ type EdcDeviceListResponse = { * options with their Details. */ items: EdcDevice[]; - /** - * - Pagination Response - */ page: Page; /** * - Response is successful or not @@ -1292,9 +1711,6 @@ type EdcDeviceListResponse = { /** @returns {EdcDeviceStatsResponse} */ declare function EdcDeviceStatsResponse(): EdcDeviceStatsResponse; type EdcDeviceStatsResponse = { - /** - * - Message - */ statistics: StatisticsData; /** * - Response is successful or not @@ -1424,7 +1840,7 @@ type ErrorDescription = { /** @returns {ErrorResponse} */ declare function ErrorResponse(): ErrorResponse; type ErrorResponse = { - error?: any; + error?: ErrorDescription; /** * - Message */ @@ -1438,6 +1854,18 @@ type ErrorResponse = { */ success: boolean; }; +/** @returns {FromConfig} */ +declare function FromConfig(): FromConfig; +type FromConfig = { + /** + * - Business unit name + */ + business_unit: string; + /** + * - Device name + */ + device: string; +}; /** @returns {GetOauthUrlResponse} */ declare function GetOauthUrlResponse(): GetOauthUrlResponse; type GetOauthUrlResponse = { @@ -1453,17 +1881,11 @@ type GetOauthUrlResponse = { /** @returns {GetPaymentCode} */ declare function GetPaymentCode(): GetPaymentCode; type GetPaymentCode = { - /** - * - Payment method code - */ method_code: PaymentCode; }; /** @returns {GetPaymentCodeResponse} */ declare function GetPaymentCodeResponse(): GetPaymentCodeResponse; type GetPaymentCodeResponse = { - /** - * - Data about Payment Code. - */ data: GetPaymentCode; /** * - Response is successful or not. @@ -1517,9 +1939,6 @@ type GetUserCODLimitResponse = { * - Response is successful or not */ success: boolean; - /** - * - User COD Data - */ user_cod_data: CODdata; }; /** @returns {HttpErrorCodeAndResponse} */ @@ -1558,10 +1977,7 @@ type IntentApp = { * - Display_name */ display_name?: string; - /** - * - Logos - */ - logos?: any; + logos?: PaymentModeLogo; /** * - Package_name */ @@ -1589,7 +2005,7 @@ type LinkStatus = { /** * - Link action status */ - status: boolean; + status: string; }; /** @returns {MerchantOnBoardingRequest} */ declare function MerchantOnBoardingRequest(): MerchantOnBoardingRequest; @@ -1611,7 +2027,7 @@ type MerchantOnBoardingRequest = { */ status: string; /** - * - Deadlock/Grimlock user id + * - Deadlock or Grimlock user id */ user_id: string; }; @@ -1624,6 +2040,22 @@ type MerchantOnBoardingResponse = { */ success: boolean; }; +/** @returns {MerchantPaymentModeRequest} */ +declare function MerchantPaymentModeRequest(): MerchantPaymentModeRequest; +type MerchantPaymentModeRequest = { + /** + * - Business unit + */ + business_unit: string; + /** + * - List of devices and its activation status + */ + device: any; + /** + * - List of item details with respect to payment_mode + */ + items: any[]; +}; /** @returns {MerchnatPaymentModeRequest} */ declare function MerchnatPaymentModeRequest(): MerchnatPaymentModeRequest; type MerchnatPaymentModeRequest = { @@ -1636,22 +2068,6 @@ type MerchnatPaymentModeRequest = { */ online?: any; }; -/** @returns {MerchnatPaymentModeResponse} */ -declare function MerchnatPaymentModeResponse(): MerchnatPaymentModeResponse; -type MerchnatPaymentModeResponse = { - /** - * - List of all aggregator and payment mode details. - */ - items?: any[]; - /** - * - Message - */ - message?: string; - /** - * - Response is successful or not. - */ - success: boolean; -}; /** @returns {MultiTenderPaymentMeta} */ declare function MultiTenderPaymentMeta(): MultiTenderPaymentMeta; type MultiTenderPaymentMeta = { @@ -1828,9 +2244,6 @@ type Page = { /** @returns {PaymentCode} */ declare function PaymentCode(): PaymentCode; type PaymentCode = { - /** - * - List of dict that contains payment method data - */ codes: Code; /** * - Name of payment name @@ -1870,15 +2283,204 @@ type PaymentConfirmationResponse = { */ success: boolean; }; -/** @returns {PaymentGatewayConfig} */ -declare function PaymentGatewayConfig(): PaymentGatewayConfig; -type PaymentGatewayConfig = { +/** @returns {PaymentCustomConfigCustomerRequestSchema} */ +declare function PaymentCustomConfigCustomerRequestSchema(): PaymentCustomConfigCustomerRequestSchema; +type PaymentCustomConfigCustomerRequestSchema = { /** - * - Config Type of the aggregator + * - Customer groups. */ - config_type: string; + groups?: number[]; /** - * - Enable/ Disable Flag + * - Customer restriction type. + */ + restriction: string; +}; +/** @returns {PaymentCustomConfigCustomerSchema} */ +declare function PaymentCustomConfigCustomerSchema(): PaymentCustomConfigCustomerSchema; +type PaymentCustomConfigCustomerSchema = { + /** + * - Customer groups. + */ + groups?: number[]; + /** + * - Customer restriction type. + */ + restriction: string; + /** + * - Customer types. + */ + types?: string[]; +}; +/** @returns {PaymentCustomConfigDetailsRequestSchema} */ +declare function PaymentCustomConfigDetailsRequestSchema(): PaymentCustomConfigDetailsRequestSchema; +type PaymentCustomConfigDetailsRequestSchema = { + customer: PaymentCustomConfigCustomerRequestSchema; + /** + * - The minimum order value for the store + */ + min_order_value: number; + payment_mode: PaymentCustomConfigModeSchema; +}; +/** @returns {PaymentCustomConfigDetailsSchema} */ +declare function PaymentCustomConfigDetailsSchema(): PaymentCustomConfigDetailsSchema; +type PaymentCustomConfigDetailsSchema = { + customer: PaymentCustomConfigCustomerSchema; + /** + * - The minimum order value for the store + */ + min_order_value: number; + payment_mode: PaymentCustomConfigModeSchema; +}; +/** @returns {PaymentCustomConfigModeSchema} */ +declare function PaymentCustomConfigModeSchema(): PaymentCustomConfigModeSchema; +type PaymentCustomConfigModeSchema = { + /** + * - Indicates whether the payment mode is available. + */ + available: boolean; + /** + * - Payment modes available for post-order. + */ + post_order?: string[]; + /** + * - Payment modes available for pre-order. + */ + pre_order?: string[]; +}; +/** @returns {PaymentCustomConfigRequestSchema} */ +declare function PaymentCustomConfigRequestSchema(): PaymentCustomConfigRequestSchema; +type PaymentCustomConfigRequestSchema = { + /** + * - The business unit to which the store belongs. + */ + business_unit: string; + items: PaymentCustomConfigDetailsRequestSchema[]; +}; +/** @returns {PaymentCustomConfigResponseSchema} */ +declare function PaymentCustomConfigResponseSchema(): PaymentCustomConfigResponseSchema; +type PaymentCustomConfigResponseSchema = { + items: PaymentModeCustomConfigSchema[]; + message: string; + success: boolean; +}; +/** @returns {PaymentDetailsSerializer} */ +declare function PaymentDetailsSerializer(): PaymentDetailsSerializer; +type PaymentDetailsSerializer = { + /** + * - Unique customer id generated by + * payment gateway, not required for standard checkout. + */ + aggregator_customer_id?: string; + /** + * - Unique order id or payment request + * id generated by payment gateway + */ + aggregator_order_id?: string; + /** + * - Amount paid. + */ + amount: number; + /** + * - Amount which is captured or credited to + * merchant account + */ + amount_captured: number; + amount_refunded?: number; + /** + * - Cancel url sent by Fynd platform at the + * time of payment creation + */ + cancel_url?: string; + /** + * - Whether the payment is captured (credited to + * merchant account) by payment gateway. + */ + captured?: boolean; + /** + * - Timestamp in epoch + */ + created?: string; + /** + * - Currency of the payment. + */ + currency: string; + /** + * - Global user identifier - unique user id + * generated by Fynd platform + */ + g_user_id: string; + /** + * - 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. + */ + gid: string; + /** + * - Optional kind of purchase/payment - one time + * payment (sale) or subcription. defaults to sale. + */ + kind?: string; + /** + * - User's locale + */ + locale?: string; + /** + * - Merchant's locale + */ + merchant_locale?: string; + /** + * - Metadata + */ + meta?: any; + /** + * - Test or live, test mode uses test credentials so + * that actual payment is not created. + */ + mode: string; + /** + * - Unique transaction id generated by payment gateway + */ + payment_id?: string; + /** + * - Method of payment + */ + payment_methods: any[]; + /** + * - Stautus of the payment + */ + status: string; + /** + * - Success url sent by Fynd platform at the + * time of payment creation + */ + success_url?: string; +}; +/** @returns {PaymentFlow} */ +declare function PaymentFlow(): PaymentFlow; +type PaymentFlow = { + ajiodhan?: AggregatorRoute; + bqr_razorpay?: AggregatorRoute; + ccavenue?: AggregatorRoute; + epaylater?: AggregatorRoute; + fynd?: AggregatorRoute; + jiopay?: AggregatorRoute; + juspay?: AggregatorRoute; + mswipe?: AggregatorRoute; + payubiz?: AggregatorRoute; + razorpay?: AggregatorRoute; + rupifi?: AggregatorRoute; + simpl?: AggregatorRoute; + stripe?: AggregatorRoute; +}; +/** @returns {PaymentGatewayConfig} */ +declare function PaymentGatewayConfig(): PaymentGatewayConfig; +type PaymentGatewayConfig = { + /** + * - Config Type of the aggregator + */ + config_type: string; + /** + * - Enable or Disable Flag */ is_active?: boolean; /** @@ -1903,7 +2505,7 @@ type PaymentGatewayConfigRequest = { */ app_id: string; /** - * - Enable/ Disable Flag + * - Enable or Disable Flag */ is_active?: boolean; }; @@ -2076,6 +2678,35 @@ type PaymentInitializationResponse = { */ vpa?: string; }; +/** @returns {PaymentMethodsMetaOrder} */ +declare function PaymentMethodsMetaOrder(): PaymentMethodsMetaOrder; +type PaymentMethodsMetaOrder = { + /** + * - Merchant code + */ + merchant_code: string; + /** + * - Payment gateway name + */ + payment_gateway: string; + /** + * - Payment identifier + */ + payment_identifier: string; +}; +/** @returns {PaymentModeCustomConfigSchema} */ +declare function PaymentModeCustomConfigSchema(): PaymentModeCustomConfigSchema; +type PaymentModeCustomConfigSchema = { + /** + * - The business unit to which the store belongs. + */ + business_unit: string; + custom_config: PaymentCustomConfigDetailsSchema; + /** + * - The display name of the store. + */ + display_name: string; +}; /** @returns {PaymentModeList} */ declare function PaymentModeList(): PaymentModeList; type PaymentModeList = { @@ -2189,10 +2820,7 @@ type PaymentModeList = { * - Intent_flow */ intent_flow?: boolean; - /** - * - Logo - */ - logo_url?: any; + logo_url?: PaymentModeLogo; /** * - Merchant code */ @@ -2205,10 +2833,7 @@ type PaymentModeList = { * - Nickname */ nickname?: string; - /** - * - Product cod configurations. - */ - product_cod_data?: any; + product_cod_data?: ProductCODData; /** * - Remaining limit */ @@ -2234,6 +2859,23 @@ type PaymentModeLogo = { */ small: string; }; +/** @returns {PaymentModeRouteResponse} */ +declare function PaymentModeRouteResponse(): PaymentModeRouteResponse; +type PaymentModeRouteResponse = { + /** + * - Advance Payment Array + */ + advance_payment?: AdvancePaymentObject[]; + /** + * - Payment Breakup for advance payment + */ + payment_breakup?: any; + payment_options: PaymentOptionAndFlow; + /** + * - Response is successful or not + */ + success: boolean; +}; /** @returns {PaymentObjectListSerializer} */ declare function PaymentObjectListSerializer(): PaymentObjectListSerializer; type PaymentObjectListSerializer = { @@ -2256,6 +2898,15 @@ type PaymentObjectListSerializer = { refunded_by: string; user_object: any; }; +/** @returns {PaymentOptionAndFlow} */ +declare function PaymentOptionAndFlow(): PaymentOptionAndFlow; +type PaymentOptionAndFlow = { + payment_flows: PaymentFlow; + /** + * - Payment options + */ + payment_option: RootPaymentMode[]; +}; /** @returns {PaymentOptions} */ declare function PaymentOptions(): PaymentOptions; type PaymentOptions = { @@ -2268,14 +2919,122 @@ type PaymentOptions = { declare function PaymentOptionsResponse(): PaymentOptionsResponse; type PaymentOptionsResponse = { /** - * - Payment options + * - Payment Breakup for advance payment */ + payment_breakup?: any; payment_options: PaymentOptions; /** * - Response is successful or not */ success: boolean; }; +/** @returns {PaymentOrderData} */ +declare function PaymentOrderData(): PaymentOrderData; +type PaymentOrderData = { + /** + * - Aggregator name + */ + aggregator?: string; + /** + * - Amount + */ + amount?: number; + /** + * - Callback url for aggregator + */ + callback_url?: string; + /** + * - Mobile number + */ + contact?: string; + /** + * - Currency + */ + currency?: string; + /** + * - Aggregator customer id + */ + customer_id?: string; + /** + * - Email + */ + email?: string; + /** + * - Merchant order id + */ + merchant_order_id?: string; + /** + * - Method + */ + method?: string; + /** + * - Aggregator order id + */ + order_id?: string; +}; +/** @returns {PaymentOrderMethods} */ +declare function PaymentOrderMethods(): PaymentOrderMethods; +type PaymentOrderMethods = { + /** + * - Amount to be collected + */ + amount: number; + meta: PaymentMethodsMetaOrder; + /** + * - Payment mode + */ + mode: string; + /** + * - Payment mode name + */ + name: string; + /** + * - Payment type i.e. Required / Blocked + */ + payment?: string; +}; +/** @returns {PaymentOrderRequest} */ +declare function PaymentOrderRequest(): PaymentOrderRequest; +type PaymentOrderRequest = { + /** + * - Order id + */ + order_id: string; + payment_methods?: PaymentOrderMethods[]; + /** + * - Shipment_id + */ + shipment_id?: string; +}; +/** @returns {PaymentOrderResponse} */ +declare function PaymentOrderResponse(): PaymentOrderResponse; +type PaymentOrderResponse = { + /** + * - Callback url for aggregator + */ + callback_url?: string; + data?: PaymentOrderData; + /** + * - Message + */ + message: string; + /** + * - Merchant order id + */ + order_id?: string; + /** + * - Payment confirm url for aggregator + */ + payment_confirm_url?: string; + /** + * - HTTP status code + */ + status_code: number; + /** + * - Successful or failure + */ + success: boolean; +}; /** @returns {PaymentSessionDetail} */ declare function PaymentSessionDetail(): PaymentSessionDetail; type PaymentSessionDetail = { @@ -2333,7 +3092,7 @@ type PaymentSessionDetail = { */ gid: string; /** - * - Optional kind of purchase/payment - one time + * - Optional kind of purchase or payment - one time * payment (sale) or subcription. defaults to sale. */ kind?: string; @@ -2345,6 +3104,10 @@ type PaymentSessionDetail = { * - Merchant's locale */ merchant_locale?: string; + /** + * - Metadata + */ + meta?: any; /** * - Test or live, test mode uses test credentials so * that actual payment is not created. @@ -2433,6 +3196,37 @@ type PaymentSessionResponseSerializer = { */ total_amount: number; }; +/** @returns {PaymentSessionSerializer} */ +declare function PaymentSessionSerializer(): PaymentSessionSerializer; +type PaymentSessionSerializer = { + cart_details?: CartDetailsSerializer; + /** + * - The currency of the payment. + */ + currency?: string; + /** + * - 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. + */ + gid: string; + /** + * - Object of payment details + */ + payment_details: any; + /** + * - Object of refund details + */ + refund_details: RefundDetailsSerializer[]; + /** + * - The status of the payment session. + */ + status: string; + /** + * - Total amount to be paid + */ + total_amount: number; +}; /** @returns {PaymentStatusBulkHandlerRequest} */ declare function PaymentStatusBulkHandlerRequest(): PaymentStatusBulkHandlerRequest; type PaymentStatusBulkHandlerRequest = { @@ -2539,9 +3333,6 @@ type PaymentStatusUpdateResponse = { /** @returns {Payout} */ declare function Payout(): Payout; type Payout = { - /** - * - Customers details object - */ customers: PayoutCustomer; /** * - Enable/DIsable Flag Payout @@ -2551,9 +3342,6 @@ type Payout = { * - Default or not */ is_default: boolean; - /** - * - Bank details object - */ more_attributes: PayoutMoreAttributes; payouts_aggregators?: PayoutAggregator[]; /** @@ -2631,7 +3419,7 @@ type PayoutMoreAttributes = { */ account_no?: string; /** - * - Account Type Saving/Current + * - Account Type Saving or Current */ account_type?: string; /** @@ -2666,12 +3454,9 @@ type PayoutRequest = { * - Aggregator Name */ aggregator: string; - /** - * - Payout bank details object - */ bank_details: PayoutBankDetails; /** - * - Enable/Disable Flag Payout + * - Enable or Disable Flag Payout */ is_active: boolean; /** @@ -2703,7 +3488,7 @@ type PayoutResponse = { */ created: boolean; /** - * - Enable/DIsable Flag Payout + * - Enable or DIsable Flag Payout */ is_active: boolean; /** @@ -2743,6 +3528,28 @@ type PayoutsResponse = { */ success: boolean; }; +/** @returns {PlatformPaymentModeCopyConfigRequest} */ +declare function PlatformPaymentModeCopyConfigRequest(): PlatformPaymentModeCopyConfigRequest; +type PlatformPaymentModeCopyConfigRequest = { + from_config: FromConfig; + to_config: ToConfig; +}; +/** @returns {PlatformPaymentModeResponse} */ +declare function PlatformPaymentModeResponse(): PlatformPaymentModeResponse; +type PlatformPaymentModeResponse = { + /** + * - List of all aggregator and payment mode details. + */ + items?: any[]; + /** + * - Message + */ + message?: string; + /** + * - Response is successful or not. + */ + success: boolean; +}; /** @returns {PollingPaymentLinkResponse} */ declare function PollingPaymentLinkResponse(): PollingPaymentLinkResponse; type PollingPaymentLinkResponse = { @@ -2790,10 +3597,7 @@ type PollingPaymentLinkResponse = { /** @returns {ProductCODData} */ declare function ProductCODData(): ProductCODData; type ProductCODData = { - /** - * - Cod charges and its allowed limits. - */ - cod_charges?: any; + cod_charges?: CODChargesLimitsResponse; /** * - Item id with its cod availability. */ @@ -2816,6 +3620,34 @@ type RefundAccountResponse = { */ success: boolean; }; +/** @returns {RefundDetailsSerializer} */ +declare function RefundDetailsSerializer(): RefundDetailsSerializer; +type RefundDetailsSerializer = { + /** + * - Refunded amount + */ + amount: number; + /** + * - Timestamp in epoch. + */ + created: string; + /** + * - The currency of the payment. + */ + currency: string; + /** + * - Unique refund utr generated by payment gateway. + */ + refund_utr: string; + /** + * - Refund request id, unique id generated by Fynd platform + */ + request_id: string; + /** + * - The status of the refund. + */ + status: string; +}; /** @returns {RefundPriorityRequestSerializer} */ declare function RefundPriorityRequestSerializer(): RefundPriorityRequestSerializer; type RefundPriorityRequestSerializer = { @@ -2913,12 +3745,17 @@ type RefundSessionRequestSerializer = { * - The currency of the payment. */ currency: string; + error?: ErrorDescription; /** * - 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. */ gid: string; + /** + * - The status of the refund. + */ + message?: string; /** * - Meta */ @@ -3075,9 +3912,6 @@ type ResendOrCancelPaymentRequest = { /** @returns {ResendOrCancelPaymentResponse} */ declare function ResendOrCancelPaymentResponse(): ResendOrCancelPaymentResponse; type ResendOrCancelPaymentResponse = { - /** - * - Data about link action status. - */ data: LinkStatus; /** * - Response is successful or not. @@ -3205,6 +4039,22 @@ type SetCODOptionResponse = { */ success: boolean; }; +/** @returns {SplitObject} */ +declare function SplitObject(): SplitObject; +type SplitObject = { + /** + * - Amount pending to be paid + */ + amount_remaining?: number; + /** + * - Number of splits remaining + */ + splits_remaining?: number; + /** + * - Maximum amount of splits allowed + */ + total_number_of_splits?: number; +}; /** @returns {StatisticsData} */ declare function StatisticsData(): StatisticsData; type StatisticsData = { @@ -3245,15 +4095,27 @@ type SubscriptionPaymentMethodResponse = { */ success: boolean; }; +/** @returns {ToConfig} */ +declare function ToConfig(): ToConfig; +type ToConfig = { + /** + * - Business unit name + */ + business_unit: string; + /** + * - Device name to copy the config to + */ + device: any[]; +}; /** @returns {UpdatePayoutRequest} */ declare function UpdatePayoutRequest(): UpdatePayoutRequest; type UpdatePayoutRequest = { /** - * - Enable/Disable Flag Payout + * - Enable or Disable Flag Payout */ is_active: boolean; /** - * - Enable/Disable Default Payout + * - Enable or Disable Default Payout */ is_default: boolean; /** @@ -3265,11 +4127,11 @@ type UpdatePayoutRequest = { declare function UpdatePayoutResponse(): UpdatePayoutResponse; type UpdatePayoutResponse = { /** - * - Enable/DIsable Flag Payout + * - Enable or DIsable Flag Payout */ is_active: boolean; /** - * - Enable/Disable Default Payout + * - Enable or Disable Default Payout */ is_default: boolean; /** diff --git a/sdk/platform/Payment/PaymentPlatformModel.js b/sdk/platform/Payment/PaymentPlatformModel.js index 4c857af5d..02391f6c3 100644 --- a/sdk/platform/Payment/PaymentPlatformModel.js +++ b/sdk/platform/Payment/PaymentPlatformModel.js @@ -9,10 +9,11 @@ const Joi = require("joi"); /** * @typedef AddressDetail * @property {string} address - Address details - * @property {string} address_type - Address type e.g. home, office + * @property {string} [address_type] - Address type e.g. home, office * @property {string} area - Area details * @property {string} area_code - Customer pin/zip code - * @property {string} area_code_slug - Area slug code, use pin/zip code if not available + * @property {string} area_code_slug - Area slug code, use pin or zip code if + * not available * @property {string} city - City name * @property {string} country - Country name * @property {string} country_iso_code - Country's code name e.g. `IN`, `GB` @@ -29,6 +30,70 @@ const Joi = require("joi"); * @property {Object[]} [tags] - Optional address tag */ +/** + * @typedef AdvanceObject + * @property {string[]} [all_prepayment_type] - All available types of prepayment + * @property {boolean} [allow_custom_advance_amount] - Is custom advance amount allowed? + * @property {number} [amount] - Amount for Payment Breakdown + * @property {string} [cancellation_type] - Type of cancellation + * @property {string} [description] - The description for Advance Payment (user + * configured) + * @property {string} [display_name] - The display name for Advance payment + * @property {boolean} [is_active] - Is Advance Payment active + * @property {string} [prepayment_type] - Type of prepayment value + * @property {number} [prepayment_value] - Value for prepayment in advance payment + * @property {number} [refund_time_limit] - Time limit for processing refund + * @property {string} [time_unit] - Time unit for refunds + */ + +/** + * @typedef AdvancePaymentObject + * @property {AdvanceObject} [advance] + * @property {string} [display_name] - Display name for Advance Payment Mode + * @property {number} [display_priority] - Display Priority for Payment Option + * @property {PaymentModeList[]} [list] - Payment mode + * @property {string} [name] - Name of Advance Payment Mode + * @property {number} [payment_mode_id] - Payment Mode ID for Advance Payment Option + * @property {SplitObject} [split] + */ + +/** + * @typedef AggregatorControlRequest + * @property {string} [business_unit] - Business unit + * @property {string} [device] - Device name + * @property {Object[]} [items] - List of item details with respect to payment_mode + * @property {AggregatorVersionRequestSchema} [version] + */ + +/** + * @typedef AggregatorRoute + * @property {string} [api_link] - Api_link + * @property {Object} [data] - Data + * @property {string} [payment_flow] - Payment_flow + * @property {string} [payment_flow_data] - Payment_flow_data + */ + +/** + * @typedef AggregatorVersionItemSchema + * @property {string} [is_equal_to] + * @property {string} [is_greater_than] + * @property {string} [is_less_than] + */ + +/** + * @typedef AggregatorVersionRequestSchema + * @property {string} [is_equal_to] + * @property {string} [is_greater_than] + * @property {string} [is_less_than] + */ + +/** + * @typedef AggregatorVersionResponse + * @property {AggregatorVersionItemSchema} [items] + * @property {string} message - Message + * @property {boolean} success - Successful or failure + */ + /** * @typedef BankDetailsForOTP * @property {string} account_holder @@ -50,6 +115,14 @@ const Joi = require("joi"); * @property {boolean} success - Successful or failure */ +/** + * @typedef CartDetailsSerializer + * @property {Object[]} articles - List of articles that are added in cart + * @property {number} cart_value - Total cart value i.e. amount to be paid + * @property {Object} items - Items that are added in cart + * @property {number} [total_quantity] - Total number of items in cart + */ + /** * @typedef CODChargesLimitsResponse * @property {number} [cod_charge] - Cod charges to be applied on order. @@ -79,16 +152,16 @@ const Joi = require("joi"); * @property {string} [assign_card_id] * @property {string} cart_id * @property {string} checkout_mode - * @property {string} pincode */ /** * @typedef CreatePaymentLinkRequest * @property {number} amount - Total value of order + * @property {string} [country_phone_code] - Phone country code for complete mobile number * @property {string} [description] - Merchant order id * @property {string} email - Email to which the payment link is to be sent * @property {string} external_order_id - Merchant order id - * @property {CreatePaymentLinkMeta} meta - Meta + * @property {CreatePaymentLinkMeta} meta * @property {string} mobile_number - Mobile number to which the payment link is * to be sent */ @@ -148,13 +221,13 @@ const Joi = require("joi"); /** * @typedef EdcDeviceAddResponse - * @property {EdcDevice} data - Details of the EDC Device that is added + * @property {EdcDevice} data * @property {boolean} success - Response is successful or not */ /** * @typedef EdcDeviceDetailsResponse - * @property {EdcDevice} data - Details of one EDC Device + * @property {EdcDevice} data * @property {boolean} success - Response is successful or not */ @@ -162,13 +235,13 @@ const Joi = require("joi"); * @typedef EdcDeviceListResponse * @property {EdcDevice[]} items - List of all edc mapped to the application * options with their Details. - * @property {Page} page - Pagination Response + * @property {Page} page * @property {boolean} success - Response is successful or not */ /** * @typedef EdcDeviceStatsResponse - * @property {StatisticsData} statistics - Message + * @property {StatisticsData} statistics * @property {boolean} success - Response is successful or not */ @@ -222,12 +295,18 @@ const Joi = require("joi"); /** * @typedef ErrorResponse - * @property {Object} [error] + * @property {ErrorDescription} [error] * @property {string} message - Message * @property {number} status_code - HTTP status code * @property {boolean} success - Successful or failure */ +/** + * @typedef FromConfig + * @property {string} business_unit - Business unit name + * @property {string} device - Device name + */ + /** * @typedef GetOauthUrlResponse * @property {boolean} success - Response is successful or not @@ -236,12 +315,12 @@ const Joi = require("joi"); /** * @typedef GetPaymentCode - * @property {PaymentCode} method_code - Payment method code + * @property {PaymentCode} method_code */ /** * @typedef GetPaymentCodeResponse - * @property {GetPaymentCode} data - Data about Payment Code. + * @property {GetPaymentCode} data * @property {boolean} success - Response is successful or not. */ @@ -261,7 +340,7 @@ const Joi = require("joi"); /** * @typedef GetUserCODLimitResponse * @property {boolean} success - Response is successful or not - * @property {CODdata} user_cod_data - User COD Data + * @property {CODdata} user_cod_data */ /** @@ -281,7 +360,7 @@ const Joi = require("joi"); * @typedef IntentApp * @property {string} [code] - Code * @property {string} [display_name] - Display_name - * @property {Object} [logos] - Logos + * @property {PaymentModeLogo} [logos] * @property {string} [package_name] - Package_name */ @@ -294,7 +373,7 @@ const Joi = require("joi"); /** * @typedef LinkStatus * @property {string} message - Message - * @property {boolean} status - Link action status + * @property {string} status - Link action status */ /** @@ -303,7 +382,7 @@ const Joi = require("joi"); * @property {string} app_id - Application id * @property {string} credit_line_id - Merchant ID at Ajiodhan's end * @property {string} status - Status - * @property {string} user_id - Deadlock/Grimlock user id + * @property {string} user_id - Deadlock or Grimlock user id */ /** @@ -313,16 +392,16 @@ const Joi = require("joi"); */ /** - * @typedef MerchnatPaymentModeRequest - * @property {Object} [offline] - Details to be updated for online payment configuration. - * @property {Object} [online] - Details to be updated for offline payment configuration. + * @typedef MerchantPaymentModeRequest + * @property {string} business_unit - Business unit + * @property {Object} device - List of devices and its activation status + * @property {Object[]} items - List of item details with respect to payment_mode */ /** - * @typedef MerchnatPaymentModeResponse - * @property {Object[]} [items] - List of all aggregator and payment mode details. - * @property {string} [message] - Message - * @property {boolean} success - Response is successful or not. + * @typedef MerchnatPaymentModeRequest + * @property {Object} [offline] - Details to be updated for online payment configuration. + * @property {Object} [online] - Details to be updated for offline payment configuration. */ /** @@ -404,7 +483,7 @@ const Joi = require("joi"); /** * @typedef PaymentCode - * @property {Code} codes - List of dict that contains payment method data + * @property {Code} codes * @property {string} name - Name of payment name * @property {string} networks - Payment networks * @property {string} types - Type of payment mode @@ -423,10 +502,109 @@ const Joi = require("joi"); * @property {boolean} success - Payment confirmation updated or not. */ +/** + * @typedef PaymentCustomConfigCustomerRequestSchema + * @property {number[]} [groups] - Customer groups. + * @property {string} restriction - Customer restriction type. + */ + +/** + * @typedef PaymentCustomConfigCustomerSchema + * @property {number[]} [groups] - Customer groups. + * @property {string} restriction - Customer restriction type. + * @property {string[]} [types] - Customer types. + */ + +/** + * @typedef PaymentCustomConfigDetailsRequestSchema + * @property {PaymentCustomConfigCustomerRequestSchema} customer + * @property {number} min_order_value - The minimum order value for the store + * @property {PaymentCustomConfigModeSchema} payment_mode + */ + +/** + * @typedef PaymentCustomConfigDetailsSchema + * @property {PaymentCustomConfigCustomerSchema} customer + * @property {number} min_order_value - The minimum order value for the store + * @property {PaymentCustomConfigModeSchema} payment_mode + */ + +/** + * @typedef PaymentCustomConfigModeSchema + * @property {boolean} available - Indicates whether the payment mode is available. + * @property {string[]} [post_order] - Payment modes available for post-order. + * @property {string[]} [pre_order] - Payment modes available for pre-order. + */ + +/** + * @typedef PaymentCustomConfigRequestSchema + * @property {string} business_unit - The business unit to which the store belongs. + * @property {PaymentCustomConfigDetailsRequestSchema[]} items + */ + +/** + * @typedef PaymentCustomConfigResponseSchema + * @property {PaymentModeCustomConfigSchema[]} items + * @property {string} message + * @property {boolean} success + */ + +/** + * @typedef PaymentDetailsSerializer + * @property {string} [aggregator_customer_id] - Unique customer id generated by + * payment gateway, not required for standard checkout. + * @property {string} [aggregator_order_id] - Unique order id or payment request + * id generated by payment gateway + * @property {number} amount - Amount paid. + * @property {number} amount_captured - Amount which is captured or credited to + * merchant account + * @property {number} [amount_refunded] + * @property {string} [cancel_url] - Cancel url sent by Fynd platform at the + * time of payment creation + * @property {boolean} [captured] - Whether the payment is captured (credited to + * merchant account) by payment gateway. + * @property {string} [created] - Timestamp in epoch + * @property {string} currency - Currency of the payment. + * @property {string} g_user_id - Global user identifier - unique user id + * generated by Fynd platform + * @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 {string} [kind] - Optional kind of purchase/payment - one time + * payment (sale) or subcription. defaults to sale. + * @property {string} [locale] - User's locale + * @property {string} [merchant_locale] - Merchant's locale + * @property {Object} [meta] - Metadata + * @property {string} mode - Test or live, test mode uses test credentials so + * that actual payment is not created. + * @property {string} [payment_id] - Unique transaction id generated by payment gateway + * @property {Object[]} payment_methods - Method of payment + * @property {string} status - Stautus of the payment + * @property {string} [success_url] - Success url sent by Fynd platform at the + * time of payment creation + */ + +/** + * @typedef PaymentFlow + * @property {AggregatorRoute} [ajiodhan] + * @property {AggregatorRoute} [bqr_razorpay] + * @property {AggregatorRoute} [ccavenue] + * @property {AggregatorRoute} [epaylater] + * @property {AggregatorRoute} [fynd] + * @property {AggregatorRoute} [jiopay] + * @property {AggregatorRoute} [juspay] + * @property {AggregatorRoute} [mswipe] + * @property {AggregatorRoute} [payubiz] + * @property {AggregatorRoute} [razorpay] + * @property {AggregatorRoute} [rupifi] + * @property {AggregatorRoute} [simpl] + * @property {AggregatorRoute} [stripe] + */ + /** * @typedef PaymentGatewayConfig * @property {string} config_type - Config Type of the aggregator - * @property {boolean} [is_active] - Enable/ Disable Flag + * @property {boolean} [is_active] - Enable or Disable Flag * @property {string} key - Api key of the payment aggregator * @property {string} merchant_salt - Merchant key of the payment aggregator * @property {string} secret - Secret Key of the payment aggregator @@ -436,7 +614,7 @@ const Joi = require("joi"); * @typedef PaymentGatewayConfigRequest * @property {PaymentGatewayConfig} [aggregator_name] * @property {string} app_id - Application Id to which Payment config Mapped - * @property {boolean} [is_active] - Enable/ Disable Flag + * @property {boolean} [is_active] - Enable or Disable Flag */ /** @@ -494,6 +672,20 @@ const Joi = require("joi"); * @property {string} [vpa] - Customer vpa address */ +/** + * @typedef PaymentMethodsMetaOrder + * @property {string} merchant_code - Merchant code + * @property {string} payment_gateway - Payment gateway name + * @property {string} payment_identifier - Payment identifier + */ + +/** + * @typedef PaymentModeCustomConfigSchema + * @property {string} business_unit - The business unit to which the store belongs. + * @property {PaymentCustomConfigDetailsSchema} custom_config + * @property {string} display_name - The display name of the store. + */ + /** * @typedef PaymentModeList * @property {string} aggregator_name - Aggregator_name @@ -525,11 +717,11 @@ const Joi = require("joi"); * Intent_app_error_dict_list * @property {string[]} [intent_app_error_list] - Intent_app_error_list * @property {boolean} [intent_flow] - Intent_flow - * @property {Object} [logo_url] - Logo + * @property {PaymentModeLogo} [logo_url] * @property {string} [merchant_code] - Merchant code * @property {string} [name] - Name * @property {string} [nickname] - Nickname - * @property {Object} [product_cod_data] - Product cod configurations. + * @property {ProductCODData} [product_cod_data] * @property {number} [remaining_limit] - Remaining limit * @property {number} [retry_count] - Retry_count * @property {number} [timeout] - Timeout @@ -541,6 +733,14 @@ const Joi = require("joi"); * @property {string} small - Smalll */ +/** + * @typedef PaymentModeRouteResponse + * @property {AdvancePaymentObject[]} [advance_payment] - Advance Payment Array + * @property {Object} [payment_breakup] - Payment Breakup for advance payment + * @property {PaymentOptionAndFlow} payment_options + * @property {boolean} success - Response is successful or not + */ + /** * @typedef PaymentObjectListSerializer * @property {Object} [aggregator_payment_object] @@ -563,6 +763,12 @@ const Joi = require("joi"); * @property {Object} user_object */ +/** + * @typedef PaymentOptionAndFlow + * @property {PaymentFlow} payment_flows + * @property {RootPaymentMode[]} payment_option - Payment options + */ + /** * @typedef PaymentOptions * @property {RootPaymentMode[]} payment_option - Payment options @@ -570,10 +776,52 @@ const Joi = require("joi"); /** * @typedef PaymentOptionsResponse - * @property {PaymentOptions} payment_options - Payment options + * @property {Object} [payment_breakup] - Payment Breakup for advance payment + * @property {PaymentOptions} payment_options * @property {boolean} success - Response is successful or not */ +/** + * @typedef PaymentOrderData + * @property {string} [aggregator] - Aggregator name + * @property {number} [amount] - Amount + * @property {string} [callback_url] - Callback url for aggregator + * @property {string} [contact] - Mobile number + * @property {string} [currency] - Currency + * @property {string} [customer_id] - Aggregator customer id + * @property {string} [email] - Email + * @property {string} [merchant_order_id] - Merchant order id + * @property {string} [method] - Method + * @property {string} [order_id] - Aggregator order id + */ + +/** + * @typedef PaymentOrderMethods + * @property {number} amount - Amount to be collected + * @property {PaymentMethodsMetaOrder} meta + * @property {string} mode - Payment mode + * @property {string} name - Payment mode name + * @property {string} [payment] - Payment type i.e. Required / Blocked + */ + +/** + * @typedef PaymentOrderRequest + * @property {string} order_id - Order id + * @property {PaymentOrderMethods[]} [payment_methods] + * @property {string} [shipment_id] - Shipment_id + */ + +/** + * @typedef PaymentOrderResponse + * @property {string} [callback_url] - Callback url for aggregator + * @property {PaymentOrderData} [data] + * @property {string} message - Message + * @property {string} [order_id] - Merchant order id + * @property {string} [payment_confirm_url] - Payment confirm url for aggregator + * @property {number} status_code - HTTP status code + * @property {boolean} success - Successful or failure + */ + /** * @typedef PaymentSessionDetail * @property {string} [aggregator_customer_id] - Unique customer id generated by @@ -596,10 +844,11 @@ 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 {string} [kind] - Optional kind of purchase/payment - one time + * @property {string} [kind] - Optional kind of purchase or payment - one time * payment (sale) or subcription. defaults to sale. * @property {string} [locale] - User's locale * @property {string} [merchant_locale] - Merchant's locale + * @property {Object} [meta] - Metadata * @property {string} mode - Test or live, test mode uses test credentials so * that actual payment is not created. * @property {string} payment_id - Unique transaction id generated by payment gateway @@ -635,6 +884,19 @@ const Joi = require("joi"); * @property {number} total_amount - Amount paid. */ +/** + * @typedef PaymentSessionSerializer + * @property {CartDetailsSerializer} [cart_details] + * @property {string} [currency] - The currency of the payment. + * @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 {Object} payment_details - Object of payment details + * @property {RefundDetailsSerializer[]} refund_details - Object of refund details + * @property {string} status - The status of the payment session. + * @property {number} total_amount - Total amount to be paid + */ + /** * @typedef PaymentStatusBulkHandlerRequest * @property {string[]} merchant_order_id - List of order ids @@ -683,10 +945,10 @@ const Joi = require("joi"); /** * @typedef Payout - * @property {PayoutCustomer} customers - Customers details object + * @property {PayoutCustomer} customers * @property {boolean} is_active - Enable/DIsable Flag Payout * @property {boolean} is_default - Default or not - * @property {PayoutMoreAttributes} more_attributes - Bank details object + * @property {PayoutMoreAttributes} more_attributes * @property {PayoutAggregator[]} [payouts_aggregators] * @property {string} transfer_type - Transafer type * @property {string} unique_transfer_no - Display priority of the payment mode @@ -726,7 +988,7 @@ const Joi = require("joi"); * @typedef PayoutMoreAttributes * @property {string} [account_holder] - Account Holder Name * @property {string} [account_no] - Account Number - * @property {string} [account_type] - Account Type Saving/Current + * @property {string} [account_type] - Account Type Saving or Current * @property {string} [bank_name] - Name of Bank * @property {string} [branch_name] - Branch Name * @property {string} [city] - City @@ -738,8 +1000,8 @@ const Joi = require("joi"); /** * @typedef PayoutRequest * @property {string} aggregator - Aggregator Name - * @property {PayoutBankDetails} bank_details - Payout bank details object - * @property {boolean} is_active - Enable/Disable Flag Payout + * @property {PayoutBankDetails} bank_details + * @property {boolean} is_active - Enable or Disable Flag Payout * @property {string} transfer_type - Transafer type * @property {string} unique_external_id - Unique Id of Payout * @property {Object} users - Payout users object @@ -750,7 +1012,7 @@ const Joi = require("joi"); * @property {string} aggregator - Aggregator Name * @property {Object} bank_details - Payout bank_details object * @property {boolean} created - Created flag - * @property {boolean} is_active - Enable/DIsable Flag Payout + * @property {boolean} is_active - Enable or DIsable Flag Payout * @property {string} payment_status - Status of payment * @property {Object} payouts - Payout object * @property {boolean} success - Response is successful or not @@ -765,6 +1027,19 @@ const Joi = require("joi"); * @property {boolean} success - Response is successful or not */ +/** + * @typedef PlatformPaymentModeCopyConfigRequest + * @property {FromConfig} from_config + * @property {ToConfig} to_config + */ + +/** + * @typedef PlatformPaymentModeResponse + * @property {Object[]} [items] - List of all aggregator and payment mode details. + * @property {string} [message] - Message + * @property {boolean} success - Response is successful or not. + */ + /** * @typedef PollingPaymentLinkResponse * @property {string} [aggregator_name] - Aggregator name @@ -781,7 +1056,7 @@ const Joi = require("joi"); /** * @typedef ProductCODData - * @property {Object} [cod_charges] - Cod charges and its allowed limits. + * @property {CODChargesLimitsResponse} [cod_charges] * @property {Object} [items] - Item id with its cod availability. */ @@ -793,6 +1068,16 @@ const Joi = require("joi"); * @property {boolean} success - Success or failure flag. */ +/** + * @typedef RefundDetailsSerializer + * @property {number} amount - Refunded amount + * @property {string} created - Timestamp in epoch. + * @property {string} currency - The currency of the payment. + * @property {string} refund_utr - Unique refund utr generated by payment gateway. + * @property {string} request_id - Refund request id, unique id generated by Fynd platform + * @property {string} status - The status of the refund. + */ + /** * @typedef RefundPriorityRequestSerializer * @property {boolean} apportion - Apportion refund to multiple sources @@ -829,9 +1114,11 @@ const Joi = require("joi"); /** * @typedef RefundSessionRequestSerializer * @property {string} currency - The currency of the payment. + * @property {ErrorDescription} [error] * @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 {string} [message] - The status of the refund. * @property {Object} [meta] - Meta * @property {PaymentSessionDetail} payment_details - Details of the payment * @property {RefundSessionDetail[]} [refund_details] - Details of the refund @@ -895,7 +1182,7 @@ const Joi = require("joi"); /** * @typedef ResendOrCancelPaymentResponse - * @property {LinkStatus} data - Data about link action status. + * @property {LinkStatus} data * @property {boolean} success - Response is successful or not. */ @@ -951,6 +1238,13 @@ const Joi = require("joi"); * @property {boolean} success - Response is successful or not */ +/** + * @typedef SplitObject + * @property {number} [amount_remaining] - Amount pending to be paid + * @property {number} [splits_remaining] - Number of splits remaining + * @property {number} [total_number_of_splits] - Maximum amount of splits allowed + */ + /** * @typedef StatisticsData * @property {number} active_device_count - No of active devices @@ -970,17 +1264,23 @@ const Joi = require("joi"); * @property {boolean} success - Response is successful or not */ +/** + * @typedef ToConfig + * @property {string} business_unit - Business unit name + * @property {Object[]} device - Device name to copy the config to + */ + /** * @typedef UpdatePayoutRequest - * @property {boolean} is_active - Enable/Disable Flag Payout - * @property {boolean} is_default - Enable/Disable Default Payout + * @property {boolean} is_active - Enable or Disable Flag Payout + * @property {boolean} is_default - Enable or Disable Default Payout * @property {string} unique_external_id - Unique Id of Payout */ /** * @typedef UpdatePayoutResponse - * @property {boolean} is_active - Enable/DIsable Flag Payout - * @property {boolean} is_default - Enable/Disable Default Payout + * @property {boolean} is_active - Enable or DIsable Flag Payout + * @property {boolean} is_default - Enable or Disable Default Payout * @property {boolean} success - Response is successful or not */ @@ -1016,7 +1316,7 @@ class PaymentPlatformModel { static AddressDetail() { return Joi.object({ address: Joi.string().allow("").required(), - address_type: Joi.string().allow("").required(), + address_type: Joi.string().allow("").allow(null), area: Joi.string().allow("").required(), area_code: Joi.string().allow("").required(), area_code_slug: Joi.string().allow("").required(), @@ -1037,6 +1337,85 @@ class PaymentPlatformModel { }); } + /** @returns {AdvanceObject} */ + static AdvanceObject() { + return Joi.object({ + all_prepayment_type: Joi.array().items( + Joi.string().allow("").allow(null) + ), + allow_custom_advance_amount: Joi.boolean().allow(null), + amount: Joi.number().allow(null), + cancellation_type: Joi.string().allow("").allow(null), + description: Joi.string().allow("").allow(null), + display_name: Joi.string().allow("").allow(null), + is_active: Joi.boolean().allow(null), + prepayment_type: Joi.string().allow("").allow(null), + prepayment_value: Joi.number().allow(null), + refund_time_limit: Joi.number().allow(null), + time_unit: Joi.string().allow("").allow(null), + }); + } + + /** @returns {AdvancePaymentObject} */ + static AdvancePaymentObject() { + return Joi.object({ + advance: PaymentPlatformModel.AdvanceObject(), + display_name: Joi.string().allow("").allow(null), + display_priority: Joi.number().allow(null), + list: Joi.array().items(PaymentPlatformModel.PaymentModeList()), + name: Joi.string().allow("").allow(null), + payment_mode_id: Joi.number().allow(null), + split: PaymentPlatformModel.SplitObject(), + }); + } + + /** @returns {AggregatorControlRequest} */ + static AggregatorControlRequest() { + return Joi.object({ + business_unit: Joi.string().allow(""), + device: Joi.string().allow(""), + items: Joi.array().items(Joi.any()), + version: PaymentPlatformModel.AggregatorVersionRequestSchema(), + }); + } + + /** @returns {AggregatorRoute} */ + static AggregatorRoute() { + return Joi.object({ + api_link: Joi.string().allow("").allow(null), + data: Joi.any().allow(null), + payment_flow: Joi.string().allow("").allow(null), + payment_flow_data: Joi.string().allow("").allow(null), + }); + } + + /** @returns {AggregatorVersionItemSchema} */ + static AggregatorVersionItemSchema() { + return Joi.object({ + is_equal_to: Joi.string().allow(""), + is_greater_than: Joi.string().allow(""), + is_less_than: Joi.string().allow(""), + }); + } + + /** @returns {AggregatorVersionRequestSchema} */ + static AggregatorVersionRequestSchema() { + return Joi.object({ + is_equal_to: Joi.string().allow(""), + is_greater_than: Joi.string().allow(""), + is_less_than: Joi.string().allow(""), + }); + } + + /** @returns {AggregatorVersionResponse} */ + static AggregatorVersionResponse() { + return Joi.object({ + items: PaymentPlatformModel.AggregatorVersionItemSchema(), + message: Joi.string().allow("").required(), + success: Joi.boolean().required(), + }); + } + /** @returns {BankDetailsForOTP} */ static BankDetailsForOTP() { return Joi.object({ @@ -1064,6 +1443,16 @@ class PaymentPlatformModel { }); } + /** @returns {CartDetailsSerializer} */ + static CartDetailsSerializer() { + return Joi.object({ + articles: Joi.array().items(Joi.any()).required(), + cart_value: Joi.number().required(), + items: Joi.any().required(), + total_quantity: Joi.number(), + }); + } + /** @returns {CODChargesLimitsResponse} */ static CODChargesLimitsResponse() { return Joi.object({ @@ -1100,7 +1489,6 @@ class PaymentPlatformModel { assign_card_id: Joi.string().allow("").allow(null), cart_id: Joi.string().allow("").required(), checkout_mode: Joi.string().allow("").required(), - pincode: Joi.string().allow("").required(), }); } @@ -1108,6 +1496,7 @@ class PaymentPlatformModel { static CreatePaymentLinkRequest() { return Joi.object({ amount: Joi.number().required(), + country_phone_code: Joi.string().allow(""), description: Joi.string().allow("").allow(null), email: Joi.string().allow("").required(), external_order_id: Joi.string().allow("").required(), @@ -1275,13 +1664,21 @@ class PaymentPlatformModel { /** @returns {ErrorResponse} */ static ErrorResponse() { return Joi.object({ - error: Joi.any().allow(null), + error: PaymentPlatformModel.ErrorDescription(), message: Joi.string().allow("").required(), status_code: Joi.number().required(), success: Joi.boolean().required(), }); } + /** @returns {FromConfig} */ + static FromConfig() { + return Joi.object({ + business_unit: Joi.string().allow("").required(), + device: Joi.string().allow("").required(), + }); + } + /** @returns {GetOauthUrlResponse} */ static GetOauthUrlResponse() { return Joi.object({ @@ -1350,7 +1747,7 @@ class PaymentPlatformModel { return Joi.object({ code: Joi.string().allow("").allow(null), display_name: Joi.string().allow("").allow(null), - logos: Joi.any().allow(null), + logos: PaymentPlatformModel.PaymentModeLogo(), package_name: Joi.string().allow("").allow(null), }); } @@ -1367,7 +1764,7 @@ class PaymentPlatformModel { static LinkStatus() { return Joi.object({ message: Joi.string().allow("").required(), - status: Joi.boolean().required(), + status: Joi.string().allow("").required(), }); } @@ -1390,20 +1787,20 @@ class PaymentPlatformModel { }); } - /** @returns {MerchnatPaymentModeRequest} */ - static MerchnatPaymentModeRequest() { + /** @returns {MerchantPaymentModeRequest} */ + static MerchantPaymentModeRequest() { return Joi.object({ - offline: Joi.any().allow(null), - online: Joi.any().allow(null), + business_unit: Joi.string().allow("").required(), + device: Joi.any().required(), + items: Joi.array().items(Joi.any()).required(), }); } - /** @returns {MerchnatPaymentModeResponse} */ - static MerchnatPaymentModeResponse() { + /** @returns {MerchnatPaymentModeRequest} */ + static MerchnatPaymentModeRequest() { return Joi.object({ - items: Joi.array().items(Joi.any()), - message: Joi.string().allow("").allow(null), - success: Joi.boolean().required(), + offline: Joi.any().allow(null), + online: Joi.any().allow(null), }); } @@ -1526,6 +1923,116 @@ class PaymentPlatformModel { }); } + /** @returns {PaymentCustomConfigCustomerRequestSchema} */ + static PaymentCustomConfigCustomerRequestSchema() { + return Joi.object({ + groups: Joi.array().items(Joi.number()), + restriction: Joi.string().allow("").required(), + }); + } + + /** @returns {PaymentCustomConfigCustomerSchema} */ + static PaymentCustomConfigCustomerSchema() { + return Joi.object({ + groups: Joi.array().items(Joi.number()), + restriction: Joi.string().allow("").required(), + types: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {PaymentCustomConfigDetailsRequestSchema} */ + static PaymentCustomConfigDetailsRequestSchema() { + return Joi.object({ + customer: PaymentPlatformModel.PaymentCustomConfigCustomerRequestSchema().required(), + min_order_value: Joi.number().required(), + payment_mode: PaymentPlatformModel.PaymentCustomConfigModeSchema().required(), + }); + } + + /** @returns {PaymentCustomConfigDetailsSchema} */ + static PaymentCustomConfigDetailsSchema() { + return Joi.object({ + customer: PaymentPlatformModel.PaymentCustomConfigCustomerSchema().required(), + min_order_value: Joi.number().required(), + payment_mode: PaymentPlatformModel.PaymentCustomConfigModeSchema().required(), + }); + } + + /** @returns {PaymentCustomConfigModeSchema} */ + static PaymentCustomConfigModeSchema() { + return Joi.object({ + available: Joi.boolean().required(), + post_order: Joi.array().items(Joi.string().allow("")), + pre_order: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {PaymentCustomConfigRequestSchema} */ + static PaymentCustomConfigRequestSchema() { + return Joi.object({ + business_unit: Joi.string().allow("").required(), + items: Joi.array() + .items(PaymentPlatformModel.PaymentCustomConfigDetailsRequestSchema()) + .required(), + }); + } + + /** @returns {PaymentCustomConfigResponseSchema} */ + static PaymentCustomConfigResponseSchema() { + return Joi.object({ + items: Joi.array() + .items(PaymentPlatformModel.PaymentModeCustomConfigSchema()) + .required(), + message: Joi.string().allow("").required(), + success: Joi.boolean().required(), + }); + } + + /** @returns {PaymentDetailsSerializer} */ + static PaymentDetailsSerializer() { + return Joi.object({ + aggregator_customer_id: Joi.string().allow(""), + aggregator_order_id: Joi.string().allow(""), + amount: Joi.number().required(), + amount_captured: Joi.number().required(), + amount_refunded: Joi.number(), + cancel_url: Joi.string().allow(""), + captured: Joi.boolean(), + created: Joi.string().allow(""), + currency: Joi.string().allow("").required(), + g_user_id: Joi.string().allow("").required(), + gid: Joi.string().allow("").required(), + kind: Joi.string().allow(""), + locale: Joi.string().allow(""), + merchant_locale: Joi.string().allow(""), + meta: Joi.any().allow(null), + mode: Joi.string().allow("").required(), + payment_id: Joi.string().allow(""), + payment_methods: Joi.array().items(Joi.any()).required(), + status: Joi.string().allow("").required(), + success_url: Joi.string().allow(""), + }); + } + + /** @returns {PaymentFlow} */ + static PaymentFlow() { + return Joi.object({ + ajiodhan: PaymentPlatformModel.AggregatorRoute(), + bqr_razorpay: PaymentPlatformModel.AggregatorRoute(), + ccavenue: PaymentPlatformModel.AggregatorRoute(), + epaylater: PaymentPlatformModel.AggregatorRoute(), + fynd: PaymentPlatformModel.AggregatorRoute(), + jiopay: PaymentPlatformModel.AggregatorRoute(), + juspay: PaymentPlatformModel.AggregatorRoute(), + mswipe: PaymentPlatformModel.AggregatorRoute(), + payubiz: PaymentPlatformModel.AggregatorRoute(), + razorpay: PaymentPlatformModel.AggregatorRoute(), + rupifi: PaymentPlatformModel.AggregatorRoute(), + simpl: PaymentPlatformModel.AggregatorRoute(), + stripe: PaymentPlatformModel.AggregatorRoute(), + }); + } + /** @returns {PaymentGatewayConfig} */ static PaymentGatewayConfig() { return Joi.object({ @@ -1608,6 +2115,24 @@ class PaymentPlatformModel { }); } + /** @returns {PaymentMethodsMetaOrder} */ + static PaymentMethodsMetaOrder() { + return Joi.object({ + merchant_code: Joi.string().allow("").required(), + payment_gateway: Joi.string().allow("").required(), + payment_identifier: Joi.string().allow("").required(), + }); + } + + /** @returns {PaymentModeCustomConfigSchema} */ + static PaymentModeCustomConfigSchema() { + return Joi.object({ + business_unit: Joi.string().allow("").required(), + custom_config: PaymentPlatformModel.PaymentCustomConfigDetailsSchema().required(), + display_name: Joi.string().allow("").required(), + }); + } + /** @returns {PaymentModeList} */ static PaymentModeList() { return Joi.object({ @@ -1640,11 +2165,11 @@ class PaymentPlatformModel { ), intent_app_error_list: Joi.array().items(Joi.string().allow("")), intent_flow: Joi.boolean().allow(null), - logo_url: Joi.any().allow(null), + logo_url: PaymentPlatformModel.PaymentModeLogo(), merchant_code: Joi.string().allow("").allow(null), name: Joi.string().allow("").allow(null), nickname: Joi.string().allow("").allow(null), - product_cod_data: Joi.any().allow(null), + product_cod_data: PaymentPlatformModel.ProductCODData(), remaining_limit: Joi.number().allow(null), retry_count: Joi.number().allow(null), timeout: Joi.number().allow(null), @@ -1659,6 +2184,18 @@ class PaymentPlatformModel { }); } + /** @returns {PaymentModeRouteResponse} */ + static PaymentModeRouteResponse() { + return Joi.object({ + advance_payment: Joi.array().items( + PaymentPlatformModel.AdvancePaymentObject() + ), + payment_breakup: Joi.any(), + payment_options: PaymentPlatformModel.PaymentOptionAndFlow().required(), + success: Joi.boolean().required(), + }); + } + /** @returns {PaymentObjectListSerializer} */ static PaymentObjectListSerializer() { return Joi.object({ @@ -1683,6 +2220,16 @@ class PaymentPlatformModel { }); } + /** @returns {PaymentOptionAndFlow} */ + static PaymentOptionAndFlow() { + return Joi.object({ + payment_flows: PaymentPlatformModel.PaymentFlow().required(), + payment_option: Joi.array() + .items(PaymentPlatformModel.RootPaymentMode()) + .required(), + }); + } + /** @returns {PaymentOptions} */ static PaymentOptions() { return Joi.object({ @@ -1695,11 +2242,63 @@ class PaymentPlatformModel { /** @returns {PaymentOptionsResponse} */ static PaymentOptionsResponse() { return Joi.object({ + payment_breakup: Joi.any(), payment_options: PaymentPlatformModel.PaymentOptions().required(), success: Joi.boolean().required(), }); } + /** @returns {PaymentOrderData} */ + static PaymentOrderData() { + return Joi.object({ + aggregator: Joi.string().allow("").allow(null), + amount: Joi.number().allow(null), + callback_url: Joi.string().allow("").allow(null), + contact: Joi.string().allow("").allow(null), + currency: Joi.string().allow("").allow(null), + customer_id: Joi.string().allow("").allow(null), + email: Joi.string().allow("").allow(null), + merchant_order_id: Joi.string().allow("").allow(null), + method: Joi.string().allow("").allow(null), + order_id: Joi.string().allow("").allow(null), + }); + } + + /** @returns {PaymentOrderMethods} */ + static PaymentOrderMethods() { + return Joi.object({ + amount: Joi.number().required(), + meta: PaymentPlatformModel.PaymentMethodsMetaOrder().required(), + mode: Joi.string().allow("").required(), + name: Joi.string().allow("").required(), + payment: Joi.string().allow(""), + }); + } + + /** @returns {PaymentOrderRequest} */ + static PaymentOrderRequest() { + return Joi.object({ + order_id: Joi.string().allow("").required(), + payment_methods: Joi.array().items( + PaymentPlatformModel.PaymentOrderMethods() + ), + shipment_id: Joi.string().allow(""), + }); + } + + /** @returns {PaymentOrderResponse} */ + static PaymentOrderResponse() { + return Joi.object({ + callback_url: Joi.string().allow("").allow(null), + data: PaymentPlatformModel.PaymentOrderData(), + message: Joi.string().allow("").required(), + order_id: Joi.string().allow("").allow(null), + payment_confirm_url: Joi.string().allow("").allow(null), + status_code: Joi.number().required(), + success: Joi.boolean().required(), + }); + } + /** @returns {PaymentSessionDetail} */ static PaymentSessionDetail() { return Joi.object({ @@ -1718,6 +2317,7 @@ class PaymentPlatformModel { kind: Joi.string().allow(""), locale: Joi.string().allow(""), merchant_locale: Joi.string().allow(""), + meta: Joi.any(), mode: Joi.string().allow("").required(), payment_id: Joi.string().allow("").required(), payment_methods: Joi.array().items(Joi.any()).required(), @@ -1753,6 +2353,21 @@ class PaymentPlatformModel { }); } + /** @returns {PaymentSessionSerializer} */ + static PaymentSessionSerializer() { + return Joi.object({ + cart_details: PaymentPlatformModel.CartDetailsSerializer(), + currency: Joi.string().allow("").allow(null), + gid: Joi.string().allow("").allow(null).required(), + payment_details: Joi.any().required(), + refund_details: Joi.array() + .items(PaymentPlatformModel.RefundDetailsSerializer()) + .required(), + status: Joi.string().allow("").required(), + total_amount: Joi.number().required(), + }); + } + /** @returns {PaymentStatusBulkHandlerRequest} */ static PaymentStatusBulkHandlerRequest() { return Joi.object({ @@ -1913,6 +2528,23 @@ class PaymentPlatformModel { }); } + /** @returns {PlatformPaymentModeCopyConfigRequest} */ + static PlatformPaymentModeCopyConfigRequest() { + return Joi.object({ + from_config: PaymentPlatformModel.FromConfig().required(), + to_config: PaymentPlatformModel.ToConfig().required(), + }); + } + + /** @returns {PlatformPaymentModeResponse} */ + static PlatformPaymentModeResponse() { + return Joi.object({ + items: Joi.array().items(Joi.any()), + message: Joi.string().allow("").allow(null), + success: Joi.boolean().required(), + }); + } + /** @returns {PollingPaymentLinkResponse} */ static PollingPaymentLinkResponse() { return Joi.object({ @@ -1932,7 +2564,7 @@ class PaymentPlatformModel { /** @returns {ProductCODData} */ static ProductCODData() { return Joi.object({ - cod_charges: Joi.any().allow(null), + cod_charges: PaymentPlatformModel.CODChargesLimitsResponse(), items: Joi.any().allow(null), }); } @@ -1947,6 +2579,18 @@ class PaymentPlatformModel { }); } + /** @returns {RefundDetailsSerializer} */ + static RefundDetailsSerializer() { + return Joi.object({ + amount: Joi.number().required(), + created: Joi.string().allow("").required(), + currency: Joi.string().allow("").required(), + refund_utr: Joi.string().allow("").required(), + request_id: Joi.string().allow("").required(), + status: Joi.string().allow("").required(), + }); + } + /** @returns {RefundPriorityRequestSerializer} */ static RefundPriorityRequestSerializer() { return Joi.object({ @@ -1992,7 +2636,9 @@ class PaymentPlatformModel { static RefundSessionRequestSerializer() { return Joi.object({ currency: Joi.string().allow("").required(), + error: PaymentPlatformModel.ErrorDescription(), gid: Joi.string().allow("").required(), + message: Joi.string().allow(""), meta: Joi.any(), payment_details: PaymentPlatformModel.PaymentSessionDetail().required(), refund_details: Joi.array().items( @@ -2142,6 +2788,15 @@ class PaymentPlatformModel { }); } + /** @returns {SplitObject} */ + static SplitObject() { + return Joi.object({ + amount_remaining: Joi.number().allow(null), + splits_remaining: Joi.number().allow(null), + total_number_of_splits: Joi.number().allow(null), + }); + } + /** @returns {StatisticsData} */ static StatisticsData() { return Joi.object({ @@ -2167,6 +2822,14 @@ class PaymentPlatformModel { }); } + /** @returns {ToConfig} */ + static ToConfig() { + return Joi.object({ + business_unit: Joi.string().allow("").required(), + device: Joi.array().items(Joi.any()).required(), + }); + } + /** @returns {UpdatePayoutRequest} */ static UpdatePayoutRequest() { return Joi.object({ diff --git a/sdk/platform/PlatformApplicationClient.d.ts b/sdk/platform/PlatformApplicationClient.d.ts index 252da3dbb..3b7002ebc 100644 --- a/sdk/platform/PlatformApplicationClient.d.ts +++ b/sdk/platform/PlatformApplicationClient.d.ts @@ -22,11 +22,11 @@ declare class PlatformApplicationClient { content: Content; fileStorage: FileStorage; lead: Lead; + serviceability: Serviceability; order: Order; partner: Partner; payment: Payment; rewards: Rewards; - serviceability: Serviceability; share: Share; theme: Theme; user: User; @@ -45,11 +45,11 @@ import Configuration = require("./Configuration/ConfigurationPlatformApplication import Content = require("./Content/ContentPlatformApplicationClient"); import FileStorage = require("./FileStorage/FileStoragePlatformApplicationClient"); import Lead = require("./Lead/LeadPlatformApplicationClient"); +import Serviceability = require("./Serviceability/ServiceabilityPlatformApplicationClient"); import Order = require("./Order/OrderPlatformApplicationClient"); import Partner = require("./Partner/PartnerPlatformApplicationClient"); import Payment = require("./Payment/PaymentPlatformApplicationClient"); import Rewards = require("./Rewards/RewardsPlatformApplicationClient"); -import Serviceability = require("./Serviceability/ServiceabilityPlatformApplicationClient"); import Share = require("./Share/SharePlatformApplicationClient"); import Theme = require("./Theme/ThemePlatformApplicationClient"); import User = require("./User/UserPlatformApplicationClient"); diff --git a/sdk/platform/PlatformApplicationClient.js b/sdk/platform/PlatformApplicationClient.js index 0b59640ee..b0e6aefc2 100644 --- a/sdk/platform/PlatformApplicationClient.js +++ b/sdk/platform/PlatformApplicationClient.js @@ -12,6 +12,8 @@ const FileStorage = require("./FileStorage/FileStoragePlatformApplicationClient" const Lead = require("./Lead/LeadPlatformApplicationClient"); +const Serviceability = require("./Serviceability/ServiceabilityPlatformApplicationClient"); + const Order = require("./Order/OrderPlatformApplicationClient"); const Partner = require("./Partner/PartnerPlatformApplicationClient"); @@ -20,8 +22,6 @@ const Payment = require("./Payment/PaymentPlatformApplicationClient"); const Rewards = require("./Rewards/RewardsPlatformApplicationClient"); -const Serviceability = require("./Serviceability/ServiceabilityPlatformApplicationClient"); - const Share = require("./Share/SharePlatformApplicationClient"); const Theme = require("./Theme/ThemePlatformApplicationClient"); @@ -61,6 +61,8 @@ class PlatformApplicationClient { this.lead = new Lead(config, applicationId); + this.serviceability = new Serviceability(config, applicationId); + this.order = new Order(config, applicationId); this.partner = new Partner(config, applicationId); @@ -69,8 +71,6 @@ class PlatformApplicationClient { this.rewards = new Rewards(config, applicationId); - this.serviceability = new Serviceability(config, applicationId); - this.share = new Share(config, applicationId); this.theme = new Theme(config, applicationId); diff --git a/sdk/platform/PlatformClient.d.ts b/sdk/platform/PlatformClient.d.ts index e28a7b64d..6f33dfa68 100644 --- a/sdk/platform/PlatformClient.d.ts +++ b/sdk/platform/PlatformClient.d.ts @@ -19,14 +19,15 @@ declare class PlatformClient { communication: Communication; companyProfile: CompanyProfile; configuration: Configuration; + content: Content; discount: Discount; fileStorage: FileStorage; finance: Finance; inventory: Inventory; lead: Lead; + serviceability: Serviceability; order: Order; payment: Payment; - serviceability: Serviceability; theme: Theme; webhook: Webhook; /** @@ -54,14 +55,15 @@ import Common = require("./Common/CommonPlatformClient"); import Communication = require("./Communication/CommunicationPlatformClient"); import CompanyProfile = require("./CompanyProfile/CompanyProfilePlatformClient"); 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 Inventory = require("./Inventory/InventoryPlatformClient"); import Lead = require("./Lead/LeadPlatformClient"); +import Serviceability = require("./Serviceability/ServiceabilityPlatformClient"); import Order = require("./Order/OrderPlatformClient"); import Payment = require("./Payment/PaymentPlatformClient"); -import Serviceability = require("./Serviceability/ServiceabilityPlatformClient"); import Theme = require("./Theme/ThemePlatformClient"); import Webhook = require("./Webhook/WebhookPlatformClient"); import PlatformApplicationClient = require("./PlatformApplicationClient"); diff --git a/sdk/platform/PlatformClient.js b/sdk/platform/PlatformClient.js index cf08400f0..7d3be4c06 100644 --- a/sdk/platform/PlatformClient.js +++ b/sdk/platform/PlatformClient.js @@ -12,6 +12,8 @@ const CompanyProfile = require("./CompanyProfile/CompanyProfilePlatformClient"); const Configuration = require("./Configuration/ConfigurationPlatformClient"); +const Content = require("./Content/ContentPlatformClient"); + const Discount = require("./Discount/DiscountPlatformClient"); const FileStorage = require("./FileStorage/FileStoragePlatformClient"); @@ -22,12 +24,12 @@ const Inventory = require("./Inventory/InventoryPlatformClient"); const Lead = require("./Lead/LeadPlatformClient"); +const Serviceability = require("./Serviceability/ServiceabilityPlatformClient"); + const Order = require("./Order/OrderPlatformClient"); const Payment = require("./Payment/PaymentPlatformClient"); -const Serviceability = require("./Serviceability/ServiceabilityPlatformClient"); - const Theme = require("./Theme/ThemePlatformClient"); const Webhook = require("./Webhook/WebhookPlatformClient"); @@ -63,6 +65,8 @@ class PlatformClient { this.configuration = new Configuration(config); + this.content = new Content(config); + this.discount = new Discount(config); this.fileStorage = new FileStorage(config); @@ -73,12 +77,12 @@ class PlatformClient { this.lead = new Lead(config); + this.serviceability = new Serviceability(config); + this.order = new Order(config); this.payment = new Payment(config); - this.serviceability = new Serviceability(config); - this.theme = new Theme(config); this.webhook = new Webhook(config); diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts index 2b23abdb7..527183007 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts @@ -4,61 +4,60 @@ declare class Serviceability { config: any; applicationId: any; /** - * @param {ServiceabilityPlatformApplicationValidator.AddAppDpParam} arg - Arg object + * @param {ServiceabilityPlatformApplicationValidator.CreateCourierPartnerRuleParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name addAppDp - * @summary: Add application dp data - * @description: This API add application dp data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/addAppDp/). + * @returns {Promise} - + * Success response + * @name createCourierPartnerRule + * @summary: Create Courier Rules. + * @description: Creates Courier Rules with rule configuration and dp priority - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerRule/). */ - addAppDp({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.AddAppDpParam, { responseHeaders }?: object): Promise; + createCourierPartnerRule({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateCourierPartnerRuleParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformApplicationValidator.DeleteAppDpParam} arg + * @param {ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name deleteAppDp - * @summary: Delete application dp data - * @description: This API remove application dp data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/deleteAppDp/). + * @name createStoreRules + * @summary: Create Store Rule + * @description: Create Store Rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createStoreRules/). */ - deleteAppDp({ courierPartnerId, requestHeaders }?: ServiceabilityPlatformApplicationValidator.DeleteAppDpParam, { responseHeaders }?: object): Promise; + createStoreRules({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformApplicationValidator.GetApplicationServiceabilityParam} arg + * @param {ServiceabilityPlatformApplicationValidator.GetApplicationConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getApplicationServiceability - * @summary: Zone configuration of application. - * @description: This API returns serviceability config of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationServiceability/). + * @returns {Promise} - + * Success response + * @name getApplicationConfig + * @summary: Get Application Configuration + * @description: Get Application Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationConfig/). */ - getApplicationServiceability({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getApplicationConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformApplicationValidator.GetDpApplicationRulesParam} arg + * @param {ServiceabilityPlatformApplicationValidator.GetApplicationConfigurationParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getDpApplicationRules - * @summary: Get All DpApplicationRules rules added at application level from database. - * @description: This API returns response of all rules of DpApplicationRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpApplicationRules/). + * @returns {Promise} - + * Success response + * @name getApplicationConfiguration + * @summary: Get All Courier Rules applied to application + * @description: This API returns all the Courier Rules applied to an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationConfiguration/). */ - getDpApplicationRules({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getApplicationConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformApplicationValidator.GetSelfShipParam} arg + * @param {ServiceabilityPlatformApplicationValidator.GetApplicationServiceabilitySelfShipmentParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -66,53 +65,131 @@ declare class Serviceability { * @returns {Promise} * - Success response * - * @name getSelfShip + * @name getApplicationServiceabilitySelfShipment * @summary: Self-ship configuration of application. - * @description: This API returns Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getSelfShip/). + * @description: This API returns Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationServiceabilitySelfShipment/). + */ + 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} - + * Success response + * @name getCourierPartnerRule + * @summary: Fetch of Courier Rule. + * @description: This API returns Courier Rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerRule/). */ - getSelfShip({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getCourierPartnerRule({ ruleId, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetCourierPartnerRuleParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformApplicationValidator.GetZoneFromPincodeViewParam} arg + * @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 getZoneFromPincodeView - * @summary: GET zone from the Pincode. - * @description: This API returns zone from the Pincode View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneFromPincodeView/). + * @name getCourierPartnerRules + * @summary: Fetch Courier Rules List + * @description: This API returns Courier Rules List - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerRules/). */ - getZoneFromPincodeView({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetZoneFromPincodeViewParam, { responseHeaders }?: object): Promise; + getCourierPartnerRules({ pageNo, pageSize, status, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetCourierPartnerRulesParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformApplicationValidator.GetZonesFromApplicationIdViewParam} arg + * @param {ServiceabilityPlatformApplicationValidator.GetStoreRuleParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} - + * Success response + * @name getStoreRule + * @summary: Get Single Store Rule + * @description: Get Single Store Rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStoreRule/). + */ + getStoreRule({ ruleUid, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetStoreRuleParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformApplicationValidator.GetStoreRulesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} * - Success response * - * @name getZonesFromApplicationIdView - * @summary: GET zones from the application_id. - * @description: This API returns zones from the application_id View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZonesFromApplicationIdView/). + * @name getStoreRules + * @summary: Get Multiple Store Rules + * @description: Get Multiple Store Rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStoreRules/). + */ + getStoreRules({ pageNo, pageSize, status, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetStoreRulesParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformApplicationValidator.InsertApplicationConfigParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name insertApplicationConfig + * @summary: Insert Application Configuration + * @description: Insert Application Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/insertApplicationConfig/). */ - getZonesFromApplicationIdView({ pageNo, pageSize, zoneId, q, requestHeaders }?: ServiceabilityPlatformApplicationValidator.GetZonesFromApplicationIdViewParam, { responseHeaders }?: object): Promise; + insertApplicationConfig({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.InsertApplicationConfigParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationServiceabilityParam} arg + * @param {ServiceabilityPlatformApplicationValidator.PatchApplicationServiceabilitySelfShipmentParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name updateApplicationServiceability - * @summary: Zone configuration of application. - * @description: This API updates serviceability config of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateApplicationServiceability/). + * @name patchApplicationServiceabilitySelfShipment + * @summary: Self-ship configuration of application. + * @description: This API updates Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/patchApplicationServiceabilitySelfShipment/). + */ + patchApplicationServiceabilitySelfShipment({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.PatchApplicationServiceabilitySelfShipmentParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationConfigurationParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name updateApplicationConfiguration + * @summary: Apply configuration to an application + * @description: Apply configuration to application to set DP rules and Zone configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateApplicationConfiguration/). + */ + updateApplicationConfiguration({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateApplicationConfigurationParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformApplicationValidator.UpdateCourierPartnerRulePriorityParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name updateCourierPartnerRulePriority + * @summary: Updates Courier Partner Rules Priority for a sales channel + * @description: Updates Courier Partner Rules Priority for a sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerRulePriority/). */ - updateApplicationServiceability({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateApplicationServiceabilityParam, { 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} - + * Success response + * @name updateCourierRule + * @summary: Updating of Courier Rule. + * @description: This API updates and returns Courier Rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierRule/). + */ + updateCourierRule({ ruleId, body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateCourierRuleParam, { responseHeaders }?: object): Promise; /** * @param {ServiceabilityPlatformApplicationValidator.UpdatePincodeAuditHistoryParam} arg * - Arg object @@ -169,33 +246,32 @@ declare class Serviceability { */ updatePincodeMopView({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdatePincodeMopViewParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformApplicationValidator.UpdateSelfShipParam} arg + * @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 updateSelfShip - * @summary: Self-ship configuration of application. - * @description: This API updates Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateSelfShip/). + * @name updateStoreRules + * @summary: Update Store Rule + * @description: Update Store Rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateStoreRules/). */ - updateSelfShip({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateSelfShipParam, { responseHeaders }?: object): Promise; + updateStoreRules({ ruleUid, body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateStoreRulesParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformApplicationValidator.UpsertDpApplicationRulesParam} arg + * @param {ServiceabilityPlatformApplicationValidator.UpdateStoreRulesConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name upsertDpApplicationRules - * @summary: Upsert of DpApplicationRules in database. - * @description: This API returns response of upsert of DpApplicationRules in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpApplicationRules/). + * @returns {Promise} - + * Success response + * @name updateStoreRulesConfig + * @summary: Update Store Rule Configuration + * @description: Update Store Rule Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateStoreRulesConfig/). */ - upsertDpApplicationRules({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpsertDpApplicationRulesParam, { responseHeaders }?: object): Promise; + updateStoreRulesConfig({ body, requestHeaders }?: ServiceabilityPlatformApplicationValidator.UpdateStoreRulesConfigParam, { responseHeaders }?: object): Promise; } import ServiceabilityPlatformApplicationValidator = require("./ServiceabilityPlatformApplicationValidator"); import ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js index 5376cfb26..acdd28c78 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js @@ -13,23 +13,24 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.AddAppDpParam} arg - Arg object + * @param {ServiceabilityPlatformApplicationValidator.CreateCourierPartnerRuleParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name addAppDp - * @summary: Add application dp data - * @description: This API add application dp data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/addAppDp/). + * @returns {Promise} - + * Success response + * @name createCourierPartnerRule + * @summary: Create Courier Rules. + * @description: Creates Courier Rules with rule configuration and dp priority - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerRule/). */ - async addAppDp( + async createCourierPartnerRule( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.addAppDp().validate( + } = ServiceabilityPlatformApplicationValidator.createCourierPartnerRule().validate( { body, }, @@ -42,7 +43,7 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.addAppDp().validate( + } = ServiceabilityPlatformApplicationValidator.createCourierPartnerRule().validate( { body, }, @@ -51,7 +52,7 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > addAppDp \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > createCourierPartnerRule \n ${warrning}`, }); } @@ -60,7 +61,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules`, query_params, body, requestHeaders, @@ -74,7 +75,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ApplicationCompanyDpViewResponse().validate( + } = ServiceabilityPlatformModel.CourierPartnerRule().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -85,7 +86,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > addAppDp \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > createCourierPartnerRule \n ${res_error}`, }); } } @@ -94,27 +95,27 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.DeleteAppDpParam} arg + * @param {ServiceabilityPlatformApplicationValidator.CreateStoreRulesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name deleteAppDp - * @summary: Delete application dp data - * @description: This API remove application dp data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/deleteAppDp/). + * @name createStoreRules + * @summary: Create Store Rule + * @description: Create Store Rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createStoreRules/). */ - async deleteAppDp( - { courierPartnerId, requestHeaders } = { requestHeaders: {} }, + async createStoreRules( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.deleteAppDp().validate( + } = ServiceabilityPlatformApplicationValidator.createStoreRules().validate( { - courierPartnerId, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -125,16 +126,16 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.deleteAppDp().validate( + } = ServiceabilityPlatformApplicationValidator.createStoreRules().validate( { - courierPartnerId, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > deleteAppDp \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > createStoreRules \n ${warrning}`, }); } @@ -142,10 +143,10 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, - "delete", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/${courierPartnerId}`, + "post", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/rules`, query_params, - undefined, + body, requestHeaders, { responseHeaders } ); @@ -157,7 +158,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ApplicationCompanyDpViewResponse().validate( + } = ServiceabilityPlatformModel.StoreRuleResponseSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -168,7 +169,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > deleteAppDp \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > createStoreRules \n ${res_error}`, }); } } @@ -177,25 +178,24 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.GetApplicationServiceabilityParam} arg + * @param {ServiceabilityPlatformApplicationValidator.GetApplicationConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getApplicationServiceability - * @summary: Zone configuration of application. - * @description: This API returns serviceability config of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationServiceability/). + * @returns {Promise} - + * Success response + * @name getApplicationConfig + * @summary: Get Application Configuration + * @description: Get Application Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationConfig/). */ - async getApplicationServiceability( + async getApplicationConfig( { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.getApplicationServiceability().validate( + } = ServiceabilityPlatformApplicationValidator.getApplicationConfig().validate( {}, { abortEarly: false, allowUnknown: true } ); @@ -206,14 +206,14 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.getApplicationServiceability().validate( + } = ServiceabilityPlatformApplicationValidator.getApplicationConfig().validate( {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getApplicationServiceability \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getApplicationConfig \n ${warrning}`, }); } @@ -222,7 +222,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/serviceability`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/configuration`, query_params, undefined, requestHeaders, @@ -236,7 +236,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ApplicationServiceabilityConfigResponse().validate( + } = ServiceabilityPlatformModel.StoreRuleConfigData().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -247,7 +247,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getApplicationServiceability \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getApplicationConfig \n ${res_error}`, }); } } @@ -256,25 +256,24 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.GetDpApplicationRulesParam} arg + * @param {ServiceabilityPlatformApplicationValidator.GetApplicationConfigurationParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getDpApplicationRules - * @summary: Get All DpApplicationRules rules added at application level from database. - * @description: This API returns response of all rules of DpApplicationRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpApplicationRules/). + * @returns {Promise} - + * Success response + * @name getApplicationConfiguration + * @summary: Get All Courier Rules applied to application + * @description: This API returns all the Courier Rules applied to an application - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationConfiguration/). */ - async getDpApplicationRules( + async getApplicationConfiguration( { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.getDpApplicationRules().validate( + } = ServiceabilityPlatformApplicationValidator.getApplicationConfiguration().validate( {}, { abortEarly: false, allowUnknown: true } ); @@ -285,14 +284,14 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.getDpApplicationRules().validate( + } = ServiceabilityPlatformApplicationValidator.getApplicationConfiguration().validate( {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getDpApplicationRules \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getApplicationConfiguration \n ${warrning}`, }); } @@ -301,7 +300,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier/priority`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`, query_params, undefined, requestHeaders, @@ -315,10 +314,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.DPApplicationRuleResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ServiceabilityPlatformModel.ApplicationConfig().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -326,7 +325,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getDpApplicationRules \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getApplicationConfiguration \n ${res_error}`, }); } } @@ -335,7 +334,7 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.GetSelfShipParam} arg + * @param {ServiceabilityPlatformApplicationValidator.GetApplicationServiceabilitySelfShipmentParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -343,17 +342,17 @@ class Serviceability { * @returns {Promise} * - Success response * - * @name getSelfShip + * @name getApplicationServiceabilitySelfShipment * @summary: Self-ship configuration of application. - * @description: This API returns Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getSelfShip/). + * @description: This API returns Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getApplicationServiceabilitySelfShipment/). */ - async getSelfShip( + async getApplicationServiceabilitySelfShipment( { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.getSelfShip().validate( + } = ServiceabilityPlatformApplicationValidator.getApplicationServiceabilitySelfShipment().validate( {}, { abortEarly: false, allowUnknown: true } ); @@ -364,14 +363,14 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.getSelfShip().validate( + } = ServiceabilityPlatformApplicationValidator.getApplicationServiceabilitySelfShipment().validate( {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getSelfShip \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getApplicationServiceabilitySelfShipment \n ${warrning}`, }); } @@ -405,7 +404,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getSelfShip \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getApplicationServiceabilitySelfShipment \n ${res_error}`, }); } } @@ -414,27 +413,111 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.GetZoneFromPincodeViewParam} arg + * @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: Fetch of Courier Rule. + * @description: This API returns Courier Rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerRule/). + */ + async getCourierPartnerRule( + { ruleId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformApplicationValidator.getCourierPartnerRule().validate( + { + ruleId, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ServiceabilityPlatformApplicationValidator.getCourierPartnerRule().validate( + { + ruleId, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerRule \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules/${ruleId}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.CourierPartnerRule().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 > getCourierPartnerRule \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformApplicationValidator.GetCourierPartnerRulesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} * - Success response * - * @name getZoneFromPincodeView - * @summary: GET zone from the Pincode. - * @description: This API returns zone from the Pincode View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneFromPincodeView/). + * @name getCourierPartnerRules + * @summary: Fetch Courier Rules List + * @description: This API returns Courier Rules List - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCourierPartnerRules/). */ - async getZoneFromPincodeView( - { body, requestHeaders } = { requestHeaders: {} }, + async getCourierPartnerRules( + { pageNo, pageSize, status, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.getZoneFromPincodeView().validate( + } = ServiceabilityPlatformApplicationValidator.getCourierPartnerRules().validate( { - body, + pageNo, + pageSize, + status, }, { abortEarly: false, allowUnknown: true } ); @@ -445,27 +528,114 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.getZoneFromPincodeView().validate( + } = ServiceabilityPlatformApplicationValidator.getCourierPartnerRules().validate( { - body, + pageNo, + pageSize, + status, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getZoneFromPincodeView \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerRules \n ${warrning}`, }); } const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["status"] = status; const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/zones`, + "get", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules`, query_params, - body, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.CourierPartnerRulesListResponse().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 > getCourierPartnerRules \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformApplicationValidator.GetStoreRuleParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getStoreRule + * @summary: Get Single Store Rule + * @description: Get Single Store Rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStoreRule/). + */ + async getStoreRule( + { ruleUid, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformApplicationValidator.getStoreRule().validate( + { + ruleUid, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ServiceabilityPlatformApplicationValidator.getStoreRule().validate( + { + ruleUid, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > getStoreRule \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/rules/${ruleUid}`, + query_params, + undefined, requestHeaders, { responseHeaders } ); @@ -477,7 +647,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.GetZoneFromPincodeViewResponse().validate( + } = ServiceabilityPlatformModel.StoreRuleDataSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -488,7 +658,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getZoneFromPincodeView \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getStoreRule \n ${res_error}`, }); } } @@ -497,30 +667,29 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.GetZonesFromApplicationIdViewParam} arg + * @param {ServiceabilityPlatformApplicationValidator.GetStoreRulesParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name getZonesFromApplicationIdView - * @summary: GET zones from the application_id. - * @description: This API returns zones from the application_id View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZonesFromApplicationIdView/). + * @name getStoreRules + * @summary: Get Multiple Store Rules + * @description: Get Multiple Store Rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStoreRules/). */ - async getZonesFromApplicationIdView( - { pageNo, pageSize, zoneId, q, requestHeaders } = { requestHeaders: {} }, + async getStoreRules( + { pageNo, pageSize, status, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.getZonesFromApplicationIdView().validate( + } = ServiceabilityPlatformApplicationValidator.getStoreRules().validate( { pageNo, pageSize, - zoneId, - q, + status, }, { abortEarly: false, allowUnknown: true } ); @@ -531,32 +700,30 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.getZonesFromApplicationIdView().validate( + } = ServiceabilityPlatformApplicationValidator.getStoreRules().validate( { pageNo, pageSize, - zoneId, - q, + status, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getZonesFromApplicationIdView \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getStoreRules \n ${warrning}`, }); } const query_params = {}; query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; - query_params["zone_id"] = zoneId; - query_params["q"] = q; + query_params["status"] = status; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/zones`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/rules`, query_params, undefined, requestHeaders, @@ -570,7 +737,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.GetZoneFromApplicationIdViewResponse().validate( + } = ServiceabilityPlatformModel.GetStoreRulesApiResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -581,7 +748,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getZonesFromApplicationIdView \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getStoreRules \n ${res_error}`, }); } } @@ -590,25 +757,107 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationServiceabilityParam} arg + * @param {ServiceabilityPlatformApplicationValidator.InsertApplicationConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} - + * Success response + * @name insertApplicationConfig + * @summary: Insert Application Configuration + * @description: Insert Application Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/insertApplicationConfig/). + */ + async insertApplicationConfig( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformApplicationValidator.insertApplicationConfig().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.insertApplicationConfig().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > insertApplicationConfig \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}/store/configuration`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.StoreRuleConfigData().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 > insertApplicationConfig \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformApplicationValidator.PatchApplicationServiceabilitySelfShipmentParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} * - Success response * - * @name updateApplicationServiceability - * @summary: Zone configuration of application. - * @description: This API updates serviceability config of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateApplicationServiceability/). + * @name patchApplicationServiceabilitySelfShipment + * @summary: Self-ship configuration of application. + * @description: This API updates Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/patchApplicationServiceabilitySelfShipment/). */ - async updateApplicationServiceability( + async patchApplicationServiceabilitySelfShipment( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.updateApplicationServiceability().validate( + } = ServiceabilityPlatformApplicationValidator.patchApplicationServiceabilitySelfShipment().validate( { body, }, @@ -621,7 +870,7 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.updateApplicationServiceability().validate( + } = ServiceabilityPlatformApplicationValidator.patchApplicationServiceabilitySelfShipment().validate( { body, }, @@ -630,7 +879,7 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > updateApplicationServiceability \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > patchApplicationServiceabilitySelfShipment \n ${warrning}`, }); } @@ -638,8 +887,8 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/serviceability`, + "patch", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/selfship`, query_params, body, requestHeaders, @@ -653,7 +902,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ApplicationServiceabilityConfigResponse().validate( + } = ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -664,7 +913,255 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > updateApplicationServiceability \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > patchApplicationServiceabilitySelfShipment \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformApplicationValidator.UpdateApplicationConfigurationParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name updateApplicationConfiguration + * @summary: Apply configuration to an application + * @description: Apply configuration to application to set DP rules and Zone configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateApplicationConfiguration/). + */ + async updateApplicationConfiguration( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformApplicationValidator.updateApplicationConfiguration().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.updateApplicationConfiguration().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > updateApplicationConfiguration \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.ApplicationConfig().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 > updateApplicationConfiguration \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformApplicationValidator.UpdateCourierPartnerRulePriorityParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name updateCourierPartnerRulePriority + * @summary: Updates Courier Partner Rules Priority for a sales channel + * @description: Updates Courier Partner Rules Priority for a sales channel - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierPartnerRulePriority/). + */ + async updateCourierPartnerRulePriority( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformApplicationValidator.updateCourierPartnerRulePriority().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.updateCourierPartnerRulePriority().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerRulePriority \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules/priority`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.RulePriorityResponse().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 > updateCourierPartnerRulePriority \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformApplicationValidator.UpdateCourierRuleParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name updateCourierRule + * @summary: Updating of Courier Rule. + * @description: This API updates and returns Courier Rule. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCourierRule/). + */ + async updateCourierRule( + { ruleId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformApplicationValidator.updateCourierRule().validate( + { + ruleId, + 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.updateCourierRule().validate( + { + ruleId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > updateCourierRule \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier-partner/rules/${ruleId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.CourierPartnerRule().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 > updateCourierRule \n ${res_error}`, }); } } @@ -1004,26 +1501,27 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.UpdateSelfShipParam} arg + * @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 updateSelfShip - * @summary: Self-ship configuration of application. - * @description: This API updates Self-ship configuration of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateSelfShip/). + * @name updateStoreRules + * @summary: Update Store Rule + * @description: Update Store Rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateStoreRules/). */ - async updateSelfShip( - { body, requestHeaders } = { requestHeaders: {} }, + async updateStoreRules( + { ruleUid, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.updateSelfShip().validate( + } = ServiceabilityPlatformApplicationValidator.updateStoreRules().validate( { + ruleUid, body, }, { abortEarly: false, allowUnknown: true } @@ -1035,8 +1533,9 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.updateSelfShip().validate( + } = ServiceabilityPlatformApplicationValidator.updateStoreRules().validate( { + ruleUid, body, }, { abortEarly: false, allowUnknown: false } @@ -1044,7 +1543,7 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > updateSelfShip \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > updateStoreRules \n ${warrning}`, }); } @@ -1052,8 +1551,8 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, - "patch", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/selfship`, + "put", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/rules/${ruleUid}`, query_params, body, requestHeaders, @@ -1067,7 +1566,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ApplicationSelfShipConfigResponse().validate( + } = ServiceabilityPlatformModel.StoreRuleUpdateResponseSchema().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1078,7 +1577,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > updateSelfShip \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > updateStoreRules \n ${res_error}`, }); } } @@ -1087,25 +1586,24 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformApplicationValidator.UpsertDpApplicationRulesParam} arg + * @param {ServiceabilityPlatformApplicationValidator.UpdateStoreRulesConfigParam} arg * - Arg object * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name upsertDpApplicationRules - * @summary: Upsert of DpApplicationRules in database. - * @description: This API returns response of upsert of DpApplicationRules in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpApplicationRules/). + * @returns {Promise} - + * Success response + * @name updateStoreRulesConfig + * @summary: Update Store Rule Configuration + * @description: Update Store Rule Configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateStoreRulesConfig/). */ - async upsertDpApplicationRules( + async updateStoreRulesConfig( { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformApplicationValidator.upsertDpApplicationRules().validate( + } = ServiceabilityPlatformApplicationValidator.updateStoreRulesConfig().validate( { body, }, @@ -1118,7 +1616,7 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformApplicationValidator.upsertDpApplicationRules().validate( + } = ServiceabilityPlatformApplicationValidator.updateStoreRulesConfig().validate( { body, }, @@ -1127,7 +1625,7 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > upsertDpApplicationRules \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > updateStoreRulesConfig \n ${warrning}`, }); } @@ -1136,7 +1634,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/courier/priority`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store/configuration`, query_params, body, requestHeaders, @@ -1150,7 +1648,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.DPApplicationRuleResponse().validate( + } = ServiceabilityPlatformModel.StoreRuleConfigData().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1161,7 +1659,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > upsertDpApplicationRules \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > updateStoreRulesConfig \n ${res_error}`, }); } } diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts index d19dbfd1c..927653ef2 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts @@ -1,30 +1,56 @@ export = ServiceabilityPlatformApplicationValidator; /** - * @typedef AddAppDpParam - * @property {ServiceabilityPlatformModel.ApplicationCompanyDpViewRequest} body + * @typedef CreateCourierPartnerRuleParam + * @property {ServiceabilityPlatformModel.CourierPartnerRule} body */ /** - * @typedef DeleteAppDpParam - * @property {number} courierPartnerId - A `courier_partner_id` is a unique - * identifier of a particular delivery partner. + * @typedef CreateStoreRulesParam + * @property {ServiceabilityPlatformModel.CreateStoreRuleRequestSchema} body */ -/** @typedef GetApplicationServiceabilityParam */ -/** @typedef GetDpApplicationRulesParam */ -/** @typedef GetSelfShipParam */ +/** @typedef GetApplicationConfigParam */ +/** @typedef GetApplicationConfigurationParam */ +/** @typedef GetApplicationServiceabilitySelfShipmentParam */ /** - * @typedef GetZoneFromPincodeViewParam - * @property {ServiceabilityPlatformModel.GetZoneFromPincodeViewRequest} body + * @typedef GetCourierPartnerRuleParam + * @property {string} ruleId - A `rule_id` is a unique identifier for a rule. */ /** - * @typedef GetZonesFromApplicationIdViewParam + * @typedef GetCourierPartnerRulesParam * @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[]} [zoneId] - List of zones to query for - * @property {string} [q] - Search with name as a free text + * @property {string} [status] - Filter rules based on rule status */ /** - * @typedef UpdateApplicationServiceabilityParam - * @property {ServiceabilityPlatformModel.ServiceabilityPayloadSchema} body + * @typedef GetStoreRuleParam + * @property {string} ruleUid - A `rule_uid` is a unique identifier for a + * particular rule object. + */ +/** + * @typedef GetStoreRulesParam + * @property {number} [pageNo] + * @property {number} [pageSize] + * @property {string} [status] + */ +/** + * @typedef InsertApplicationConfigParam + * @property {ServiceabilityPlatformModel.StoreRuleConfigData} body + */ +/** + * @typedef PatchApplicationServiceabilitySelfShipmentParam + * @property {ServiceabilityPlatformModel.SelfShipResponse} body + */ +/** + * @typedef UpdateApplicationConfigurationParam + * @property {ServiceabilityPlatformModel.ApplicationConfig} body + */ +/** + * @typedef UpdateCourierPartnerRulePriorityParam + * @property {ServiceabilityPlatformModel.RulePriorityRequest} body + */ +/** + * @typedef UpdateCourierRuleParam + * @property {string} ruleId - A `rule_id` is a unique identifier for a particular Dp. + * @property {ServiceabilityPlatformModel.CourierPartnerRule} body */ /** * @typedef UpdatePincodeAuditHistoryParam @@ -43,30 +69,44 @@ export = ServiceabilityPlatformApplicationValidator; * @property {ServiceabilityPlatformModel.PincodeMopData} body */ /** - * @typedef UpdateSelfShipParam - * @property {ServiceabilityPlatformModel.SelfShipResponse} body + * @typedef UpdateStoreRulesParam + * @property {string} ruleUid - A `rule_uid` is a unique identifier for a + * particular rule object. + * @property {ServiceabilityPlatformModel.CreateStoreRuleRequestSchema} body */ /** - * @typedef UpsertDpApplicationRulesParam - * @property {ServiceabilityPlatformModel.DPApplicationRuleRequest} body + * @typedef UpdateStoreRulesConfigParam + * @property {ServiceabilityPlatformModel.StoreRuleConfigData} body */ declare class ServiceabilityPlatformApplicationValidator { - /** @returns {AddAppDpParam} */ - static addAppDp(): AddAppDpParam; - /** @returns {DeleteAppDpParam} */ - static deleteAppDp(): DeleteAppDpParam; - /** @returns {GetApplicationServiceabilityParam} */ - static getApplicationServiceability(): any; - /** @returns {GetDpApplicationRulesParam} */ - static getDpApplicationRules(): any; - /** @returns {GetSelfShipParam} */ - static getSelfShip(): any; - /** @returns {GetZoneFromPincodeViewParam} */ - static getZoneFromPincodeView(): GetZoneFromPincodeViewParam; - /** @returns {GetZonesFromApplicationIdViewParam} */ - static getZonesFromApplicationIdView(): GetZonesFromApplicationIdViewParam; - /** @returns {UpdateApplicationServiceabilityParam} */ - static updateApplicationServiceability(): UpdateApplicationServiceabilityParam; + /** @returns {CreateCourierPartnerRuleParam} */ + static createCourierPartnerRule(): CreateCourierPartnerRuleParam; + /** @returns {CreateStoreRulesParam} */ + static createStoreRules(): CreateStoreRulesParam; + /** @returns {GetApplicationConfigParam} */ + static getApplicationConfig(): any; + /** @returns {GetApplicationConfigurationParam} */ + static getApplicationConfiguration(): any; + /** @returns {GetApplicationServiceabilitySelfShipmentParam} */ + static getApplicationServiceabilitySelfShipment(): any; + /** @returns {GetCourierPartnerRuleParam} */ + static getCourierPartnerRule(): GetCourierPartnerRuleParam; + /** @returns {GetCourierPartnerRulesParam} */ + static getCourierPartnerRules(): GetCourierPartnerRulesParam; + /** @returns {GetStoreRuleParam} */ + static getStoreRule(): GetStoreRuleParam; + /** @returns {GetStoreRulesParam} */ + static getStoreRules(): GetStoreRulesParam; + /** @returns {InsertApplicationConfigParam} */ + static insertApplicationConfig(): InsertApplicationConfigParam; + /** @returns {PatchApplicationServiceabilitySelfShipmentParam} */ + static patchApplicationServiceabilitySelfShipment(): PatchApplicationServiceabilitySelfShipmentParam; + /** @returns {UpdateApplicationConfigurationParam} */ + static updateApplicationConfiguration(): UpdateApplicationConfigurationParam; + /** @returns {UpdateCourierPartnerRulePriorityParam} */ + static updateCourierPartnerRulePriority(): UpdateCourierPartnerRulePriorityParam; + /** @returns {UpdateCourierRuleParam} */ + static updateCourierRule(): UpdateCourierRuleParam; /** @returns {UpdatePincodeAuditHistoryParam} */ static updatePincodeAuditHistory(): UpdatePincodeAuditHistoryParam; /** @returns {UpdatePincodeBulkViewParam} */ @@ -75,28 +115,27 @@ declare class ServiceabilityPlatformApplicationValidator { static updatePincodeCoDListing(): UpdatePincodeCoDListingParam; /** @returns {UpdatePincodeMopViewParam} */ static updatePincodeMopView(): UpdatePincodeMopViewParam; - /** @returns {UpdateSelfShipParam} */ - static updateSelfShip(): UpdateSelfShipParam; - /** @returns {UpsertDpApplicationRulesParam} */ - static upsertDpApplicationRules(): UpsertDpApplicationRulesParam; + /** @returns {UpdateStoreRulesParam} */ + static updateStoreRules(): UpdateStoreRulesParam; + /** @returns {UpdateStoreRulesConfigParam} */ + static updateStoreRulesConfig(): UpdateStoreRulesConfigParam; } declare namespace ServiceabilityPlatformApplicationValidator { - export { AddAppDpParam, DeleteAppDpParam, GetApplicationServiceabilityParam, GetDpApplicationRulesParam, GetSelfShipParam, GetZoneFromPincodeViewParam, GetZonesFromApplicationIdViewParam, UpdateApplicationServiceabilityParam, UpdatePincodeAuditHistoryParam, UpdatePincodeBulkViewParam, UpdatePincodeCoDListingParam, UpdatePincodeMopViewParam, UpdateSelfShipParam, UpsertDpApplicationRulesParam }; + export { CreateCourierPartnerRuleParam, CreateStoreRulesParam, GetApplicationConfigParam, GetApplicationConfigurationParam, GetApplicationServiceabilitySelfShipmentParam, GetCourierPartnerRuleParam, GetCourierPartnerRulesParam, GetStoreRuleParam, GetStoreRulesParam, InsertApplicationConfigParam, PatchApplicationServiceabilitySelfShipmentParam, UpdateApplicationConfigurationParam, UpdateCourierPartnerRulePriorityParam, UpdateCourierRuleParam, UpdatePincodeAuditHistoryParam, UpdatePincodeBulkViewParam, UpdatePincodeCoDListingParam, UpdatePincodeMopViewParam, UpdateStoreRulesParam, UpdateStoreRulesConfigParam }; } -type AddAppDpParam = { - body: ServiceabilityPlatformModel.ApplicationCompanyDpViewRequest; +type CreateCourierPartnerRuleParam = { + body: ServiceabilityPlatformModel.CourierPartnerRule; +}; +type CreateStoreRulesParam = { + body: ServiceabilityPlatformModel.CreateStoreRuleRequestSchema; }; -type DeleteAppDpParam = { +type GetCourierPartnerRuleParam = { /** - * - A `courier_partner_id` is a unique - * identifier of a particular delivery partner. + * - A `rule_id` is a unique identifier for a rule. */ - courierPartnerId: number; + ruleId: string; }; -type GetZoneFromPincodeViewParam = { - body: ServiceabilityPlatformModel.GetZoneFromPincodeViewRequest; -}; -type GetZonesFromApplicationIdViewParam = { +type GetCourierPartnerRulesParam = { /** * - Index of the item to start returning with */ @@ -106,16 +145,40 @@ type GetZonesFromApplicationIdViewParam = { */ pageSize?: number; /** - * - List of zones to query for + * - Filter rules based on rule status */ - zoneId?: string[]; + status?: string; +}; +type GetStoreRuleParam = { /** - * - Search with name as a free text + * - A `rule_uid` is a unique identifier for a + * particular rule object. */ - q?: string; + ruleUid: string; +}; +type GetStoreRulesParam = { + pageNo?: number; + pageSize?: number; + status?: string; +}; +type InsertApplicationConfigParam = { + body: ServiceabilityPlatformModel.StoreRuleConfigData; +}; +type PatchApplicationServiceabilitySelfShipmentParam = { + body: ServiceabilityPlatformModel.SelfShipResponse; }; -type UpdateApplicationServiceabilityParam = { - body: ServiceabilityPlatformModel.ServiceabilityPayloadSchema; +type UpdateApplicationConfigurationParam = { + body: ServiceabilityPlatformModel.ApplicationConfig; +}; +type UpdateCourierPartnerRulePriorityParam = { + body: ServiceabilityPlatformModel.RulePriorityRequest; +}; +type UpdateCourierRuleParam = { + /** + * - A `rule_id` is a unique identifier for a particular Dp. + */ + ruleId: string; + body: ServiceabilityPlatformModel.CourierPartnerRule; }; type UpdatePincodeAuditHistoryParam = { body: ServiceabilityPlatformModel.PincodeMopUpdateAuditHistoryRequest; @@ -129,13 +192,18 @@ type UpdatePincodeCoDListingParam = { type UpdatePincodeMopViewParam = { body: ServiceabilityPlatformModel.PincodeMopData; }; -type UpdateSelfShipParam = { - body: ServiceabilityPlatformModel.SelfShipResponse; +type UpdateStoreRulesParam = { + /** + * - A `rule_uid` is a unique identifier for a + * particular rule object. + */ + ruleUid: string; + body: ServiceabilityPlatformModel.CreateStoreRuleRequestSchema; }; -type UpsertDpApplicationRulesParam = { - body: ServiceabilityPlatformModel.DPApplicationRuleRequest; +type UpdateStoreRulesConfigParam = { + body: ServiceabilityPlatformModel.StoreRuleConfigData; }; -type GetApplicationServiceabilityParam = any; -type GetDpApplicationRulesParam = any; -type GetSelfShipParam = any; +type GetApplicationConfigParam = any; +type GetApplicationConfigurationParam = any; +type GetApplicationServiceabilitySelfShipmentParam = any; import ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js index d6fb8aa6b..9c9e6440d 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js @@ -3,38 +3,70 @@ const Joi = require("joi"); const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); /** - * @typedef AddAppDpParam - * @property {ServiceabilityPlatformModel.ApplicationCompanyDpViewRequest} body + * @typedef CreateCourierPartnerRuleParam + * @property {ServiceabilityPlatformModel.CourierPartnerRule} body */ /** - * @typedef DeleteAppDpParam - * @property {number} courierPartnerId - A `courier_partner_id` is a unique - * identifier of a particular delivery partner. + * @typedef CreateStoreRulesParam + * @property {ServiceabilityPlatformModel.CreateStoreRuleRequestSchema} body */ -/** @typedef GetApplicationServiceabilityParam */ +/** @typedef GetApplicationConfigParam */ -/** @typedef GetDpApplicationRulesParam */ +/** @typedef GetApplicationConfigurationParam */ -/** @typedef GetSelfShipParam */ +/** @typedef GetApplicationServiceabilitySelfShipmentParam */ /** - * @typedef GetZoneFromPincodeViewParam - * @property {ServiceabilityPlatformModel.GetZoneFromPincodeViewRequest} body + * @typedef GetCourierPartnerRuleParam + * @property {string} ruleId - A `rule_id` is a unique identifier for a rule. */ /** - * @typedef GetZonesFromApplicationIdViewParam + * @typedef GetCourierPartnerRulesParam * @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[]} [zoneId] - List of zones to query for - * @property {string} [q] - Search with name as a free text + * @property {string} [status] - Filter rules based on rule status */ /** - * @typedef UpdateApplicationServiceabilityParam - * @property {ServiceabilityPlatformModel.ServiceabilityPayloadSchema} body + * @typedef GetStoreRuleParam + * @property {string} ruleUid - A `rule_uid` is a unique identifier for a + * particular rule object. + */ + +/** + * @typedef GetStoreRulesParam + * @property {number} [pageNo] + * @property {number} [pageSize] + * @property {string} [status] + */ + +/** + * @typedef InsertApplicationConfigParam + * @property {ServiceabilityPlatformModel.StoreRuleConfigData} body + */ + +/** + * @typedef PatchApplicationServiceabilitySelfShipmentParam + * @property {ServiceabilityPlatformModel.SelfShipResponse} body + */ + +/** + * @typedef UpdateApplicationConfigurationParam + * @property {ServiceabilityPlatformModel.ApplicationConfig} body + */ + +/** + * @typedef UpdateCourierPartnerRulePriorityParam + * @property {ServiceabilityPlatformModel.RulePriorityRequest} body + */ + +/** + * @typedef UpdateCourierRuleParam + * @property {string} ruleId - A `rule_id` is a unique identifier for a particular Dp. + * @property {ServiceabilityPlatformModel.CourierPartnerRule} body */ /** @@ -58,66 +90,112 @@ const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); */ /** - * @typedef UpdateSelfShipParam - * @property {ServiceabilityPlatformModel.SelfShipResponse} body + * @typedef UpdateStoreRulesParam + * @property {string} ruleUid - A `rule_uid` is a unique identifier for a + * particular rule object. + * @property {ServiceabilityPlatformModel.CreateStoreRuleRequestSchema} body */ /** - * @typedef UpsertDpApplicationRulesParam - * @property {ServiceabilityPlatformModel.DPApplicationRuleRequest} body + * @typedef UpdateStoreRulesConfigParam + * @property {ServiceabilityPlatformModel.StoreRuleConfigData} body */ class ServiceabilityPlatformApplicationValidator { - /** @returns {AddAppDpParam} */ - static addAppDp() { + /** @returns {CreateCourierPartnerRuleParam} */ + static createCourierPartnerRule() { return Joi.object({ - body: ServiceabilityPlatformModel.ApplicationCompanyDpViewRequest().required(), + body: ServiceabilityPlatformModel.CourierPartnerRule().required(), }).required(); } - /** @returns {DeleteAppDpParam} */ - static deleteAppDp() { + /** @returns {CreateStoreRulesParam} */ + static createStoreRules() { return Joi.object({ - courierPartnerId: Joi.number().required(), + body: ServiceabilityPlatformModel.CreateStoreRuleRequestSchema().required(), }).required(); } - /** @returns {GetApplicationServiceabilityParam} */ - static getApplicationServiceability() { + /** @returns {GetApplicationConfigParam} */ + static getApplicationConfig() { return Joi.object({}).required(); } - /** @returns {GetDpApplicationRulesParam} */ - static getDpApplicationRules() { + /** @returns {GetApplicationConfigurationParam} */ + static getApplicationConfiguration() { return Joi.object({}).required(); } - /** @returns {GetSelfShipParam} */ - static getSelfShip() { + /** @returns {GetApplicationServiceabilitySelfShipmentParam} */ + static getApplicationServiceabilitySelfShipment() { return Joi.object({}).required(); } - /** @returns {GetZoneFromPincodeViewParam} */ - static getZoneFromPincodeView() { + /** @returns {GetCourierPartnerRuleParam} */ + static getCourierPartnerRule() { + return Joi.object({ + ruleId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetCourierPartnerRulesParam} */ + static getCourierPartnerRules() { return Joi.object({ - body: ServiceabilityPlatformModel.GetZoneFromPincodeViewRequest().required(), + pageNo: Joi.number(), + pageSize: Joi.number(), + status: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetStoreRuleParam} */ + static getStoreRule() { + return Joi.object({ + ruleUid: Joi.string().allow("").required(), }).required(); } - /** @returns {GetZonesFromApplicationIdViewParam} */ - static getZonesFromApplicationIdView() { + /** @returns {GetStoreRulesParam} */ + static getStoreRules() { return Joi.object({ pageNo: Joi.number(), pageSize: Joi.number(), - zoneId: Joi.array().items(Joi.string().allow("")), - q: Joi.string().allow(""), + status: Joi.string().allow(""), + }).required(); + } + + /** @returns {InsertApplicationConfigParam} */ + static insertApplicationConfig() { + return Joi.object({ + body: ServiceabilityPlatformModel.StoreRuleConfigData().required(), + }).required(); + } + + /** @returns {PatchApplicationServiceabilitySelfShipmentParam} */ + static patchApplicationServiceabilitySelfShipment() { + return Joi.object({ + body: ServiceabilityPlatformModel.SelfShipResponse().required(), + }).required(); + } + + /** @returns {UpdateApplicationConfigurationParam} */ + static updateApplicationConfiguration() { + return Joi.object({ + body: ServiceabilityPlatformModel.ApplicationConfig().required(), + }).required(); + } + + /** @returns {UpdateCourierPartnerRulePriorityParam} */ + static updateCourierPartnerRulePriority() { + return Joi.object({ + body: ServiceabilityPlatformModel.RulePriorityRequest().required(), }).required(); } - /** @returns {UpdateApplicationServiceabilityParam} */ - static updateApplicationServiceability() { + /** @returns {UpdateCourierRuleParam} */ + static updateCourierRule() { return Joi.object({ - body: ServiceabilityPlatformModel.ServiceabilityPayloadSchema().required(), + ruleId: Joi.string().allow("").required(), + body: ServiceabilityPlatformModel.CourierPartnerRule().required(), }).required(); } @@ -149,17 +227,18 @@ class ServiceabilityPlatformApplicationValidator { }).required(); } - /** @returns {UpdateSelfShipParam} */ - static updateSelfShip() { + /** @returns {UpdateStoreRulesParam} */ + static updateStoreRules() { return Joi.object({ - body: ServiceabilityPlatformModel.SelfShipResponse().required(), + ruleUid: Joi.string().allow("").required(), + body: ServiceabilityPlatformModel.CreateStoreRuleRequestSchema().required(), }).required(); } - /** @returns {UpsertDpApplicationRulesParam} */ - static upsertDpApplicationRules() { + /** @returns {UpdateStoreRulesConfigParam} */ + static updateStoreRulesConfig() { return Joi.object({ - body: ServiceabilityPlatformModel.DPApplicationRuleRequest().required(), + body: ServiceabilityPlatformModel.StoreRuleConfigData().required(), }).required(); } } diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts index 0ff3daeeb..744c8c6b5 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts @@ -2,14 +2,77 @@ export = Serviceability; declare class Serviceability { constructor(config: any); config: any; + /** + * @param {ServiceabilityPlatformValidator.BulkServiceabilityParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/platform/serviceability/bulkServiceability/). + */ + 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} + * - 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/platform/serviceability/bulkTat/). + */ + bulkTat({ extensionId, schemeId, body, requestHeaders }?: ServiceabilityPlatformValidator.BulkTatParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformValidator.CreateCourierPartnerAccountParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createCourierPartnerAccount + * @summary: Creation of Courier Account + * @description: This API Creates a new Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerAccount/). + */ + createCourierPartnerAccount({ body, requestHeaders }?: ServiceabilityPlatformValidator.CreateCourierPartnerAccountParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformValidator.CreatePackageMaterialParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createPackageMaterial + * @summary: Upsert of PackageMaterial in database. + * @description: This API returns response of upsert of PackageMaterial in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterial/). + */ + 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} - + * Success response + * @name createPackageMaterialRule + * @summary: Upsert of Package Material Rule in database. + * @description: This API returns response of upsert of Package Material Rule in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterialRule/). + */ + 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 * @name createZone - * @summary: Creation of a new zone - * @description: This API allows you to create a new zone with the specified information. A zone enables serviceability based on given pincodes or regions. By creating a zone and including specific pincodes or regions, you can ensure that the stores associated with the zone are serviceable for those added pincodes or regions. This functionality is particularly useful when you need to ensure serviceability for multiple pincodes or regions by grouping them into a single zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createZone/). + * @summary: Creates a new Zone + * @description: Creates a new zone with the specified mapping. A zone enables serviceability based on given regions. By creating a zone and including specific regions, you can ensure that the stores associated with the zone are serviceable for those added regions. This functionality is particularly useful when you need to ensure serviceability for multiple regions by grouping them into a single zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createZone/). */ createZone({ body, requestHeaders }?: ServiceabilityPlatformValidator.CreateZoneParam, { responseHeaders }?: object): Promise; /** @@ -24,85 +87,68 @@ declare class Serviceability { */ getAllStores({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.GetCompanyStoreViewParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response + * @param {ServiceabilityPlatformValidator.GetBulkServiceabilityParam} arg + * - Arg object * - * @name getCompanyStoreView - * @summary: Company Store View of application. - * @description: This API returns Company Store View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyStoreView/). - */ - getCompanyStoreView({ pageNumber, pageSize, requestHeaders }?: ServiceabilityPlatformValidator.GetCompanyStoreViewParam, { responseHeaders }?: object): Promise; - /** - * @param {ServiceabilityPlatformValidator.GetDpAccountParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getDpAccount - * @summary: Getting DpAccount 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/platform/serviceability/getDpAccount/). + * @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/platform/serviceability/getBulkServiceability/). */ - getDpAccount({ pageNumber, pageSize, stage, paymentMode, transportType, requestHeaders, }?: ServiceabilityPlatformValidator.GetDpAccountParam, { responseHeaders }?: object): Promise; + getBulkServiceability({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: ServiceabilityPlatformValidator.GetBulkServiceabilityParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.GetDpCompanyRulesParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetBulkTatParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name getDpCompanyRules - * @summary: Get All DpCompanyRules applied to company from database. - * @description: This API returns response of all DpCompanyRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpCompanyRules/). + * @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/platform/serviceability/getBulkTat/). */ - getDpCompanyRules({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getBulkTat({ extensionId, schemeId, pageNo, pageSize, batchId, action, status, country, region, startDate, endDate, requestHeaders, }?: ServiceabilityPlatformValidator.GetBulkTatParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.GetDpRuleInsertParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetCompanyConfigurationParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getDpRuleInsert - * @summary: Fetching of DpRules from database. - * @description: This API returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpRuleInsert/). + * @returns {Promise} - Success response + * @name getCompanyConfiguration + * @summary: Get All Courier Rules applied to company. + * @description: This API returns all Courier Rules applied for company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyConfiguration/). */ - getDpRuleInsert({ pageNumber, pageSize, requestHeaders }?: ServiceabilityPlatformValidator.GetDpRuleInsertParam, { responseHeaders }?: object): Promise; + getCompanyConfiguration({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.GetDpRulesParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name getDpRules - * @summary: Fetching of DpRules from database. - * @description: This API returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpRules/). + * @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/platform/serviceability/getCourierPartnerAccount/). */ - getDpRules({ ruleUid, requestHeaders }?: ServiceabilityPlatformValidator.GetDpRulesParam, { responseHeaders }?: object): Promise; + getCourierPartnerAccount({ accountId, requestHeaders }?: ServiceabilityPlatformValidator.GetCourierPartnerAccountParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.GetEntityRegionViewParam} arg - Arg object + * @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 getEntityRegionView - * @summary: Get country and state list - * @description: This API returns response for Entity Region View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getEntityRegionView/). - */ - getEntityRegionView({ body, requestHeaders }?: ServiceabilityPlatformValidator.GetEntityRegionViewParam, { responseHeaders }?: object): Promise; - /** - * @param {ServiceabilityPlatformValidator.GetListViewParam} arg - Arg object - * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` - * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getListView - * @summary: Zone List of application. - * @description: This API returns Zone List View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getListView/). + * @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/platform/serviceability/getCourierPartnerAccounts/). */ - getListView({ pageNumber, pageSize, name, isActive, channelIds, q, requestHeaders }?: ServiceabilityPlatformValidator.GetListViewParam, { 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 `{}` @@ -115,97 +161,163 @@ declare class Serviceability { */ getOptimalLocations({ body, requestHeaders }?: ServiceabilityPlatformValidator.GetOptimalLocationsParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.GetStoreParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetPackageMaterialListParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name getStore - * @summary: GET stores data - * @description: This API returns stores data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStore/). + * @name getPackageMaterialList + * @summary: Fetching of PackageMaterials from database. + * @description: This API returns response of PackageMaterials from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialList/). + */ + getPackageMaterialList({ pageNo, pageSize, q, size, packageType, requestHeaders }?: ServiceabilityPlatformValidator.GetPackageMaterialListParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformValidator.GetPackageMaterialRuleParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getPackageMaterialRule + * @summary: Fetching of Package Material from database. + * @description: This API returns response of Package Material from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRule/). + */ + getPackageMaterialRule({ ruleId, requestHeaders }?: ServiceabilityPlatformValidator.GetPackageMaterialRuleParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformValidator.GetPackageMaterialRulesParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name getPackageMaterialRules + * @summary: Fetching of Package Material Rules from database. + * @description: This API returns response of Package Materials Rules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRules/). */ - getStore({ storeUid, requestHeaders }?: ServiceabilityPlatformValidator.GetStoreParam, { responseHeaders }?: object): Promise; + getPackageMaterialRules({ pageNo, pageSize, isActive, requestHeaders }?: ServiceabilityPlatformValidator.GetPackageMaterialRulesParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.GetZoneDataViewParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name getZoneDataView - * @summary: Zone Data View of application. - * @description: This API returns Zone Data View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneDataView/). + * @name getPackageMaterials + * @summary: Fetching of Package Material from database. + * @description: This API returns response of Package Material from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/). + */ + getPackageMaterials({ packageMaterialId, requestHeaders }?: ServiceabilityPlatformValidator.GetPackageMaterialsParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformValidator.GetServiceabilityParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getServiceability + * @summary: Get Serviceability of a region + * @description: Get Serviceability of a region - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getServiceability/). */ - getZoneDataView({ zoneId, requestHeaders }?: ServiceabilityPlatformValidator.GetZoneDataViewParam, { responseHeaders }?: object): Promise; + getServiceability({ extensionId, schemeId, regionId, requestHeaders }?: ServiceabilityPlatformValidator.GetServiceabilityParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.GetZoneListViewParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetZoneByIdParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name getZoneById + * @summary: Get details of the Zone + * @description: Returns the region, application, store mapping and other details in the Zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneById/). + */ + getZoneById({ zoneId, requestHeaders }?: ServiceabilityPlatformValidator.GetZoneByIdParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformValidator.GetZonesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response - * @name getZoneListView - * @summary: Zone List of application. - * @description: This API returns Zone List View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneListView/). + * @name getZones + * @summary: Shows zones defined at the company level + * @description: Return the list of zones that are defined at the company level. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZones/). */ - getZoneListView({ pageNumber, pageNo, pageSize, name, isActive, channelIds, q, zoneId, requestHeaders, }?: ServiceabilityPlatformValidator.GetZoneListViewParam, { responseHeaders }?: object): Promise; + getZones({ pageNo, pageSize, isActive, channelId, q, country, state, city, pincode, sector, requestHeaders, }?: ServiceabilityPlatformValidator.GetZonesParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.UpdateDpRuleParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.UpdateCompanyConfigurationParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response + * @returns {Promise} - Success response + * @name updateCompanyConfiguration + * @summary: Apply Courier Rule to company. + * @description: Apply Courier Rule to company with rules priority - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCompanyConfiguration/). + */ + updateCompanyConfiguration({ body, requestHeaders }?: ServiceabilityPlatformValidator.UpdateCompanyConfigurationParam, { responseHeaders }?: object): Promise; + /** + * @param {ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam} arg + * - Arg object * - * @name updateDpRule - * @summary: Updating of DpRules from database. - * @description: This API updates and returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateDpRule/). + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/platform/serviceability/updateCourierPartnerAccount/). */ - updateDpRule({ ruleUid, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdateDpRuleParam, { responseHeaders }?: object): Promise; + updateCourierPartnerAccount({ accountId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.UpdateZoneControllerViewParam} arg + * @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 updateZoneControllerView - * @summary: Updation of zone collections in database. - * @description: This API returns response of updation of zone in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateZoneControllerView/). + * @name updatePackageMaterialRule + * @summary: Fetching of Package Material Rules into database. + * @description: This API updates Package Material Rules into mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterialRule/). */ - updateZoneControllerView({ zoneId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdateZoneControllerViewParam, { responseHeaders }?: object): Promise; + updatePackageMaterialRule({ ruleId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdatePackageMaterialRuleParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.UpsertDpAccountParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.UpdatePackageMaterialsParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name upsertDpAccount - * @summary: Upsertion of DpAccount in database. - * @description: This API returns response of upsertion of DpAccount in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpAccount/). + * @name updatePackageMaterials + * @summary: Update Package Material to database. + * @description: This API updates Package Materials from into mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/). */ - upsertDpAccount({ body, requestHeaders }?: ServiceabilityPlatformValidator.UpsertDpAccountParam, { responseHeaders }?: object): Promise; + updatePackageMaterials({ packageMaterialId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdatePackageMaterialsParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.UpsertDpCompanyRulesParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.UpdateServiceabilityParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name upsertDpCompanyRules - * @summary: Upsert of DpCompanyRules in database. - * @description: This API returns response of upsert of DpCompanyRules in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpCompanyRules/). + * @name updateServiceability + * @summary: Serviceability Update for a region + * @description: Serviceability Update for a region - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateServiceability/). */ - upsertDpCompanyRules({ body, requestHeaders }?: ServiceabilityPlatformValidator.UpsertDpCompanyRulesParam, { responseHeaders }?: object): Promise; + updateServiceability({ extensionId, schemeId, regionId, body, requestHeaders }?: ServiceabilityPlatformValidator.UpdateServiceabilityParam, { responseHeaders }?: object): Promise; /** - * @param {ServiceabilityPlatformValidator.UpsertDpRulesParam} arg - Arg object + * @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 upsertDpRules - * @summary: Upsert of DpRules in database. - * @description: This API returns response of upsert of DpRules in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpRules/). + * @name updateZoneById + * @summary: Update details of a Zone + * @description: Updates the region, application, store mapping and other details in the Zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateZoneById/). */ - upsertDpRules({ body, requestHeaders }?: ServiceabilityPlatformValidator.UpsertDpRulesParam, { 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 cb35674d2..d6bd85c59 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformClient.js @@ -14,14 +14,438 @@ class Serviceability { this.config = config; } + /** + * @param {ServiceabilityPlatformValidator.BulkServiceabilityParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/platform/serviceability/bulkServiceability/). + */ + async bulkServiceability( + { extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformValidator.bulkServiceability().validate( + { + extensionId, + 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, + } = ServiceabilityPlatformValidator.bulkServiceability().validate( + { + extensionId, + schemeId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > bulkServiceability \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.BulkRegionResponseItemData().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 > bulkServiceability \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformValidator.BulkTatParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/platform/serviceability/bulkTat/). + */ + async bulkTat( + { extensionId, schemeId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ServiceabilityPlatformValidator.bulkTat().validate( + { + extensionId, + 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, + } = ServiceabilityPlatformValidator.bulkTat().validate( + { + extensionId, + schemeId, + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > bulkTat \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.BulkRegionResponseItemData().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 > bulkTat \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformValidator.CreateCourierPartnerAccountParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name createCourierPartnerAccount + * @summary: Creation of Courier Account + * @description: This API Creates a new Courier Account - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createCourierPartnerAccount/). + */ + async createCourierPartnerAccount( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformValidator.createCourierPartnerAccount().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, + } = ServiceabilityPlatformValidator.createCourierPartnerAccount().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > createCourierPartnerAccount \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.CourierAccount().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 > createCourierPartnerAccount \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformValidator.CreatePackageMaterialParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} + * - Success response + * + * @name createPackageMaterial + * @summary: Upsert of PackageMaterial in database. + * @description: This API returns response of upsert of PackageMaterial in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterial/). + */ + async createPackageMaterial( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformValidator.createPackageMaterial().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, + } = ServiceabilityPlatformValidator.createPackageMaterial().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterial \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.PackageMaterialResponse().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 > createPackageMaterial \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformValidator.CreatePackageMaterialRuleParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name createPackageMaterialRule + * @summary: Upsert of Package Material Rule in database. + * @description: This API returns response of upsert of Package Material Rule in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createPackageMaterialRule/). + */ + async createPackageMaterialRule( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformValidator.createPackageMaterialRule().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, + } = ServiceabilityPlatformValidator.createPackageMaterialRule().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > createPackageMaterialRule \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules`, + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.PackageRuleResponse().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 > createPackageMaterialRule \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {ServiceabilityPlatformValidator.CreateZoneParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name createZone - * @summary: Creation of a new zone - * @description: This API allows you to create a new zone with the specified information. A zone enables serviceability based on given pincodes or regions. By creating a zone and including specific pincodes or regions, you can ensure that the stores associated with the zone are serviceable for those added pincodes or regions. This functionality is particularly useful when you need to ensure serviceability for multiple pincodes or regions by grouping them into a single zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createZone/). + * @summary: Creates a new Zone + * @description: Creates a new zone with the specified mapping. A zone enables serviceability based on given regions. By creating a zone and including specific regions, you can ensure that the stores associated with the zone are serviceable for those added regions. This functionality is particularly useful when you need to ensure serviceability for multiple regions by grouping them into a single zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/createZone/). */ async createZone( { body, requestHeaders } = { requestHeaders: {} }, @@ -60,7 +484,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "post", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/zone`, + `/service/platform/logistics/v2.0/company/${this.config.companyId}/zones`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -97,17 +521,344 @@ class Serviceability { * @param {ServiceabilityPlatformValidator.GetAllStoresParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name getAllStores - * @summary: GET stores data - * @description: This API returns stores data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getAllStores/). + * @returns {Promise} - + * Success response + * @name getAllStores + * @summary: GET stores data + * @description: This API returns stores data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getAllStores/). + */ + async getAllStores( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ServiceabilityPlatformValidator.getAllStores().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ServiceabilityPlatformValidator.getAllStores().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > getAllStores \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/logistics/stores`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.GetStoresViewResponse().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 > getAllStores \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformValidator.GetBulkServiceabilityParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/platform/serviceability/getBulkServiceability/). + */ + async getBulkServiceability( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + startDate, + endDate, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ServiceabilityPlatformValidator.getBulkServiceability().validate( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + 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, + } = ServiceabilityPlatformValidator.getBulkServiceability().validate( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + startDate, + endDate, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > getBulkServiceability \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["batch_id"] = batchId; + query_params["action"] = action; + query_params["status"] = status; + query_params["country"] = country; + query_params["region"] = region; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/bulk`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.BulkRegionResponse().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 > getBulkServiceability \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformValidator.GetBulkTatParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/platform/serviceability/getBulkTat/). + */ + async getBulkTat( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + startDate, + endDate, + requestHeaders, + } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ServiceabilityPlatformValidator.getBulkTat().validate( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + 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, + } = ServiceabilityPlatformValidator.getBulkTat().validate( + { + extensionId, + schemeId, + pageNo, + pageSize, + batchId, + action, + status, + country, + region, + startDate, + endDate, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Serviceability > getBulkTat \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["batch_id"] = batchId; + query_params["action"] = action; + query_params["status"] = status; + query_params["country"] = country; + query_params["region"] = region; + query_params["start_date"] = startDate; + query_params["end_date"] = endDate; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/tat`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ServiceabilityPlatformModel.BulkRegionResponse().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 > getBulkTat \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {ServiceabilityPlatformValidator.GetCompanyConfigurationParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCompanyConfiguration + * @summary: Get All Courier Rules applied to company. + * @description: This API returns all Courier Rules applied for company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyConfiguration/). */ - async getAllStores( + async getCompanyConfiguration( { requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ServiceabilityPlatformValidator.getAllStores().validate( + const { + error, + } = ServiceabilityPlatformValidator.getCompanyConfiguration().validate( {}, { abortEarly: false, allowUnknown: true } ); @@ -118,14 +869,14 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getAllStores().validate( + } = ServiceabilityPlatformValidator.getCompanyConfiguration().validate( {}, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getAllStores \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getCompanyConfiguration \n ${warrning}`, }); } @@ -136,7 +887,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/logistics/stores`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/configuration`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -150,10 +901,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.GetStoresViewResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ServiceabilityPlatformModel.CompanyConfig().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -161,7 +912,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getAllStores \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getCompanyConfiguration \n ${res_error}`, }); } } @@ -170,26 +921,26 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetCompanyStoreViewParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetCourierPartnerAccountParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getCompanyStoreView - * @summary: Company Store View of application. - * @description: This API returns Company Store View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getCompanyStoreView/). + * @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/platform/serviceability/getCourierPartnerAccount/). */ - async getCompanyStoreView( - { pageNumber, pageSize, requestHeaders } = { requestHeaders: {} }, + async getCourierPartnerAccount( + { accountId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformValidator.getCompanyStoreView().validate( + } = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate( { - pageNumber, - pageSize, + accountId, }, { abortEarly: false, allowUnknown: true } ); @@ -200,30 +951,27 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getCompanyStoreView().validate( + } = ServiceabilityPlatformValidator.getCourierPartnerAccount().validate( { - pageNumber, - pageSize, + accountId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getCompanyStoreView \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccount \n ${warrning}`, }); } const query_params = {}; - query_params["page_number"] = pageNumber; - query_params["page_size"] = pageSize; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/all-stores`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -237,7 +985,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CompanyStoreView_Response().validate( + } = ServiceabilityPlatformModel.CourierAccountResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -248,7 +996,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getCompanyStoreView \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccount \n ${res_error}`, }); } } @@ -257,30 +1005,29 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetDpAccountParam} arg - Arg object + * @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 getDpAccount - * @summary: Getting DpAccount 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/platform/serviceability/getDpAccount/). + * @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/platform/serviceability/getCourierPartnerAccounts/). */ - async getDpAccount( - { - pageNumber, - pageSize, - stage, - paymentMode, - transportType, - requestHeaders, - } = { requestHeaders: {} }, + async getCourierPartnerAccounts( + { pageNo, pageSize, stage, paymentMode, transportType, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ServiceabilityPlatformValidator.getDpAccount().validate( + const { + error, + } = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate( { - pageNumber, + pageNo, pageSize, stage, paymentMode, @@ -295,9 +1042,9 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getDpAccount().validate( + } = ServiceabilityPlatformValidator.getCourierPartnerAccounts().validate( { - pageNumber, + pageNo, pageSize, stage, paymentMode, @@ -308,12 +1055,12 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getDpAccount \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getCourierPartnerAccounts \n ${warrning}`, }); } const query_params = {}; - query_params["page_number"] = pageNumber; + query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["stage"] = stage; query_params["payment_mode"] = paymentMode; @@ -324,7 +1071,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/account`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -338,7 +1085,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CompanyDpAccountListResponse().validate( + } = ServiceabilityPlatformModel.CompanyCourierPartnerAccountListResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -349,7 +1096,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getDpAccount \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getCourierPartnerAccounts \n ${res_error}`, }); } } @@ -358,23 +1105,25 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetDpCompanyRulesParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name getDpCompanyRules - * @summary: Get All DpCompanyRules applied to company from database. - * @description: This API returns response of all DpCompanyRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpCompanyRules/). + * @name getOptimalLocations + * @summary: Get serviceable store of the item + * @description: This API returns serviceable store of the item. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getOptimalLocations/). */ - async getDpCompanyRules( - { requestHeaders } = { requestHeaders: {} }, + async getOptimalLocations( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformValidator.getDpCompanyRules().validate( - {}, + } = ServiceabilityPlatformValidator.getOptimalLocations().validate( + { + body, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -384,14 +1133,16 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getDpCompanyRules().validate( - {}, + } = ServiceabilityPlatformValidator.getOptimalLocations().validate( + { + body, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getDpCompanyRules \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getOptimalLocations \n ${warrning}`, }); } @@ -401,10 +1152,10 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/priority`, + "post", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/reassign`, query_params, - undefined, + body, { ...xHeaders, ...requestHeaders }, { responseHeaders } ); @@ -416,7 +1167,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.DPCompanyRuleResponse().validate( + } = ServiceabilityPlatformModel.ReAssignStoreResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -427,7 +1178,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getDpCompanyRules \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getOptimalLocations \n ${res_error}`, }); } } @@ -436,26 +1187,32 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetDpRuleInsertParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetPackageMaterialListParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getDpRuleInsert - * @summary: Fetching of DpRules from database. - * @description: This API returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpRuleInsert/). + * @returns {Promise} - + * Success response + * @name getPackageMaterialList + * @summary: Fetching of PackageMaterials from database. + * @description: This API returns response of PackageMaterials from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialList/). */ - async getDpRuleInsert( - { pageNumber, pageSize, requestHeaders } = { requestHeaders: {} }, + async getPackageMaterialList( + { pageNo, pageSize, q, size, packageType, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformValidator.getDpRuleInsert().validate( + } = ServiceabilityPlatformValidator.getPackageMaterialList().validate( { - pageNumber, + pageNo, pageSize, + q, + size, + packageType, }, { abortEarly: false, allowUnknown: true } ); @@ -466,30 +1223,36 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getDpRuleInsert().validate( + } = ServiceabilityPlatformValidator.getPackageMaterialList().validate( { - pageNumber, + pageNo, pageSize, + q, + size, + packageType, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getDpRuleInsert \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialList \n ${warrning}`, }); } const query_params = {}; - query_params["page_number"] = pageNumber; + query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; + query_params["q"] = q; + query_params["size"] = size; + query_params["package_type"] = packageType; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-materials`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -503,7 +1266,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.DpMultipleRuleSuccessResponse().validate( + } = ServiceabilityPlatformModel.PackageMaterialList().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -514,7 +1277,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getDpRuleInsert \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialList \n ${res_error}`, }); } } @@ -523,22 +1286,26 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetDpRulesParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetPackageMaterialRuleParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name getDpRules - * @summary: Fetching of DpRules from database. - * @description: This API returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getDpRules/). + * @name getPackageMaterialRule + * @summary: Fetching of Package Material from database. + * @description: This API returns response of Package Material from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRule/). */ - async getDpRules( - { ruleUid, requestHeaders } = { requestHeaders: {} }, + async getPackageMaterialRule( + { ruleId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ServiceabilityPlatformValidator.getDpRules().validate( + const { + error, + } = ServiceabilityPlatformValidator.getPackageMaterialRule().validate( { - ruleUid, + ruleId, }, { abortEarly: false, allowUnknown: true } ); @@ -549,16 +1316,16 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getDpRules().validate( + } = ServiceabilityPlatformValidator.getPackageMaterialRule().validate( { - ruleUid, + ruleId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getDpRules \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRule \n ${warrning}`, }); } @@ -569,7 +1336,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules/${ruleUid}`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -583,7 +1350,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.DpRuleSuccessResponse().validate( + } = ServiceabilityPlatformModel.PackageRuleResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -594,7 +1361,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getDpRules \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRule \n ${res_error}`, }); } } @@ -603,25 +1370,29 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetEntityRegionViewParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetPackageMaterialRulesParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name getEntityRegionView - * @summary: Get country and state list - * @description: This API returns response for Entity Region View. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getEntityRegionView/). + * @name getPackageMaterialRules + * @summary: Fetching of Package Material Rules from database. + * @description: This API returns response of Package Materials Rules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterialRules/). */ - async getEntityRegionView( - { body, requestHeaders } = { requestHeaders: {} }, + async getPackageMaterialRules( + { pageNo, pageSize, isActive, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformValidator.getEntityRegionView().validate( + } = ServiceabilityPlatformValidator.getPackageMaterialRules().validate( { - body, + pageNo, + pageSize, + isActive, }, { abortEarly: false, allowUnknown: true } ); @@ -632,29 +1403,34 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getEntityRegionView().validate( + } = ServiceabilityPlatformValidator.getPackageMaterialRules().validate( { - body, + pageNo, + pageSize, + isActive, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getEntityRegionView \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterialRules \n ${warrning}`, }); } const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["is_active"] = isActive; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/regions`, + "get", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules`, query_params, - body, + undefined, { ...xHeaders, ...requestHeaders }, { responseHeaders } ); @@ -666,7 +1442,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.EntityRegionView_Response().validate( + } = ServiceabilityPlatformModel.PackageMaterialRuleList().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -677,7 +1453,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getEntityRegionView \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getPackageMaterialRules \n ${res_error}`, }); } } @@ -686,28 +1462,25 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetListViewParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetPackageMaterialsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getListView - * @summary: Zone List of application. - * @description: This API returns Zone List View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getListView/). + * @returns {Promise} + * - Success response + * + * @name getPackageMaterials + * @summary: Fetching of Package Material from database. + * @description: This API returns response of Package Material from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getPackageMaterials/). */ - async getListView( - { pageNumber, pageSize, name, isActive, channelIds, q, requestHeaders } = { - requestHeaders: {}, - }, + async getPackageMaterials( + { packageMaterialId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ServiceabilityPlatformValidator.getListView().validate( + const { + error, + } = ServiceabilityPlatformValidator.getPackageMaterials().validate( { - pageNumber, - pageSize, - name, - isActive, - channelIds, - q, + packageMaterialId, }, { abortEarly: false, allowUnknown: true } ); @@ -718,38 +1491,27 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getListView().validate( + } = ServiceabilityPlatformValidator.getPackageMaterials().validate( { - pageNumber, - pageSize, - name, - isActive, - channelIds, - q, + packageMaterialId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getListView \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getPackageMaterials \n ${warrning}`, }); } const query_params = {}; - query_params["page_number"] = pageNumber; - query_params["page_size"] = pageSize; - query_params["name"] = name; - query_params["is_active"] = isActive; - query_params["channel_ids"] = channelIds; - query_params["q"] = q; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/zones`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/${packageMaterialId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -763,10 +1525,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ListViewResponse().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + } = ServiceabilityPlatformModel.PackageMaterialResponse().validate( + responseData, + { abortEarly: false, allowUnknown: true } + ); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -774,7 +1536,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getListView \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getPackageMaterials \n ${res_error}`, }); } } @@ -783,24 +1545,28 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetOptimalLocationsParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetServiceabilityParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name getOptimalLocations - * @summary: Get serviceable store of the item - * @description: This API returns serviceable store of the item. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getOptimalLocations/). + * @name getServiceability + * @summary: Get Serviceability of a region + * @description: Get Serviceability of a region - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getServiceability/). */ - async getOptimalLocations( - { body, requestHeaders } = { requestHeaders: {} }, + async getServiceability( + { extensionId, schemeId, regionId, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformValidator.getOptimalLocations().validate( + } = ServiceabilityPlatformValidator.getServiceability().validate( { - body, + extensionId, + schemeId, + regionId, }, { abortEarly: false, allowUnknown: true } ); @@ -811,16 +1577,18 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getOptimalLocations().validate( + } = ServiceabilityPlatformValidator.getServiceability().validate( { - body, + extensionId, + schemeId, + regionId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getOptimalLocations \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getServiceability \n ${warrning}`, }); } @@ -830,10 +1598,10 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/reassign`, + "get", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/region/${regionId}`, query_params, - body, + undefined, { ...xHeaders, ...requestHeaders }, { responseHeaders } ); @@ -845,7 +1613,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ReAssignStoreResponse().validate( + } = ServiceabilityPlatformModel.ServiceabilityModel().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -856,7 +1624,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getOptimalLocations \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getServiceability \n ${res_error}`, }); } } @@ -865,22 +1633,22 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetStoreParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetZoneByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name getStore - * @summary: GET stores data - * @description: This API returns stores data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getStore/). + * @name getZoneById + * @summary: Get details of the Zone + * @description: Returns the region, application, store mapping and other details in the Zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneById/). */ - async getStore( - { storeUid, requestHeaders } = { requestHeaders: {} }, + async getZoneById( + { zoneId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ServiceabilityPlatformValidator.getStore().validate( + const { error } = ServiceabilityPlatformValidator.getZoneById().validate( { - storeUid, + zoneId, }, { abortEarly: false, allowUnknown: true } ); @@ -891,16 +1659,16 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getStore().validate( + } = ServiceabilityPlatformValidator.getZoneById().validate( { - storeUid, + zoneId, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getStore \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getZoneById \n ${warrning}`, }); } @@ -911,7 +1679,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/stores/${storeUid}`, + `/service/platform/logistics/v2.0/company/${this.config.companyId}/zones/${zoneId}`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -925,10 +1693,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.GetStoresViewResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ServiceabilityPlatformModel.GetZoneByIdSchema().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -936,7 +1704,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getStore \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getZoneById \n ${res_error}`, }); } } @@ -945,25 +1713,42 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetZoneDataViewParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.GetZonesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name getZoneDataView - * @summary: Zone Data View of application. - * @description: This API returns Zone Data View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneDataView/). + * @returns {Promise} - Success response + * @name getZones + * @summary: Shows zones defined at the company level + * @description: Return the list of zones that are defined at the company level. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZones/). */ - async getZoneDataView( - { zoneId, requestHeaders } = { requestHeaders: {} }, + async getZones( + { + pageNo, + pageSize, + isActive, + channelId, + q, + country, + state, + city, + pincode, + sector, + requestHeaders, + } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { - error, - } = ServiceabilityPlatformValidator.getZoneDataView().validate( + const { error } = ServiceabilityPlatformValidator.getZones().validate( { - zoneId, + pageNo, + pageSize, + isActive, + channelId, + q, + country, + state, + city, + pincode, + sector, }, { abortEarly: false, allowUnknown: true } ); @@ -974,27 +1759,46 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getZoneDataView().validate( + } = ServiceabilityPlatformValidator.getZones().validate( { - zoneId, + pageNo, + pageSize, + isActive, + channelId, + q, + country, + state, + city, + pincode, + sector, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getZoneDataView \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > getZones \n ${warrning}`, }); } const query_params = {}; + query_params["page_no"] = pageNo; + query_params["page_size"] = pageSize; + query_params["is_active"] = isActive; + query_params["channel_id"] = channelId; + query_params["q"] = q; + query_params["country"] = country; + query_params["state"] = state; + query_params["city"] = city; + query_params["pincode"] = pincode; + query_params["sector"] = sector; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/zone/${zoneId}`, + `/service/platform/logistics/v2.0/company/${this.config.companyId}/zones`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -1008,10 +1812,10 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.GetSingleZoneDataViewResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = ServiceabilityPlatformModel.ListViewResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1019,7 +1823,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getZoneDataView \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > getZones \n ${res_error}`, }); } } @@ -1028,40 +1832,25 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.GetZoneListViewParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.UpdateCompanyConfigurationParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getZoneListView - * @summary: Zone List of application. - * @description: This API returns Zone List View of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/getZoneListView/). + * @returns {Promise} - Success response + * @name updateCompanyConfiguration + * @summary: Apply Courier Rule to company. + * @description: Apply Courier Rule to company with rules priority - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateCompanyConfiguration/). */ - async getZoneListView( - { - pageNumber, - pageNo, - pageSize, - name, - isActive, - channelIds, - q, - zoneId, - requestHeaders, - } = { requestHeaders: {} }, + async updateCompanyConfiguration( + { body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformValidator.getZoneListView().validate( + } = ServiceabilityPlatformValidator.updateCompanyConfiguration().validate( { - pageNumber, - pageNo, - pageSize, - name, - isActive, - channelIds, - q, - zoneId, + body, }, { abortEarly: false, allowUnknown: true } ); @@ -1072,44 +1861,29 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.getZoneListView().validate( + } = ServiceabilityPlatformValidator.updateCompanyConfiguration().validate( { - pageNumber, - pageNo, - pageSize, - name, - isActive, - channelIds, - q, - zoneId, + body, }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > getZoneListView \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > updateCompanyConfiguration \n ${warrning}`, }); } const query_params = {}; - query_params["page_number"] = pageNumber; - query_params["page_no"] = pageNo; - query_params["page_size"] = pageSize; - query_params["name"] = name; - query_params["is_active"] = isActive; - query_params["channel_ids"] = channelIds; - query_params["q"] = q; - query_params["zone_id"] = zoneId; const xHeaders = {}; const response = await PlatformAPIClient.execute( this.config, - "get", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/zones-list`, + "put", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/configuration`, query_params, - undefined, + body, { ...xHeaders, ...requestHeaders }, { responseHeaders } ); @@ -1121,7 +1895,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ListViewResponse().validate(responseData, { + } = ServiceabilityPlatformModel.CompanyConfig().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1132,7 +1906,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > getZoneListView \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > updateCompanyConfiguration \n ${res_error}`, }); } } @@ -1141,23 +1915,26 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.UpdateDpRuleParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.UpdateCourierPartnerAccountParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * - * @name updateDpRule - * @summary: Updating of DpRules from database. - * @description: This API updates and returns response of DpRules from mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateDpRule/). + * @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/platform/serviceability/updateCourierPartnerAccount/). */ - async updateDpRule( - { ruleUid, body, requestHeaders } = { requestHeaders: {} }, + async updateCourierPartnerAccount( + { accountId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ServiceabilityPlatformValidator.updateDpRule().validate( + const { + error, + } = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate( { - ruleUid, + accountId, body, }, { abortEarly: false, allowUnknown: true } @@ -1169,9 +1946,9 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.updateDpRule().validate( + } = ServiceabilityPlatformValidator.updateCourierPartnerAccount().validate( { - ruleUid, + accountId, body, }, { abortEarly: false, allowUnknown: false } @@ -1179,7 +1956,7 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > updateDpRule \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > updateCourierPartnerAccount \n ${warrning}`, }); } @@ -1190,7 +1967,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules/${ruleUid}`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/account/${accountId}`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -1204,7 +1981,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.DpRuleUpdateSuccessResponse().validate( + } = ServiceabilityPlatformModel.CourierAccountResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1215,7 +1992,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > updateDpRule \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > updateCourierPartnerAccount \n ${res_error}`, }); } } @@ -1224,27 +2001,26 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.UpdateZoneControllerViewParam} arg + * @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 updateZoneControllerView - * @summary: Updation of zone collections in database. - * @description: This API returns response of updation of zone in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateZoneControllerView/). + * @name updatePackageMaterialRule + * @summary: Fetching of Package Material Rules into database. + * @description: This API updates Package Material Rules into mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterialRule/). */ - async updateZoneControllerView( - { zoneId, body, requestHeaders } = { requestHeaders: {} }, + async updatePackageMaterialRule( + { ruleId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformValidator.updateZoneControllerView().validate( + } = ServiceabilityPlatformValidator.updatePackageMaterialRule().validate( { - zoneId, - + ruleId, body, }, { abortEarly: false, allowUnknown: true } @@ -1256,10 +2032,9 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.updateZoneControllerView().validate( + } = ServiceabilityPlatformValidator.updatePackageMaterialRule().validate( { - zoneId, - + ruleId, body, }, { abortEarly: false, allowUnknown: false } @@ -1267,7 +2042,7 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > updateZoneControllerView \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > updatePackageMaterialRule \n ${warrning}`, }); } @@ -1277,8 +2052,8 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, - "put", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/zone/${zoneId}`, + "patch", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/rules/${ruleId}`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -1292,7 +2067,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.ZoneSuccessResponse().validate( + } = ServiceabilityPlatformModel.PackageRuleResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1303,7 +2078,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > updateZoneControllerView \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > updatePackageMaterialRule \n ${res_error}`, }); } } @@ -1312,24 +2087,27 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.UpsertDpAccountParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.UpdatePackageMaterialsParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} + * @returns {Promise} * - Success response * - * @name upsertDpAccount - * @summary: Upsertion of DpAccount in database. - * @description: This API returns response of upsertion of DpAccount in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpAccount/). + * @name updatePackageMaterials + * @summary: Update Package Material to database. + * @description: This API updates Package Materials from into mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updatePackageMaterials/). */ - async upsertDpAccount( - { body, requestHeaders } = { requestHeaders: {} }, + async updatePackageMaterials( + { packageMaterialId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformValidator.upsertDpAccount().validate( + } = ServiceabilityPlatformValidator.updatePackageMaterials().validate( { + packageMaterialId, body, }, { abortEarly: false, allowUnknown: true } @@ -1341,8 +2119,9 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.upsertDpAccount().validate( + } = ServiceabilityPlatformValidator.updatePackageMaterials().validate( { + packageMaterialId, body, }, { abortEarly: false, allowUnknown: false } @@ -1350,7 +2129,7 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > upsertDpAccount \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > updatePackageMaterials \n ${warrning}`, }); } @@ -1360,8 +2139,8 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/account`, + "patch", + `/service/platform/logistics/v1.0/company/${this.config.companyId}/packaging-material/${packageMaterialId}`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -1375,7 +2154,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.CompanyDpAccountResponse().validate( + } = ServiceabilityPlatformModel.PackageMaterialResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1386,7 +2165,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > upsertDpAccount \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > updatePackageMaterials \n ${res_error}`, }); } } @@ -1395,23 +2174,28 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.UpsertDpCompanyRulesParam} arg - Arg object + * @param {ServiceabilityPlatformValidator.UpdateServiceabilityParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - + * @returns {Promise} - * Success response - * @name upsertDpCompanyRules - * @summary: Upsert of DpCompanyRules in database. - * @description: This API returns response of upsert of DpCompanyRules in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpCompanyRules/). + * @name updateServiceability + * @summary: Serviceability Update for a region + * @description: Serviceability Update for a region - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateServiceability/). */ - async upsertDpCompanyRules( - { body, requestHeaders } = { requestHeaders: {} }, + async updateServiceability( + { extensionId, schemeId, regionId, body, requestHeaders } = { + requestHeaders: {}, + }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = ServiceabilityPlatformValidator.upsertDpCompanyRules().validate( + } = ServiceabilityPlatformValidator.updateServiceability().validate( { + extensionId, + schemeId, + regionId, body, }, { abortEarly: false, allowUnknown: true } @@ -1423,8 +2207,11 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.upsertDpCompanyRules().validate( + } = ServiceabilityPlatformValidator.updateServiceability().validate( { + extensionId, + schemeId, + regionId, body, }, { abortEarly: false, allowUnknown: false } @@ -1432,7 +2219,7 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > upsertDpCompanyRules \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > updateServiceability \n ${warrning}`, }); } @@ -1443,7 +2230,7 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/priority`, + `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier-partner/${extensionId}/scheme/${schemeId}/serviceability/region/${regionId}`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -1457,7 +2244,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.DPCompanyRuleResponse().validate( + } = ServiceabilityPlatformModel.ServiceabilityModel().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1468,7 +2255,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > upsertDpCompanyRules \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > updateServiceability \n ${res_error}`, }); } } @@ -1477,21 +2264,22 @@ class Serviceability { } /** - * @param {ServiceabilityPlatformValidator.UpsertDpRulesParam} arg - Arg object + * @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 upsertDpRules - * @summary: Upsert of DpRules in database. - * @description: This API returns response of upsert of DpRules in mongo database. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/upsertDpRules/). + * @name updateZoneById + * @summary: Update details of a Zone + * @description: Updates the region, application, store mapping and other details in the Zone. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/serviceability/updateZoneById/). */ - async upsertDpRules( - { body, requestHeaders } = { requestHeaders: {} }, + async updateZoneById( + { zoneId, body, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = ServiceabilityPlatformValidator.upsertDpRules().validate( + const { error } = ServiceabilityPlatformValidator.updateZoneById().validate( { + zoneId, body, }, { abortEarly: false, allowUnknown: true } @@ -1503,8 +2291,9 @@ class Serviceability { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = ServiceabilityPlatformValidator.upsertDpRules().validate( + } = ServiceabilityPlatformValidator.updateZoneById().validate( { + zoneId, body, }, { abortEarly: false, allowUnknown: false } @@ -1512,7 +2301,7 @@ class Serviceability { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > Serviceability > upsertDpRules \n ${warrning}`, + message: `Parameter Validation warrnings for platform > Serviceability > updateZoneById \n ${warrning}`, }); } @@ -1522,8 +2311,8 @@ class Serviceability { const response = await PlatformAPIClient.execute( this.config, - "post", - `/service/platform/logistics/v1.0/company/${this.config.companyId}/courier/rules`, + "put", + `/service/platform/logistics/v2.0/company/${this.config.companyId}/zones/${zoneId}`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -1537,7 +2326,7 @@ class Serviceability { const { error: res_error, - } = ServiceabilityPlatformModel.DpRuleSuccessResponse().validate( + } = ServiceabilityPlatformModel.ZoneSuccessResponse().validate( responseData, { abortEarly: false, allowUnknown: true } ); @@ -1548,7 +2337,7 @@ class Serviceability { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > Serviceability > upsertDpRules \n ${res_error}`, + message: `Response Validation Warnings for platform > Serviceability > updateZoneById \n ${res_error}`, }); } } diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts index 1dbec6f8e..38f40548a 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts @@ -12,15 +12,10 @@ export = ServiceabilityPlatformModel; * @property {string} [state] */ /** - * @typedef ApplicationCompanyDpViewRequest - * @property {string} [dp_id] - */ -/** - * @typedef ApplicationCompanyDpViewResponse - * @property {string} application_id - * @property {number} company_id - * @property {number} [courier_partner_id] - * @property {boolean} success + * @typedef ApplicationConfig + * @property {string[]} [rule_ids] + * @property {string[]} [sort] + * @property {ZoneConfig} [zones] */ /** * @typedef ApplicationSelfShipConfig @@ -44,6 +39,44 @@ export = ServiceabilityPlatformModel; * @property {ServiceabilityErrorResponse} [error] * @property {boolean} success */ +/** + * @typedef ArithmeticOperations + * @property {number} [gt] + * @property {number} [gte] + * @property {number} [lt] + * @property {number} [lte] + */ +/** + * @typedef BulkRegionJobSerializer + * @property {string} action + * @property {string} country + * @property {string} [file_path] + * @property {string} region + */ +/** + * @typedef BulkRegionResponse + * @property {BulkRegionResponseItemData[]} items + * @property {Page} page + */ +/** + * @typedef BulkRegionResponseItemData + * @property {string} action + * @property {string} batch_id + * @property {string} country + * @property {string} [error_file_path] + * @property {number} [failed] + * @property {Object[]} [failed_records] + * @property {string} file_path + * @property {string} region + * @property {string} status + * @property {number} [success] + * @property {number} [total] + */ +/** + * @typedef Channel + * @property {string} [id] + * @property {string} [type] + */ /** * @typedef CommonError * @property {Object} [error] @@ -51,18 +84,15 @@ export = ServiceabilityPlatformModel; * @property {string} [success] */ /** - * @typedef CompanyDpAccountListResponse - * @property {Dp1[]} items - * @property {Page} page - * @property {boolean} success - */ -/** - * @typedef CompanyDpAccountRequest - * @property {Dp1[]} data + * @typedef CompanyConfig + * @property {boolean} [logistics_as_actual] + * @property {string[]} rule_ids + * @property {string[]} sort */ /** - * @typedef CompanyDpAccountResponse - * @property {boolean} success + * @typedef CompanyCourierPartnerAccountListResponse + * @property {CourierAccountResponse[]} items + * @property {Page} page */ /** * @typedef CompanyStoreView_PageItems @@ -82,11 +112,116 @@ export = ServiceabilityPlatformModel; * @property {number} [country_code] * @property {string} [number] */ +/** + * @typedef CourierAccount + * @property {string} account_id + * @property {string} extension_id + * @property {boolean} is_own_account + * @property {boolean} is_self_ship + * @property {string} scheme_id + * @property {string} stage + */ +/** + * @typedef CourierAccountResponse + * @property {string} account_id + * @property {boolean} is_own_account + * @property {boolean} is_self_ship + * @property {string} scheme_id + * @property {CourierPartnerSchemeModel} scheme_rules + * @property {string} stage + */ +/** + * @typedef CourierPartnerAccountFailureResponse + * @property {ErrorResponse[]} error + * @property {boolean} success + */ +/** + * @typedef CourierPartnerList + * @property {string} account_id + * @property {string} extension_id + * @property {boolean} is_self_ship + * @property {string} name + */ +/** + * @typedef CourierPartnerRule + * @property {CourierPartnerRuleConditions} conditions + * @property {CourierPartnerList[]} [cp_list] + * @property {boolean} is_active + * @property {string} name + * @property {string[]} sort + */ +/** + * @typedef CourierPartnerRuleConditions + * @property {IntComparisonOperations} [brand_ids] + * @property {IntComparisonOperations} [category_ids] + * @property {IntComparisonOperations} [department_ids] + * @property {LocationRule} [forward] + * @property {ArithmeticOperations} [order_place_date] + * @property {StringComparisonOperations} [payment_mode] + * @property {IntComparisonOperations} [product_ids] + * @property {StringComparisonOperations} [product_tags] + * @property {LocationRule} [reverse] + * @property {ArithmeticOperations} [shipment_cost] + * @property {ArithmeticOperations} [shipment_volumetric_weight] + * @property {ArithmeticOperations} [shipment_weight] + * @property {IntComparisonOperations} [store_ids] + * @property {StringComparisonOperations} [store_tags] + * @property {StringComparisonOperations} [store_type] + * @property {StringComparisonOperations} [zone_ids] + */ +/** + * @typedef CourierPartnerRulesListResponse + * @property {CourierPartnerRule[]} items + * @property {Page} page + */ +/** + * @typedef CourierPartnerSchemeFeatures + * @property {boolean} [cold_storage_goods] + * @property {boolean} [dangerous_goods] + * @property {boolean} [doorstep_exchange] + * @property {boolean} [doorstep_qc] + * @property {boolean} [doorstep_return] + * @property {boolean} [ewaybill] + * @property {boolean} [fragile_goods] + * @property {boolean} [mps] + * @property {boolean} [multi_pick_multi_drop] + * @property {boolean} [multi_pick_single_drop] + * @property {boolean} [ndr] + * @property {number} [ndr_attempts] + * @property {boolean} [openbox_delivery] + * @property {boolean} [product_installation] + * @property {boolean} [qr] + * @property {boolean} [restricted_goods] + * @property {boolean} [single_pick_multi_drop] + * @property {string} [status_updates] + */ +/** + * @typedef CourierPartnerSchemeModel + * @property {string} delivery_type + * @property {string} extension_id + * @property {CourierPartnerSchemeFeatures} feature + * @property {string[]} payment_mode + * @property {string} region + * @property {string} scheme_id + * @property {string} stage + * @property {string} transport_type + * @property {ArithmeticOperations} weight + */ /** * @typedef CreatedByResponse * @property {string} [user_id] * @property {string} [username] */ +/** + * @typedef CreateStoreRuleRequestSchema + * @property {StoreRuleConditionSchema} [conditions] + * @property {boolean} [is_active] + * @property {string} [name] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string[]} [type_based_priority] + */ /** * @typedef CreateZoneData * @property {string} [assignment_preference] @@ -95,11 +230,18 @@ export = ServiceabilityPlatformModel; * @property {boolean} is_active * @property {ZoneMappingType[]} mapping * @property {string} name - * @property {ZoneProductTypes} product * @property {string} region_type * @property {string} slug * @property {number[]} store_ids */ +/** + * @typedef CustomerRadiusSchema + * @property {number} [gt] + * @property {number} [gte] + * @property {number} [lt] + * @property {number} [lte] + * @property {string} unit + */ /** * @typedef DocumentsResponse * @property {string} [legal_name] @@ -120,113 +262,6 @@ export = ServiceabilityPlatformModel; * @property {number} [rvp_priority] * @property {string} [transport_mode] */ -/** - * @typedef Dp1 - * @property {string} account_id - * @property {string} dp_id - * @property {boolean} is_self_ship - * @property {string} name - * @property {string} plan_id - * @property {Object} plan_rules - * @property {string} stage - */ -/** - * @typedef DpAccountFailureResponse - * @property {ErrorResponse[]} error - * @property {number} status_code - * @property {boolean} success - */ -/** - * @typedef DPApplicationRuleRequest - * @property {string[]} shipping_rules - */ -/** - * @typedef DPApplicationRuleResponse - * @property {DpRuleResponse[]} data - * @property {boolean} status_code - * @property {boolean} success - */ -/** - * @typedef DPCompanyRuleRequest - * @property {string[]} rule_ids - */ -/** - * @typedef DPCompanyRuleResponse - * @property {DpRuleResponse[]} data - * @property {number} status_code - * @property {boolean} success - */ -/** - * @typedef DpIds - * @property {boolean} enabled - * @property {Object} [meta] - * @property {number} priority - */ -/** - * @typedef DpMultipleRuleSuccessResponse - * @property {DpRule[]} items - * @property {Page} page - * @property {boolean} success - */ -/** - * @typedef DpRule - * @property {number} [company_id] - * @property {Object[]} conditions - * @property {Object} dp_ids - * @property {boolean} [is_active] - * @property {string} name - */ -/** - * @typedef DpRuleRequest - * @property {number} [company_id] - * @property {Object[]} conditions - * @property {Object} dp_ids - * @property {boolean} [is_active] - * @property {string} name - */ -/** - * @typedef DpRuleResponse - * @property {number} company_id - * @property {string[]} conditions - * @property {Object} [created_by] - * @property {string} [created_on] - * @property {Object} dp_ids - * @property {boolean} [is_active] - * @property {Object} [modified_by] - * @property {string} [modified_on] - * @property {string} name - * @property {string} uid - */ -/** - * @typedef DpRuleSuccessResponse - * @property {DpRule} data - * @property {number} status_code - * @property {boolean} success - */ -/** - * @typedef DpRulesUpdateRequest - * @property {Object[]} conditions - * @property {Object} dp_ids - * @property {boolean} is_active - * @property {string} name - */ -/** - * @typedef DpRuleUpdateSuccessResponse - * @property {DpRuleResponse} data - * @property {number} status_code - * @property {boolean} success - */ -/** - * @typedef DpSchemaInRuleListing - * @property {string} account_id - * @property {string} dp_id - * @property {boolean} is_self_ship - * @property {string} name - * @property {string} plan_id - * @property {Object} plan_rules - * @property {number} priority - * @property {string} stage - */ /** * @typedef EinvoiceResponse * @property {boolean} [enabled] @@ -239,7 +274,6 @@ export = ServiceabilityPlatformModel; */ /** * @typedef EntityRegionView_Items - * @property {string} [display_name] * @property {string} name * @property {string} sub_type * @property {string} uid @@ -259,8 +293,8 @@ export = ServiceabilityPlatformModel; */ /** * @typedef EntityRegionView_Response + * @property {EntityRegionView_Items[]} data * @property {EntityRegionView_Error} error - * @property {EntityRegionView_Items[]} [items] * @property {EntityRegionView_page} page * @property {boolean} success */ @@ -283,18 +317,42 @@ export = ServiceabilityPlatformModel; /** * @typedef FailureResponse * @property {ErrorResponse[]} error - * @property {number} status_code * @property {boolean} success */ +/** + * @typedef getAppRegionZonesResponse + * @property {ListViewItems[]} items + * @property {PageSchema[]} page + */ /** * @typedef GetSingleZoneDataViewResponse * @property {GetZoneDataViewItems} data */ +/** + * @typedef GetStoreRulesApiResponse + * @property {StoreRuleDataSchema[]} [items] + * @property {Page} [page] + */ /** * @typedef GetStoresViewResponse * @property {ItemResponse[]} [items] * @property {ServiceabilityPageResponse} page */ +/** + * @typedef GetZoneByIdSchema + * @property {string} [assignment_preference] + * @property {GetZoneDataViewChannels[]} channels + * @property {number} [company_id] + * @property {boolean} is_active + * @property {ZoneMappingType[]} mapping + * @property {string} name + * @property {ZoneProductTypes} product + * @property {string} region_type + * @property {string} slug + * @property {number[]} store_ids + * @property {number} stores_count + * @property {string} zone_id + */ /** * @typedef GetZoneDataViewChannels * @property {string} channel_id @@ -308,9 +366,8 @@ export = ServiceabilityPlatformModel; * @property {boolean} is_active * @property {ZoneMappingType[]} mapping * @property {string} name - * @property {number} pincodes_count * @property {ZoneProductTypes} product - * @property {string} region_type + * @property {string} [region_type] * @property {string} slug * @property {number[]} store_ids * @property {number} stores_count @@ -336,6 +393,10 @@ export = ServiceabilityPlatformModel; * @property {EinvoiceResponse} [e_invoice] * @property {EwayBillResponse} [e_waybill] */ +/** + * @typedef IntComparisonOperations + * @property {number[]} [includes] + */ /** * @typedef IntegrationTypeResponse * @property {string} [inventory] @@ -379,12 +440,12 @@ export = ServiceabilityPlatformModel; */ /** * @typedef ListViewItems - * @property {ListViewChannels[]} channels + * @property {ListViewChannels} channels * @property {number} company_id * @property {boolean} is_active * @property {string} name - * @property {number} pincodes_count * @property {ListViewProduct} product + * @property {number} regions_count * @property {string} slug * @property {number} stores_count * @property {string} zone_id @@ -397,8 +458,7 @@ export = ServiceabilityPlatformModel; /** * @typedef ListViewResponse * @property {ListViewItems[]} items - * @property {ZoneDataItem} page - * @property {ListViewSummary} summary + * @property {ZoneDataItem[]} page */ /** * @typedef ListViewSummary @@ -406,6 +466,20 @@ export = ServiceabilityPlatformModel; * @property {number} total_pincodes_served * @property {number} total_zones */ +/** + * @typedef LocationRule + * @property {LocationRuleValues[]} [includes] + * @property {string} [type] + */ +/** + * @typedef LocationRuleValues + * @property {string} [display_name] + * @property {string} id + * @property {string} [name] + * @property {string} [parent_id] + * @property {string[]} [parent_ids] + * @property {string} [sub_type] + */ /** * @typedef LogisticsResponse * @property {Dp} [dp] @@ -432,6 +506,102 @@ export = ServiceabilityPlatformModel; * @property {number} [hour] * @property {number} [minute] */ +/** + * @typedef PackageMaterial + * @property {boolean} [auto_calculate] + * @property {Channel[]} channels + * @property {number} error_rate + * @property {number} height + * @property {number} length + * @property {number} [max_weight] + * @property {string[]} [media] + * @property {string} name + * @property {string} package_type + * @property {number} [package_vol_weight] + * @property {PackageMaterialRule[]} [rules] + * @property {string} size + * @property {string} status + * @property {number[]} store_ids + * @property {boolean} [track_inventory] + * @property {number} weight + * @property {number} width + */ +/** + * @typedef PackageMaterialList + * @property {PackageMaterialResponse} [items] + * @property {Page} [page] + */ +/** + * @typedef PackageMaterialResponse + * @property {boolean} [auto_calculate] + * @property {Channel[]} channels + * @property {number} error_rate + * @property {number} height + * @property {string} [id] + * @property {number} [item_id] + * @property {number} length + * @property {number} [max_weight] + * @property {string[]} [media] + * @property {string} name + * @property {string} package_type + * @property {number} [package_vol_weight] + * @property {PackageMaterialRule[]} [rules] + * @property {string} size + * @property {string} status + * @property {number[]} store_ids + * @property {boolean} [track_inventory] + * @property {number} weight + * @property {number} width + */ +/** + * @typedef PackageMaterialRule + * @property {PackageMaterialRuleQuantity} [quantity] + * @property {string} [rule_id] + * @property {number} [weight] + */ +/** + * @typedef PackageMaterialRuleList + * @property {PackageRuleResponse} [items] + * @property {Page} [page] + */ +/** + * @typedef PackageMaterialRuleQuantity + * @property {number} [max] + * @property {number} [min] + */ +/** + * @typedef PackageRule + * @property {PackageRuleCategory} [category_id] + * @property {number} company_id + * @property {boolean} [is_active] + * @property {string} name + * @property {PackageRuleProduct} [product_id] + * @property {PackageRuleProductTag} [product_tag] + * @property {string} type + */ +/** + * @typedef PackageRuleCategory + * @property {number[]} [includes] + */ +/** + * @typedef PackageRuleProduct + * @property {number[]} [includes] + */ +/** + * @typedef PackageRuleProductTag + * @property {string[]} [includes] + */ +/** + * @typedef PackageRuleResponse + * @property {PackageRuleCategory} [category_id] + * @property {number} company_id + * @property {string} [id] + * @property {boolean} [is_active] + * @property {string} name + * @property {PackageRuleProduct} [product_id] + * @property {PackageRuleProductTag} [product_tag] + * @property {string} type + */ /** * @typedef Page * @property {number} [current] @@ -442,6 +612,14 @@ export = ServiceabilityPlatformModel; * @property {number} [size] * @property {string} type */ +/** + * @typedef PageSchema + * @property {number} current + * @property {boolean} has_next + * @property {number} item_total + * @property {number} size + * @property {string} type + */ /** * @typedef PincodeBulkViewResponse * @property {string} batch_id @@ -554,6 +732,33 @@ export = ServiceabilityPlatformModel; * @property {boolean} success * @property {string} to_pincode */ +/** + * @typedef RulePriorityRequest + * @property {number} priority + * @property {string} rule_id + */ +/** + * @typedef RulePriorityResponse + * @property {boolean} [success] + */ +/** + * @typedef SchemeRules + * @property {SchemeRulesFeatures} [feature] + * @property {string[]} [payment_mode] + * @property {string} [region] + * @property {string[]} [transport_type] + * @property {ArithmeticOperations} [weight] + */ +/** + * @typedef SchemeRulesFeatures + * @property {boolean} [battery_operated] + * @property {boolean} [e_waybill] + * @property {boolean} [flammable] + * @property {boolean} [hazmat] + * @property {boolean} [multi_part_shipments] + * @property {boolean} [quality_check] + * @property {boolean} [quick_response_code] + */ /** * @typedef SelfShipResponse * @property {boolean} is_active @@ -565,6 +770,17 @@ export = ServiceabilityPlatformModel; * @property {string} type * @property {string} value */ +/** + * @typedef ServiceabilityModel + * @property {boolean} is_first_mile + * @property {boolean} is_installation + * @property {boolean} is_last_mile + * @property {boolean} is_qc + * @property {boolean} is_return + * @property {number} lm_cod_limit + * @property {string} pickup_cutoff + * @property {string} route_code + */ /** * @typedef ServiceabilityPageResponse * @property {number} [current] @@ -574,8 +790,74 @@ export = ServiceabilityPlatformModel; * @property {string} [type] */ /** - * @typedef ServiceabilityPayloadSchema - * @property {string} serviceability_type + * @typedef StorePrioritySchema + * @property {string} [id] + * @property {string} [name] + */ +/** + * @typedef StoreRuleConditionSchema + * @property {IntComparisonOperations} [brand_ids] + * @property {IntComparisonOperations} [category_ids] + * @property {CustomerRadiusSchema} [customer_radius] + * @property {IntComparisonOperations} [department_ids] + * @property {ArithmeticOperations} [order_place_date] + * @property {IntComparisonOperations} [product_ids] + * @property {StringComparisonOperations} [product_tags] + * @property {StringComparisonOperations} [store_tags] + * @property {StringComparisonOperations} [store_type] + * @property {LocationRule} [to_location] + * @property {StringComparisonOperations} [zone_ids] + */ +/** + * @typedef StoreRuleConfigData + * @property {string[]} [rule_ids] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string[]} [type_based_priority] + */ +/** + * @typedef StoreRuleDataSchema + * @property {string} [application_id] + * @property {number} [company_id] + * @property {StoreRuleConditionSchema} [conditions] + * @property {string} [id] + * @property {boolean} [is_active] + * @property {string} [name] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string[]} [type_based_priority] + */ +/** + * @typedef StoreRuleResponseSchema + * @property {StoreRuleConditionSchema} [conditions] + * @property {string} [id] + * @property {boolean} [is_active] + * @property {string} [name] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string} [type] + * @property {string[]} [type_based_priority] + */ +/** + * @typedef StoreRuleUpdateResponseSchema + * @property {string} [application_id] + * @property {number} [company_id] + * @property {StoreRuleConditionSchema} [conditions] + * @property {string} [id] + * @property {boolean} [is_active] + * @property {string} [name] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string} [type] + * @property {string[]} [type_based_priority] + */ +/** + * @typedef StringComparisonOperations + * @property {string[]} [includes] */ /** * @typedef TimmingResponse @@ -584,6 +866,10 @@ export = ServiceabilityPlatformModel; * @property {OpeningClosing} [opening] * @property {string} [weekday] */ +/** + * @typedef UpdateZoneConfigRequest + * @property {string} [serviceability_type] + */ /** * @typedef UpdateZoneData * @property {string} [assignment_preference] @@ -613,6 +899,10 @@ export = ServiceabilityPlatformModel; * @property {string} type * @property {string} zone_id */ +/** + * @typedef ZoneConfig + * @property {string} [serviceability_type] + */ /** * @typedef ZoneDataItem * @property {number} current @@ -632,11 +922,6 @@ export = ServiceabilityPlatformModel; * @property {string[]} tags * @property {string} type */ -/** - * @typedef ZoneRequest - * @property {CreateZoneData} data - * @property {string} identifier - */ /** * @typedef ZoneResponse * @property {number} status_code @@ -656,7 +941,7 @@ export = ServiceabilityPlatformModel; declare class ServiceabilityPlatformModel { } declare namespace ServiceabilityPlatformModel { - export { AddressResponse, ApplicationCompanyDpViewRequest, ApplicationCompanyDpViewResponse, ApplicationSelfShipConfig, ApplicationSelfShipConfigResponse, ApplicationServiceabilityConfig, ApplicationServiceabilityConfigResponse, CommonError, CompanyDpAccountListResponse, CompanyDpAccountRequest, CompanyDpAccountResponse, CompanyStoreView_PageItems, CompanyStoreView_Response, ContactNumberResponse, CreatedByResponse, CreateZoneData, DocumentsResponse, Dp, Dp1, DpAccountFailureResponse, DPApplicationRuleRequest, DPApplicationRuleResponse, DPCompanyRuleRequest, DPCompanyRuleResponse, DpIds, DpMultipleRuleSuccessResponse, DpRule, DpRuleRequest, DpRuleResponse, DpRuleSuccessResponse, DpRulesUpdateRequest, DpRuleUpdateSuccessResponse, DpSchemaInRuleListing, EinvoiceResponse, EntityRegionView_Error, EntityRegionView_Items, EntityRegionView_page, EntityRegionView_Request, EntityRegionView_Response, Error, ErrorResponse, EwayBillResponse, FailureResponse, GetSingleZoneDataViewResponse, GetStoresViewResponse, GetZoneDataViewChannels, GetZoneDataViewItems, GetZoneFromApplicationIdViewResponse, GetZoneFromPincodeViewRequest, GetZoneFromPincodeViewResponse, GstCredentialsResponse, IntegrationTypeResponse, ItemResponse, ListViewChannels, ListViewItems, ListViewProduct, ListViewResponse, ListViewSummary, LogisticsResponse, ManagerResponse, MobileNo, ModifiedByResponse, OpeningClosing, Page, PincodeBulkViewResponse, PincodeCodStatusListingPage, PincodeCodStatusListingRequest, PincodeCodStatusListingResponse, PincodeCodStatusListingSummary, PincodeMopBulkData, PincodeMopData, PincodeMOPresponse, PincodeMopUpdateAuditHistoryPaging, PincodeMopUpdateAuditHistoryRequest, PincodeMopUpdateAuditHistoryResponse, PincodeMopUpdateAuditHistoryResponseData, PincodeMopUpdateResponse, ProductReturnConfigResponse, ReAssignStoreRequest, ReAssignStoreResponse, SelfShipResponse, ServiceabilityErrorResponse, ServiceabilityPageResponse, ServiceabilityPayloadSchema, TimmingResponse, UpdateZoneData, WarningsResponse, Zone, ZoneDataItem, ZoneMappingType, ZoneProductTypes, ZoneRequest, ZoneResponse, ZoneSuccessResponse, ZoneUpdateRequest }; + export { AddressResponse, ApplicationConfig, ApplicationSelfShipConfig, ApplicationSelfShipConfigResponse, ApplicationServiceabilityConfig, ApplicationServiceabilityConfigResponse, ArithmeticOperations, BulkRegionJobSerializer, BulkRegionResponse, BulkRegionResponseItemData, Channel, CommonError, CompanyConfig, CompanyCourierPartnerAccountListResponse, CompanyStoreView_PageItems, CompanyStoreView_Response, ContactNumberResponse, CourierAccount, CourierAccountResponse, CourierPartnerAccountFailureResponse, CourierPartnerList, CourierPartnerRule, CourierPartnerRuleConditions, CourierPartnerRulesListResponse, CourierPartnerSchemeFeatures, CourierPartnerSchemeModel, CreatedByResponse, CreateStoreRuleRequestSchema, CreateZoneData, CustomerRadiusSchema, DocumentsResponse, Dp, EinvoiceResponse, EntityRegionView_Error, EntityRegionView_Items, EntityRegionView_page, EntityRegionView_Request, EntityRegionView_Response, Error, ErrorResponse, EwayBillResponse, FailureResponse, getAppRegionZonesResponse, GetSingleZoneDataViewResponse, GetStoreRulesApiResponse, GetStoresViewResponse, GetZoneByIdSchema, GetZoneDataViewChannels, GetZoneDataViewItems, GetZoneFromApplicationIdViewResponse, GetZoneFromPincodeViewRequest, GetZoneFromPincodeViewResponse, GstCredentialsResponse, IntComparisonOperations, IntegrationTypeResponse, ItemResponse, ListViewChannels, ListViewItems, ListViewProduct, ListViewResponse, ListViewSummary, LocationRule, LocationRuleValues, LogisticsResponse, ManagerResponse, MobileNo, ModifiedByResponse, OpeningClosing, PackageMaterial, PackageMaterialList, PackageMaterialResponse, PackageMaterialRule, PackageMaterialRuleList, PackageMaterialRuleQuantity, PackageRule, PackageRuleCategory, PackageRuleProduct, PackageRuleProductTag, PackageRuleResponse, Page, PageSchema, PincodeBulkViewResponse, PincodeCodStatusListingPage, PincodeCodStatusListingRequest, PincodeCodStatusListingResponse, PincodeCodStatusListingSummary, PincodeMopBulkData, PincodeMopData, PincodeMOPresponse, PincodeMopUpdateAuditHistoryPaging, PincodeMopUpdateAuditHistoryRequest, PincodeMopUpdateAuditHistoryResponse, PincodeMopUpdateAuditHistoryResponseData, PincodeMopUpdateResponse, ProductReturnConfigResponse, ReAssignStoreRequest, ReAssignStoreResponse, RulePriorityRequest, RulePriorityResponse, SchemeRules, SchemeRulesFeatures, SelfShipResponse, ServiceabilityErrorResponse, ServiceabilityModel, ServiceabilityPageResponse, StorePrioritySchema, StoreRuleConditionSchema, StoreRuleConfigData, StoreRuleDataSchema, StoreRuleResponseSchema, StoreRuleUpdateResponseSchema, StringComparisonOperations, TimmingResponse, UpdateZoneConfigRequest, UpdateZoneData, WarningsResponse, Zone, ZoneConfig, ZoneDataItem, ZoneMappingType, ZoneProductTypes, ZoneResponse, ZoneSuccessResponse, ZoneUpdateRequest }; } /** @returns {AddressResponse} */ declare function AddressResponse(): AddressResponse; @@ -671,18 +956,12 @@ type AddressResponse = { pincode?: number; state?: string; }; -/** @returns {ApplicationCompanyDpViewRequest} */ -declare function ApplicationCompanyDpViewRequest(): ApplicationCompanyDpViewRequest; -type ApplicationCompanyDpViewRequest = { - dp_id?: string; -}; -/** @returns {ApplicationCompanyDpViewResponse} */ -declare function ApplicationCompanyDpViewResponse(): ApplicationCompanyDpViewResponse; -type ApplicationCompanyDpViewResponse = { - application_id: string; - company_id: number; - courier_partner_id?: number; - success: boolean; +/** @returns {ApplicationConfig} */ +declare function ApplicationConfig(): ApplicationConfig; +type ApplicationConfig = { + rule_ids?: string[]; + sort?: string[]; + zones?: ZoneConfig; }; /** @returns {ApplicationSelfShipConfig} */ declare function ApplicationSelfShipConfig(): ApplicationSelfShipConfig; @@ -710,6 +989,49 @@ type ApplicationServiceabilityConfigResponse = { error?: ServiceabilityErrorResponse; success: boolean; }; +/** @returns {ArithmeticOperations} */ +declare function ArithmeticOperations(): ArithmeticOperations; +type ArithmeticOperations = { + gt?: number; + gte?: number; + lt?: number; + lte?: number; +}; +/** @returns {BulkRegionJobSerializer} */ +declare function BulkRegionJobSerializer(): BulkRegionJobSerializer; +type BulkRegionJobSerializer = { + action: string; + country: string; + file_path?: string; + region: string; +}; +/** @returns {BulkRegionResponse} */ +declare function BulkRegionResponse(): BulkRegionResponse; +type BulkRegionResponse = { + items: BulkRegionResponseItemData[]; + page: Page; +}; +/** @returns {BulkRegionResponseItemData} */ +declare function BulkRegionResponseItemData(): BulkRegionResponseItemData; +type BulkRegionResponseItemData = { + action: string; + batch_id: string; + country: string; + error_file_path?: string; + failed?: number; + failed_records?: any[]; + file_path: string; + region: string; + status: string; + success?: number; + total?: number; +}; +/** @returns {Channel} */ +declare function Channel(): Channel; +type Channel = { + id?: string; + type?: string; +}; /** @returns {CommonError} */ declare function CommonError(): CommonError; type CommonError = { @@ -717,22 +1039,18 @@ type CommonError = { status_code?: string; success?: string; }; -/** @returns {CompanyDpAccountListResponse} */ -declare function CompanyDpAccountListResponse(): CompanyDpAccountListResponse; -type CompanyDpAccountListResponse = { - items: Dp1[]; - page: Page; - success: boolean; -}; -/** @returns {CompanyDpAccountRequest} */ -declare function CompanyDpAccountRequest(): CompanyDpAccountRequest; -type CompanyDpAccountRequest = { - data: Dp1[]; +/** @returns {CompanyConfig} */ +declare function CompanyConfig(): CompanyConfig; +type CompanyConfig = { + logistics_as_actual?: boolean; + rule_ids: string[]; + sort: string[]; }; -/** @returns {CompanyDpAccountResponse} */ -declare function CompanyDpAccountResponse(): CompanyDpAccountResponse; -type CompanyDpAccountResponse = { - success: boolean; +/** @returns {CompanyCourierPartnerAccountListResponse} */ +declare function CompanyCourierPartnerAccountListResponse(): CompanyCourierPartnerAccountListResponse; +type CompanyCourierPartnerAccountListResponse = { + items: CourierAccountResponse[]; + page: Page; }; /** @returns {CompanyStoreView_PageItems} */ declare function CompanyStoreView_PageItems(): CompanyStoreView_PageItems; @@ -755,12 +1073,127 @@ type ContactNumberResponse = { country_code?: number; number?: string; }; +/** @returns {CourierAccount} */ +declare function CourierAccount(): CourierAccount; +type CourierAccount = { + account_id: string; + extension_id: string; + is_own_account: boolean; + is_self_ship: boolean; + scheme_id: string; + stage: string; +}; +/** @returns {CourierAccountResponse} */ +declare function CourierAccountResponse(): CourierAccountResponse; +type CourierAccountResponse = { + account_id: string; + is_own_account: boolean; + is_self_ship: boolean; + scheme_id: string; + scheme_rules: CourierPartnerSchemeModel; + stage: string; +}; +/** @returns {CourierPartnerAccountFailureResponse} */ +declare function CourierPartnerAccountFailureResponse(): CourierPartnerAccountFailureResponse; +type CourierPartnerAccountFailureResponse = { + error: ErrorResponse[]; + success: boolean; +}; +/** @returns {CourierPartnerList} */ +declare function CourierPartnerList(): CourierPartnerList; +type CourierPartnerList = { + account_id: string; + extension_id: string; + is_self_ship: boolean; + name: string; +}; +/** @returns {CourierPartnerRule} */ +declare function CourierPartnerRule(): CourierPartnerRule; +type CourierPartnerRule = { + conditions: CourierPartnerRuleConditions; + cp_list?: CourierPartnerList[]; + is_active: boolean; + name: string; + sort: string[]; +}; +/** @returns {CourierPartnerRuleConditions} */ +declare function CourierPartnerRuleConditions(): CourierPartnerRuleConditions; +type CourierPartnerRuleConditions = { + brand_ids?: IntComparisonOperations; + category_ids?: IntComparisonOperations; + department_ids?: IntComparisonOperations; + forward?: LocationRule; + order_place_date?: ArithmeticOperations; + payment_mode?: StringComparisonOperations; + product_ids?: IntComparisonOperations; + product_tags?: StringComparisonOperations; + reverse?: LocationRule; + shipment_cost?: ArithmeticOperations; + shipment_volumetric_weight?: ArithmeticOperations; + shipment_weight?: ArithmeticOperations; + store_ids?: IntComparisonOperations; + store_tags?: StringComparisonOperations; + store_type?: StringComparisonOperations; + zone_ids?: StringComparisonOperations; +}; +/** @returns {CourierPartnerRulesListResponse} */ +declare function CourierPartnerRulesListResponse(): CourierPartnerRulesListResponse; +type CourierPartnerRulesListResponse = { + items: CourierPartnerRule[]; + page: Page; +}; +/** @returns {CourierPartnerSchemeFeatures} */ +declare function CourierPartnerSchemeFeatures(): CourierPartnerSchemeFeatures; +type CourierPartnerSchemeFeatures = { + cold_storage_goods?: boolean; + dangerous_goods?: boolean; + doorstep_exchange?: boolean; + doorstep_qc?: boolean; + doorstep_return?: boolean; + ewaybill?: boolean; + fragile_goods?: boolean; + mps?: boolean; + multi_pick_multi_drop?: boolean; + multi_pick_single_drop?: boolean; + ndr?: boolean; + ndr_attempts?: number; + openbox_delivery?: boolean; + product_installation?: boolean; + qr?: boolean; + restricted_goods?: boolean; + single_pick_multi_drop?: boolean; + status_updates?: string; +}; +/** @returns {CourierPartnerSchemeModel} */ +declare function CourierPartnerSchemeModel(): CourierPartnerSchemeModel; +type CourierPartnerSchemeModel = { + delivery_type: string; + extension_id: string; + feature: CourierPartnerSchemeFeatures; + payment_mode: string[]; + region: string; + scheme_id: string; + stage: string; + transport_type: string; + weight: ArithmeticOperations; +}; /** @returns {CreatedByResponse} */ declare function CreatedByResponse(): CreatedByResponse; type CreatedByResponse = { user_id?: string; username?: string; }; +/** @returns {CreateStoreRuleRequestSchema} */ +declare function CreateStoreRuleRequestSchema(): CreateStoreRuleRequestSchema; +type CreateStoreRuleRequestSchema = { + conditions?: StoreRuleConditionSchema; + is_active?: boolean; + name?: string; + sort?: string[]; + store_priority?: StorePrioritySchema[]; + tag_based_priority?: string[]; + type_based_priority?: string[]; +}; /** @returns {CreateZoneData} */ declare function CreateZoneData(): CreateZoneData; type CreateZoneData = { @@ -770,11 +1203,19 @@ type CreateZoneData = { is_active: boolean; mapping: ZoneMappingType[]; name: string; - product: ZoneProductTypes; region_type: string; slug: string; store_ids: number[]; }; +/** @returns {CustomerRadiusSchema} */ +declare function CustomerRadiusSchema(): CustomerRadiusSchema; +type CustomerRadiusSchema = { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + unit: string; +}; /** @returns {DocumentsResponse} */ declare function DocumentsResponse(): DocumentsResponse; type DocumentsResponse = { @@ -797,128 +1238,6 @@ type Dp = { rvp_priority?: number; transport_mode?: string; }; -/** @returns {Dp1} */ -declare function Dp1(): Dp1; -type Dp1 = { - account_id: string; - dp_id: string; - is_self_ship: boolean; - name: string; - plan_id: string; - plan_rules: any; - stage: string; -}; -/** @returns {DpAccountFailureResponse} */ -declare function DpAccountFailureResponse(): DpAccountFailureResponse; -type DpAccountFailureResponse = { - error: ErrorResponse[]; - status_code: number; - success: boolean; -}; -/** @returns {DPApplicationRuleRequest} */ -declare function DPApplicationRuleRequest(): DPApplicationRuleRequest; -type DPApplicationRuleRequest = { - shipping_rules: string[]; -}; -/** @returns {DPApplicationRuleResponse} */ -declare function DPApplicationRuleResponse(): DPApplicationRuleResponse; -type DPApplicationRuleResponse = { - data: DpRuleResponse[]; - status_code: boolean; - success: boolean; -}; -/** @returns {DPCompanyRuleRequest} */ -declare function DPCompanyRuleRequest(): DPCompanyRuleRequest; -type DPCompanyRuleRequest = { - rule_ids: string[]; -}; -/** @returns {DPCompanyRuleResponse} */ -declare function DPCompanyRuleResponse(): DPCompanyRuleResponse; -type DPCompanyRuleResponse = { - data: DpRuleResponse[]; - status_code: number; - success: boolean; -}; -/** @returns {DpIds} */ -declare function DpIds(): DpIds; -type DpIds = { - enabled: boolean; - meta?: any; - priority: number; -}; -/** @returns {DpMultipleRuleSuccessResponse} */ -declare function DpMultipleRuleSuccessResponse(): DpMultipleRuleSuccessResponse; -type DpMultipleRuleSuccessResponse = { - items: DpRule[]; - page: Page; - success: boolean; -}; -/** @returns {DpRule} */ -declare function DpRule(): DpRule; -type DpRule = { - company_id?: number; - conditions: any[]; - dp_ids: any; - is_active?: boolean; - name: string; -}; -/** @returns {DpRuleRequest} */ -declare function DpRuleRequest(): DpRuleRequest; -type DpRuleRequest = { - company_id?: number; - conditions: any[]; - dp_ids: any; - is_active?: boolean; - name: string; -}; -/** @returns {DpRuleResponse} */ -declare function DpRuleResponse(): DpRuleResponse; -type DpRuleResponse = { - company_id: number; - conditions: string[]; - created_by?: any; - created_on?: string; - dp_ids: any; - is_active?: boolean; - modified_by?: any; - modified_on?: string; - name: string; - uid: string; -}; -/** @returns {DpRuleSuccessResponse} */ -declare function DpRuleSuccessResponse(): DpRuleSuccessResponse; -type DpRuleSuccessResponse = { - data: DpRule; - status_code: number; - success: boolean; -}; -/** @returns {DpRulesUpdateRequest} */ -declare function DpRulesUpdateRequest(): DpRulesUpdateRequest; -type DpRulesUpdateRequest = { - conditions: any[]; - dp_ids: any; - is_active: boolean; - name: string; -}; -/** @returns {DpRuleUpdateSuccessResponse} */ -declare function DpRuleUpdateSuccessResponse(): DpRuleUpdateSuccessResponse; -type DpRuleUpdateSuccessResponse = { - data: DpRuleResponse; - status_code: number; - success: boolean; -}; -/** @returns {DpSchemaInRuleListing} */ -declare function DpSchemaInRuleListing(): DpSchemaInRuleListing; -type DpSchemaInRuleListing = { - account_id: string; - dp_id: string; - is_self_ship: boolean; - name: string; - plan_id: string; - plan_rules: any; - priority: number; - stage: string; -}; /** @returns {EinvoiceResponse} */ declare function EinvoiceResponse(): EinvoiceResponse; type EinvoiceResponse = { @@ -934,7 +1253,6 @@ type EntityRegionView_Error = { /** @returns {EntityRegionView_Items} */ declare function EntityRegionView_Items(): EntityRegionView_Items; type EntityRegionView_Items = { - display_name?: string; name: string; sub_type: string; uid: string; @@ -957,8 +1275,8 @@ type EntityRegionView_Request = { /** @returns {EntityRegionView_Response} */ declare function EntityRegionView_Response(): EntityRegionView_Response; type EntityRegionView_Response = { + data: EntityRegionView_Items[]; error: EntityRegionView_Error; - items?: EntityRegionView_Items[]; page: EntityRegionView_page; success: boolean; }; @@ -985,20 +1303,47 @@ type EwayBillResponse = { declare function FailureResponse(): FailureResponse; type FailureResponse = { error: ErrorResponse[]; - status_code: number; success: boolean; }; +/** @returns {getAppRegionZonesResponse} */ +declare function getAppRegionZonesResponse(): getAppRegionZonesResponse; +type getAppRegionZonesResponse = { + items: ListViewItems[]; + page: PageSchema[]; +}; /** @returns {GetSingleZoneDataViewResponse} */ declare function GetSingleZoneDataViewResponse(): GetSingleZoneDataViewResponse; type GetSingleZoneDataViewResponse = { data: GetZoneDataViewItems; }; +/** @returns {GetStoreRulesApiResponse} */ +declare function GetStoreRulesApiResponse(): GetStoreRulesApiResponse; +type GetStoreRulesApiResponse = { + items?: StoreRuleDataSchema[]; + page?: Page; +}; /** @returns {GetStoresViewResponse} */ declare function GetStoresViewResponse(): GetStoresViewResponse; type GetStoresViewResponse = { items?: ItemResponse[]; page: ServiceabilityPageResponse; }; +/** @returns {GetZoneByIdSchema} */ +declare function GetZoneByIdSchema(): GetZoneByIdSchema; +type GetZoneByIdSchema = { + assignment_preference?: string; + channels: GetZoneDataViewChannels[]; + company_id?: number; + is_active: boolean; + mapping: ZoneMappingType[]; + name: string; + product: ZoneProductTypes; + region_type: string; + slug: string; + store_ids: number[]; + stores_count: number; + zone_id: string; +}; /** @returns {GetZoneDataViewChannels} */ declare function GetZoneDataViewChannels(): GetZoneDataViewChannels; type GetZoneDataViewChannels = { @@ -1014,9 +1359,8 @@ type GetZoneDataViewItems = { is_active: boolean; mapping: ZoneMappingType[]; name: string; - pincodes_count: number; product: ZoneProductTypes; - region_type: string; + region_type?: string; slug: string; store_ids: number[]; stores_count: number; @@ -1046,6 +1390,11 @@ type GstCredentialsResponse = { e_invoice?: EinvoiceResponse; e_waybill?: EwayBillResponse; }; +/** @returns {IntComparisonOperations} */ +declare function IntComparisonOperations(): IntComparisonOperations; +type IntComparisonOperations = { + includes?: number[]; +}; /** @returns {IntegrationTypeResponse} */ declare function IntegrationTypeResponse(): IntegrationTypeResponse; type IntegrationTypeResponse = { @@ -1093,12 +1442,12 @@ type ListViewChannels = { /** @returns {ListViewItems} */ declare function ListViewItems(): ListViewItems; type ListViewItems = { - channels: ListViewChannels[]; + channels: ListViewChannels; company_id: number; is_active: boolean; name: string; - pincodes_count: number; product: ListViewProduct; + regions_count: number; slug: string; stores_count: number; zone_id: string; @@ -1113,8 +1462,7 @@ type ListViewProduct = { declare function ListViewResponse(): ListViewResponse; type ListViewResponse = { items: ListViewItems[]; - page: ZoneDataItem; - summary: ListViewSummary; + page: ZoneDataItem[]; }; /** @returns {ListViewSummary} */ declare function ListViewSummary(): ListViewSummary; @@ -1123,6 +1471,22 @@ type ListViewSummary = { total_pincodes_served: number; total_zones: number; }; +/** @returns {LocationRule} */ +declare function LocationRule(): LocationRule; +type LocationRule = { + includes?: LocationRuleValues[]; + type?: string; +}; +/** @returns {LocationRuleValues} */ +declare function LocationRuleValues(): LocationRuleValues; +type LocationRuleValues = { + display_name?: string; + id: string; + name?: string; + parent_id?: string; + parent_ids?: string[]; + sub_type?: string; +}; /** @returns {LogisticsResponse} */ declare function LogisticsResponse(): LogisticsResponse; type LogisticsResponse = { @@ -1154,6 +1518,113 @@ type OpeningClosing = { hour?: number; minute?: number; }; +/** @returns {PackageMaterial} */ +declare function PackageMaterial(): PackageMaterial; +type PackageMaterial = { + auto_calculate?: boolean; + channels: Channel[]; + error_rate: number; + height: number; + length: number; + max_weight?: number; + media?: string[]; + name: string; + package_type: string; + package_vol_weight?: number; + rules?: PackageMaterialRule[]; + size: string; + status: string; + store_ids: number[]; + track_inventory?: boolean; + weight: number; + width: number; +}; +/** @returns {PackageMaterialList} */ +declare function PackageMaterialList(): PackageMaterialList; +type PackageMaterialList = { + items?: PackageMaterialResponse; + page?: Page; +}; +/** @returns {PackageMaterialResponse} */ +declare function PackageMaterialResponse(): PackageMaterialResponse; +type PackageMaterialResponse = { + auto_calculate?: boolean; + channels: Channel[]; + error_rate: number; + height: number; + id?: string; + item_id?: number; + length: number; + max_weight?: number; + media?: string[]; + name: string; + package_type: string; + package_vol_weight?: number; + rules?: PackageMaterialRule[]; + size: string; + status: string; + store_ids: number[]; + track_inventory?: boolean; + weight: number; + width: number; +}; +/** @returns {PackageMaterialRule} */ +declare function PackageMaterialRule(): PackageMaterialRule; +type PackageMaterialRule = { + quantity?: PackageMaterialRuleQuantity; + rule_id?: string; + weight?: number; +}; +/** @returns {PackageMaterialRuleList} */ +declare function PackageMaterialRuleList(): PackageMaterialRuleList; +type PackageMaterialRuleList = { + items?: PackageRuleResponse; + page?: Page; +}; +/** @returns {PackageMaterialRuleQuantity} */ +declare function PackageMaterialRuleQuantity(): PackageMaterialRuleQuantity; +type PackageMaterialRuleQuantity = { + max?: number; + min?: number; +}; +/** @returns {PackageRule} */ +declare function PackageRule(): PackageRule; +type PackageRule = { + category_id?: PackageRuleCategory; + company_id: number; + is_active?: boolean; + name: string; + product_id?: PackageRuleProduct; + product_tag?: PackageRuleProductTag; + type: string; +}; +/** @returns {PackageRuleCategory} */ +declare function PackageRuleCategory(): PackageRuleCategory; +type PackageRuleCategory = { + includes?: number[]; +}; +/** @returns {PackageRuleProduct} */ +declare function PackageRuleProduct(): PackageRuleProduct; +type PackageRuleProduct = { + includes?: number[]; +}; +/** @returns {PackageRuleProductTag} */ +declare function PackageRuleProductTag(): PackageRuleProductTag; +type PackageRuleProductTag = { + includes?: string[]; +}; +/** @returns {PackageRuleResponse} */ +declare function PackageRuleResponse(): PackageRuleResponse; +type PackageRuleResponse = { + category_id?: PackageRuleCategory; + company_id: number; + id?: string; + is_active?: boolean; + name: string; + product_id?: PackageRuleProduct; + product_tag?: PackageRuleProductTag; + type: string; +}; /** @returns {Page} */ declare function Page(): Page; type Page = { @@ -1165,6 +1636,15 @@ type Page = { size?: number; type: string; }; +/** @returns {PageSchema} */ +declare function PageSchema(): PageSchema; +type PageSchema = { + current: number; + has_next: boolean; + item_total: number; + size: number; + type: string; +}; /** @returns {PincodeBulkViewResponse} */ declare function PincodeBulkViewResponse(): PincodeBulkViewResponse; type PincodeBulkViewResponse = { @@ -1293,6 +1773,37 @@ type ReAssignStoreResponse = { success: boolean; to_pincode: string; }; +/** @returns {RulePriorityRequest} */ +declare function RulePriorityRequest(): RulePriorityRequest; +type RulePriorityRequest = { + priority: number; + rule_id: string; +}; +/** @returns {RulePriorityResponse} */ +declare function RulePriorityResponse(): RulePriorityResponse; +type RulePriorityResponse = { + success?: boolean; +}; +/** @returns {SchemeRules} */ +declare function SchemeRules(): SchemeRules; +type SchemeRules = { + feature?: SchemeRulesFeatures; + payment_mode?: string[]; + region?: string; + transport_type?: string[]; + weight?: ArithmeticOperations; +}; +/** @returns {SchemeRulesFeatures} */ +declare function SchemeRulesFeatures(): SchemeRulesFeatures; +type SchemeRulesFeatures = { + battery_operated?: boolean; + e_waybill?: boolean; + flammable?: boolean; + hazmat?: boolean; + multi_part_shipments?: boolean; + quality_check?: boolean; + quick_response_code?: boolean; +}; /** @returns {SelfShipResponse} */ declare function SelfShipResponse(): SelfShipResponse; type SelfShipResponse = { @@ -1306,6 +1817,18 @@ type ServiceabilityErrorResponse = { type: string; value: string; }; +/** @returns {ServiceabilityModel} */ +declare function ServiceabilityModel(): ServiceabilityModel; +type ServiceabilityModel = { + is_first_mile: boolean; + is_installation: boolean; + is_last_mile: boolean; + is_qc: boolean; + is_return: boolean; + lm_cod_limit: number; + pickup_cutoff: string; + route_code: string; +}; /** @returns {ServiceabilityPageResponse} */ declare function ServiceabilityPageResponse(): ServiceabilityPageResponse; type ServiceabilityPageResponse = { @@ -1315,10 +1838,82 @@ type ServiceabilityPageResponse = { size?: number; type?: string; }; -/** @returns {ServiceabilityPayloadSchema} */ -declare function ServiceabilityPayloadSchema(): ServiceabilityPayloadSchema; -type ServiceabilityPayloadSchema = { - serviceability_type: string; +/** @returns {StorePrioritySchema} */ +declare function StorePrioritySchema(): StorePrioritySchema; +type StorePrioritySchema = { + id?: string; + name?: string; +}; +/** @returns {StoreRuleConditionSchema} */ +declare function StoreRuleConditionSchema(): StoreRuleConditionSchema; +type StoreRuleConditionSchema = { + brand_ids?: IntComparisonOperations; + category_ids?: IntComparisonOperations; + customer_radius?: CustomerRadiusSchema; + department_ids?: IntComparisonOperations; + order_place_date?: ArithmeticOperations; + product_ids?: IntComparisonOperations; + product_tags?: StringComparisonOperations; + store_tags?: StringComparisonOperations; + store_type?: StringComparisonOperations; + to_location?: LocationRule; + zone_ids?: StringComparisonOperations; +}; +/** @returns {StoreRuleConfigData} */ +declare function StoreRuleConfigData(): StoreRuleConfigData; +type StoreRuleConfigData = { + rule_ids?: string[]; + sort?: string[]; + store_priority?: StorePrioritySchema[]; + tag_based_priority?: string[]; + type_based_priority?: string[]; +}; +/** @returns {StoreRuleDataSchema} */ +declare function StoreRuleDataSchema(): StoreRuleDataSchema; +type StoreRuleDataSchema = { + application_id?: string; + company_id?: number; + conditions?: StoreRuleConditionSchema; + id?: string; + is_active?: boolean; + name?: string; + sort?: string[]; + store_priority?: StorePrioritySchema[]; + tag_based_priority?: string[]; + type_based_priority?: string[]; +}; +/** @returns {StoreRuleResponseSchema} */ +declare function StoreRuleResponseSchema(): StoreRuleResponseSchema; +type StoreRuleResponseSchema = { + conditions?: StoreRuleConditionSchema; + id?: string; + is_active?: boolean; + name?: string; + sort?: string[]; + store_priority?: StorePrioritySchema[]; + tag_based_priority?: string[]; + type?: string; + type_based_priority?: string[]; +}; +/** @returns {StoreRuleUpdateResponseSchema} */ +declare function StoreRuleUpdateResponseSchema(): StoreRuleUpdateResponseSchema; +type StoreRuleUpdateResponseSchema = { + application_id?: string; + company_id?: number; + conditions?: StoreRuleConditionSchema; + id?: string; + is_active?: boolean; + name?: string; + sort?: string[]; + store_priority?: StorePrioritySchema[]; + tag_based_priority?: string[]; + type?: string; + type_based_priority?: string[]; +}; +/** @returns {StringComparisonOperations} */ +declare function StringComparisonOperations(): StringComparisonOperations; +type StringComparisonOperations = { + includes?: string[]; }; /** @returns {TimmingResponse} */ declare function TimmingResponse(): TimmingResponse; @@ -1328,6 +1923,11 @@ type TimmingResponse = { opening?: OpeningClosing; weekday?: string; }; +/** @returns {UpdateZoneConfigRequest} */ +declare function UpdateZoneConfigRequest(): UpdateZoneConfigRequest; +type UpdateZoneConfigRequest = { + serviceability_type?: string; +}; /** @returns {UpdateZoneData} */ declare function UpdateZoneData(): UpdateZoneData; type UpdateZoneData = { @@ -1360,6 +1960,11 @@ type Zone = { type: string; zone_id: string; }; +/** @returns {ZoneConfig} */ +declare function ZoneConfig(): ZoneConfig; +type ZoneConfig = { + serviceability_type?: string; +}; /** @returns {ZoneDataItem} */ declare function ZoneDataItem(): ZoneDataItem; type ZoneDataItem = { @@ -1382,12 +1987,6 @@ type ZoneProductTypes = { tags: string[]; type: string; }; -/** @returns {ZoneRequest} */ -declare function ZoneRequest(): ZoneRequest; -type ZoneRequest = { - data: CreateZoneData; - identifier: string; -}; /** @returns {ZoneResponse} */ declare function ZoneResponse(): ZoneResponse; type ZoneResponse = { diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformModel.js b/sdk/platform/Serviceability/ServiceabilityPlatformModel.js index 172bf5a04..3a7652d1c 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformModel.js @@ -14,16 +14,10 @@ const Joi = require("joi"); */ /** - * @typedef ApplicationCompanyDpViewRequest - * @property {string} [dp_id] - */ - -/** - * @typedef ApplicationCompanyDpViewResponse - * @property {string} application_id - * @property {number} company_id - * @property {number} [courier_partner_id] - * @property {boolean} success + * @typedef ApplicationConfig + * @property {string[]} [rule_ids] + * @property {string[]} [sort] + * @property {ZoneConfig} [zones] */ /** @@ -53,27 +47,66 @@ const Joi = require("joi"); */ /** - * @typedef CommonError - * @property {Object} [error] - * @property {string} [status_code] - * @property {string} [success] + * @typedef ArithmeticOperations + * @property {number} [gt] + * @property {number} [gte] + * @property {number} [lt] + * @property {number} [lte] + */ + +/** + * @typedef BulkRegionJobSerializer + * @property {string} action + * @property {string} country + * @property {string} [file_path] + * @property {string} region */ /** - * @typedef CompanyDpAccountListResponse - * @property {Dp1[]} items + * @typedef BulkRegionResponse + * @property {BulkRegionResponseItemData[]} items * @property {Page} page - * @property {boolean} success */ /** - * @typedef CompanyDpAccountRequest - * @property {Dp1[]} data + * @typedef BulkRegionResponseItemData + * @property {string} action + * @property {string} batch_id + * @property {string} country + * @property {string} [error_file_path] + * @property {number} [failed] + * @property {Object[]} [failed_records] + * @property {string} file_path + * @property {string} region + * @property {string} status + * @property {number} [success] + * @property {number} [total] */ /** - * @typedef CompanyDpAccountResponse - * @property {boolean} success + * @typedef Channel + * @property {string} [id] + * @property {string} [type] + */ + +/** + * @typedef CommonError + * @property {Object} [error] + * @property {string} [status_code] + * @property {string} [success] + */ + +/** + * @typedef CompanyConfig + * @property {boolean} [logistics_as_actual] + * @property {string[]} rule_ids + * @property {string[]} sort + */ + +/** + * @typedef CompanyCourierPartnerAccountListResponse + * @property {CourierAccountResponse[]} items + * @property {Page} page */ /** @@ -98,167 +131,168 @@ const Joi = require("joi"); */ /** - * @typedef CreatedByResponse - * @property {string} [user_id] - * @property {string} [username] - */ - -/** - * @typedef CreateZoneData - * @property {string} [assignment_preference] - * @property {GetZoneDataViewChannels[]} channels - * @property {number} company_id - * @property {boolean} is_active - * @property {ZoneMappingType[]} mapping - * @property {string} name - * @property {ZoneProductTypes} product - * @property {string} region_type - * @property {string} slug - * @property {number[]} store_ids - */ - -/** - * @typedef DocumentsResponse - * @property {string} [legal_name] - * @property {string} [type] - * @property {string} [value] - * @property {boolean} [verified] - */ - -/** - * @typedef Dp - * @property {number} [area_code] - * @property {boolean} [assign_dp_from_sb] - * @property {string} [external_account_id] - * @property {number} [fm_priority] - * @property {string} [internal_account_id] - * @property {number} [lm_priority] - * @property {string[]} [operations] - * @property {string} [payment_mode] - * @property {number} [rvp_priority] - * @property {string} [transport_mode] + * @typedef CourierAccount + * @property {string} account_id + * @property {string} extension_id + * @property {boolean} is_own_account + * @property {boolean} is_self_ship + * @property {string} scheme_id + * @property {string} stage */ /** - * @typedef Dp1 + * @typedef CourierAccountResponse * @property {string} account_id - * @property {string} dp_id + * @property {boolean} is_own_account * @property {boolean} is_self_ship - * @property {string} name - * @property {string} plan_id - * @property {Object} plan_rules + * @property {string} scheme_id + * @property {CourierPartnerSchemeModel} scheme_rules * @property {string} stage */ /** - * @typedef DpAccountFailureResponse + * @typedef CourierPartnerAccountFailureResponse * @property {ErrorResponse[]} error - * @property {number} status_code * @property {boolean} success */ /** - * @typedef DPApplicationRuleRequest - * @property {string[]} shipping_rules - */ - -/** - * @typedef DPApplicationRuleResponse - * @property {DpRuleResponse[]} data - * @property {boolean} status_code - * @property {boolean} success + * @typedef CourierPartnerList + * @property {string} account_id + * @property {string} extension_id + * @property {boolean} is_self_ship + * @property {string} name */ /** - * @typedef DPCompanyRuleRequest - * @property {string[]} rule_ids + * @typedef CourierPartnerRule + * @property {CourierPartnerRuleConditions} conditions + * @property {CourierPartnerList[]} [cp_list] + * @property {boolean} is_active + * @property {string} name + * @property {string[]} sort */ /** - * @typedef DPCompanyRuleResponse - * @property {DpRuleResponse[]} data - * @property {number} status_code - * @property {boolean} success + * @typedef CourierPartnerRuleConditions + * @property {IntComparisonOperations} [brand_ids] + * @property {IntComparisonOperations} [category_ids] + * @property {IntComparisonOperations} [department_ids] + * @property {LocationRule} [forward] + * @property {ArithmeticOperations} [order_place_date] + * @property {StringComparisonOperations} [payment_mode] + * @property {IntComparisonOperations} [product_ids] + * @property {StringComparisonOperations} [product_tags] + * @property {LocationRule} [reverse] + * @property {ArithmeticOperations} [shipment_cost] + * @property {ArithmeticOperations} [shipment_volumetric_weight] + * @property {ArithmeticOperations} [shipment_weight] + * @property {IntComparisonOperations} [store_ids] + * @property {StringComparisonOperations} [store_tags] + * @property {StringComparisonOperations} [store_type] + * @property {StringComparisonOperations} [zone_ids] */ /** - * @typedef DpIds - * @property {boolean} enabled - * @property {Object} [meta] - * @property {number} priority + * @typedef CourierPartnerRulesListResponse + * @property {CourierPartnerRule[]} items + * @property {Page} page */ /** - * @typedef DpMultipleRuleSuccessResponse - * @property {DpRule[]} items - * @property {Page} page - * @property {boolean} success + * @typedef CourierPartnerSchemeFeatures + * @property {boolean} [cold_storage_goods] + * @property {boolean} [dangerous_goods] + * @property {boolean} [doorstep_exchange] + * @property {boolean} [doorstep_qc] + * @property {boolean} [doorstep_return] + * @property {boolean} [ewaybill] + * @property {boolean} [fragile_goods] + * @property {boolean} [mps] + * @property {boolean} [multi_pick_multi_drop] + * @property {boolean} [multi_pick_single_drop] + * @property {boolean} [ndr] + * @property {number} [ndr_attempts] + * @property {boolean} [openbox_delivery] + * @property {boolean} [product_installation] + * @property {boolean} [qr] + * @property {boolean} [restricted_goods] + * @property {boolean} [single_pick_multi_drop] + * @property {string} [status_updates] + */ + +/** + * @typedef CourierPartnerSchemeModel + * @property {string} delivery_type + * @property {string} extension_id + * @property {CourierPartnerSchemeFeatures} feature + * @property {string[]} payment_mode + * @property {string} region + * @property {string} scheme_id + * @property {string} stage + * @property {string} transport_type + * @property {ArithmeticOperations} weight */ /** - * @typedef DpRule - * @property {number} [company_id] - * @property {Object[]} conditions - * @property {Object} dp_ids - * @property {boolean} [is_active] - * @property {string} name + * @typedef CreatedByResponse + * @property {string} [user_id] + * @property {string} [username] */ /** - * @typedef DpRuleRequest - * @property {number} [company_id] - * @property {Object[]} conditions - * @property {Object} dp_ids + * @typedef CreateStoreRuleRequestSchema + * @property {StoreRuleConditionSchema} [conditions] * @property {boolean} [is_active] - * @property {string} name + * @property {string} [name] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string[]} [type_based_priority] */ /** - * @typedef DpRuleResponse + * @typedef CreateZoneData + * @property {string} [assignment_preference] + * @property {GetZoneDataViewChannels[]} channels * @property {number} company_id - * @property {string[]} conditions - * @property {Object} [created_by] - * @property {string} [created_on] - * @property {Object} dp_ids - * @property {boolean} [is_active] - * @property {Object} [modified_by] - * @property {string} [modified_on] + * @property {boolean} is_active + * @property {ZoneMappingType[]} mapping * @property {string} name - * @property {string} uid - */ - -/** - * @typedef DpRuleSuccessResponse - * @property {DpRule} data - * @property {number} status_code - * @property {boolean} success + * @property {string} region_type + * @property {string} slug + * @property {number[]} store_ids */ /** - * @typedef DpRulesUpdateRequest - * @property {Object[]} conditions - * @property {Object} dp_ids - * @property {boolean} is_active - * @property {string} name + * @typedef CustomerRadiusSchema + * @property {number} [gt] + * @property {number} [gte] + * @property {number} [lt] + * @property {number} [lte] + * @property {string} unit */ /** - * @typedef DpRuleUpdateSuccessResponse - * @property {DpRuleResponse} data - * @property {number} status_code - * @property {boolean} success + * @typedef DocumentsResponse + * @property {string} [legal_name] + * @property {string} [type] + * @property {string} [value] + * @property {boolean} [verified] */ /** - * @typedef DpSchemaInRuleListing - * @property {string} account_id - * @property {string} dp_id - * @property {boolean} is_self_ship - * @property {string} name - * @property {string} plan_id - * @property {Object} plan_rules - * @property {number} priority - * @property {string} stage + * @typedef Dp + * @property {number} [area_code] + * @property {boolean} [assign_dp_from_sb] + * @property {string} [external_account_id] + * @property {number} [fm_priority] + * @property {string} [internal_account_id] + * @property {number} [lm_priority] + * @property {string[]} [operations] + * @property {string} [payment_mode] + * @property {number} [rvp_priority] + * @property {string} [transport_mode] */ /** @@ -275,7 +309,6 @@ const Joi = require("joi"); /** * @typedef EntityRegionView_Items - * @property {string} [display_name] * @property {string} name * @property {string} sub_type * @property {string} uid @@ -298,8 +331,8 @@ const Joi = require("joi"); /** * @typedef EntityRegionView_Response + * @property {EntityRegionView_Items[]} data * @property {EntityRegionView_Error} error - * @property {EntityRegionView_Items[]} [items] * @property {EntityRegionView_page} page * @property {boolean} success */ @@ -326,21 +359,48 @@ const Joi = require("joi"); /** * @typedef FailureResponse * @property {ErrorResponse[]} error - * @property {number} status_code * @property {boolean} success */ +/** + * @typedef getAppRegionZonesResponse + * @property {ListViewItems[]} items + * @property {PageSchema[]} page + */ + /** * @typedef GetSingleZoneDataViewResponse * @property {GetZoneDataViewItems} data */ +/** + * @typedef GetStoreRulesApiResponse + * @property {StoreRuleDataSchema[]} [items] + * @property {Page} [page] + */ + /** * @typedef GetStoresViewResponse * @property {ItemResponse[]} [items] * @property {ServiceabilityPageResponse} page */ +/** + * @typedef GetZoneByIdSchema + * @property {string} [assignment_preference] + * @property {GetZoneDataViewChannels[]} channels + * @property {number} [company_id] + * @property {boolean} is_active + * @property {ZoneMappingType[]} mapping + * @property {string} name + * @property {ZoneProductTypes} product + * @property {string} region_type + * @property {string} slug + * @property {number[]} store_ids + * @property {number} stores_count + * @property {string} zone_id + */ + /** * @typedef GetZoneDataViewChannels * @property {string} channel_id @@ -355,9 +415,8 @@ const Joi = require("joi"); * @property {boolean} is_active * @property {ZoneMappingType[]} mapping * @property {string} name - * @property {number} pincodes_count * @property {ZoneProductTypes} product - * @property {string} region_type + * @property {string} [region_type] * @property {string} slug * @property {number[]} store_ids * @property {number} stores_count @@ -388,6 +447,11 @@ const Joi = require("joi"); * @property {EwayBillResponse} [e_waybill] */ +/** + * @typedef IntComparisonOperations + * @property {number[]} [includes] + */ + /** * @typedef IntegrationTypeResponse * @property {string} [inventory] @@ -434,12 +498,12 @@ const Joi = require("joi"); /** * @typedef ListViewItems - * @property {ListViewChannels[]} channels + * @property {ListViewChannels} channels * @property {number} company_id * @property {boolean} is_active * @property {string} name - * @property {number} pincodes_count * @property {ListViewProduct} product + * @property {number} regions_count * @property {string} slug * @property {number} stores_count * @property {string} zone_id @@ -454,8 +518,7 @@ const Joi = require("joi"); /** * @typedef ListViewResponse * @property {ListViewItems[]} items - * @property {ZoneDataItem} page - * @property {ListViewSummary} summary + * @property {ZoneDataItem[]} page */ /** @@ -465,6 +528,22 @@ const Joi = require("joi"); * @property {number} total_zones */ +/** + * @typedef LocationRule + * @property {LocationRuleValues[]} [includes] + * @property {string} [type] + */ + +/** + * @typedef LocationRuleValues + * @property {string} [display_name] + * @property {string} id + * @property {string} [name] + * @property {string} [parent_id] + * @property {string[]} [parent_ids] + * @property {string} [sub_type] + */ + /** * @typedef LogisticsResponse * @property {Dp} [dp] @@ -496,6 +575,113 @@ const Joi = require("joi"); * @property {number} [minute] */ +/** + * @typedef PackageMaterial + * @property {boolean} [auto_calculate] + * @property {Channel[]} channels + * @property {number} error_rate + * @property {number} height + * @property {number} length + * @property {number} [max_weight] + * @property {string[]} [media] + * @property {string} name + * @property {string} package_type + * @property {number} [package_vol_weight] + * @property {PackageMaterialRule[]} [rules] + * @property {string} size + * @property {string} status + * @property {number[]} store_ids + * @property {boolean} [track_inventory] + * @property {number} weight + * @property {number} width + */ + +/** + * @typedef PackageMaterialList + * @property {PackageMaterialResponse} [items] + * @property {Page} [page] + */ + +/** + * @typedef PackageMaterialResponse + * @property {boolean} [auto_calculate] + * @property {Channel[]} channels + * @property {number} error_rate + * @property {number} height + * @property {string} [id] + * @property {number} [item_id] + * @property {number} length + * @property {number} [max_weight] + * @property {string[]} [media] + * @property {string} name + * @property {string} package_type + * @property {number} [package_vol_weight] + * @property {PackageMaterialRule[]} [rules] + * @property {string} size + * @property {string} status + * @property {number[]} store_ids + * @property {boolean} [track_inventory] + * @property {number} weight + * @property {number} width + */ + +/** + * @typedef PackageMaterialRule + * @property {PackageMaterialRuleQuantity} [quantity] + * @property {string} [rule_id] + * @property {number} [weight] + */ + +/** + * @typedef PackageMaterialRuleList + * @property {PackageRuleResponse} [items] + * @property {Page} [page] + */ + +/** + * @typedef PackageMaterialRuleQuantity + * @property {number} [max] + * @property {number} [min] + */ + +/** + * @typedef PackageRule + * @property {PackageRuleCategory} [category_id] + * @property {number} company_id + * @property {boolean} [is_active] + * @property {string} name + * @property {PackageRuleProduct} [product_id] + * @property {PackageRuleProductTag} [product_tag] + * @property {string} type + */ + +/** + * @typedef PackageRuleCategory + * @property {number[]} [includes] + */ + +/** + * @typedef PackageRuleProduct + * @property {number[]} [includes] + */ + +/** + * @typedef PackageRuleProductTag + * @property {string[]} [includes] + */ + +/** + * @typedef PackageRuleResponse + * @property {PackageRuleCategory} [category_id] + * @property {number} company_id + * @property {string} [id] + * @property {boolean} [is_active] + * @property {string} name + * @property {PackageRuleProduct} [product_id] + * @property {PackageRuleProductTag} [product_tag] + * @property {string} type + */ + /** * @typedef Page * @property {number} [current] @@ -507,6 +693,15 @@ const Joi = require("joi"); * @property {string} type */ +/** + * @typedef PageSchema + * @property {number} current + * @property {boolean} has_next + * @property {number} item_total + * @property {number} size + * @property {string} type + */ + /** * @typedef PincodeBulkViewResponse * @property {string} batch_id @@ -635,6 +830,37 @@ const Joi = require("joi"); * @property {string} to_pincode */ +/** + * @typedef RulePriorityRequest + * @property {number} priority + * @property {string} rule_id + */ + +/** + * @typedef RulePriorityResponse + * @property {boolean} [success] + */ + +/** + * @typedef SchemeRules + * @property {SchemeRulesFeatures} [feature] + * @property {string[]} [payment_mode] + * @property {string} [region] + * @property {string[]} [transport_type] + * @property {ArithmeticOperations} [weight] + */ + +/** + * @typedef SchemeRulesFeatures + * @property {boolean} [battery_operated] + * @property {boolean} [e_waybill] + * @property {boolean} [flammable] + * @property {boolean} [hazmat] + * @property {boolean} [multi_part_shipments] + * @property {boolean} [quality_check] + * @property {boolean} [quick_response_code] + */ + /** * @typedef SelfShipResponse * @property {boolean} is_active @@ -648,6 +874,18 @@ const Joi = require("joi"); * @property {string} value */ +/** + * @typedef ServiceabilityModel + * @property {boolean} is_first_mile + * @property {boolean} is_installation + * @property {boolean} is_last_mile + * @property {boolean} is_qc + * @property {boolean} is_return + * @property {number} lm_cod_limit + * @property {string} pickup_cutoff + * @property {string} route_code + */ + /** * @typedef ServiceabilityPageResponse * @property {number} [current] @@ -658,8 +896,80 @@ const Joi = require("joi"); */ /** - * @typedef ServiceabilityPayloadSchema - * @property {string} serviceability_type + * @typedef StorePrioritySchema + * @property {string} [id] + * @property {string} [name] + */ + +/** + * @typedef StoreRuleConditionSchema + * @property {IntComparisonOperations} [brand_ids] + * @property {IntComparisonOperations} [category_ids] + * @property {CustomerRadiusSchema} [customer_radius] + * @property {IntComparisonOperations} [department_ids] + * @property {ArithmeticOperations} [order_place_date] + * @property {IntComparisonOperations} [product_ids] + * @property {StringComparisonOperations} [product_tags] + * @property {StringComparisonOperations} [store_tags] + * @property {StringComparisonOperations} [store_type] + * @property {LocationRule} [to_location] + * @property {StringComparisonOperations} [zone_ids] + */ + +/** + * @typedef StoreRuleConfigData + * @property {string[]} [rule_ids] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string[]} [type_based_priority] + */ + +/** + * @typedef StoreRuleDataSchema + * @property {string} [application_id] + * @property {number} [company_id] + * @property {StoreRuleConditionSchema} [conditions] + * @property {string} [id] + * @property {boolean} [is_active] + * @property {string} [name] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string[]} [type_based_priority] + */ + +/** + * @typedef StoreRuleResponseSchema + * @property {StoreRuleConditionSchema} [conditions] + * @property {string} [id] + * @property {boolean} [is_active] + * @property {string} [name] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string} [type] + * @property {string[]} [type_based_priority] + */ + +/** + * @typedef StoreRuleUpdateResponseSchema + * @property {string} [application_id] + * @property {number} [company_id] + * @property {StoreRuleConditionSchema} [conditions] + * @property {string} [id] + * @property {boolean} [is_active] + * @property {string} [name] + * @property {string[]} [sort] + * @property {StorePrioritySchema[]} [store_priority] + * @property {string[]} [tag_based_priority] + * @property {string} [type] + * @property {string[]} [type_based_priority] + */ + +/** + * @typedef StringComparisonOperations + * @property {string[]} [includes] */ /** @@ -670,6 +980,11 @@ const Joi = require("joi"); * @property {string} [weekday] */ +/** + * @typedef UpdateZoneConfigRequest + * @property {string} [serviceability_type] + */ + /** * @typedef UpdateZoneData * @property {string} [assignment_preference] @@ -702,6 +1017,11 @@ const Joi = require("joi"); * @property {string} zone_id */ +/** + * @typedef ZoneConfig + * @property {string} [serviceability_type] + */ + /** * @typedef ZoneDataItem * @property {number} current @@ -724,12 +1044,6 @@ const Joi = require("joi"); * @property {string} type */ -/** - * @typedef ZoneRequest - * @property {CreateZoneData} data - * @property {string} identifier - */ - /** * @typedef ZoneResponse * @property {number} status_code @@ -765,20 +1079,12 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ApplicationCompanyDpViewRequest} */ - static ApplicationCompanyDpViewRequest() { + /** @returns {ApplicationConfig} */ + static ApplicationConfig() { return Joi.object({ - dp_id: Joi.string().allow(""), - }); - } - - /** @returns {ApplicationCompanyDpViewResponse} */ - static ApplicationCompanyDpViewResponse() { - return Joi.object({ - application_id: Joi.string().allow("").required(), - company_id: Joi.number().required(), - courier_partner_id: Joi.number(), - success: Joi.boolean().required(), + rule_ids: Joi.array().items(Joi.string().allow("")), + sort: Joi.array().items(Joi.string().allow("")), + zones: ServiceabilityPlatformModel.ZoneConfig(), }); } @@ -816,35 +1122,86 @@ class ServiceabilityPlatformModel { }); } - /** @returns {CommonError} */ - static CommonError() { + /** @returns {ArithmeticOperations} */ + static ArithmeticOperations() { return Joi.object({ - error: Joi.any(), - status_code: Joi.string().allow(""), - success: Joi.string().allow(""), + gt: Joi.number(), + gte: Joi.number(), + lt: Joi.number(), + lte: Joi.number(), + }); + } + + /** @returns {BulkRegionJobSerializer} */ + static BulkRegionJobSerializer() { + return Joi.object({ + action: Joi.string().allow("").required(), + country: Joi.string().allow("").required(), + file_path: Joi.string().allow(""), + region: Joi.string().allow("").required(), }); } - /** @returns {CompanyDpAccountListResponse} */ - static CompanyDpAccountListResponse() { + /** @returns {BulkRegionResponse} */ + static BulkRegionResponse() { return Joi.object({ - items: Joi.array().items(ServiceabilityPlatformModel.Dp1()).required(), + items: Joi.array() + .items(ServiceabilityPlatformModel.BulkRegionResponseItemData()) + .required(), page: ServiceabilityPlatformModel.Page().required(), - success: Joi.boolean().required(), }); } - /** @returns {CompanyDpAccountRequest} */ - static CompanyDpAccountRequest() { + /** @returns {BulkRegionResponseItemData} */ + static BulkRegionResponseItemData() { return Joi.object({ - data: Joi.array().items(ServiceabilityPlatformModel.Dp1()).required(), + action: Joi.string().allow("").required(), + batch_id: Joi.string().allow("").required(), + country: Joi.string().allow("").required(), + error_file_path: Joi.string().allow(""), + failed: Joi.number(), + failed_records: Joi.array().items(Joi.any()), + file_path: Joi.string().allow("").required(), + region: Joi.string().allow("").required(), + status: Joi.string().allow("").required(), + success: Joi.number(), + total: Joi.number(), }); } - /** @returns {CompanyDpAccountResponse} */ - static CompanyDpAccountResponse() { + /** @returns {Channel} */ + static Channel() { return Joi.object({ - success: Joi.boolean().required(), + id: Joi.string().allow(""), + type: Joi.string().allow(""), + }); + } + + /** @returns {CommonError} */ + static CommonError() { + return Joi.object({ + error: Joi.any(), + status_code: Joi.string().allow(""), + success: Joi.string().allow(""), + }); + } + + /** @returns {CompanyConfig} */ + static CompanyConfig() { + return Joi.object({ + logistics_as_actual: Joi.boolean(), + rule_ids: Joi.array().items(Joi.string().allow("")).required(), + sort: Joi.array().items(Joi.string().allow("")).required(), + }); + } + + /** @returns {CompanyCourierPartnerAccountListResponse} */ + static CompanyCourierPartnerAccountListResponse() { + return Joi.object({ + items: Joi.array() + .items(ServiceabilityPlatformModel.CourierAccountResponse()) + .required(), + page: ServiceabilityPlatformModel.Page().required(), }); } @@ -877,219 +1234,210 @@ class ServiceabilityPlatformModel { }); } - /** @returns {CreatedByResponse} */ - static CreatedByResponse() { - return Joi.object({ - user_id: Joi.string().allow(""), - username: Joi.string().allow(""), - }); - } - - /** @returns {CreateZoneData} */ - static CreateZoneData() { + /** @returns {CourierAccount} */ + static CourierAccount() { return Joi.object({ - assignment_preference: Joi.string().allow(""), - channels: Joi.array() - .items(ServiceabilityPlatformModel.GetZoneDataViewChannels()) - .required(), - company_id: Joi.number().required(), - is_active: Joi.boolean().required(), - mapping: Joi.array() - .items(ServiceabilityPlatformModel.ZoneMappingType()) - .required(), - name: Joi.string().allow("").required(), - product: ServiceabilityPlatformModel.ZoneProductTypes().required(), - region_type: Joi.string().allow("").required(), - slug: Joi.string().allow("").required(), - store_ids: Joi.array().items(Joi.number()).required(), - }); - } - - /** @returns {DocumentsResponse} */ - static DocumentsResponse() { - return Joi.object({ - legal_name: Joi.string().allow(""), - type: Joi.string().allow(""), - value: Joi.string().allow(""), - verified: Joi.boolean(), - }); - } - - /** @returns {Dp} */ - static Dp() { - return Joi.object({ - area_code: Joi.number().allow(null), - assign_dp_from_sb: Joi.boolean(), - external_account_id: Joi.string().allow("").allow(null), - fm_priority: Joi.number(), - internal_account_id: Joi.string().allow(""), - lm_priority: Joi.number(), - operations: Joi.array().items(Joi.string().allow("")), - payment_mode: Joi.string().allow(""), - rvp_priority: Joi.number(), - transport_mode: Joi.string().allow(""), + account_id: Joi.string().allow("").required(), + extension_id: Joi.string().allow("").required(), + is_own_account: Joi.boolean().required(), + is_self_ship: Joi.boolean().required(), + scheme_id: Joi.string().allow("").required(), + stage: Joi.string().allow("").required(), }); } - /** @returns {Dp1} */ - static Dp1() { + /** @returns {CourierAccountResponse} */ + static CourierAccountResponse() { return Joi.object({ account_id: Joi.string().allow("").required(), - dp_id: Joi.string().allow("").required(), + is_own_account: Joi.boolean().required(), is_self_ship: Joi.boolean().required(), - name: Joi.string().allow("").required(), - plan_id: Joi.string().allow("").required(), - plan_rules: Joi.any().required(), + scheme_id: Joi.string().allow("").required(), + scheme_rules: ServiceabilityPlatformModel.CourierPartnerSchemeModel().required(), stage: Joi.string().allow("").required(), }); } - /** @returns {DpAccountFailureResponse} */ - static DpAccountFailureResponse() { + /** @returns {CourierPartnerAccountFailureResponse} */ + static CourierPartnerAccountFailureResponse() { return Joi.object({ error: Joi.array() .items(ServiceabilityPlatformModel.ErrorResponse()) .required(), - status_code: Joi.number().required(), success: Joi.boolean().required(), }); } - /** @returns {DPApplicationRuleRequest} */ - static DPApplicationRuleRequest() { + /** @returns {CourierPartnerList} */ + static CourierPartnerList() { return Joi.object({ - shipping_rules: Joi.array().items(Joi.string().allow("")).required(), + account_id: Joi.string().allow("").required(), + extension_id: Joi.string().allow("").required(), + is_self_ship: Joi.boolean().required(), + name: Joi.string().allow("").required(), }); } - /** @returns {DPApplicationRuleResponse} */ - static DPApplicationRuleResponse() { + /** @returns {CourierPartnerRule} */ + static CourierPartnerRule() { return Joi.object({ - data: Joi.array() - .items(ServiceabilityPlatformModel.DpRuleResponse()) - .required(), - status_code: Joi.boolean().required(), - success: Joi.boolean().required(), + conditions: ServiceabilityPlatformModel.CourierPartnerRuleConditions().required(), + cp_list: Joi.array().items( + ServiceabilityPlatformModel.CourierPartnerList() + ), + is_active: Joi.boolean().required(), + name: Joi.string().allow("").required(), + sort: Joi.array().items(Joi.string().allow("")).required(), }); } - /** @returns {DPCompanyRuleRequest} */ - static DPCompanyRuleRequest() { + /** @returns {CourierPartnerRuleConditions} */ + static CourierPartnerRuleConditions() { return Joi.object({ - rule_ids: Joi.array().items(Joi.string().allow("")).required(), + brand_ids: ServiceabilityPlatformModel.IntComparisonOperations(), + category_ids: ServiceabilityPlatformModel.IntComparisonOperations(), + department_ids: ServiceabilityPlatformModel.IntComparisonOperations(), + forward: ServiceabilityPlatformModel.LocationRule(), + order_place_date: ServiceabilityPlatformModel.ArithmeticOperations(), + payment_mode: ServiceabilityPlatformModel.StringComparisonOperations(), + product_ids: ServiceabilityPlatformModel.IntComparisonOperations(), + product_tags: ServiceabilityPlatformModel.StringComparisonOperations(), + reverse: ServiceabilityPlatformModel.LocationRule(), + shipment_cost: ServiceabilityPlatformModel.ArithmeticOperations(), + shipment_volumetric_weight: ServiceabilityPlatformModel.ArithmeticOperations(), + shipment_weight: ServiceabilityPlatformModel.ArithmeticOperations(), + store_ids: ServiceabilityPlatformModel.IntComparisonOperations(), + store_tags: ServiceabilityPlatformModel.StringComparisonOperations(), + store_type: ServiceabilityPlatformModel.StringComparisonOperations(), + zone_ids: ServiceabilityPlatformModel.StringComparisonOperations(), }); } - /** @returns {DPCompanyRuleResponse} */ - static DPCompanyRuleResponse() { + /** @returns {CourierPartnerRulesListResponse} */ + static CourierPartnerRulesListResponse() { return Joi.object({ - data: Joi.array() - .items(ServiceabilityPlatformModel.DpRuleResponse()) + items: Joi.array() + .items(ServiceabilityPlatformModel.CourierPartnerRule()) .required(), - status_code: Joi.number().required(), - success: Joi.boolean().required(), - }); - } - - /** @returns {DpIds} */ - static DpIds() { - return Joi.object({ - enabled: Joi.boolean().required(), - meta: Joi.any(), - priority: Joi.number().required(), - }); - } - - /** @returns {DpMultipleRuleSuccessResponse} */ - static DpMultipleRuleSuccessResponse() { - return Joi.object({ - items: Joi.array().items(ServiceabilityPlatformModel.DpRule()).required(), page: ServiceabilityPlatformModel.Page().required(), - success: Joi.boolean().required(), }); } - /** @returns {DpRule} */ - static DpRule() { - return Joi.object({ - company_id: Joi.number(), - conditions: Joi.array().items(Joi.any()).required(), - dp_ids: Joi.object() - .pattern(/\S/, ServiceabilityPlatformModel.DpSchemaInRuleListing()) - .required(), - is_active: Joi.boolean(), - name: Joi.string().allow("").required(), + /** @returns {CourierPartnerSchemeFeatures} */ + static CourierPartnerSchemeFeatures() { + return Joi.object({ + cold_storage_goods: Joi.boolean(), + dangerous_goods: Joi.boolean(), + doorstep_exchange: Joi.boolean(), + doorstep_qc: Joi.boolean(), + doorstep_return: Joi.boolean(), + ewaybill: Joi.boolean(), + fragile_goods: Joi.boolean(), + mps: Joi.boolean(), + multi_pick_multi_drop: Joi.boolean(), + multi_pick_single_drop: Joi.boolean(), + ndr: Joi.boolean(), + ndr_attempts: Joi.number(), + openbox_delivery: Joi.boolean(), + product_installation: Joi.boolean(), + qr: Joi.boolean(), + restricted_goods: Joi.boolean(), + single_pick_multi_drop: Joi.boolean(), + status_updates: Joi.string().allow(""), + }); + } + + /** @returns {CourierPartnerSchemeModel} */ + static CourierPartnerSchemeModel() { + return Joi.object({ + delivery_type: Joi.string().allow("").required(), + extension_id: Joi.string().allow("").required(), + feature: ServiceabilityPlatformModel.CourierPartnerSchemeFeatures().required(), + payment_mode: Joi.array().items(Joi.string().allow("")).required(), + region: Joi.string().allow("").required(), + scheme_id: Joi.string().allow("").required(), + stage: Joi.string().allow("").required(), + transport_type: Joi.string().allow("").required(), + weight: ServiceabilityPlatformModel.ArithmeticOperations().required(), }); } - /** @returns {DpRuleRequest} */ - static DpRuleRequest() { + /** @returns {CreatedByResponse} */ + static CreatedByResponse() { return Joi.object({ - company_id: Joi.number(), - conditions: Joi.array().items(Joi.any()).required(), - dp_ids: Joi.object() - .pattern(/\S/, ServiceabilityPlatformModel.DpIds()) - .required(), - is_active: Joi.boolean(), - name: Joi.string().allow("").required(), + user_id: Joi.string().allow(""), + username: Joi.string().allow(""), }); } - /** @returns {DpRuleResponse} */ - static DpRuleResponse() { + /** @returns {CreateStoreRuleRequestSchema} */ + static CreateStoreRuleRequestSchema() { return Joi.object({ - company_id: Joi.number().required(), - conditions: Joi.array().items(Joi.string().allow("")).required(), - created_by: Joi.any(), - created_on: Joi.string().allow(""), - dp_ids: Joi.any().required(), + conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(), is_active: Joi.boolean(), - modified_by: Joi.any(), - modified_on: Joi.string().allow(""), - name: Joi.string().allow("").required(), - uid: Joi.string().allow("").required(), + name: Joi.string().allow(""), + sort: Joi.array().items(Joi.string().allow("")), + store_priority: Joi.array().items( + ServiceabilityPlatformModel.StorePrioritySchema() + ), + tag_based_priority: Joi.array().items(Joi.string().allow("")), + type_based_priority: Joi.array().items(Joi.string().allow("")), }); } - /** @returns {DpRuleSuccessResponse} */ - static DpRuleSuccessResponse() { + /** @returns {CreateZoneData} */ + static CreateZoneData() { return Joi.object({ - data: ServiceabilityPlatformModel.DpRule().required(), - status_code: Joi.number().required(), - success: Joi.boolean().required(), + assignment_preference: Joi.string().allow(""), + channels: Joi.array() + .items(ServiceabilityPlatformModel.GetZoneDataViewChannels()) + .required(), + company_id: Joi.number().required(), + is_active: Joi.boolean().required(), + mapping: Joi.array() + .items(ServiceabilityPlatformModel.ZoneMappingType()) + .required(), + name: Joi.string().allow("").required(), + region_type: Joi.string().allow("").required(), + slug: Joi.string().allow("").required(), + store_ids: Joi.array().items(Joi.number()).required(), }); } - /** @returns {DpRulesUpdateRequest} */ - static DpRulesUpdateRequest() { + /** @returns {CustomerRadiusSchema} */ + static CustomerRadiusSchema() { return Joi.object({ - conditions: Joi.array().items(Joi.any()).required(), - dp_ids: Joi.object().pattern(/\S/, Joi.any()).required(), - is_active: Joi.boolean().required(), - name: Joi.string().allow("").required(), + gt: Joi.number(), + gte: Joi.number(), + lt: Joi.number(), + lte: Joi.number(), + unit: Joi.string().allow("").required(), }); } - /** @returns {DpRuleUpdateSuccessResponse} */ - static DpRuleUpdateSuccessResponse() { + /** @returns {DocumentsResponse} */ + static DocumentsResponse() { return Joi.object({ - data: ServiceabilityPlatformModel.DpRuleResponse().required(), - status_code: Joi.number().required(), - success: Joi.boolean().required(), + legal_name: Joi.string().allow(""), + type: Joi.string().allow(""), + value: Joi.string().allow(""), + verified: Joi.boolean(), }); } - /** @returns {DpSchemaInRuleListing} */ - static DpSchemaInRuleListing() { + /** @returns {Dp} */ + static Dp() { return Joi.object({ - account_id: Joi.string().allow("").required(), - dp_id: Joi.string().allow("").required(), - is_self_ship: Joi.boolean().required(), - name: Joi.string().allow("").required(), - plan_id: Joi.string().allow("").required(), - plan_rules: Joi.any().required(), - priority: Joi.number().required(), - stage: Joi.string().allow("").required(), + area_code: Joi.number().allow(null), + assign_dp_from_sb: Joi.boolean(), + external_account_id: Joi.string().allow("").allow(null), + fm_priority: Joi.number(), + internal_account_id: Joi.string().allow(""), + lm_priority: Joi.number(), + operations: Joi.array().items(Joi.string().allow("")), + payment_mode: Joi.string().allow(""), + rvp_priority: Joi.number(), + transport_mode: Joi.string().allow(""), }); } @@ -1112,7 +1460,6 @@ class ServiceabilityPlatformModel { /** @returns {EntityRegionView_Items} */ static EntityRegionView_Items() { return Joi.object({ - display_name: Joi.string().allow(""), name: Joi.string().allow("").required(), sub_type: Joi.string().allow("").required(), uid: Joi.string().allow("").required(), @@ -1141,10 +1488,10 @@ class ServiceabilityPlatformModel { /** @returns {EntityRegionView_Response} */ static EntityRegionView_Response() { return Joi.object({ + data: Joi.array() + .items(ServiceabilityPlatformModel.EntityRegionView_Items()) + .required(), error: ServiceabilityPlatformModel.EntityRegionView_Error().required(), - items: Joi.array().items( - ServiceabilityPlatformModel.EntityRegionView_Items() - ), page: ServiceabilityPlatformModel.EntityRegionView_page().required(), success: Joi.boolean().required(), }); @@ -1181,11 +1528,22 @@ class ServiceabilityPlatformModel { error: Joi.array() .items(ServiceabilityPlatformModel.ErrorResponse()) .required(), - status_code: Joi.number().required(), success: Joi.boolean().required(), }); } + /** @returns {getAppRegionZonesResponse} */ + static getAppRegionZonesResponse() { + return Joi.object({ + items: Joi.array() + .items(ServiceabilityPlatformModel.ListViewItems()) + .required(), + page: Joi.array() + .items(ServiceabilityPlatformModel.PageSchema()) + .required(), + }); + } + /** @returns {GetSingleZoneDataViewResponse} */ static GetSingleZoneDataViewResponse() { return Joi.object({ @@ -1193,6 +1551,16 @@ class ServiceabilityPlatformModel { }); } + /** @returns {GetStoreRulesApiResponse} */ + static GetStoreRulesApiResponse() { + return Joi.object({ + items: Joi.array().items( + ServiceabilityPlatformModel.StoreRuleDataSchema() + ), + page: ServiceabilityPlatformModel.Page(), + }); + } + /** @returns {GetStoresViewResponse} */ static GetStoresViewResponse() { return Joi.object({ @@ -1201,6 +1569,28 @@ class ServiceabilityPlatformModel { }); } + /** @returns {GetZoneByIdSchema} */ + static GetZoneByIdSchema() { + return Joi.object({ + assignment_preference: Joi.string().allow(""), + channels: Joi.array() + .items(ServiceabilityPlatformModel.GetZoneDataViewChannels()) + .required(), + company_id: Joi.number(), + is_active: Joi.boolean().required(), + mapping: Joi.array() + .items(ServiceabilityPlatformModel.ZoneMappingType()) + .required(), + name: Joi.string().allow("").required(), + product: ServiceabilityPlatformModel.ZoneProductTypes().required(), + region_type: Joi.string().allow("").required(), + slug: Joi.string().allow("").required(), + store_ids: Joi.array().items(Joi.number()).required(), + stores_count: Joi.number().required(), + zone_id: Joi.string().allow("").required(), + }); + } + /** @returns {GetZoneDataViewChannels} */ static GetZoneDataViewChannels() { return Joi.object({ @@ -1222,9 +1612,8 @@ class ServiceabilityPlatformModel { .items(ServiceabilityPlatformModel.ZoneMappingType()) .required(), name: Joi.string().allow("").required(), - pincodes_count: Joi.number().required(), product: ServiceabilityPlatformModel.ZoneProductTypes().required(), - region_type: Joi.string().allow("").required(), + region_type: Joi.string().allow(""), slug: Joi.string().allow("").required(), store_ids: Joi.array().items(Joi.number()).required(), stores_count: Joi.number().required(), @@ -1268,6 +1657,13 @@ class ServiceabilityPlatformModel { }); } + /** @returns {IntComparisonOperations} */ + static IntComparisonOperations() { + return Joi.object({ + includes: Joi.array().items(Joi.number()), + }); + } + /** @returns {IntegrationTypeResponse} */ static IntegrationTypeResponse() { return Joi.object({ @@ -1325,14 +1721,12 @@ class ServiceabilityPlatformModel { /** @returns {ListViewItems} */ static ListViewItems() { return Joi.object({ - channels: Joi.array() - .items(ServiceabilityPlatformModel.ListViewChannels()) - .required(), + channels: ServiceabilityPlatformModel.ListViewChannels().required(), company_id: Joi.number().required(), is_active: Joi.boolean().required(), name: Joi.string().allow("").required(), - pincodes_count: Joi.number().required(), product: ServiceabilityPlatformModel.ListViewProduct().required(), + regions_count: Joi.number().required(), slug: Joi.string().allow("").required(), stores_count: Joi.number().required(), zone_id: Joi.string().allow("").required(), @@ -1353,8 +1747,9 @@ class ServiceabilityPlatformModel { items: Joi.array() .items(ServiceabilityPlatformModel.ListViewItems()) .required(), - page: ServiceabilityPlatformModel.ZoneDataItem().required(), - summary: ServiceabilityPlatformModel.ListViewSummary().required(), + page: Joi.array() + .items(ServiceabilityPlatformModel.ZoneDataItem()) + .required(), }); } @@ -1367,6 +1762,28 @@ class ServiceabilityPlatformModel { }); } + /** @returns {LocationRule} */ + static LocationRule() { + return Joi.object({ + includes: Joi.array().items( + ServiceabilityPlatformModel.LocationRuleValues() + ), + type: Joi.string().allow(""), + }); + } + + /** @returns {LocationRuleValues} */ + static LocationRuleValues() { + return Joi.object({ + display_name: Joi.string().allow(""), + id: Joi.string().allow("").required(), + name: Joi.string().allow(""), + parent_id: Joi.string().allow(""), + parent_ids: Joi.array().items(Joi.string().allow("")), + sub_type: Joi.string().allow(""), + }); + } + /** @returns {LogisticsResponse} */ static LogisticsResponse() { return Joi.object({ @@ -1408,6 +1825,143 @@ class ServiceabilityPlatformModel { }); } + /** @returns {PackageMaterial} */ + static PackageMaterial() { + return Joi.object({ + auto_calculate: Joi.boolean(), + channels: Joi.array() + .items(ServiceabilityPlatformModel.Channel()) + .required(), + error_rate: Joi.number().required(), + height: Joi.number().required(), + length: Joi.number().required(), + max_weight: Joi.number(), + media: Joi.array().items(Joi.string().allow("")), + name: Joi.string().allow("").required(), + package_type: Joi.string().allow("").required(), + package_vol_weight: Joi.number(), + rules: Joi.array().items( + ServiceabilityPlatformModel.PackageMaterialRule() + ), + size: Joi.string().allow("").required(), + status: Joi.string().allow("").required(), + store_ids: Joi.array().items(Joi.number()).required(), + track_inventory: Joi.boolean(), + weight: Joi.number().required(), + width: Joi.number().required(), + }); + } + + /** @returns {PackageMaterialList} */ + static PackageMaterialList() { + return Joi.object({ + items: ServiceabilityPlatformModel.PackageMaterialResponse(), + page: ServiceabilityPlatformModel.Page(), + }); + } + + /** @returns {PackageMaterialResponse} */ + static PackageMaterialResponse() { + return Joi.object({ + auto_calculate: Joi.boolean(), + channels: Joi.array() + .items(ServiceabilityPlatformModel.Channel()) + .required(), + error_rate: Joi.number().required(), + height: Joi.number().required(), + id: Joi.string().allow(""), + item_id: Joi.number(), + length: Joi.number().required(), + max_weight: Joi.number(), + media: Joi.array().items(Joi.string().allow("")), + name: Joi.string().allow("").required(), + package_type: Joi.string().allow("").required(), + package_vol_weight: Joi.number(), + rules: Joi.array().items( + ServiceabilityPlatformModel.PackageMaterialRule() + ), + size: Joi.string().allow("").required(), + status: Joi.string().allow("").required(), + store_ids: Joi.array().items(Joi.number()).required(), + track_inventory: Joi.boolean(), + weight: Joi.number().required(), + width: Joi.number().required(), + }); + } + + /** @returns {PackageMaterialRule} */ + static PackageMaterialRule() { + return Joi.object({ + quantity: ServiceabilityPlatformModel.PackageMaterialRuleQuantity(), + rule_id: Joi.string().allow(""), + weight: Joi.number(), + }); + } + + /** @returns {PackageMaterialRuleList} */ + static PackageMaterialRuleList() { + return Joi.object({ + items: ServiceabilityPlatformModel.PackageRuleResponse(), + page: ServiceabilityPlatformModel.Page(), + }); + } + + /** @returns {PackageMaterialRuleQuantity} */ + static PackageMaterialRuleQuantity() { + return Joi.object({ + max: Joi.number(), + min: Joi.number(), + }); + } + + /** @returns {PackageRule} */ + static PackageRule() { + return Joi.object({ + category_id: ServiceabilityPlatformModel.PackageRuleCategory(), + company_id: Joi.number().required(), + is_active: Joi.boolean(), + name: Joi.string().allow("").required(), + product_id: ServiceabilityPlatformModel.PackageRuleProduct(), + product_tag: ServiceabilityPlatformModel.PackageRuleProductTag(), + type: Joi.string().allow("").required(), + }); + } + + /** @returns {PackageRuleCategory} */ + static PackageRuleCategory() { + return Joi.object({ + includes: Joi.array().items(Joi.number()), + }); + } + + /** @returns {PackageRuleProduct} */ + static PackageRuleProduct() { + return Joi.object({ + includes: Joi.array().items(Joi.number()), + }); + } + + /** @returns {PackageRuleProductTag} */ + static PackageRuleProductTag() { + return Joi.object({ + includes: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {PackageRuleResponse} */ + static PackageRuleResponse() { + return Joi.object({ + category_id: ServiceabilityPlatformModel.PackageRuleCategory(), + company_id: Joi.number().required(), + id: Joi.string().allow(""), + is_active: Joi.boolean(), + name: Joi.string().allow("").required(), + product_id: ServiceabilityPlatformModel.PackageRuleProduct(), + product_tag: ServiceabilityPlatformModel.PackageRuleProductTag(), + type: Joi.string().allow("").required(), + }); + } + /** @returns {Page} */ static Page() { return Joi.object({ @@ -1421,6 +1975,17 @@ class ServiceabilityPlatformModel { }); } + /** @returns {PageSchema} */ + static PageSchema() { + return Joi.object({ + current: Joi.number().required(), + has_next: Joi.boolean().required(), + item_total: Joi.number().required(), + size: Joi.number().required(), + type: Joi.string().allow("").required(), + }); + } + /** @returns {PincodeBulkViewResponse} */ static PincodeBulkViewResponse() { return Joi.object({ @@ -1589,6 +2154,45 @@ class ServiceabilityPlatformModel { }); } + /** @returns {RulePriorityRequest} */ + static RulePriorityRequest() { + return Joi.object({ + priority: Joi.number().required(), + rule_id: Joi.string().allow("").required(), + }); + } + + /** @returns {RulePriorityResponse} */ + static RulePriorityResponse() { + return Joi.object({ + success: Joi.boolean(), + }); + } + + /** @returns {SchemeRules} */ + static SchemeRules() { + return Joi.object({ + feature: ServiceabilityPlatformModel.SchemeRulesFeatures(), + payment_mode: Joi.array().items(Joi.string().allow("")), + region: Joi.string().allow(""), + transport_type: Joi.array().items(Joi.string().allow("")), + weight: ServiceabilityPlatformModel.ArithmeticOperations(), + }); + } + + /** @returns {SchemeRulesFeatures} */ + static SchemeRulesFeatures() { + return Joi.object({ + battery_operated: Joi.boolean(), + e_waybill: Joi.boolean(), + flammable: Joi.boolean(), + hazmat: Joi.boolean(), + multi_part_shipments: Joi.boolean(), + quality_check: Joi.boolean(), + quick_response_code: Joi.boolean(), + }); + } + /** @returns {SelfShipResponse} */ static SelfShipResponse() { return Joi.object({ @@ -1606,6 +2210,20 @@ class ServiceabilityPlatformModel { }); } + /** @returns {ServiceabilityModel} */ + static ServiceabilityModel() { + return Joi.object({ + is_first_mile: Joi.boolean().required(), + is_installation: Joi.boolean().required(), + is_last_mile: Joi.boolean().required(), + is_qc: Joi.boolean().required(), + is_return: Joi.boolean().required(), + lm_cod_limit: Joi.number().required(), + pickup_cutoff: Joi.string().allow("").allow(null).required(), + route_code: Joi.string().allow("").allow(null).required(), + }); + } + /** @returns {ServiceabilityPageResponse} */ static ServiceabilityPageResponse() { return Joi.object({ @@ -1617,10 +2235,102 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ServiceabilityPayloadSchema} */ - static ServiceabilityPayloadSchema() { + /** @returns {StorePrioritySchema} */ + static StorePrioritySchema() { return Joi.object({ - serviceability_type: Joi.string().allow("").required(), + id: Joi.string().allow(""), + name: Joi.string().allow(""), + }); + } + + /** @returns {StoreRuleConditionSchema} */ + static StoreRuleConditionSchema() { + return Joi.object({ + brand_ids: ServiceabilityPlatformModel.IntComparisonOperations(), + category_ids: ServiceabilityPlatformModel.IntComparisonOperations(), + customer_radius: ServiceabilityPlatformModel.CustomerRadiusSchema(), + department_ids: ServiceabilityPlatformModel.IntComparisonOperations(), + order_place_date: ServiceabilityPlatformModel.ArithmeticOperations(), + product_ids: ServiceabilityPlatformModel.IntComparisonOperations(), + product_tags: ServiceabilityPlatformModel.StringComparisonOperations(), + store_tags: ServiceabilityPlatformModel.StringComparisonOperations(), + store_type: ServiceabilityPlatformModel.StringComparisonOperations(), + to_location: ServiceabilityPlatformModel.LocationRule(), + zone_ids: ServiceabilityPlatformModel.StringComparisonOperations(), + }); + } + + /** @returns {StoreRuleConfigData} */ + static StoreRuleConfigData() { + return Joi.object({ + rule_ids: Joi.array().items(Joi.string().allow("")), + sort: Joi.array().items(Joi.string().allow("")), + store_priority: Joi.array().items( + ServiceabilityPlatformModel.StorePrioritySchema() + ), + tag_based_priority: Joi.array().items(Joi.string().allow("")), + type_based_priority: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {StoreRuleDataSchema} */ + static StoreRuleDataSchema() { + return Joi.object({ + application_id: Joi.string().allow(""), + company_id: Joi.number(), + conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(), + id: Joi.string().allow(""), + is_active: Joi.boolean(), + name: Joi.string().allow(""), + sort: Joi.array().items(Joi.string().allow("")), + store_priority: Joi.array().items( + ServiceabilityPlatformModel.StorePrioritySchema() + ), + tag_based_priority: Joi.array().items(Joi.string().allow("")), + type_based_priority: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {StoreRuleResponseSchema} */ + static StoreRuleResponseSchema() { + return Joi.object({ + conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(), + id: Joi.string().allow(""), + is_active: Joi.boolean(), + name: Joi.string().allow(""), + sort: Joi.array().items(Joi.string().allow("")), + store_priority: Joi.array().items( + ServiceabilityPlatformModel.StorePrioritySchema() + ), + tag_based_priority: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + type_based_priority: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {StoreRuleUpdateResponseSchema} */ + static StoreRuleUpdateResponseSchema() { + return Joi.object({ + application_id: Joi.string().allow(""), + company_id: Joi.number(), + conditions: ServiceabilityPlatformModel.StoreRuleConditionSchema(), + id: Joi.string().allow(""), + is_active: Joi.boolean(), + name: Joi.string().allow(""), + sort: Joi.array().items(Joi.string().allow("")), + store_priority: Joi.array().items( + ServiceabilityPlatformModel.StorePrioritySchema() + ), + tag_based_priority: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + type_based_priority: Joi.array().items(Joi.string().allow("")), + }); + } + + /** @returns {StringComparisonOperations} */ + static StringComparisonOperations() { + return Joi.object({ + includes: Joi.array().items(Joi.string().allow("")), }); } @@ -1634,6 +2344,13 @@ class ServiceabilityPlatformModel { }); } + /** @returns {UpdateZoneConfigRequest} */ + static UpdateZoneConfigRequest() { + return Joi.object({ + serviceability_type: Joi.string().allow(""), + }); + } + /** @returns {UpdateZoneData} */ static UpdateZoneData() { return Joi.object({ @@ -1676,6 +2393,13 @@ class ServiceabilityPlatformModel { }); } + /** @returns {ZoneConfig} */ + static ZoneConfig() { + return Joi.object({ + serviceability_type: Joi.string().allow(""), + }); + } + /** @returns {ZoneDataItem} */ static ZoneDataItem() { return Joi.object({ @@ -1704,14 +2428,6 @@ class ServiceabilityPlatformModel { }); } - /** @returns {ZoneRequest} */ - static ZoneRequest() { - return Joi.object({ - data: ServiceabilityPlatformModel.CreateZoneData().required(), - identifier: Joi.string().allow("").required(), - }); - } - /** @returns {ZoneResponse} */ static ZoneResponse() { return Joi.object({ diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts b/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts index e82ee9ac8..a6a2f53b6 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +++ b/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts @@ -1,149 +1,352 @@ export = ServiceabilityPlatformValidator; +/** + * @typedef BulkServiceabilityParam + * @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 CP Extension + * @property {string} schemeId - Unique identifier of a scheme + * @property {ServiceabilityPlatformModel.BulkRegionJobSerializer} body + */ +/** + * @typedef CreateCourierPartnerAccountParam + * @property {ServiceabilityPlatformModel.CourierAccount} body + */ +/** + * @typedef CreatePackageMaterialParam + * @property {ServiceabilityPlatformModel.PackageMaterial} body + */ +/** + * @typedef CreatePackageMaterialRuleParam + * @property {ServiceabilityPlatformModel.PackageRule} body + */ /** * @typedef CreateZoneParam - * @property {ServiceabilityPlatformModel.ZoneRequest} body + * @property {ServiceabilityPlatformModel.CreateZoneData} body */ /** @typedef GetAllStoresParam */ /** - * @typedef GetCompanyStoreViewParam - * @property {number} [pageNumber] - Index of the item to start returning with + * @typedef GetBulkServiceabilityParam + * @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 + * @property {string} [action] - Import or export bulk type + * @property {string} [status] - Status of the bulk actions + * @property {string} [country] - Country for which bulk job is initiated + * @property {string} [region] - Region for which bulk job is initiated + * @property {string} [startDate] - Fetch job history after a particule date + * @property {string} [endDate] - Fetch job history before a particule date */ /** - * @typedef GetDpAccountParam - * @property {number} [pageNumber] - Index of the item to start returning with + * @typedef GetBulkTatParam + * @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 + * @property {string} [action] - Import or export bulk type + * @property {string} [status] - Status of the bulk actions + * @property {string} [country] - Country for which bulk job is initiated + * @property {string} [region] - Region for which bulk job is initiated + * @property {string} [startDate] - Fetch job history after a particule date + * @property {string} [endDate] - Fetch job history before a particule date + */ +/** @typedef GetCompanyConfigurationParam */ +/** + * @typedef GetCourierPartnerAccountParam + * @property {string} accountId - Unique ID of courier account + */ +/** + * @typedef GetCourierPartnerAccountsParam + * @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} [stage] - Stage of the account. enabled/disabled * @property {string} [paymentMode] - Filters dp accounts based on payment mode * @property {string} [transportType] - Filters dp accounts based on transport_type */ -/** @typedef GetDpCompanyRulesParam */ /** - * @typedef GetDpRuleInsertParam - * @property {number} [pageNumber] - Index of the item to start returning with - * @property {number} [pageSize] - Determines the items to be displayed in a page + * @typedef GetOptimalLocationsParam + * @property {ServiceabilityPlatformModel.ReAssignStoreRequest} body */ /** - * @typedef GetDpRulesParam - * @property {string} ruleUid - A `rule_uid` is a unique identifier for a particular Dp. + * @typedef GetPackageMaterialListParam + * @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} [q] - Perform regex search on items matching name for given value + * @property {string} [size] - Filters items based on given size + * @property {string} [packageType] - Filters items based on given package_type */ /** - * @typedef GetEntityRegionViewParam - * @property {ServiceabilityPlatformModel.EntityRegionView_Request} body + * @typedef GetPackageMaterialRuleParam + * @property {string} ruleId - A `package_material_rule_id` is a unique + * identifier for a Package Material Rule */ /** - * @typedef GetListViewParam - * @property {number} [pageNumber] - Index of the item to start returning with + * @typedef GetPackageMaterialRulesParam + * @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} [name] - Name of particular zone in the seller account - * @property {boolean} [isActive] - Status of zone whether active or inactive - * @property {string} [channelIds] - Zones associated with the given channel ids' - * @property {string} [q] - Search with name as a free text + * @property {string} [isActive] - Filters items based on given is_active */ /** - * @typedef GetOptimalLocationsParam - * @property {ServiceabilityPlatformModel.ReAssignStoreRequest} body + * @typedef GetPackageMaterialsParam + * @property {string} packageMaterialId - A `package_material_id` is a unique + * identifier for a Package Material */ /** - * @typedef GetStoreParam - * @property {number} storeUid - A `store_uid` contains a specific ID of a store. + * @typedef GetServiceabilityParam + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme + * @property {string} regionId - Unique identifier of a region */ /** - * @typedef GetZoneDataViewParam + * @typedef GetZoneByIdParam * @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone. */ /** - * @typedef GetZoneListViewParam - * @property {number} [pageNumber] - Index of the item to start returning with + * @typedef GetZonesParam * @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} [name] - Name of particular zone in the seller account - * @property {boolean} [isActive] - Status of zone whether active or inactive - * @property {string} [channelIds] - Zones associated with the given channel ids' + * @property {boolean} [isActive] - Status of Zone (either active or inactive) + * @property {string} [channelId] - Zones filtered by an application * @property {string} [q] - Search with name as a free text - * @property {string[]} [zoneId] - List of zones to query for + * @property {string} [country] - ISO2 code of the country + * @property {string} [state] - State name + * @property {string} [city] - City name + * @property {string} [pincode] - Pincode value to search zones + * @property {string} [sector] - Sector value to search zones */ /** - * @typedef UpdateDpRuleParam - * @property {string} ruleUid - A `rule_uid` is a unique identifier for a particular Dp. - * @property {ServiceabilityPlatformModel.DpRulesUpdateRequest} body + * @typedef UpdateCompanyConfigurationParam + * @property {ServiceabilityPlatformModel.CompanyConfig} body */ /** - * @typedef UpdateZoneControllerViewParam - * @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone. - * @property {ServiceabilityPlatformModel.ZoneUpdateRequest} body + * @typedef UpdateCourierPartnerAccountParam + * @property {string} accountId - Unique ID of courier account + * @property {ServiceabilityPlatformModel.CourierAccount} body */ /** - * @typedef UpsertDpAccountParam - * @property {ServiceabilityPlatformModel.CompanyDpAccountRequest} body + * @typedef UpdatePackageMaterialRuleParam + * @property {string} ruleId - A `package_material_rule_id` is a unique + * identifier for a Package Material Rule + * @property {ServiceabilityPlatformModel.PackageRule} body */ /** - * @typedef UpsertDpCompanyRulesParam - * @property {ServiceabilityPlatformModel.DPCompanyRuleRequest} body + * @typedef UpdatePackageMaterialsParam + * @property {string} packageMaterialId - A `package_material_id` is a unique + * identifier for a Package Material + * @property {ServiceabilityPlatformModel.PackageMaterial} body */ /** - * @typedef UpsertDpRulesParam - * @property {ServiceabilityPlatformModel.DpRuleRequest} body + * @typedef UpdateServiceabilityParam + * @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 + */ +/** + * @typedef UpdateZoneByIdParam + * @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone. + * @property {ServiceabilityPlatformModel.UpdateZoneData} body */ declare class ServiceabilityPlatformValidator { + /** @returns {BulkServiceabilityParam} */ + static bulkServiceability(): BulkServiceabilityParam; + /** @returns {BulkTatParam} */ + static bulkTat(): BulkTatParam; + /** @returns {CreateCourierPartnerAccountParam} */ + static createCourierPartnerAccount(): CreateCourierPartnerAccountParam; + /** @returns {CreatePackageMaterialParam} */ + static createPackageMaterial(): CreatePackageMaterialParam; + /** @returns {CreatePackageMaterialRuleParam} */ + static createPackageMaterialRule(): CreatePackageMaterialRuleParam; /** @returns {CreateZoneParam} */ static createZone(): CreateZoneParam; /** @returns {GetAllStoresParam} */ static getAllStores(): any; - /** @returns {GetCompanyStoreViewParam} */ - static getCompanyStoreView(): GetCompanyStoreViewParam; - /** @returns {GetDpAccountParam} */ - static getDpAccount(): GetDpAccountParam; - /** @returns {GetDpCompanyRulesParam} */ - static getDpCompanyRules(): any; - /** @returns {GetDpRuleInsertParam} */ - static getDpRuleInsert(): GetDpRuleInsertParam; - /** @returns {GetDpRulesParam} */ - static getDpRules(): GetDpRulesParam; - /** @returns {GetEntityRegionViewParam} */ - static getEntityRegionView(): GetEntityRegionViewParam; - /** @returns {GetListViewParam} */ - static getListView(): GetListViewParam; + /** @returns {GetBulkServiceabilityParam} */ + static getBulkServiceability(): GetBulkServiceabilityParam; + /** @returns {GetBulkTatParam} */ + static getBulkTat(): GetBulkTatParam; + /** @returns {GetCompanyConfigurationParam} */ + static getCompanyConfiguration(): any; + /** @returns {GetCourierPartnerAccountParam} */ + static getCourierPartnerAccount(): GetCourierPartnerAccountParam; + /** @returns {GetCourierPartnerAccountsParam} */ + static getCourierPartnerAccounts(): GetCourierPartnerAccountsParam; /** @returns {GetOptimalLocationsParam} */ static getOptimalLocations(): GetOptimalLocationsParam; - /** @returns {GetStoreParam} */ - static getStore(): GetStoreParam; - /** @returns {GetZoneDataViewParam} */ - static getZoneDataView(): GetZoneDataViewParam; - /** @returns {GetZoneListViewParam} */ - static getZoneListView(): GetZoneListViewParam; - /** @returns {UpdateDpRuleParam} */ - static updateDpRule(): UpdateDpRuleParam; - /** @returns {UpdateZoneControllerViewParam} */ - static updateZoneControllerView(): UpdateZoneControllerViewParam; - /** @returns {UpsertDpAccountParam} */ - static upsertDpAccount(): UpsertDpAccountParam; - /** @returns {UpsertDpCompanyRulesParam} */ - static upsertDpCompanyRules(): UpsertDpCompanyRulesParam; - /** @returns {UpsertDpRulesParam} */ - static upsertDpRules(): UpsertDpRulesParam; + /** @returns {GetPackageMaterialListParam} */ + static getPackageMaterialList(): GetPackageMaterialListParam; + /** @returns {GetPackageMaterialRuleParam} */ + static getPackageMaterialRule(): GetPackageMaterialRuleParam; + /** @returns {GetPackageMaterialRulesParam} */ + static getPackageMaterialRules(): GetPackageMaterialRulesParam; + /** @returns {GetPackageMaterialsParam} */ + static getPackageMaterials(): GetPackageMaterialsParam; + /** @returns {GetServiceabilityParam} */ + static getServiceability(): GetServiceabilityParam; + /** @returns {GetZoneByIdParam} */ + static getZoneById(): GetZoneByIdParam; + /** @returns {GetZonesParam} */ + static getZones(): GetZonesParam; + /** @returns {UpdateCompanyConfigurationParam} */ + static updateCompanyConfiguration(): UpdateCompanyConfigurationParam; + /** @returns {UpdateCourierPartnerAccountParam} */ + static updateCourierPartnerAccount(): UpdateCourierPartnerAccountParam; + /** @returns {UpdatePackageMaterialRuleParam} */ + static updatePackageMaterialRule(): UpdatePackageMaterialRuleParam; + /** @returns {UpdatePackageMaterialsParam} */ + static updatePackageMaterials(): UpdatePackageMaterialsParam; + /** @returns {UpdateServiceabilityParam} */ + static updateServiceability(): UpdateServiceabilityParam; + /** @returns {UpdateZoneByIdParam} */ + static updateZoneById(): UpdateZoneByIdParam; } declare namespace ServiceabilityPlatformValidator { - export { CreateZoneParam, GetAllStoresParam, GetCompanyStoreViewParam, GetDpAccountParam, GetDpCompanyRulesParam, GetDpRuleInsertParam, GetDpRulesParam, GetEntityRegionViewParam, GetListViewParam, GetOptimalLocationsParam, GetStoreParam, GetZoneDataViewParam, GetZoneListViewParam, UpdateDpRuleParam, UpdateZoneControllerViewParam, UpsertDpAccountParam, UpsertDpCompanyRulesParam, UpsertDpRulesParam }; + export { BulkServiceabilityParam, BulkTatParam, CreateCourierPartnerAccountParam, CreatePackageMaterialParam, CreatePackageMaterialRuleParam, CreateZoneParam, GetAllStoresParam, GetBulkServiceabilityParam, GetBulkTatParam, GetCompanyConfigurationParam, GetCourierPartnerAccountParam, GetCourierPartnerAccountsParam, GetOptimalLocationsParam, GetPackageMaterialListParam, GetPackageMaterialRuleParam, GetPackageMaterialRulesParam, GetPackageMaterialsParam, GetServiceabilityParam, GetZoneByIdParam, GetZonesParam, UpdateCompanyConfigurationParam, UpdateCourierPartnerAccountParam, UpdatePackageMaterialRuleParam, UpdatePackageMaterialsParam, UpdateServiceabilityParam, UpdateZoneByIdParam }; } +type BulkServiceabilityParam = { + /** + * - Unique Identifier of CP Extension + */ + extensionId: string; + /** + * - Unique identifier of a scheme + */ + schemeId: string; + body: ServiceabilityPlatformModel.BulkRegionJobSerializer; +}; +type BulkTatParam = { + /** + * - Unique Identifier of CP Extension + */ + extensionId: string; + /** + * - Unique identifier of a scheme + */ + schemeId: string; + body: ServiceabilityPlatformModel.BulkRegionJobSerializer; +}; +type CreateCourierPartnerAccountParam = { + body: ServiceabilityPlatformModel.CourierAccount; +}; +type CreatePackageMaterialParam = { + body: ServiceabilityPlatformModel.PackageMaterial; +}; +type CreatePackageMaterialRuleParam = { + body: ServiceabilityPlatformModel.PackageRule; +}; type CreateZoneParam = { - body: ServiceabilityPlatformModel.ZoneRequest; + body: ServiceabilityPlatformModel.CreateZoneData; +}; +type GetBulkServiceabilityParam = { + /** + * - Unique Identifier of CP Extension + */ + extensionId: string; + /** + * - Unique identifier of a scheme + */ + schemeId: string; + /** + * - Index of the item to start returning with + */ + pageNo?: number; + /** + * - Determines the items to be displayed in a page + */ + pageSize?: number; + /** + * - Unique identifier of bulk job + */ + batchId?: string; + /** + * - Import or export bulk type + */ + action?: string; + /** + * - Status of the bulk actions + */ + status?: string; + /** + * - Country for which bulk job is initiated + */ + country?: string; + /** + * - Region for which bulk job is initiated + */ + region?: string; + /** + * - Fetch job history after a particule date + */ + startDate?: string; + /** + * - Fetch job history before a particule date + */ + endDate?: string; }; -type GetCompanyStoreViewParam = { +type GetBulkTatParam = { + /** + * - Unique Identifier of CP Extension + */ + extensionId: string; + /** + * - Unique identifier of a scheme + */ + schemeId: string; /** * - Index of the item to start returning with */ - pageNumber?: number; + pageNo?: number; /** * - Determines the items to be displayed in a page */ pageSize?: number; + /** + * - Unique identifier of bulk job + */ + batchId?: string; + /** + * - Import or export bulk type + */ + action?: string; + /** + * - Status of the bulk actions + */ + status?: string; + /** + * - Country for which bulk job is initiated + */ + country?: string; + /** + * - Region for which bulk job is initiated + */ + region?: string; + /** + * - Fetch job history after a particule date + */ + startDate?: string; + /** + * - Fetch job history before a particule date + */ + endDate?: string; }; -type GetDpAccountParam = { +type GetCourierPartnerAccountParam = { + /** + * - Unique ID of courier account + */ + accountId: string; +}; +type GetCourierPartnerAccountsParam = { /** * - Index of the item to start returning with */ - pageNumber?: number; + pageNo?: number; /** * - Determines the items to be displayed in a page */ @@ -161,71 +364,80 @@ type GetDpAccountParam = { */ transportType?: string; }; -type GetDpRuleInsertParam = { +type GetOptimalLocationsParam = { + body: ServiceabilityPlatformModel.ReAssignStoreRequest; +}; +type GetPackageMaterialListParam = { /** * - Index of the item to start returning with */ - pageNumber?: number; + pageNo?: number; /** * - Determines the items to be displayed in a page */ pageSize?: number; -}; -type GetDpRulesParam = { /** - * - A `rule_uid` is a unique identifier for a particular Dp. + * - Perform regex search on items matching name for given value */ - ruleUid: string; + q?: string; + /** + * - Filters items based on given size + */ + size?: string; + /** + * - Filters items based on given package_type + */ + packageType?: string; }; -type GetEntityRegionViewParam = { - body: ServiceabilityPlatformModel.EntityRegionView_Request; +type GetPackageMaterialRuleParam = { + /** + * - A `package_material_rule_id` is a unique + * identifier for a Package Material Rule + */ + ruleId: string; }; -type GetListViewParam = { +type GetPackageMaterialRulesParam = { /** * - Index of the item to start returning with */ - pageNumber?: number; + pageNo?: number; /** * - Determines the items to be displayed in a page */ pageSize?: number; /** - * - Name of particular zone in the seller account + * - Filters items based on given is_active */ - name?: string; + isActive?: string; +}; +type GetPackageMaterialsParam = { /** - * - Status of zone whether active or inactive + * - A `package_material_id` is a unique + * identifier for a Package Material */ - isActive?: boolean; + packageMaterialId: string; +}; +type GetServiceabilityParam = { /** - * - Zones associated with the given channel ids' + * - Unique Identifier of CP Extension */ - channelIds?: string; + extensionId: string; /** - * - Search with name as a free text + * - Unique identifier of a scheme */ - q?: string; -}; -type GetOptimalLocationsParam = { - body: ServiceabilityPlatformModel.ReAssignStoreRequest; -}; -type GetStoreParam = { + schemeId: string; /** - * - A `store_uid` contains a specific ID of a store. + * - Unique identifier of a region */ - storeUid: number; + regionId: string; }; -type GetZoneDataViewParam = { +type GetZoneByIdParam = { /** * - A `zone_id` is a unique identifier for a particular zone. */ zoneId: string; }; -type GetZoneListViewParam = { - /** - * - Index of the item to start returning with - */ - pageNumber?: number; +type GetZonesParam = { /** * - Index of the item to start returning with */ @@ -235,49 +447,86 @@ type GetZoneListViewParam = { */ pageSize?: number; /** - * - Name of particular zone in the seller account - */ - name?: string; - /** - * - Status of zone whether active or inactive + * - Status of Zone (either active or inactive) */ isActive?: boolean; /** - * - Zones associated with the given channel ids' + * - Zones filtered by an application */ - channelIds?: string; + channelId?: string; /** * - Search with name as a free text */ q?: string; /** - * - List of zones to query for + * - ISO2 code of the country + */ + country?: string; + /** + * - State name + */ + state?: string; + /** + * - City name + */ + city?: string; + /** + * - Pincode value to search zones + */ + pincode?: string; + /** + * - Sector value to search zones */ - zoneId?: string[]; + sector?: string; }; -type UpdateDpRuleParam = { +type UpdateCompanyConfigurationParam = { + body: ServiceabilityPlatformModel.CompanyConfig; +}; +type UpdateCourierPartnerAccountParam = { /** - * - A `rule_uid` is a unique identifier for a particular Dp. + * - Unique ID of courier account */ - ruleUid: string; - body: ServiceabilityPlatformModel.DpRulesUpdateRequest; + accountId: string; + body: ServiceabilityPlatformModel.CourierAccount; }; -type UpdateZoneControllerViewParam = { +type UpdatePackageMaterialRuleParam = { /** - * - A `zone_id` is a unique identifier for a particular zone. + * - A `package_material_rule_id` is a unique + * identifier for a Package Material Rule */ - zoneId: string; - body: ServiceabilityPlatformModel.ZoneUpdateRequest; + ruleId: string; + body: ServiceabilityPlatformModel.PackageRule; }; -type UpsertDpAccountParam = { - body: ServiceabilityPlatformModel.CompanyDpAccountRequest; +type UpdatePackageMaterialsParam = { + /** + * - A `package_material_id` is a unique + * identifier for a Package Material + */ + packageMaterialId: string; + body: ServiceabilityPlatformModel.PackageMaterial; }; -type UpsertDpCompanyRulesParam = { - body: ServiceabilityPlatformModel.DPCompanyRuleRequest; +type UpdateServiceabilityParam = { + /** + * - Unique Identifier of CP Extension + */ + extensionId: string; + /** + * - Unique identifier of a scheme + */ + schemeId: string; + /** + * - Unique identifier of a region + */ + regionId: string; + body: ServiceabilityPlatformModel.ServiceabilityModel; }; -type UpsertDpRulesParam = { - body: ServiceabilityPlatformModel.DpRuleRequest; +type UpdateZoneByIdParam = { + /** + * - A `zone_id` is a unique identifier for a particular zone. + */ + zoneId: string; + body: ServiceabilityPlatformModel.UpdateZoneData; }; type GetAllStoresParam = any; -type GetDpCompanyRulesParam = any; +type GetCompanyConfigurationParam = any; import ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); diff --git a/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js b/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js index 1b790b6f2..54b2473d0 100644 --- a/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +++ b/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js @@ -2,115 +2,230 @@ const Joi = require("joi"); const ServiceabilityPlatformModel = require("./ServiceabilityPlatformModel"); +/** + * @typedef BulkServiceabilityParam + * @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 CP Extension + * @property {string} schemeId - Unique identifier of a scheme + * @property {ServiceabilityPlatformModel.BulkRegionJobSerializer} body + */ + +/** + * @typedef CreateCourierPartnerAccountParam + * @property {ServiceabilityPlatformModel.CourierAccount} body + */ + +/** + * @typedef CreatePackageMaterialParam + * @property {ServiceabilityPlatformModel.PackageMaterial} body + */ + +/** + * @typedef CreatePackageMaterialRuleParam + * @property {ServiceabilityPlatformModel.PackageRule} body + */ + /** * @typedef CreateZoneParam - * @property {ServiceabilityPlatformModel.ZoneRequest} body + * @property {ServiceabilityPlatformModel.CreateZoneData} body */ /** @typedef GetAllStoresParam */ /** - * @typedef GetCompanyStoreViewParam - * @property {number} [pageNumber] - Index of the item to start returning with + * @typedef GetBulkServiceabilityParam + * @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 + * @property {string} [action] - Import or export bulk type + * @property {string} [status] - Status of the bulk actions + * @property {string} [country] - Country for which bulk job is initiated + * @property {string} [region] - Region for which bulk job is initiated + * @property {string} [startDate] - Fetch job history after a particule date + * @property {string} [endDate] - Fetch job history before a particule date + */ + +/** + * @typedef GetBulkTatParam + * @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 + * @property {string} [action] - Import or export bulk type + * @property {string} [status] - Status of the bulk actions + * @property {string} [country] - Country for which bulk job is initiated + * @property {string} [region] - Region for which bulk job is initiated + * @property {string} [startDate] - Fetch job history after a particule date + * @property {string} [endDate] - Fetch job history before a particule date + */ + +/** @typedef GetCompanyConfigurationParam */ + +/** + * @typedef GetCourierPartnerAccountParam + * @property {string} accountId - Unique ID of courier account */ /** - * @typedef GetDpAccountParam - * @property {number} [pageNumber] - Index of the item to start returning with + * @typedef GetCourierPartnerAccountsParam + * @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} [stage] - Stage of the account. enabled/disabled * @property {string} [paymentMode] - Filters dp accounts based on payment mode * @property {string} [transportType] - Filters dp accounts based on transport_type */ -/** @typedef GetDpCompanyRulesParam */ - /** - * @typedef GetDpRuleInsertParam - * @property {number} [pageNumber] - Index of the item to start returning with - * @property {number} [pageSize] - Determines the items to be displayed in a page + * @typedef GetOptimalLocationsParam + * @property {ServiceabilityPlatformModel.ReAssignStoreRequest} body */ /** - * @typedef GetDpRulesParam - * @property {string} ruleUid - A `rule_uid` is a unique identifier for a particular Dp. + * @typedef GetPackageMaterialListParam + * @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} [q] - Perform regex search on items matching name for given value + * @property {string} [size] - Filters items based on given size + * @property {string} [packageType] - Filters items based on given package_type */ /** - * @typedef GetEntityRegionViewParam - * @property {ServiceabilityPlatformModel.EntityRegionView_Request} body + * @typedef GetPackageMaterialRuleParam + * @property {string} ruleId - A `package_material_rule_id` is a unique + * identifier for a Package Material Rule */ /** - * @typedef GetListViewParam - * @property {number} [pageNumber] - Index of the item to start returning with + * @typedef GetPackageMaterialRulesParam + * @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} [name] - Name of particular zone in the seller account - * @property {boolean} [isActive] - Status of zone whether active or inactive - * @property {string} [channelIds] - Zones associated with the given channel ids' - * @property {string} [q] - Search with name as a free text + * @property {string} [isActive] - Filters items based on given is_active */ /** - * @typedef GetOptimalLocationsParam - * @property {ServiceabilityPlatformModel.ReAssignStoreRequest} body + * @typedef GetPackageMaterialsParam + * @property {string} packageMaterialId - A `package_material_id` is a unique + * identifier for a Package Material */ /** - * @typedef GetStoreParam - * @property {number} storeUid - A `store_uid` contains a specific ID of a store. + * @typedef GetServiceabilityParam + * @property {string} extensionId - Unique Identifier of CP Extension + * @property {string} schemeId - Unique identifier of a scheme + * @property {string} regionId - Unique identifier of a region */ /** - * @typedef GetZoneDataViewParam + * @typedef GetZoneByIdParam * @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone. */ /** - * @typedef GetZoneListViewParam - * @property {number} [pageNumber] - Index of the item to start returning with + * @typedef GetZonesParam * @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} [name] - Name of particular zone in the seller account - * @property {boolean} [isActive] - Status of zone whether active or inactive - * @property {string} [channelIds] - Zones associated with the given channel ids' + * @property {boolean} [isActive] - Status of Zone (either active or inactive) + * @property {string} [channelId] - Zones filtered by an application * @property {string} [q] - Search with name as a free text - * @property {string[]} [zoneId] - List of zones to query for + * @property {string} [country] - ISO2 code of the country + * @property {string} [state] - State name + * @property {string} [city] - City name + * @property {string} [pincode] - Pincode value to search zones + * @property {string} [sector] - Sector value to search zones */ /** - * @typedef UpdateDpRuleParam - * @property {string} ruleUid - A `rule_uid` is a unique identifier for a particular Dp. - * @property {ServiceabilityPlatformModel.DpRulesUpdateRequest} body + * @typedef UpdateCompanyConfigurationParam + * @property {ServiceabilityPlatformModel.CompanyConfig} body */ /** - * @typedef UpdateZoneControllerViewParam - * @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone. - * @property {ServiceabilityPlatformModel.ZoneUpdateRequest} body + * @typedef UpdateCourierPartnerAccountParam + * @property {string} accountId - Unique ID of courier account + * @property {ServiceabilityPlatformModel.CourierAccount} body + */ + +/** + * @typedef UpdatePackageMaterialRuleParam + * @property {string} ruleId - A `package_material_rule_id` is a unique + * identifier for a Package Material Rule + * @property {ServiceabilityPlatformModel.PackageRule} body */ /** - * @typedef UpsertDpAccountParam - * @property {ServiceabilityPlatformModel.CompanyDpAccountRequest} body + * @typedef UpdatePackageMaterialsParam + * @property {string} packageMaterialId - A `package_material_id` is a unique + * identifier for a Package Material + * @property {ServiceabilityPlatformModel.PackageMaterial} body */ /** - * @typedef UpsertDpCompanyRulesParam - * @property {ServiceabilityPlatformModel.DPCompanyRuleRequest} body + * @typedef UpdateServiceabilityParam + * @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 */ /** - * @typedef UpsertDpRulesParam - * @property {ServiceabilityPlatformModel.DpRuleRequest} body + * @typedef UpdateZoneByIdParam + * @property {string} zoneId - A `zone_id` is a unique identifier for a particular zone. + * @property {ServiceabilityPlatformModel.UpdateZoneData} body */ class ServiceabilityPlatformValidator { + /** @returns {BulkServiceabilityParam} */ + static bulkServiceability() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + body: ServiceabilityPlatformModel.BulkRegionJobSerializer().required(), + }).required(); + } + + /** @returns {BulkTatParam} */ + static bulkTat() { + return Joi.object({ + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + body: ServiceabilityPlatformModel.BulkRegionJobSerializer().required(), + }).required(); + } + + /** @returns {CreateCourierPartnerAccountParam} */ + static createCourierPartnerAccount() { + return Joi.object({ + body: ServiceabilityPlatformModel.CourierAccount().required(), + }).required(); + } + + /** @returns {CreatePackageMaterialParam} */ + static createPackageMaterial() { + return Joi.object({ + body: ServiceabilityPlatformModel.PackageMaterial().required(), + }).required(); + } + + /** @returns {CreatePackageMaterialRuleParam} */ + static createPackageMaterialRule() { + return Joi.object({ + body: ServiceabilityPlatformModel.PackageRule().required(), + }).required(); + } + /** @returns {CreateZoneParam} */ static createZone() { return Joi.object({ - body: ServiceabilityPlatformModel.ZoneRequest().required(), + body: ServiceabilityPlatformModel.CreateZoneData().required(), }).required(); } @@ -119,133 +234,182 @@ class ServiceabilityPlatformValidator { return Joi.object({}).required(); } - /** @returns {GetCompanyStoreViewParam} */ - static getCompanyStoreView() { + /** @returns {GetBulkServiceabilityParam} */ + static getBulkServiceability() { return Joi.object({ - pageNumber: Joi.number(), + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + pageNo: Joi.number(), pageSize: Joi.number(), + batchId: Joi.string().allow(""), + action: Joi.string().allow(""), + status: Joi.string().allow(""), + country: Joi.string().allow(""), + region: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), }).required(); } - /** @returns {GetDpAccountParam} */ - static getDpAccount() { + /** @returns {GetBulkTatParam} */ + static getBulkTat() { return Joi.object({ - pageNumber: Joi.number(), + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + pageNo: Joi.number(), pageSize: Joi.number(), - stage: Joi.string().allow(""), - paymentMode: Joi.string().allow(""), - transportType: Joi.string().allow(""), + batchId: Joi.string().allow(""), + action: Joi.string().allow(""), + status: Joi.string().allow(""), + country: Joi.string().allow(""), + region: Joi.string().allow(""), + startDate: Joi.string().allow(""), + endDate: Joi.string().allow(""), }).required(); } - /** @returns {GetDpCompanyRulesParam} */ - static getDpCompanyRules() { + /** @returns {GetCompanyConfigurationParam} */ + static getCompanyConfiguration() { return Joi.object({}).required(); } - /** @returns {GetDpRuleInsertParam} */ - static getDpRuleInsert() { + /** @returns {GetCourierPartnerAccountParam} */ + static getCourierPartnerAccount() { return Joi.object({ - pageNumber: Joi.number(), - pageSize: Joi.number(), + accountId: Joi.string().allow("").required(), }).required(); } - /** @returns {GetDpRulesParam} */ - static getDpRules() { + /** @returns {GetCourierPartnerAccountsParam} */ + static getCourierPartnerAccounts() { return Joi.object({ - ruleUid: Joi.string().allow("").required(), + pageNo: Joi.number(), + pageSize: Joi.number(), + stage: Joi.string().allow(""), + paymentMode: Joi.string().allow(""), + transportType: Joi.string().allow(""), }).required(); } - /** @returns {GetEntityRegionViewParam} */ - static getEntityRegionView() { + /** @returns {GetOptimalLocationsParam} */ + static getOptimalLocations() { return Joi.object({ - body: ServiceabilityPlatformModel.EntityRegionView_Request().required(), + body: ServiceabilityPlatformModel.ReAssignStoreRequest().required(), }).required(); } - /** @returns {GetListViewParam} */ - static getListView() { + /** @returns {GetPackageMaterialListParam} */ + static getPackageMaterialList() { return Joi.object({ - pageNumber: Joi.number(), + pageNo: Joi.number(), pageSize: Joi.number(), - name: Joi.string().allow(""), - isActive: Joi.boolean(), - channelIds: Joi.string().allow(""), q: Joi.string().allow(""), + size: Joi.string().allow(""), + packageType: Joi.string().allow(""), }).required(); } - /** @returns {GetOptimalLocationsParam} */ - static getOptimalLocations() { + /** @returns {GetPackageMaterialRuleParam} */ + static getPackageMaterialRule() { return Joi.object({ - body: ServiceabilityPlatformModel.ReAssignStoreRequest().required(), + ruleId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetPackageMaterialRulesParam} */ + static getPackageMaterialRules() { + return Joi.object({ + pageNo: Joi.number(), + pageSize: Joi.number(), + isActive: Joi.string().allow(""), + }).required(); + } + + /** @returns {GetPackageMaterialsParam} */ + static getPackageMaterials() { + return Joi.object({ + packageMaterialId: Joi.string().allow("").required(), }).required(); } - /** @returns {GetStoreParam} */ - static getStore() { + /** @returns {GetServiceabilityParam} */ + static getServiceability() { return Joi.object({ - storeUid: Joi.number().required(), + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + regionId: Joi.string().allow("").required(), }).required(); } - /** @returns {GetZoneDataViewParam} */ - static getZoneDataView() { + /** @returns {GetZoneByIdParam} */ + static getZoneById() { return Joi.object({ zoneId: Joi.string().allow("").required(), }).required(); } - /** @returns {GetZoneListViewParam} */ - static getZoneListView() { + /** @returns {GetZonesParam} */ + static getZones() { return Joi.object({ - pageNumber: Joi.number(), pageNo: Joi.number(), pageSize: Joi.number(), - name: Joi.string().allow(""), isActive: Joi.boolean(), - channelIds: Joi.string().allow(""), + channelId: Joi.string().allow(""), q: Joi.string().allow(""), - zoneId: Joi.array().items(Joi.string().allow("")), + country: Joi.string().allow(""), + state: Joi.string().allow(""), + city: Joi.string().allow(""), + pincode: Joi.string().allow(""), + sector: Joi.string().allow(""), }).required(); } - /** @returns {UpdateDpRuleParam} */ - static updateDpRule() { + /** @returns {UpdateCompanyConfigurationParam} */ + static updateCompanyConfiguration() { return Joi.object({ - ruleUid: Joi.string().allow("").required(), - body: ServiceabilityPlatformModel.DpRulesUpdateRequest().required(), + body: ServiceabilityPlatformModel.CompanyConfig().required(), }).required(); } - /** @returns {UpdateZoneControllerViewParam} */ - static updateZoneControllerView() { + /** @returns {UpdateCourierPartnerAccountParam} */ + static updateCourierPartnerAccount() { return Joi.object({ - zoneId: Joi.string().allow("").required(), - body: ServiceabilityPlatformModel.ZoneUpdateRequest().required(), + accountId: Joi.string().allow("").required(), + body: ServiceabilityPlatformModel.CourierAccount().required(), + }).required(); + } + + /** @returns {UpdatePackageMaterialRuleParam} */ + static updatePackageMaterialRule() { + return Joi.object({ + ruleId: Joi.string().allow("").required(), + body: ServiceabilityPlatformModel.PackageRule().required(), }).required(); } - /** @returns {UpsertDpAccountParam} */ - static upsertDpAccount() { + /** @returns {UpdatePackageMaterialsParam} */ + static updatePackageMaterials() { return Joi.object({ - body: ServiceabilityPlatformModel.CompanyDpAccountRequest().required(), + packageMaterialId: Joi.string().allow("").required(), + body: ServiceabilityPlatformModel.PackageMaterial().required(), }).required(); } - /** @returns {UpsertDpCompanyRulesParam} */ - static upsertDpCompanyRules() { + /** @returns {UpdateServiceabilityParam} */ + static updateServiceability() { return Joi.object({ - body: ServiceabilityPlatformModel.DPCompanyRuleRequest().required(), + extensionId: Joi.string().allow("").required(), + schemeId: Joi.string().allow("").required(), + regionId: Joi.string().allow("").required(), + body: ServiceabilityPlatformModel.ServiceabilityModel().required(), }).required(); } - /** @returns {UpsertDpRulesParam} */ - static upsertDpRules() { + /** @returns {UpdateZoneByIdParam} */ + static updateZoneById() { return Joi.object({ - body: ServiceabilityPlatformModel.DpRuleRequest().required(), + zoneId: Joi.string().allow("").required(), + body: ServiceabilityPlatformModel.UpdateZoneData().required(), }).required(); } } diff --git a/sdk/platform/Theme/ThemePlatformClient.d.ts b/sdk/platform/Theme/ThemePlatformClient.d.ts index b2957dc0c..c0416e50f 100644 --- a/sdk/platform/Theme/ThemePlatformClient.d.ts +++ b/sdk/platform/Theme/ThemePlatformClient.d.ts @@ -22,6 +22,16 @@ declare class Theme { * @description: Delete a specific theme for a company by providing the company ID and theme ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/deleteCompanyTheme/). */ deleteCompanyTheme({ themeId, requestHeaders }?: ThemePlatformValidator.DeleteCompanyThemeParam, { responseHeaders }?: object): Promise; + /** + * @param {ThemePlatformValidator.GetCompanyLevelPrivateThemesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCompanyLevelPrivateThemes + * @summary: Get private themes for a company + * @description: Retrieve a list of private themes available for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getCompanyLevelPrivateThemes/). + */ + getCompanyLevelPrivateThemes({ searchText, requestHeaders }?: ThemePlatformValidator.GetCompanyLevelPrivateThemesParam, { responseHeaders }?: object): Promise; /** * @param {ThemePlatformValidator.GetCompanyLevelThemesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -31,7 +41,7 @@ declare class Theme { * @summary: Get themes for a company * @description: Retrieve a list of themes available for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getCompanyLevelThemes/). */ - getCompanyLevelThemes({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + getCompanyLevelThemes({ searchText, requestHeaders }?: ThemePlatformValidator.GetCompanyLevelThemesParam, { responseHeaders }?: object): Promise; } import ThemePlatformValidator = require("./ThemePlatformValidator"); import ThemePlatformModel = require("./ThemePlatformModel"); diff --git a/sdk/platform/Theme/ThemePlatformClient.js b/sdk/platform/Theme/ThemePlatformClient.js index d35601b39..15b23b8f3 100644 --- a/sdk/platform/Theme/ThemePlatformClient.js +++ b/sdk/platform/Theme/ThemePlatformClient.js @@ -174,6 +174,85 @@ class Theme { return response; } + /** + * @param {ThemePlatformValidator.GetCompanyLevelPrivateThemesParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCompanyLevelPrivateThemes + * @summary: Get private themes for a company + * @description: Retrieve a list of private themes available for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getCompanyLevelPrivateThemes/). + */ + async getCompanyLevelPrivateThemes( + { searchText, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = ThemePlatformValidator.getCompanyLevelPrivateThemes().validate( + { + searchText, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ThemePlatformValidator.getCompanyLevelPrivateThemes().validate( + { + searchText, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > Theme > getCompanyLevelPrivateThemes \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["search_text"] = searchText; + + const xHeaders = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/theme/v2.0/company/${this.config.companyId}/private_themes`, + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { error: res_error } = Joi.array() + .items(ThemePlatformModel.CompanyPrivateTheme()) + .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 > Theme > getCompanyLevelPrivateThemes \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {ThemePlatformValidator.GetCompanyLevelThemesParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -184,11 +263,13 @@ class Theme { * @description: Retrieve a list of themes available for a specific company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/theme/getCompanyLevelThemes/). */ async getCompanyLevelThemes( - { requestHeaders } = { requestHeaders: {} }, + { searchText, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error } = ThemePlatformValidator.getCompanyLevelThemes().validate( - {}, + { + searchText, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -199,7 +280,9 @@ class Theme { const { error: warrning, } = ThemePlatformValidator.getCompanyLevelThemes().validate( - {}, + { + searchText, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { @@ -210,6 +293,7 @@ class Theme { } const query_params = {}; + query_params["search_text"] = searchText; const xHeaders = {}; diff --git a/sdk/platform/Theme/ThemePlatformModel.d.ts b/sdk/platform/Theme/ThemePlatformModel.d.ts index 208551a3e..4127212a7 100644 --- a/sdk/platform/Theme/ThemePlatformModel.d.ts +++ b/sdk/platform/Theme/ThemePlatformModel.d.ts @@ -1,4 +1,17 @@ export = ThemePlatformModel; +/** + * @typedef Action + * @property {ActionPage} [page] + * @property {ActionPage} [popup] + * @property {string} [type] + */ +/** + * @typedef ActionPage + * @property {Object} [params] + * @property {Object} [query] + * @property {PageType} type + * @property {string} [url] + */ /** * @typedef AddThemeRequestSchema * @property {string} [theme_id] @@ -7,17 +20,31 @@ export = ThemePlatformModel; * @typedef AllAvailablePageSchema * @property {AvailablePageSchema[]} [pages] */ +/** + * @typedef AppliedThemes + * @property {string} [_id] - ID of the application theme + * @property {string} [application_id] - ID of the application + */ /** * @typedef Assets * @property {CommonJS} [common_js] * @property {CSS} [css] * @property {UMDJs} [umd_js] */ +/** + * @typedef AvailablePagePlatformPredicate + * @property {boolean} [android] - Section visibility on android platform + * @property {boolean} [ios] - Section visibility on ios platform + * @property {boolean} [web] - Section visibility on web platform + */ /** * @typedef AvailablePagePredicate + * @property {AvailablePagePlatformPredicate} [platform] * @property {AvailablePageRoutePredicate} [route] + * @property {AvailablePageSchedulePredicate} [schedule] * @property {AvailablePageScreenPredicate} [screen] * @property {AvailablePageUserPredicate} [user] + * @property {string[]} [zones] - An array of zone ids associated with the section */ /** * @typedef AvailablePageRoutePredicate @@ -25,6 +52,12 @@ export = ThemePlatformModel; * @property {Object} [query] * @property {string} [selected] */ +/** + * @typedef AvailablePageSchedulePredicate + * @property {string} [cron] + * @property {string} [end] + * @property {string} [start] + */ /** * @typedef AvailablePageSchema * @property {string} [_id] @@ -60,7 +93,11 @@ export = ThemePlatformModel; /** * @typedef AvailablePageSeo * @property {string} [_id] + * @property {SEObreadcrumb[]} [breadcrumb] + * @property {string} [canonical_url] * @property {string} [description] + * @property {SEOMetaItem[]} [meta_tags] + * @property {SEOSitemap} [sitemap] * @property {string} [title] */ /** @@ -96,13 +133,36 @@ export = ThemePlatformModel; * @typedef CommonJS * @property {string} [link] */ +/** + * @typedef CompanyPrivateTheme + * @property {string} [_id] - Unique identifier for the theme + * @property {string} [application_id] - Identifier for the application + * @property {boolean} [applied] - Whether the theme is applied or not + * @property {string} [created_at] - Date and time when the theme was created + * @property {boolean} [is_private] - Whether the theme is private or not + * @property {CompanyThemeMeta} [meta] + * @property {string} [name] - Name of the theme + * @property {string} [theme_type] - Type of the theme + * @property {string} [updated_at] - Date and time when the theme was last updated + * @property {string} [version] - Version of the theme + */ +/** + * @typedef CompanyThemeMeta + * @property {string} [description] - A description of the theme. + * @property {ThemeImages} [images] + * @property {string[]} [industry] - A list of industry categories the theme is + * suitable for. + * @property {ThemePayment} [payment] + * @property {string} [slug] - The slug for the theme. + */ /** * @typedef CompanyThemeSchema * @property {string} [_id] - The unique identifier for the theme. + * @property {AppliedThemes[]} [applied_themes] * @property {number} [company_id] - The ID of the company that the theme belongs to. * @property {string} [created_at] - The timestamp when the theme was created. * @property {MarketplaceThemeId} [marketplace_theme_id] - * @property {ThemeMeta} [meta] + * @property {CompanyThemeMeta} [meta] * @property {string} [name] - The name of the theme. * @property {string} [updated_at] - The timestamp when the theme was last updated. */ @@ -220,17 +280,10 @@ export = ThemePlatformModel; /** * @typedef MarketplaceThemeId * @property {string} [_id] - The unique identifier for the marketplace theme. + * @property {string} [created_at] - Creation date of the theme * @property {boolean} [is_default] - Whether the theme is the default theme. - */ -/** - * @typedef Meta - * @property {string} [description] - The description of the theme - * @property {Images} [images] - * @property {string[]} [industry] - An array of industries associated with the theme - * @property {string} [name] - The name of the theme - * @property {ThemePayment} [payment] - * @property {Release} [release] - * @property {string} [slug] - The slug of the theme + * @property {ReleaseVersionOnly} [release] + * @property {string} [updated_at] - Update date of the theme */ /** * @typedef Page @@ -270,6 +323,10 @@ export = ThemePlatformModel; * @property {string} [notes] - The release notes of the theme * @property {string} [version] - The version of the theme */ +/** + * @typedef ReleaseVersionOnly + * @property {string} [version] - The version of the theme + */ /** * @typedef Route * @property {string} [exact_url] - The exact URL of the route. @@ -307,6 +364,26 @@ export = ThemePlatformModel; * @property {RangeProp} [slide_interval] * @property {TextProp} [title] */ +/** + * @typedef SEObreadcrumb + * @property {Action} [action] + * @property {string} [url] + */ +/** + * @typedef SEOMetaItem + * @property {SEOMetaItems[]} [items] + * @property {string} [title] + */ +/** + * @typedef SEOMetaItems + * @property {string} [key] + * @property {string} [value] + */ +/** + * @typedef SEOSitemap + * @property {string} [frequency] + * @property {number} [priority] + */ /** * @typedef TextProp * @property {string} [type] - The type of the property. @@ -326,12 +403,13 @@ export = ThemePlatformModel; */ /** * @typedef ThemeMeta - * @property {string} [description] - A description of the theme. - * @property {ThemeImages} [images] - * @property {string[]} [industry] - A list of industry categories the theme is - * suitable for. + * @property {string} [description] - The description of the theme + * @property {Images} [images] + * @property {string[]} [industry] - An array of industries associated with the theme + * @property {string} [name] - The name of the theme * @property {ThemePayment} [payment] - * @property {string} [slug] - The slug for the theme. + * @property {Release} [release] + * @property {string} [slug] - The slug of the theme */ /** * @typedef ThemePayment @@ -350,16 +428,18 @@ export = ThemePlatformModel; * @property {boolean} [applied] - Whether the theme has been applied or not * @property {Assets} [assets] * @property {SectionItem[]} [available_sections] - Available sections information + * @property {number} [company_id] - The company id in which sales channel exists * @property {Config} [config] * @property {string} [created_at] - The creation timestamp of the theme * @property {Font} [font] * @property {boolean} [is_private] - Whether the theme is private or not * @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace - * @property {Meta} [meta] + * @property {ThemeMeta} [meta] * @property {string} [name] - The name of the theme * @property {Object} [styles] - The styles associated with the theme * @property {string[]} [tags] - An array of tags associated with the theme * @property {string} [template_theme_id] - The ID of the template theme + * @property {string} [theme_type] * @property {string} [updated_at] - The last update timestamp of the theme * @property {string} [version] - The version of the theme */ @@ -381,7 +461,7 @@ export = ThemePlatformModel; */ /** * @typedef UMDJs - * @property {string[]} [links] + * @property {string[]} [links] - An array of pages */ /** * @typedef UpdateThemeNameRequestBody @@ -397,11 +477,74 @@ export = ThemePlatformModel; * @property {string} [type] - The type of the property. * @property {string} [value] - The value of the URL property. */ +/** + * @typedef {| "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"} PageType + */ declare class ThemePlatformModel { } declare namespace ThemePlatformModel { - export { AddThemeRequestSchema, AllAvailablePageSchema, Assets, AvailablePagePredicate, AvailablePageRoutePredicate, AvailablePageSchema, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageSectionMetaAttributes, AvailablePageSeo, AvailablePageUserPredicate, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, Block, BlockProps, CheckboxProp, CommonJS, CompanyThemeSchema, Config, CSS, CustomConfig, CustomProps, DummyResponse, Font, FontsSchema, FontsSchemaItems, FontsSchemaItemsFiles, FontVariant, FontVariants, GlobalSchema, ImagePickerProp, Images, MarketplaceThemeId, Meta, Page, Predicate, Preset, Prop, RangeProp, Release, Route, Screen, Section, SectionItem, SectionPreset, SectionProps, TextProp, ThemeConfiguration, ThemeImages, ThemeMeta, ThemePayment, ThemeReq, ThemesSchema, ThemeUpgradableResponse, ThemeUserSchema, ThemeVersions, UMDJs, UpdateThemeNameRequestBody, UpdateThemeRequestBody, UrlProp }; + export { Action, ActionPage, AddThemeRequestSchema, AllAvailablePageSchema, AppliedThemes, Assets, AvailablePagePlatformPredicate, AvailablePagePredicate, AvailablePageRoutePredicate, AvailablePageSchedulePredicate, AvailablePageSchema, AvailablePageSchemaSections, AvailablePageScreenPredicate, AvailablePageSectionMetaAttributes, AvailablePageSeo, AvailablePageUserPredicate, BlitzkriegApiErrorSchema, BlitzkriegInternalServerErrorSchema, Block, BlockProps, CheckboxProp, CommonJS, CompanyPrivateTheme, CompanyThemeMeta, CompanyThemeSchema, Config, CSS, CustomConfig, CustomProps, DummyResponse, Font, FontsSchema, FontsSchemaItems, FontsSchemaItemsFiles, FontVariant, FontVariants, GlobalSchema, ImagePickerProp, Images, MarketplaceThemeId, Page, Predicate, Preset, Prop, RangeProp, Release, ReleaseVersionOnly, Route, Screen, Section, SectionItem, SectionPreset, SectionProps, SEObreadcrumb, SEOMetaItem, SEOMetaItems, SEOSitemap, TextProp, ThemeConfiguration, ThemeImages, ThemeMeta, ThemePayment, ThemeReq, ThemesSchema, ThemeUpgradableResponse, ThemeUserSchema, ThemeVersions, UMDJs, UpdateThemeNameRequestBody, UpdateThemeRequestBody, UrlProp, PageType }; } +/** @returns {Action} */ +declare function Action(): Action; +type Action = { + page?: ActionPage; + popup?: ActionPage; + type?: string; +}; +/** @returns {ActionPage} */ +declare function ActionPage(): ActionPage; +type ActionPage = { + params?: any; + query?: any; + type: PageType; + url?: string; +}; /** @returns {AddThemeRequestSchema} */ declare function AddThemeRequestSchema(): AddThemeRequestSchema; type AddThemeRequestSchema = { @@ -412,6 +555,18 @@ declare function AllAvailablePageSchema(): AllAvailablePageSchema; type AllAvailablePageSchema = { pages?: AvailablePageSchema[]; }; +/** @returns {AppliedThemes} */ +declare function AppliedThemes(): AppliedThemes; +type AppliedThemes = { + /** + * - ID of the application theme + */ + _id?: string; + /** + * - ID of the application + */ + application_id?: string; +}; /** @returns {Assets} */ declare function Assets(): Assets; type Assets = { @@ -419,12 +574,34 @@ type Assets = { css?: CSS; umd_js?: UMDJs; }; +/** @returns {AvailablePagePlatformPredicate} */ +declare function AvailablePagePlatformPredicate(): AvailablePagePlatformPredicate; +type AvailablePagePlatformPredicate = { + /** + * - Section visibility on android platform + */ + android?: boolean; + /** + * - Section visibility on ios platform + */ + ios?: boolean; + /** + * - Section visibility on web platform + */ + web?: boolean; +}; /** @returns {AvailablePagePredicate} */ declare function AvailablePagePredicate(): AvailablePagePredicate; type AvailablePagePredicate = { + platform?: AvailablePagePlatformPredicate; route?: AvailablePageRoutePredicate; + schedule?: AvailablePageSchedulePredicate; screen?: AvailablePageScreenPredicate; user?: AvailablePageUserPredicate; + /** + * - An array of zone ids associated with the section + */ + zones?: string[]; }; /** @returns {AvailablePageRoutePredicate} */ declare function AvailablePageRoutePredicate(): AvailablePageRoutePredicate; @@ -433,6 +610,13 @@ type AvailablePageRoutePredicate = { query?: any; selected?: string; }; +/** @returns {AvailablePageSchedulePredicate} */ +declare function AvailablePageSchedulePredicate(): AvailablePageSchedulePredicate; +type AvailablePageSchedulePredicate = { + cron?: string; + end?: string; + start?: string; +}; /** @returns {AvailablePageSchema} */ declare function AvailablePageSchema(): AvailablePageSchema; type AvailablePageSchema = { @@ -473,7 +657,11 @@ type AvailablePageSectionMetaAttributes = { declare function AvailablePageSeo(): AvailablePageSeo; type AvailablePageSeo = { _id?: string; + breadcrumb?: SEObreadcrumb[]; + canonical_url?: string; description?: string; + meta_tags?: SEOMetaItem[]; + sitemap?: SEOSitemap; title?: string; }; /** @returns {AvailablePageUserPredicate} */ @@ -528,6 +716,66 @@ declare function CommonJS(): CommonJS; type CommonJS = { link?: string; }; +/** @returns {CompanyPrivateTheme} */ +declare function CompanyPrivateTheme(): CompanyPrivateTheme; +type CompanyPrivateTheme = { + /** + * - Unique identifier for the theme + */ + _id?: string; + /** + * - Identifier for the application + */ + application_id?: string; + /** + * - Whether the theme is applied or not + */ + applied?: boolean; + /** + * - Date and time when the theme was created + */ + created_at?: string; + /** + * - Whether the theme is private or not + */ + is_private?: boolean; + meta?: CompanyThemeMeta; + /** + * - Name of the theme + */ + name?: string; + /** + * - Type of the theme + */ + theme_type?: string; + /** + * - Date and time when the theme was last updated + */ + updated_at?: string; + /** + * - Version of the theme + */ + version?: string; +}; +/** @returns {CompanyThemeMeta} */ +declare function CompanyThemeMeta(): CompanyThemeMeta; +type CompanyThemeMeta = { + /** + * - A description of the theme. + */ + description?: string; + images?: ThemeImages; + /** + * - A list of industry categories the theme is + * suitable for. + */ + industry?: string[]; + payment?: ThemePayment; + /** + * - The slug for the theme. + */ + slug?: string; +}; /** @returns {CompanyThemeSchema} */ declare function CompanyThemeSchema(): CompanyThemeSchema; type CompanyThemeSchema = { @@ -535,6 +783,7 @@ type CompanyThemeSchema = { * - The unique identifier for the theme. */ _id?: string; + applied_themes?: AppliedThemes[]; /** * - The ID of the company that the theme belongs to. */ @@ -544,7 +793,7 @@ type CompanyThemeSchema = { */ created_at?: string; marketplace_theme_id?: MarketplaceThemeId; - meta?: ThemeMeta; + meta?: CompanyThemeMeta; /** * - The name of the theme. */ @@ -804,32 +1053,18 @@ type MarketplaceThemeId = { */ _id?: string; /** - * - Whether the theme is the default theme. - */ - is_default?: boolean; -}; -/** @returns {Meta} */ -declare function Meta(): Meta; -type Meta = { - /** - * - The description of the theme - */ - description?: string; - images?: Images; - /** - * - An array of industries associated with the theme + * - Creation date of the theme */ - industry?: string[]; + created_at?: string; /** - * - The name of the theme + * - Whether the theme is the default theme. */ - name?: string; - payment?: ThemePayment; - release?: Release; + is_default?: boolean; + release?: ReleaseVersionOnly; /** - * - The slug of the theme + * - Update date of the theme */ - slug?: string; + updated_at?: string; }; /** @returns {Page} */ declare function Page(): Page; @@ -902,6 +1137,14 @@ type Release = { */ version?: string; }; +/** @returns {ReleaseVersionOnly} */ +declare function ReleaseVersionOnly(): ReleaseVersionOnly; +type ReleaseVersionOnly = { + /** + * - The version of the theme + */ + version?: string; +}; /** @returns {Route} */ declare function Route(): Route; type Route = { @@ -972,6 +1215,30 @@ type SectionProps = { slide_interval?: RangeProp; title?: TextProp; }; +/** @returns {SEObreadcrumb} */ +declare function SEObreadcrumb(): SEObreadcrumb; +type SEObreadcrumb = { + action?: Action; + url?: string; +}; +/** @returns {SEOMetaItem} */ +declare function SEOMetaItem(): SEOMetaItem; +type SEOMetaItem = { + items?: SEOMetaItems[]; + title?: string; +}; +/** @returns {SEOMetaItems} */ +declare function SEOMetaItems(): SEOMetaItems; +type SEOMetaItems = { + key?: string; + value?: string; +}; +/** @returns {SEOSitemap} */ +declare function SEOSitemap(): SEOSitemap; +type SEOSitemap = { + frequency?: string; + priority?: number; +}; /** @returns {TextProp} */ declare function TextProp(): TextProp; type TextProp = { @@ -1014,18 +1281,22 @@ type ThemeImages = { declare function ThemeMeta(): ThemeMeta; type ThemeMeta = { /** - * - A description of the theme. + * - The description of the theme */ description?: string; - images?: ThemeImages; + images?: Images; /** - * - A list of industry categories the theme is - * suitable for. + * - An array of industries associated with the theme */ industry?: string[]; + /** + * - The name of the theme + */ + name?: string; payment?: ThemePayment; + release?: Release; /** - * - The slug for the theme. + * - The slug of the theme */ slug?: string; }; @@ -1070,6 +1341,10 @@ type ThemesSchema = { * - Available sections information */ available_sections?: SectionItem[]; + /** + * - The company id in which sales channel exists + */ + company_id?: number; config?: Config; /** * - The creation timestamp of the theme @@ -1084,7 +1359,7 @@ type ThemesSchema = { * - The ID of the theme in the marketplace */ marketplace_theme_id?: string; - meta?: Meta; + meta?: ThemeMeta; /** * - The name of the theme */ @@ -1101,6 +1376,7 @@ type ThemesSchema = { * - The ID of the template theme */ template_theme_id?: string; + theme_type?: string; /** * - The last update timestamp of the theme */ @@ -1150,6 +1426,9 @@ type ThemeVersions = { /** @returns {UMDJs} */ declare function UMDJs(): UMDJs; type UMDJs = { + /** + * - An array of pages + */ links?: string[]; }; /** @returns {UpdateThemeNameRequestBody} */ @@ -1178,3 +1457,10 @@ type UrlProp = { */ value?: string; }; +/** + * Enum: PageType Used By: Theme + * + * @returns {PageType} + */ +declare function PageType(): PageType; +type PageType = "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"; diff --git a/sdk/platform/Theme/ThemePlatformModel.js b/sdk/platform/Theme/ThemePlatformModel.js index ed46ca727..d57b3529f 100644 --- a/sdk/platform/Theme/ThemePlatformModel.js +++ b/sdk/platform/Theme/ThemePlatformModel.js @@ -1,5 +1,20 @@ const Joi = require("joi"); +/** + * @typedef Action + * @property {ActionPage} [page] + * @property {ActionPage} [popup] + * @property {string} [type] + */ + +/** + * @typedef ActionPage + * @property {Object} [params] + * @property {Object} [query] + * @property {PageType} type + * @property {string} [url] + */ + /** * @typedef AddThemeRequestSchema * @property {string} [theme_id] @@ -10,6 +25,12 @@ const Joi = require("joi"); * @property {AvailablePageSchema[]} [pages] */ +/** + * @typedef AppliedThemes + * @property {string} [_id] - ID of the application theme + * @property {string} [application_id] - ID of the application + */ + /** * @typedef Assets * @property {CommonJS} [common_js] @@ -17,11 +38,21 @@ const Joi = require("joi"); * @property {UMDJs} [umd_js] */ +/** + * @typedef AvailablePagePlatformPredicate + * @property {boolean} [android] - Section visibility on android platform + * @property {boolean} [ios] - Section visibility on ios platform + * @property {boolean} [web] - Section visibility on web platform + */ + /** * @typedef AvailablePagePredicate + * @property {AvailablePagePlatformPredicate} [platform] * @property {AvailablePageRoutePredicate} [route] + * @property {AvailablePageSchedulePredicate} [schedule] * @property {AvailablePageScreenPredicate} [screen] * @property {AvailablePageUserPredicate} [user] + * @property {string[]} [zones] - An array of zone ids associated with the section */ /** @@ -31,6 +62,13 @@ const Joi = require("joi"); * @property {string} [selected] */ +/** + * @typedef AvailablePageSchedulePredicate + * @property {string} [cron] + * @property {string} [end] + * @property {string} [start] + */ + /** * @typedef AvailablePageSchema * @property {string} [_id] @@ -70,7 +108,11 @@ const Joi = require("joi"); /** * @typedef AvailablePageSeo * @property {string} [_id] + * @property {SEObreadcrumb[]} [breadcrumb] + * @property {string} [canonical_url] * @property {string} [description] + * @property {SEOMetaItem[]} [meta_tags] + * @property {SEOSitemap} [sitemap] * @property {string} [title] */ @@ -114,13 +156,38 @@ const Joi = require("joi"); * @property {string} [link] */ +/** + * @typedef CompanyPrivateTheme + * @property {string} [_id] - Unique identifier for the theme + * @property {string} [application_id] - Identifier for the application + * @property {boolean} [applied] - Whether the theme is applied or not + * @property {string} [created_at] - Date and time when the theme was created + * @property {boolean} [is_private] - Whether the theme is private or not + * @property {CompanyThemeMeta} [meta] + * @property {string} [name] - Name of the theme + * @property {string} [theme_type] - Type of the theme + * @property {string} [updated_at] - Date and time when the theme was last updated + * @property {string} [version] - Version of the theme + */ + +/** + * @typedef CompanyThemeMeta + * @property {string} [description] - A description of the theme. + * @property {ThemeImages} [images] + * @property {string[]} [industry] - A list of industry categories the theme is + * suitable for. + * @property {ThemePayment} [payment] + * @property {string} [slug] - The slug for the theme. + */ + /** * @typedef CompanyThemeSchema * @property {string} [_id] - The unique identifier for the theme. + * @property {AppliedThemes[]} [applied_themes] * @property {number} [company_id] - The ID of the company that the theme belongs to. * @property {string} [created_at] - The timestamp when the theme was created. * @property {MarketplaceThemeId} [marketplace_theme_id] - * @property {ThemeMeta} [meta] + * @property {CompanyThemeMeta} [meta] * @property {string} [name] - The name of the theme. * @property {string} [updated_at] - The timestamp when the theme was last updated. */ @@ -253,18 +320,10 @@ const Joi = require("joi"); /** * @typedef MarketplaceThemeId * @property {string} [_id] - The unique identifier for the marketplace theme. + * @property {string} [created_at] - Creation date of the theme * @property {boolean} [is_default] - Whether the theme is the default theme. - */ - -/** - * @typedef Meta - * @property {string} [description] - The description of the theme - * @property {Images} [images] - * @property {string[]} [industry] - An array of industries associated with the theme - * @property {string} [name] - The name of the theme - * @property {ThemePayment} [payment] - * @property {Release} [release] - * @property {string} [slug] - The slug of the theme + * @property {ReleaseVersionOnly} [release] + * @property {string} [updated_at] - Update date of the theme */ /** @@ -311,6 +370,11 @@ const Joi = require("joi"); * @property {string} [version] - The version of the theme */ +/** + * @typedef ReleaseVersionOnly + * @property {string} [version] - The version of the theme + */ + /** * @typedef Route * @property {string} [exact_url] - The exact URL of the route. @@ -354,6 +418,30 @@ const Joi = require("joi"); * @property {TextProp} [title] */ +/** + * @typedef SEObreadcrumb + * @property {Action} [action] + * @property {string} [url] + */ + +/** + * @typedef SEOMetaItem + * @property {SEOMetaItems[]} [items] + * @property {string} [title] + */ + +/** + * @typedef SEOMetaItems + * @property {string} [key] + * @property {string} [value] + */ + +/** + * @typedef SEOSitemap + * @property {string} [frequency] + * @property {number} [priority] + */ + /** * @typedef TextProp * @property {string} [type] - The type of the property. @@ -376,12 +464,13 @@ const Joi = require("joi"); /** * @typedef ThemeMeta - * @property {string} [description] - A description of the theme. - * @property {ThemeImages} [images] - * @property {string[]} [industry] - A list of industry categories the theme is - * suitable for. + * @property {string} [description] - The description of the theme + * @property {Images} [images] + * @property {string[]} [industry] - An array of industries associated with the theme + * @property {string} [name] - The name of the theme * @property {ThemePayment} [payment] - * @property {string} [slug] - The slug for the theme. + * @property {Release} [release] + * @property {string} [slug] - The slug of the theme */ /** @@ -403,16 +492,18 @@ const Joi = require("joi"); * @property {boolean} [applied] - Whether the theme has been applied or not * @property {Assets} [assets] * @property {SectionItem[]} [available_sections] - Available sections information + * @property {number} [company_id] - The company id in which sales channel exists * @property {Config} [config] * @property {string} [created_at] - The creation timestamp of the theme * @property {Font} [font] * @property {boolean} [is_private] - Whether the theme is private or not * @property {string} [marketplace_theme_id] - The ID of the theme in the marketplace - * @property {Meta} [meta] + * @property {ThemeMeta} [meta] * @property {string} [name] - The name of the theme * @property {Object} [styles] - The styles associated with the theme * @property {string[]} [tags] - An array of tags associated with the theme * @property {string} [template_theme_id] - The ID of the template theme + * @property {string} [theme_type] * @property {string} [updated_at] - The last update timestamp of the theme * @property {string} [version] - The version of the theme */ @@ -438,7 +529,7 @@ const Joi = require("joi"); /** * @typedef UMDJs - * @property {string[]} [links] + * @property {string[]} [links] - An array of pages */ /** @@ -458,7 +549,81 @@ const Joi = require("joi"); * @property {string} [value] - The value of the URL property. */ +/** + * @typedef {| "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"} PageType + */ + class ThemePlatformModel { + /** @returns {Action} */ + static Action() { + return Joi.object({ + page: ThemePlatformModel.ActionPage(), + popup: ThemePlatformModel.ActionPage(), + type: Joi.string().allow(""), + }); + } + + /** @returns {ActionPage} */ + static ActionPage() { + return Joi.object({ + params: Joi.object().pattern( + /\S/, + Joi.array().items(Joi.string().allow("")) + ), + query: Joi.object().pattern( + /\S/, + Joi.array().items(Joi.string().allow("")) + ), + type: ThemePlatformModel.PageType().required(), + url: Joi.string().allow(""), + }); + } + /** @returns {AddThemeRequestSchema} */ static AddThemeRequestSchema() { return Joi.object({ @@ -473,6 +638,14 @@ class ThemePlatformModel { }); } + /** @returns {AppliedThemes} */ + static AppliedThemes() { + return Joi.object({ + _id: Joi.string().allow(""), + application_id: Joi.string().allow(""), + }); + } + /** @returns {Assets} */ static Assets() { return Joi.object({ @@ -482,12 +655,24 @@ class ThemePlatformModel { }); } + /** @returns {AvailablePagePlatformPredicate} */ + static AvailablePagePlatformPredicate() { + return Joi.object({ + android: Joi.boolean(), + ios: Joi.boolean(), + web: Joi.boolean(), + }); + } + /** @returns {AvailablePagePredicate} */ static AvailablePagePredicate() { return Joi.object({ + platform: ThemePlatformModel.AvailablePagePlatformPredicate(), route: ThemePlatformModel.AvailablePageRoutePredicate(), + schedule: ThemePlatformModel.AvailablePageSchedulePredicate(), screen: ThemePlatformModel.AvailablePageScreenPredicate(), user: ThemePlatformModel.AvailablePageUserPredicate(), + zones: Joi.array().items(Joi.string().allow("")), }); } @@ -500,6 +685,15 @@ class ThemePlatformModel { }); } + /** @returns {AvailablePageSchedulePredicate} */ + static AvailablePageSchedulePredicate() { + return Joi.object({ + cron: Joi.string().allow(""), + end: Joi.string().allow(""), + start: Joi.string().allow(""), + }); + } + /** @returns {AvailablePageSchema} */ static AvailablePageSchema() { return Joi.object({ @@ -552,7 +746,11 @@ class ThemePlatformModel { static AvailablePageSeo() { return Joi.object({ _id: Joi.string().allow(""), + breadcrumb: Joi.array().items(ThemePlatformModel.SEObreadcrumb()), + canonical_url: Joi.string().allow(""), description: Joi.string().allow(""), + meta_tags: Joi.array().items(ThemePlatformModel.SEOMetaItem()), + sitemap: ThemePlatformModel.SEOSitemap(), title: Joi.string().allow(""), }); } @@ -611,14 +809,42 @@ class ThemePlatformModel { }); } + /** @returns {CompanyPrivateTheme} */ + static CompanyPrivateTheme() { + return Joi.object({ + _id: Joi.string().allow(""), + application_id: Joi.string().allow(""), + applied: Joi.boolean(), + created_at: Joi.string().allow(""), + is_private: Joi.boolean(), + meta: ThemePlatformModel.CompanyThemeMeta(), + name: Joi.string().allow(""), + theme_type: Joi.string().allow(""), + updated_at: Joi.string().allow(""), + version: Joi.string().allow(""), + }); + } + + /** @returns {CompanyThemeMeta} */ + static CompanyThemeMeta() { + return Joi.object({ + description: Joi.string().allow(""), + images: ThemePlatformModel.ThemeImages(), + industry: Joi.array().items(Joi.string().allow("")), + payment: ThemePlatformModel.ThemePayment(), + slug: Joi.string().allow(""), + }); + } + /** @returns {CompanyThemeSchema} */ static CompanyThemeSchema() { return Joi.object({ _id: Joi.string().allow(""), + applied_themes: Joi.array().items(ThemePlatformModel.AppliedThemes()), company_id: Joi.number(), created_at: Joi.string().allow(""), marketplace_theme_id: ThemePlatformModel.MarketplaceThemeId(), - meta: ThemePlatformModel.ThemeMeta(), + meta: ThemePlatformModel.CompanyThemeMeta(), name: Joi.string().allow(""), updated_at: Joi.string().allow(""), }); @@ -778,20 +1004,10 @@ class ThemePlatformModel { static MarketplaceThemeId() { return Joi.object({ _id: Joi.string().allow(""), + created_at: Joi.string().allow(""), is_default: Joi.boolean(), - }); - } - - /** @returns {Meta} */ - static Meta() { - return Joi.object({ - description: Joi.string().allow(""), - images: ThemePlatformModel.Images(), - industry: Joi.array().items(Joi.string().allow("")), - name: Joi.string().allow(""), - payment: ThemePlatformModel.ThemePayment(), - release: ThemePlatformModel.Release(), - slug: Joi.string().allow(""), + release: ThemePlatformModel.ReleaseVersionOnly(), + updated_at: Joi.string().allow(""), }); } @@ -851,6 +1067,13 @@ class ThemePlatformModel { }); } + /** @returns {ReleaseVersionOnly} */ + static ReleaseVersionOnly() { + return Joi.object({ + version: Joi.string().allow(""), + }); + } + /** @returns {Route} */ static Route() { return Joi.object({ @@ -906,6 +1129,38 @@ class ThemePlatformModel { }); } + /** @returns {SEObreadcrumb} */ + static SEObreadcrumb() { + return Joi.object({ + action: ThemePlatformModel.Action(), + url: Joi.string().allow(""), + }); + } + + /** @returns {SEOMetaItem} */ + static SEOMetaItem() { + return Joi.object({ + items: Joi.array().items(ThemePlatformModel.SEOMetaItems()), + title: Joi.string().allow(""), + }); + } + + /** @returns {SEOMetaItems} */ + static SEOMetaItems() { + return Joi.object({ + key: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {SEOSitemap} */ + static SEOSitemap() { + return Joi.object({ + frequency: Joi.string().allow(""), + priority: Joi.number(), + }); + } + /** @returns {TextProp} */ static TextProp() { return Joi.object({ @@ -936,9 +1191,11 @@ class ThemePlatformModel { static ThemeMeta() { return Joi.object({ description: Joi.string().allow(""), - images: ThemePlatformModel.ThemeImages(), + images: ThemePlatformModel.Images(), industry: Joi.array().items(Joi.string().allow("")), + name: Joi.string().allow(""), payment: ThemePlatformModel.ThemePayment(), + release: ThemePlatformModel.Release(), slug: Joi.string().allow(""), }); } @@ -966,16 +1223,18 @@ class ThemePlatformModel { applied: Joi.boolean(), assets: ThemePlatformModel.Assets(), available_sections: Joi.array().items(ThemePlatformModel.SectionItem()), + company_id: Joi.number(), config: ThemePlatformModel.Config(), created_at: Joi.string().allow(""), font: ThemePlatformModel.Font(), is_private: Joi.boolean(), marketplace_theme_id: Joi.string().allow(""), - meta: ThemePlatformModel.Meta(), + meta: ThemePlatformModel.ThemeMeta(), name: Joi.string().allow(""), styles: Joi.any(), tags: Joi.array().items(Joi.string().allow("")), template_theme_id: Joi.string().allow(""), + theme_type: Joi.string().allow(""), updated_at: Joi.string().allow(""), version: Joi.string().allow(""), }); @@ -1035,5 +1294,106 @@ class ThemePlatformModel { value: Joi.string().allow(""), }); } + + /** + * Enum: PageType Used By: Theme + * + * @returns {PageType} + */ + static PageType() { + return Joi.string().valid( + "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" + ); + } } module.exports = ThemePlatformModel; diff --git a/sdk/platform/Theme/ThemePlatformValidator.d.ts b/sdk/platform/Theme/ThemePlatformValidator.d.ts index 0eb2257df..20b6c4cff 100644 --- a/sdk/platform/Theme/ThemePlatformValidator.d.ts +++ b/sdk/platform/Theme/ThemePlatformValidator.d.ts @@ -7,17 +7,28 @@ export = ThemePlatformValidator; * @typedef DeleteCompanyThemeParam * @property {string} themeId - The ID of the theme. */ -/** @typedef GetCompanyLevelThemesParam */ +/** + * @typedef GetCompanyLevelPrivateThemesParam + * @property {string} [searchText] - Search Text to match the Theme Names and + * return the response. + */ +/** + * @typedef GetCompanyLevelThemesParam + * @property {string} [searchText] - Search Text to match the Theme Names and + * return the response. + */ declare class ThemePlatformValidator { /** @returns {AddMarketplaceThemeToCompanyParam} */ static addMarketplaceThemeToCompany(): AddMarketplaceThemeToCompanyParam; /** @returns {DeleteCompanyThemeParam} */ static deleteCompanyTheme(): DeleteCompanyThemeParam; + /** @returns {GetCompanyLevelPrivateThemesParam} */ + static getCompanyLevelPrivateThemes(): GetCompanyLevelPrivateThemesParam; /** @returns {GetCompanyLevelThemesParam} */ - static getCompanyLevelThemes(): any; + static getCompanyLevelThemes(): GetCompanyLevelThemesParam; } declare namespace ThemePlatformValidator { - export { AddMarketplaceThemeToCompanyParam, DeleteCompanyThemeParam, GetCompanyLevelThemesParam }; + export { AddMarketplaceThemeToCompanyParam, DeleteCompanyThemeParam, GetCompanyLevelPrivateThemesParam, GetCompanyLevelThemesParam }; } type AddMarketplaceThemeToCompanyParam = { body: ThemePlatformModel.ThemeReq; @@ -28,5 +39,18 @@ type DeleteCompanyThemeParam = { */ themeId: string; }; -type GetCompanyLevelThemesParam = any; +type GetCompanyLevelPrivateThemesParam = { + /** + * - Search Text to match the Theme Names and + * return the response. + */ + searchText?: string; +}; +type GetCompanyLevelThemesParam = { + /** + * - Search Text to match the Theme Names and + * return the response. + */ + searchText?: string; +}; import ThemePlatformModel = require("./ThemePlatformModel"); diff --git a/sdk/platform/Theme/ThemePlatformValidator.js b/sdk/platform/Theme/ThemePlatformValidator.js index 9964f94ed..f22141ea8 100644 --- a/sdk/platform/Theme/ThemePlatformValidator.js +++ b/sdk/platform/Theme/ThemePlatformValidator.js @@ -12,7 +12,17 @@ const ThemePlatformModel = require("./ThemePlatformModel"); * @property {string} themeId - The ID of the theme. */ -/** @typedef GetCompanyLevelThemesParam */ +/** + * @typedef GetCompanyLevelPrivateThemesParam + * @property {string} [searchText] - Search Text to match the Theme Names and + * return the response. + */ + +/** + * @typedef GetCompanyLevelThemesParam + * @property {string} [searchText] - Search Text to match the Theme Names and + * return the response. + */ class ThemePlatformValidator { /** @returns {AddMarketplaceThemeToCompanyParam} */ @@ -29,9 +39,18 @@ class ThemePlatformValidator { }).required(); } + /** @returns {GetCompanyLevelPrivateThemesParam} */ + static getCompanyLevelPrivateThemes() { + return Joi.object({ + searchText: Joi.string().allow(""), + }).required(); + } + /** @returns {GetCompanyLevelThemesParam} */ static getCompanyLevelThemes() { - return Joi.object({}).required(); + return Joi.object({ + searchText: Joi.string().allow(""), + }).required(); } } diff --git a/sdk/platform/User/UserPlatformApplicationClient.d.ts b/sdk/platform/User/UserPlatformApplicationClient.d.ts index 9731cdf46..a057fe24c 100644 --- a/sdk/platform/User/UserPlatformApplicationClient.d.ts +++ b/sdk/platform/User/UserPlatformApplicationClient.d.ts @@ -33,6 +33,19 @@ declare class User { * @description: Create user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUser/). */ createUser({ body, requestHeaders }?: UserPlatformApplicationValidator.CreateUserParam, { responseHeaders }?: object): Promise; + /** + * @param {UserPlatformApplicationValidator.CreateUserAttributeDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name createUserAttributeDefinition + * @summary: Create a User Attribute Definition + * @description: Use this API to areate 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; /** * @param {UserPlatformApplicationValidator.CreateUserGroupParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -78,6 +91,28 @@ declare class User { * @description: Use this API to Delete a session of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteSession/). */ deleteSession({ id, sessionId, reason, requestHeaders }?: UserPlatformApplicationValidator.DeleteSessionParam, { responseHeaders }?: object): Promise; + /** + * @param {UserPlatformApplicationValidator.DeleteUserAttributeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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; + /** + * @param {UserPlatformApplicationValidator.DeleteUserAttributeDefinitionByIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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; /** * @param {UserPlatformApplicationValidator.GetActiveSessionsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -108,6 +143,64 @@ declare class User { * @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getPlatformConfig/). */ getPlatformConfig({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {UserPlatformApplicationValidator.GetUserAttributeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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; + /** + * @param {UserPlatformApplicationValidator.GetUserAttributeByIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getUserAttributeById + * @summary: Get User Attribute + * @description: Get 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; + /** + * @param {UserPlatformApplicationValidator.GetUserAttributeDefinitionByIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getUserAttributeDefinitionById + * @summary: Get User Attribute Definition + * @description: Get a user attribute definition by its unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttributeDefinitionById/). + */ + getUserAttributeDefinitionById({ attributeDefId, requestHeaders }?: UserPlatformApplicationValidator.GetUserAttributeDefinitionByIdParam, { responseHeaders }?: object): Promise; + /** + * @param {UserPlatformApplicationValidator.GetUserAttributeDefinitionsParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getUserAttributeDefinitions + * @summary: Get User Attribute Definitions + * @description: Retrieve user attribute definitions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttributeDefinitions/). + */ + getUserAttributeDefinitions({ excludingIds, slug, type, customerEditable, encrypted, pinned, pinOrder, isLocked, name, pageSize, pageNo, requestHeaders, }?: UserPlatformApplicationValidator.GetUserAttributeDefinitionsParam, { responseHeaders }?: object): Promise; + /** + * @param {UserPlatformApplicationValidator.GetUserAttributesForUserParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getUserAttributesForUser + * @summary: Get User Attributes for user + * @description: Get all user attributes for user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttributesForUser/). + */ + getUserAttributesForUser({ userId, pageSize, pageNo, requestHeaders }?: UserPlatformApplicationValidator.GetUserAttributesForUserParam, { responseHeaders }?: object): Promise; /** * @param {UserPlatformApplicationValidator.GetUserGroupByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -128,7 +221,7 @@ declare class User { * @summary: Get User Groups mathcing criteria * @description: Use this API to get User Groups mathing criteria passed in query - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserGroups/). */ - getUserGroups({ pageNo, pageSize, name, status, groupUid, requestHeaders }?: UserPlatformApplicationValidator.GetUserGroupsParam, { responseHeaders }?: object): Promise; + getUserGroups({ pageNo, pageSize, name, type, status, groupUid, requestHeaders }?: UserPlatformApplicationValidator.GetUserGroupsParam, { responseHeaders }?: object): Promise; /** * @param {UserPlatformApplicationValidator.SearchUsersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -171,6 +264,28 @@ declare class User { * @description: Use this API to update user details, Note: Existing emails and phone numbers of user will be replaced directly if phone_numbers or emails field sent in request data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updateUser/). */ updateUser({ userId, body, requestHeaders }?: UserPlatformApplicationValidator.UpdateUserParam, { responseHeaders }?: object): Promise; + /** + * @param {UserPlatformApplicationValidator.UpdateUserAttributeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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; + /** + * @param {UserPlatformApplicationValidator.UpdateUserAttributeDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name updateUserAttributeDefinition + * @summary: Update User Attribute Definition + * @description: Update an existing user attribute definition. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updateUserAttributeDefinition/). + */ + updateUserAttributeDefinition({ attributeDefId, body, requestHeaders }?: UserPlatformApplicationValidator.UpdateUserAttributeDefinitionParam, { responseHeaders }?: object): Promise; /** * @param {UserPlatformApplicationValidator.UpdateUserGroupParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/User/UserPlatformApplicationClient.js b/sdk/platform/User/UserPlatformApplicationClient.js index 0a80878f3..f80b84a16 100644 --- a/sdk/platform/User/UserPlatformApplicationClient.js +++ b/sdk/platform/User/UserPlatformApplicationClient.js @@ -245,6 +245,88 @@ class User { return response; } + /** + * @param {UserPlatformApplicationValidator.CreateUserAttributeDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name createUserAttributeDefinition + * @summary: Create a User Attribute Definition + * @description: Use this API to areate a new User Attribute Definition - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/createUserAttributeDefinition/). + */ + async createUserAttributeDefinition( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = UserPlatformApplicationValidator.createUserAttributeDefinition().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, + } = UserPlatformApplicationValidator.createUserAttributeDefinition().validate( + { + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > createUserAttributeDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "post", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/definition`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.UserAttributeDefinitionResponse().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 > User > createUserAttributeDefinition \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {UserPlatformApplicationValidator.CreateUserGroupParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -482,7 +564,558 @@ class User { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > User > deleteActiveSessions \n ${res_error}`, + message: `Response Validation Warnings for platform > User > deleteActiveSessions \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {UserPlatformApplicationValidator.DeleteSessionParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - + * Success response + * @name deleteSession + * @summary: Delete a session for a user + * @description: Use this API to Delete a session of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteSession/). + */ + async deleteSession( + { id, sessionId, reason, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = UserPlatformApplicationValidator.deleteSession().validate( + { + id, + sessionId, + reason, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = UserPlatformApplicationValidator.deleteSession().validate( + { + id, + sessionId, + reason, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > deleteSession \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["id"] = id; + query_params["session_id"] = sessionId; + query_params["reason"] = reason; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/session`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.SessionDeleteResponseSchema().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 > User > deleteSession \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {UserPlatformApplicationValidator.DeleteUserAttributeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/). + */ + async deleteUserAttribute( + { attributeDefId, userId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = UserPlatformApplicationValidator.deleteUserAttribute().validate( + { attributeDefId, userId }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = UserPlatformApplicationValidator.deleteUserAttribute().validate( + { attributeDefId, userId }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > deleteUserAttribute \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/definition/${attributeDefId}/user/${userId}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.SuccessMessageResponse().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 > User > deleteUserAttribute \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {UserPlatformApplicationValidator.DeleteUserAttributeDefinitionByIdParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/). + */ + async deleteUserAttributeDefinitionById( + { attributeDefId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = UserPlatformApplicationValidator.deleteUserAttributeDefinitionById().validate( + { attributeDefId }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = UserPlatformApplicationValidator.deleteUserAttributeDefinitionById().validate( + { attributeDefId }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > deleteUserAttributeDefinitionById \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "delete", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/definition/${attributeDefId}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.SuccessMessageResponse().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 > User > deleteUserAttributeDefinitionById \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {UserPlatformApplicationValidator.GetActiveSessionsParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getActiveSessions + * @summary: Get a list of all session with info for a user + * @description: Use this API to retrieve a list of session with info of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getActiveSessions/). + */ + async getActiveSessions( + { id, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = UserPlatformApplicationValidator.getActiveSessions().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, + } = UserPlatformApplicationValidator.getActiveSessions().validate( + { + id, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > getActiveSessions \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["id"] = id; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/sessions`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.SessionListResponseSchema().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 > User > getActiveSessions \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {UserPlatformApplicationValidator.GetCustomersParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCustomers + * @summary: Get a list of customers + * @description: Use this API to retrieve a list of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getCustomers/). + */ + async getCustomers( + { q, pageSize, pageNo, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = UserPlatformApplicationValidator.getCustomers().validate( + { + q, + pageSize, + pageNo, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = UserPlatformApplicationValidator.getCustomers().validate( + { + q, + pageSize, + pageNo, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > getCustomers \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["q"] = q; + query_params["page_size"] = pageSize; + query_params["page_no"] = pageNo; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/list`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.CustomerListResponseSchema().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 > User > getCustomers \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {UserPlatformApplicationValidator.GetPlatformConfigParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getPlatformConfig + * @summary: Get platform configurations + * @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getPlatformConfig/). + */ + async getPlatformConfig( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = UserPlatformApplicationValidator.getPlatformConfig().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = UserPlatformApplicationValidator.getPlatformConfig().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > getPlatformConfig \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform/config`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.PlatformSchema().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 > User > getPlatformConfig \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {UserPlatformApplicationValidator.GetUserAttributeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/). + */ + async getUserAttribute( + { attributeDefId, userId, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = UserPlatformApplicationValidator.getUserAttribute().validate( + { attributeDefId, userId }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = UserPlatformApplicationValidator.getUserAttribute().validate( + { attributeDefId, userId }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > getUserAttribute \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "get", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/definition/${attributeDefId}/user/${userId}`, + query_params, + undefined, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.UserAttributeResponse().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 > User > getUserAttribute \n ${res_error}`, }); } } @@ -491,25 +1124,24 @@ class User { } /** - * @param {UserPlatformApplicationValidator.DeleteSessionParam} arg - Arg object + * @param {UserPlatformApplicationValidator.GetUserAttributeByIdParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response - * @name deleteSession - * @summary: Delete a session for a user - * @description: Use this API to Delete a session of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/deleteSession/). + * @returns {Promise} - Success response + * @name getUserAttributeById + * @summary: Get User Attribute + * @description: Get User Attribute details by id - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttributeById/). */ - async deleteSession( - { id, sessionId, reason, requestHeaders } = { requestHeaders: {} }, + async getUserAttributeById( + { attributeId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = UserPlatformApplicationValidator.deleteSession().validate( - { - id, - sessionId, - reason, - }, + const { + error, + } = UserPlatformApplicationValidator.getUserAttributeById().validate( + { attributeId }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -519,30 +1151,23 @@ class User { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = UserPlatformApplicationValidator.deleteSession().validate( - { - id, - sessionId, - reason, - }, + } = UserPlatformApplicationValidator.getUserAttributeById().validate( + { attributeId }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > User > deleteSession \n ${warrning}`, + message: `Parameter Validation warrnings for platform > User > getUserAttributeById \n ${warrning}`, }); } const query_params = {}; - query_params["id"] = id; - query_params["session_id"] = sessionId; - query_params["reason"] = reason; const response = await PlatformAPIClient.execute( this.config, - "delete", - `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/session`, + "get", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/attribute/${attributeId}`, query_params, undefined, requestHeaders, @@ -556,7 +1181,7 @@ class User { const { error: res_error, - } = UserPlatformModel.SessionDeleteResponseSchema().validate(responseData, { + } = UserPlatformModel.UserAttributeResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -567,7 +1192,7 @@ class User { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > User > deleteSession \n ${res_error}`, + message: `Response Validation Warnings for platform > User > getUserAttributeById \n ${res_error}`, }); } } @@ -576,24 +1201,24 @@ class User { } /** - * @param {UserPlatformApplicationValidator.GetActiveSessionsParam} arg - Arg object + * @param {UserPlatformApplicationValidator.GetUserAttributeDefinitionByIdParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getActiveSessions - * @summary: Get a list of all session with info for a user - * @description: Use this API to retrieve a list of session with info of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getActiveSessions/). + * @returns {Promise} - Success response + * @name getUserAttributeDefinitionById + * @summary: Get User Attribute Definition + * @description: Get a user attribute definition by its unique identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttributeDefinitionById/). */ - async getActiveSessions( - { id, requestHeaders } = { requestHeaders: {} }, + async getUserAttributeDefinitionById( + { attributeDefId, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = UserPlatformApplicationValidator.getActiveSessions().validate( - { - id, - }, + } = UserPlatformApplicationValidator.getUserAttributeDefinitionById().validate( + { attributeDefId }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -603,26 +1228,23 @@ class User { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = UserPlatformApplicationValidator.getActiveSessions().validate( - { - id, - }, + } = UserPlatformApplicationValidator.getUserAttributeDefinitionById().validate( + { attributeDefId }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > User > getActiveSessions \n ${warrning}`, + message: `Parameter Validation warrnings for platform > User > getUserAttributeDefinitionById \n ${warrning}`, }); } const query_params = {}; - query_params["id"] = id; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/sessions`, + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/definition/${attributeDefId}`, query_params, undefined, requestHeaders, @@ -636,7 +1258,7 @@ class User { const { error: res_error, - } = UserPlatformModel.SessionListResponseSchema().validate(responseData, { + } = UserPlatformModel.UserAttributeDefinition().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -647,7 +1269,7 @@ class User { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > User > getActiveSessions \n ${res_error}`, + message: `Response Validation Warnings for platform > User > getUserAttributeDefinitionById \n ${res_error}`, }); } } @@ -656,21 +1278,46 @@ class User { } /** - * @param {UserPlatformApplicationValidator.GetCustomersParam} arg - Arg object + * @param {UserPlatformApplicationValidator.GetUserAttributeDefinitionsParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getCustomers - * @summary: Get a list of customers - * @description: Use this API to retrieve a list of customers who have registered in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getCustomers/). + * @returns {Promise} - Success response + * @name getUserAttributeDefinitions + * @summary: Get User Attribute Definitions + * @description: Retrieve user attribute definitions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttributeDefinitions/). */ - async getCustomers( - { q, pageSize, pageNo, requestHeaders } = { requestHeaders: {} }, + async getUserAttributeDefinitions( + { + excludingIds, + slug, + type, + customerEditable, + encrypted, + pinned, + pinOrder, + isLocked, + name, + pageSize, + pageNo, + requestHeaders, + } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { - const { error } = UserPlatformApplicationValidator.getCustomers().validate( + const { + error, + } = UserPlatformApplicationValidator.getUserAttributeDefinitions().validate( { - q, + excludingIds, + slug, + type, + customerEditable, + encrypted, + pinned, + pinOrder, + isLocked, + name, pageSize, pageNo, }, @@ -683,9 +1330,17 @@ class User { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = UserPlatformApplicationValidator.getCustomers().validate( + } = UserPlatformApplicationValidator.getUserAttributeDefinitions().validate( { - q, + excludingIds, + slug, + type, + customerEditable, + encrypted, + pinned, + pinOrder, + isLocked, + name, pageSize, pageNo, }, @@ -694,19 +1349,27 @@ class User { if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > User > getCustomers \n ${warrning}`, + message: `Parameter Validation warrnings for platform > User > getUserAttributeDefinitions \n ${warrning}`, }); } const query_params = {}; - query_params["q"] = q; + query_params["excluding_ids"] = excludingIds; + query_params["slug"] = slug; + query_params["type"] = type; + query_params["customer_editable"] = customerEditable; + query_params["encrypted"] = encrypted; + query_params["pinned"] = pinned; + query_params["pin_order"] = pinOrder; + query_params["is_locked"] = isLocked; + query_params["name"] = name; query_params["page_size"] = pageSize; query_params["page_no"] = pageNo; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/customers/list`, + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/definition`, query_params, undefined, requestHeaders, @@ -718,9 +1381,7 @@ class User { responseData = response[0]; } - const { - error: res_error, - } = UserPlatformModel.CustomerListResponseSchema().validate(responseData, { + const { error: res_error } = Joi.any().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -731,7 +1392,7 @@ class User { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > User > getCustomers \n ${res_error}`, + message: `Response Validation Warnings for platform > User > getUserAttributeDefinitions \n ${res_error}`, }); } } @@ -740,22 +1401,29 @@ class User { } /** - * @param {UserPlatformApplicationValidator.GetPlatformConfigParam} arg - Arg object + * @param {UserPlatformApplicationValidator.GetUserAttributesForUserParam} arg + * - Arg object + * * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response - * @name getPlatformConfig - * @summary: Get platform configurations - * @description: Use this API to get all the platform configurations such as mobile image, desktop image, social logins, and all other text. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getPlatformConfig/). + * @returns {Promise} - Success response + * @name getUserAttributesForUser + * @summary: Get User Attributes for user + * @description: Get all user attributes for user - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserAttributesForUser/). */ - async getPlatformConfig( - { requestHeaders } = { requestHeaders: {} }, + async getUserAttributesForUser( + { userId, pageSize, pageNo, requestHeaders } = { requestHeaders: {} }, { responseHeaders } = { responseHeaders: false } ) { const { error, - } = UserPlatformApplicationValidator.getPlatformConfig().validate( - {}, + } = UserPlatformApplicationValidator.getUserAttributesForUser().validate( + { + userId, + + pageSize, + pageNo, + }, { abortEarly: false, allowUnknown: true } ); if (error) { @@ -765,23 +1433,30 @@ class User { // Showing warrnings if extra unknown parameters are found const { error: warrning, - } = UserPlatformApplicationValidator.getPlatformConfig().validate( - {}, + } = UserPlatformApplicationValidator.getUserAttributesForUser().validate( + { + userId, + + pageSize, + pageNo, + }, { abortEarly: false, allowUnknown: false } ); if (warrning) { Logger({ level: "WARN", - message: `Parameter Validation warrnings for platform > User > getPlatformConfig \n ${warrning}`, + message: `Parameter Validation warrnings for platform > User > getUserAttributesForUser \n ${warrning}`, }); } const query_params = {}; + query_params["page_size"] = pageSize; + query_params["page_no"] = pageNo; const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform/config`, + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/user/${userId}`, query_params, undefined, requestHeaders, @@ -793,9 +1468,7 @@ class User { responseData = response[0]; } - const { - error: res_error, - } = UserPlatformModel.PlatformSchema().validate(responseData, { + const { error: res_error } = Joi.any().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -806,7 +1479,7 @@ class User { } else { Logger({ level: "WARN", - message: `Response Validation Warnings for platform > User > getPlatformConfig \n ${res_error}`, + message: `Response Validation Warnings for platform > User > getUserAttributesForUser \n ${res_error}`, }); } } @@ -904,7 +1577,7 @@ class User { * @description: Use this API to get User Groups mathing criteria passed in query - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/getUserGroups/). */ async getUserGroups( - { pageNo, pageSize, name, status, groupUid, requestHeaders } = { + { pageNo, pageSize, name, type, status, groupUid, requestHeaders } = { requestHeaders: {}, }, { responseHeaders } = { responseHeaders: false } @@ -914,6 +1587,7 @@ class User { pageNo, pageSize, name, + type, status, groupUid, }, @@ -931,6 +1605,7 @@ class User { pageNo, pageSize, name, + type, status, groupUid, }, @@ -947,6 +1622,7 @@ class User { query_params["page_no"] = pageNo; query_params["page_size"] = pageSize; query_params["name"] = name; + query_params["type"] = type; query_params["status"] = status; query_params["group_uid"] = groupUid; @@ -1304,6 +1980,176 @@ class User { return response; } + /** + * @param {UserPlatformApplicationValidator.UpdateUserAttributeParam} arg - Arg object + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @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/). + */ + async updateUserAttribute( + { attributeDefId, userId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = UserPlatformApplicationValidator.updateUserAttribute().validate( + { + attributeDefId, + userId, + + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = UserPlatformApplicationValidator.updateUserAttribute().validate( + { + attributeDefId, + userId, + + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > updateUserAttribute \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/definition/${attributeDefId}/user/${userId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.UserAttributeResponse().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 > User > updateUserAttribute \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {UserPlatformApplicationValidator.UpdateUserAttributeDefinitionParam} arg + * - Arg object + * + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PlatformAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name updateUserAttributeDefinition + * @summary: Update User Attribute Definition + * @description: Update an existing user attribute definition. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/user/updateUserAttributeDefinition/). + */ + async updateUserAttributeDefinition( + { attributeDefId, body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = UserPlatformApplicationValidator.updateUserAttributeDefinition().validate( + { + attributeDefId, + + body, + }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = UserPlatformApplicationValidator.updateUserAttributeDefinition().validate( + { + attributeDefId, + + body, + }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for platform > User > updateUserAttributeDefinition \n ${warrning}`, + }); + } + + const query_params = {}; + + const response = await PlatformAPIClient.execute( + this.config, + "put", + `/service/platform/user/v1.0/company/${this.config.companyId}/application/${this.applicationId}/user_attribute/definition/${attributeDefId}`, + query_params, + body, + requestHeaders, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = UserPlatformModel.UserAttributeDefinition().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 > User > updateUserAttributeDefinition \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {UserPlatformApplicationValidator.UpdateUserGroupParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` diff --git a/sdk/platform/User/UserPlatformApplicationValidator.d.ts b/sdk/platform/User/UserPlatformApplicationValidator.d.ts index d4f172e1a..6ec436d2e 100644 --- a/sdk/platform/User/UserPlatformApplicationValidator.d.ts +++ b/sdk/platform/User/UserPlatformApplicationValidator.d.ts @@ -11,9 +11,13 @@ export = UserPlatformApplicationValidator; * @typedef CreateUserParam * @property {UserPlatformModel.CreateUserRequestSchema} body */ +/** + * @typedef CreateUserAttributeDefinitionParam + * @property {UserPlatformModel.CreateUserAttributeDefinition} body + */ /** * @typedef CreateUserGroupParam - * @property {UserPlatformModel.CreateUserGroupSchema} body + * @property {UserPlatformModel.CreateUserGroup} body */ /** * @typedef CreateUserSessionParam @@ -30,19 +34,67 @@ export = UserPlatformApplicationValidator; * @property {string} sessionId - Session ID of a customer. * @property {string} reason - Reason for deleting session. */ +/** + * @typedef DeleteUserAttributeParam + * @property {string} attributeDefId - The unique identifier of the attribute definition. + * @property {string} userId - The unique identifier of the user. + */ +/** + * @typedef DeleteUserAttributeDefinitionByIdParam + * @property {string} attributeDefId - The unique identifier of the attribute + * definition to delete. + */ /** * @typedef GetActiveSessionsParam * @property {string} id - ID of a customer. */ /** * @typedef GetCustomersParam - * @property {Object} [q] - The search query. Mobile number or email ID of a customer. + * @property {string} [q] - The search query. Mobile number or email ID of a customer. * @property {number} [pageSize] - The number of items to retrieve in each page. * Default value is 10. * @property {number} [pageNo] - The page number to navigate through the given * set of results. Default value is 1. */ /** @typedef GetPlatformConfigParam */ +/** + * @typedef GetUserAttributeParam + * @property {string} attributeDefId - The unique identifier of the attribute definition. + * @property {string} userId - The unique identifier of the user. + */ +/** + * @typedef GetUserAttributeByIdParam + * @property {string} attributeId - The unique identifier of the attribute to get. + */ +/** + * @typedef GetUserAttributeDefinitionByIdParam + * @property {string} attributeDefId - The unique identifier of the attribute + * definition to retrieve. + */ +/** + * @typedef GetUserAttributeDefinitionsParam + * @property {string} [excludingIds] - Exclude attribute definitions by Ids + * @property {string} [slug] - Filter by attribute slug. + * @property {string} [type] - Filter by attribute type. + * @property {boolean} [customerEditable] - Filter by customer_editable status. + * @property {boolean} [encrypted] - Filter by encrypted status. + * @property {boolean} [pinned] - Filter by pinned status. + * @property {number} [pinOrder] - Filter by pin order. + * @property {boolean} [isLocked] - Filter by locked status. + * @property {string} [name] - Filter by attribute name using a case-insensitive regex. + * @property {number} [pageSize] - The number of items to retrieve in each page. + * Default value is 10. + * @property {number} [pageNo] - The page number to navigate through the given + * set of results. Default value is 1. + */ +/** + * @typedef GetUserAttributesForUserParam + * @property {string} userId - The unique identifier of the user to update. + * @property {number} [pageSize] - The number of items to retrieve in each page. + * Default value is 10. + * @property {number} [pageNo] - The page number to navigate through the given + * set of results. Default value is 1. + */ /** * @typedef GetUserGroupByIdParam * @property {string} groupId - Numeric ID allotted to a User Group @@ -51,8 +103,9 @@ export = UserPlatformApplicationValidator; * @typedef GetUserGroupsParam * @property {string} [pageNo] - Page number for pagination result * @property {string} [pageSize] - Page size for pagination result - * @property {string} [name] - To seartch for User Groups which contains given + * @property {string} [name] - To search for User Groups which contains given * string in their name + * @property {string} [type] - To search for User Groups with given type * @property {string} [status] - To get User Groups with given status * @property {number} [groupUid] - To get User Groups with given uid */ @@ -75,6 +128,19 @@ export = UserPlatformApplicationValidator; * @property {string} userId - User ID * @property {UserPlatformModel.UpdateUserRequestSchema} body */ +/** + * @typedef UpdateUserAttributeParam + * @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.CreateUserAttributeRequest} body + */ +/** + * @typedef UpdateUserAttributeDefinitionParam + * @property {string} attributeDefId - The unique identifier of the attribute + * definition to update. + * @property {UserPlatformModel.CreateUserAttributeDefinition} body + */ /** * @typedef UpdateUserGroupParam * @property {string} groupId - Numeric ID allotted to a User Group @@ -92,6 +158,8 @@ declare class UserPlatformApplicationValidator { static blockOrUnblockUsers(): BlockOrUnblockUsersParam; /** @returns {CreateUserParam} */ static createUser(): CreateUserParam; + /** @returns {CreateUserAttributeDefinitionParam} */ + static createUserAttributeDefinition(): CreateUserAttributeDefinitionParam; /** @returns {CreateUserGroupParam} */ static createUserGroup(): CreateUserGroupParam; /** @returns {CreateUserSessionParam} */ @@ -100,12 +168,26 @@ declare class UserPlatformApplicationValidator { static deleteActiveSessions(): DeleteActiveSessionsParam; /** @returns {DeleteSessionParam} */ static deleteSession(): DeleteSessionParam; + /** @returns {DeleteUserAttributeParam} */ + static deleteUserAttribute(): DeleteUserAttributeParam; + /** @returns {DeleteUserAttributeDefinitionByIdParam} */ + static deleteUserAttributeDefinitionById(): DeleteUserAttributeDefinitionByIdParam; /** @returns {GetActiveSessionsParam} */ static getActiveSessions(): GetActiveSessionsParam; /** @returns {GetCustomersParam} */ static getCustomers(): GetCustomersParam; /** @returns {GetPlatformConfigParam} */ static getPlatformConfig(): any; + /** @returns {GetUserAttributeParam} */ + static getUserAttribute(): GetUserAttributeParam; + /** @returns {GetUserAttributeByIdParam} */ + static getUserAttributeById(): GetUserAttributeByIdParam; + /** @returns {GetUserAttributeDefinitionByIdParam} */ + static getUserAttributeDefinitionById(): GetUserAttributeDefinitionByIdParam; + /** @returns {GetUserAttributeDefinitionsParam} */ + static getUserAttributeDefinitions(): GetUserAttributeDefinitionsParam; + /** @returns {GetUserAttributesForUserParam} */ + static getUserAttributesForUser(): GetUserAttributesForUserParam; /** @returns {GetUserGroupByIdParam} */ static getUserGroupById(): GetUserGroupByIdParam; /** @returns {GetUserGroupsParam} */ @@ -118,13 +200,17 @@ declare class UserPlatformApplicationValidator { static updatePlatformConfig(): UpdatePlatformConfigParam; /** @returns {UpdateUserParam} */ static updateUser(): UpdateUserParam; + /** @returns {UpdateUserAttributeParam} */ + static updateUserAttribute(): UpdateUserAttributeParam; + /** @returns {UpdateUserAttributeDefinitionParam} */ + static updateUserAttributeDefinition(): UpdateUserAttributeDefinitionParam; /** @returns {UpdateUserGroupParam} */ static updateUserGroup(): UpdateUserGroupParam; /** @returns {UpdateUserGroupPartiallyParam} */ static updateUserGroupPartially(): UpdateUserGroupPartiallyParam; } declare namespace UserPlatformApplicationValidator { - export { ArchiveUserParam, BlockOrUnblockUsersParam, CreateUserParam, CreateUserGroupParam, CreateUserSessionParam, DeleteActiveSessionsParam, DeleteSessionParam, GetActiveSessionsParam, GetCustomersParam, GetPlatformConfigParam, GetUserGroupByIdParam, GetUserGroupsParam, SearchUsersParam, UnDeleteUserParam, UpdatePlatformConfigParam, UpdateUserParam, UpdateUserGroupParam, UpdateUserGroupPartiallyParam }; + export { ArchiveUserParam, BlockOrUnblockUsersParam, CreateUserParam, CreateUserAttributeDefinitionParam, CreateUserGroupParam, CreateUserSessionParam, DeleteActiveSessionsParam, DeleteSessionParam, DeleteUserAttributeParam, DeleteUserAttributeDefinitionByIdParam, GetActiveSessionsParam, GetCustomersParam, GetPlatformConfigParam, GetUserAttributeParam, GetUserAttributeByIdParam, GetUserAttributeDefinitionByIdParam, GetUserAttributeDefinitionsParam, GetUserAttributesForUserParam, GetUserGroupByIdParam, GetUserGroupsParam, SearchUsersParam, UnDeleteUserParam, UpdatePlatformConfigParam, UpdateUserParam, UpdateUserAttributeParam, UpdateUserAttributeDefinitionParam, UpdateUserGroupParam, UpdateUserGroupPartiallyParam }; } type ArchiveUserParam = { body: UserPlatformModel.ArchiveUserRequestSchema; @@ -135,8 +221,11 @@ type BlockOrUnblockUsersParam = { type CreateUserParam = { body: UserPlatformModel.CreateUserRequestSchema; }; +type CreateUserAttributeDefinitionParam = { + body: UserPlatformModel.CreateUserAttributeDefinition; +}; type CreateUserGroupParam = { - body: UserPlatformModel.CreateUserGroupSchema; + body: UserPlatformModel.CreateUserGroup; }; type CreateUserSessionParam = { body: UserPlatformModel.CreateUserSessionRequestSchema; @@ -165,6 +254,23 @@ type DeleteSessionParam = { */ reason: string; }; +type DeleteUserAttributeParam = { + /** + * - The unique identifier of the attribute definition. + */ + attributeDefId: string; + /** + * - The unique identifier of the user. + */ + userId: string; +}; +type DeleteUserAttributeDefinitionByIdParam = { + /** + * - The unique identifier of the attribute + * definition to delete. + */ + attributeDefId: string; +}; type GetActiveSessionsParam = { /** * - ID of a customer. @@ -175,7 +281,94 @@ type GetCustomersParam = { /** * - The search query. Mobile number or email ID of a customer. */ - q?: any; + q?: string; + /** + * - The number of items to retrieve in each page. + * Default value is 10. + */ + pageSize?: number; + /** + * - The page number to navigate through the given + * set of results. Default value is 1. + */ + pageNo?: number; +}; +type GetUserAttributeParam = { + /** + * - The unique identifier of the attribute definition. + */ + attributeDefId: string; + /** + * - The unique identifier of the user. + */ + userId: string; +}; +type GetUserAttributeByIdParam = { + /** + * - The unique identifier of the attribute to get. + */ + attributeId: string; +}; +type GetUserAttributeDefinitionByIdParam = { + /** + * - The unique identifier of the attribute + * definition to retrieve. + */ + attributeDefId: string; +}; +type GetUserAttributeDefinitionsParam = { + /** + * - Exclude attribute definitions by Ids + */ + excludingIds?: string; + /** + * - Filter by attribute slug. + */ + slug?: string; + /** + * - Filter by attribute type. + */ + type?: string; + /** + * - Filter by customer_editable status. + */ + customerEditable?: boolean; + /** + * - Filter by encrypted status. + */ + encrypted?: boolean; + /** + * - Filter by pinned status. + */ + pinned?: boolean; + /** + * - Filter by pin order. + */ + pinOrder?: number; + /** + * - Filter by locked status. + */ + isLocked?: boolean; + /** + * - Filter by attribute name using a case-insensitive regex. + */ + name?: string; + /** + * - The number of items to retrieve in each page. + * Default value is 10. + */ + pageSize?: number; + /** + * - The page number to navigate through the given + * set of results. Default value is 1. + */ + pageNo?: number; +}; +type GetUserAttributesForUserParam = { + /** + * - The unique identifier of the user to update. + */ + userId: string; /** * - The number of items to retrieve in each page. * Default value is 10. @@ -203,10 +396,14 @@ type GetUserGroupsParam = { */ pageSize?: string; /** - * - To seartch for User Groups which contains given + * - To search for User Groups which contains given * string in their name */ name?: string; + /** + * - To search for User Groups with given type + */ + type?: string; /** * - To get User Groups with given status */ @@ -240,6 +437,26 @@ type UpdateUserParam = { userId: string; body: UserPlatformModel.UpdateUserRequestSchema; }; +type UpdateUserAttributeParam = { + /** + * - The unique identifier of the attribute + * definition to update. + */ + attributeDefId: string; + /** + * - The unique identifier of the user to update. + */ + userId: string; + body: UserPlatformModel.CreateUserAttributeRequest; +}; +type UpdateUserAttributeDefinitionParam = { + /** + * - The unique identifier of the attribute + * definition to update. + */ + attributeDefId: string; + body: UserPlatformModel.CreateUserAttributeDefinition; +}; type UpdateUserGroupParam = { /** * - Numeric ID allotted to a User Group diff --git a/sdk/platform/User/UserPlatformApplicationValidator.js b/sdk/platform/User/UserPlatformApplicationValidator.js index 54d735d96..f3f27c8d4 100644 --- a/sdk/platform/User/UserPlatformApplicationValidator.js +++ b/sdk/platform/User/UserPlatformApplicationValidator.js @@ -17,9 +17,14 @@ const UserPlatformModel = require("./UserPlatformModel"); * @property {UserPlatformModel.CreateUserRequestSchema} body */ +/** + * @typedef CreateUserAttributeDefinitionParam + * @property {UserPlatformModel.CreateUserAttributeDefinition} body + */ + /** * @typedef CreateUserGroupParam - * @property {UserPlatformModel.CreateUserGroupSchema} body + * @property {UserPlatformModel.CreateUserGroup} body */ /** @@ -40,6 +45,18 @@ const UserPlatformModel = require("./UserPlatformModel"); * @property {string} reason - Reason for deleting session. */ +/** + * @typedef DeleteUserAttributeParam + * @property {string} attributeDefId - The unique identifier of the attribute definition. + * @property {string} userId - The unique identifier of the user. + */ + +/** + * @typedef DeleteUserAttributeDefinitionByIdParam + * @property {string} attributeDefId - The unique identifier of the attribute + * definition to delete. + */ + /** * @typedef GetActiveSessionsParam * @property {string} id - ID of a customer. @@ -47,7 +64,7 @@ const UserPlatformModel = require("./UserPlatformModel"); /** * @typedef GetCustomersParam - * @property {Object} [q] - The search query. Mobile number or email ID of a customer. + * @property {string} [q] - The search query. Mobile number or email ID of a customer. * @property {number} [pageSize] - The number of items to retrieve in each page. * Default value is 10. * @property {number} [pageNo] - The page number to navigate through the given @@ -56,6 +73,49 @@ const UserPlatformModel = require("./UserPlatformModel"); /** @typedef GetPlatformConfigParam */ +/** + * @typedef GetUserAttributeParam + * @property {string} attributeDefId - The unique identifier of the attribute definition. + * @property {string} userId - The unique identifier of the user. + */ + +/** + * @typedef GetUserAttributeByIdParam + * @property {string} attributeId - The unique identifier of the attribute to get. + */ + +/** + * @typedef GetUserAttributeDefinitionByIdParam + * @property {string} attributeDefId - The unique identifier of the attribute + * definition to retrieve. + */ + +/** + * @typedef GetUserAttributeDefinitionsParam + * @property {string} [excludingIds] - Exclude attribute definitions by Ids + * @property {string} [slug] - Filter by attribute slug. + * @property {string} [type] - Filter by attribute type. + * @property {boolean} [customerEditable] - Filter by customer_editable status. + * @property {boolean} [encrypted] - Filter by encrypted status. + * @property {boolean} [pinned] - Filter by pinned status. + * @property {number} [pinOrder] - Filter by pin order. + * @property {boolean} [isLocked] - Filter by locked status. + * @property {string} [name] - Filter by attribute name using a case-insensitive regex. + * @property {number} [pageSize] - The number of items to retrieve in each page. + * Default value is 10. + * @property {number} [pageNo] - The page number to navigate through the given + * set of results. Default value is 1. + */ + +/** + * @typedef GetUserAttributesForUserParam + * @property {string} userId - The unique identifier of the user to update. + * @property {number} [pageSize] - The number of items to retrieve in each page. + * Default value is 10. + * @property {number} [pageNo] - The page number to navigate through the given + * set of results. Default value is 1. + */ + /** * @typedef GetUserGroupByIdParam * @property {string} groupId - Numeric ID allotted to a User Group @@ -65,8 +125,9 @@ const UserPlatformModel = require("./UserPlatformModel"); * @typedef GetUserGroupsParam * @property {string} [pageNo] - Page number for pagination result * @property {string} [pageSize] - Page size for pagination result - * @property {string} [name] - To seartch for User Groups which contains given + * @property {string} [name] - To search for User Groups which contains given * string in their name + * @property {string} [type] - To search for User Groups with given type * @property {string} [status] - To get User Groups with given status * @property {number} [groupUid] - To get User Groups with given uid */ @@ -94,6 +155,21 @@ const UserPlatformModel = require("./UserPlatformModel"); * @property {UserPlatformModel.UpdateUserRequestSchema} body */ +/** + * @typedef UpdateUserAttributeParam + * @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.CreateUserAttributeRequest} body + */ + +/** + * @typedef UpdateUserAttributeDefinitionParam + * @property {string} attributeDefId - The unique identifier of the attribute + * definition to update. + * @property {UserPlatformModel.CreateUserAttributeDefinition} body + */ + /** * @typedef UpdateUserGroupParam * @property {string} groupId - Numeric ID allotted to a User Group @@ -128,10 +204,17 @@ class UserPlatformApplicationValidator { }).required(); } + /** @returns {CreateUserAttributeDefinitionParam} */ + static createUserAttributeDefinition() { + return Joi.object({ + body: UserPlatformModel.CreateUserAttributeDefinition().required(), + }).required(); + } + /** @returns {CreateUserGroupParam} */ static createUserGroup() { return Joi.object({ - body: UserPlatformModel.CreateUserGroupSchema().required(), + body: UserPlatformModel.CreateUserGroup().required(), }).required(); } @@ -159,6 +242,21 @@ class UserPlatformApplicationValidator { }).required(); } + /** @returns {DeleteUserAttributeParam} */ + static deleteUserAttribute() { + return Joi.object({ + attributeDefId: Joi.string().allow("").required(), + userId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {DeleteUserAttributeDefinitionByIdParam} */ + static deleteUserAttributeDefinitionById() { + return Joi.object({ + attributeDefId: Joi.string().allow("").required(), + }).required(); + } + /** @returns {GetActiveSessionsParam} */ static getActiveSessions() { return Joi.object({ @@ -169,7 +267,7 @@ class UserPlatformApplicationValidator { /** @returns {GetCustomersParam} */ static getCustomers() { return Joi.object({ - q: Joi.any(), + q: Joi.string().allow(""), pageSize: Joi.number(), pageNo: Joi.number(), }).required(); @@ -180,6 +278,56 @@ class UserPlatformApplicationValidator { return Joi.object({}).required(); } + /** @returns {GetUserAttributeParam} */ + static getUserAttribute() { + return Joi.object({ + attributeDefId: Joi.string().allow("").required(), + userId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetUserAttributeByIdParam} */ + static getUserAttributeById() { + return Joi.object({ + attributeId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetUserAttributeDefinitionByIdParam} */ + static getUserAttributeDefinitionById() { + return Joi.object({ + attributeDefId: Joi.string().allow("").required(), + }).required(); + } + + /** @returns {GetUserAttributeDefinitionsParam} */ + static getUserAttributeDefinitions() { + return Joi.object({ + excludingIds: Joi.string().allow(""), + slug: Joi.string().allow(""), + type: Joi.string().allow(""), + customerEditable: Joi.boolean(), + encrypted: Joi.boolean(), + pinned: Joi.boolean(), + pinOrder: Joi.number(), + isLocked: Joi.boolean(), + name: Joi.string().allow(""), + + pageSize: Joi.number(), + pageNo: Joi.number(), + }).required(); + } + + /** @returns {GetUserAttributesForUserParam} */ + static getUserAttributesForUser() { + return Joi.object({ + userId: Joi.string().allow("").required(), + + pageSize: Joi.number(), + pageNo: Joi.number(), + }).required(); + } + /** @returns {GetUserGroupByIdParam} */ static getUserGroupById() { return Joi.object({ @@ -193,6 +341,7 @@ class UserPlatformApplicationValidator { pageNo: Joi.string().allow(""), pageSize: Joi.string().allow(""), name: Joi.string().allow(""), + type: Joi.string().allow(""), status: Joi.string().allow(""), groupUid: Joi.number(), }).required(); @@ -228,6 +377,25 @@ class UserPlatformApplicationValidator { }).required(); } + /** @returns {UpdateUserAttributeParam} */ + static updateUserAttribute() { + return Joi.object({ + attributeDefId: Joi.string().allow("").required(), + userId: Joi.string().allow("").required(), + + body: UserPlatformModel.CreateUserAttributeRequest().required(), + }).required(); + } + + /** @returns {UpdateUserAttributeDefinitionParam} */ + static updateUserAttributeDefinition() { + return Joi.object({ + attributeDefId: Joi.string().allow("").required(), + + body: UserPlatformModel.CreateUserAttributeDefinition().required(), + }).required(); + } + /** @returns {UpdateUserGroupParam} */ static updateUserGroup() { return Joi.object({ diff --git a/sdk/platform/User/UserPlatformModel.d.ts b/sdk/platform/User/UserPlatformModel.d.ts index 31cef07de..be2575041 100644 --- a/sdk/platform/User/UserPlatformModel.d.ts +++ b/sdk/platform/User/UserPlatformModel.d.ts @@ -26,10 +26,44 @@ export = UserPlatformModel; * @property {boolean} [success] */ /** - * @typedef CreateUserGroupSchema + * @typedef Conditions + * @property {string} [key] + * @property {string} [type] + * @property {string} [user_attribute_definition_id] + * @property {string} [value] + */ +/** + * @typedef ConditionsSchema + * @property {string} [type] + * @property {string} [user_attribute_definition_id] + * @property {string} [value] + */ +/** + * @typedef CreateUserAttributeDefinition + * @property {boolean} [customer_editable] + * @property {string} [default_value] + * @property {string} [description] + * @property {boolean} [encrypted] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {number} [pin_order] + * @property {boolean} [pinned] + * @property {string} [slug] + * @property {string} [type] + * @property {Object[]} [validations] + */ +/** + * @typedef CreateUserAttributeRequest + * @property {Object} [attribute] + * @property {boolean} [customer_overriden] + */ +/** + * @typedef CreateUserGroup + * @property {ConditionsSchema[]} [conditions] * @property {string} description - * @property {string} file_url + * @property {string} [file_url] * @property {string} name + * @property {string} [type] */ /** * @typedef CreateUserRequestSchema @@ -239,6 +273,10 @@ export = UserPlatformModel; * @property {Facebook} [facebook] * @property {Google} [google] */ +/** + * @typedef SuccessMessageResponse + * @property {string} [success] + */ /** * @typedef UnDeleteUserRequestSchema * @property {string} [reason] @@ -251,9 +289,11 @@ export = UserPlatformModel; */ /** * @typedef UpdateUserGroupSchema + * @property {ConditionsSchema[]} [conditions] * @property {string} [description] * @property {string} [file_url] * @property {string} [name] + * @property {string} [type] */ /** * @typedef UpdateUserRequestSchema @@ -265,6 +305,62 @@ export = UserPlatformModel; * @property {Object} [meta] * @property {UserPhoneNumbers[]} [phone_numbers] */ +/** + * @typedef UserAttributeDefinition + * @property {number} [__v] - The version number of the attribute. + * @property {string} [_id] - The unique identifier for the attribute definition. + * @property {string} [application_id] - The application ID. + * @property {string} [created_at] - The creation date of the attribute. + * @property {boolean} [customer_editable] - Whether the attribute is customer-editable. + * @property {string} [description] - The description of the attribute. + * @property {boolean} [encrypted] - Whether the attribute is encrypted. + * @property {boolean} [is_locked] - Whether the attribute is locked. + * @property {string} [modified_at] - The modification date of the attribute. + * @property {boolean} [multi_value] - Whether the attribute supports multiple values. + * @property {string} [name] - The attribute name. + * @property {number} [pin_order] - The order in which the attribute is pinned. + * @property {boolean} [pinned] - Whether the attribute is pinned. + * @property {string} [slug] - The attribute key. + * @property {string} [type] - The attribute type. + * @property {Object[]} [validations] + */ +/** + * @typedef UserAttributeDefinitionResponse + * @property {string} [_id] - The unique identifier for the attribute definition. + * @property {string} [application_id] - The application ID. + * @property {string} [created_at] - The creation date of the attribute definition. + * @property {string} [created_by] - The user who created the attribute. + * @property {boolean} [customer_editable] - Whether the attribute is customer-editable. + * @property {string} [description] - The description of the attribute. + * @property {boolean} [encrypted] - Whether the attribute is encrypted. + * @property {boolean} [is_locked] - Whether the attribute is locked. + * @property {string} [modified_at] - The last modification date of the + * attribute definition. + * @property {boolean} [multi_value] - Whether the attribute supports multiple values. + * @property {string} [name] - The attribute name. + * @property {number} [pin_order] - The order in which the attribute is pinned. + * @property {boolean} [pinned] - Whether the attribute is pinned. + * @property {string} [slug] - The attribute key. + * @property {string} [type] - The attribute type. + * @property {string} [updated_by] - The user who last updated the attribute. + * @property {UserAttributeDefinitionValidation[]} [validations] + */ +/** + * @typedef UserAttributeDefinitionValidation + * @property {string} [type] - The type of validation. + * @property {Object} [value] - The validation value. + */ +/** + * @typedef UserAttributeResponse + * @property {string} [_id] - The unique identifier for the attribute definition. + * @property {string} [application_id] - The application ID. + * @property {Object} [attribute] + * @property {boolean} [customer_overriden] - Whether the attribute is customer-editable. + * @property {string} [name] - The name of user attribute definition. + * @property {string} [type] - The attribute type. + * @property {string} [updated_by] + * @property {string} [user_id] - The unique identifier for the user. + */ /** * @typedef UserEmails * @property {boolean} [active] @@ -282,12 +378,16 @@ export = UserPlatformModel; * @property {number} [__v] * @property {string} [_id] * @property {string} [application_id] + * @property {Conditions[]} [conditions] * @property {string} [created_at] * @property {string} [description] + * @property {UserResponseErrorSchema} [error] * @property {string} [file_url] + * @property {boolean} [is_active] * @property {string} [modified_at] * @property {string} [name] * @property {string} [status] + * @property {string} [type] * @property {number} [uid] */ /** @@ -305,6 +405,11 @@ export = UserPlatformModel; * @property {boolean} [primary] * @property {boolean} [verified] */ +/** + * @typedef UserResponseErrorSchema + * @property {number} [count] + * @property {string} [file_url] + */ /** * @typedef UserSchema * @property {string} [_id] @@ -332,7 +437,7 @@ export = UserPlatformModel; declare class UserPlatformModel { } declare namespace UserPlatformModel { - export { Accountkit, ArchiveUserRequestSchema, ArchiveUserSuccess, AuthenticationApiErrorSchema, BlockUserRequestSchema, BlockUserSuccess, CreateUserGroupSchema, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, CustomerListResponseSchema, DeleteAccountConsent, DeleteAccountReasons, Email, Facebook, FlashCard, Google, Login, LookAndFeel, MetaSchema, PaginationSchema, PartialUserGroupUpdateSchema, PhoneNumber, PlatformEmail, PlatformMobile, PlatformSchema, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, RequiredFields, SessionDeleteResponseSchema, SessionExpiry, SessionListResponseInfo, SessionListResponseSchema, SessionsDeleteResponseSchema, Social, SocialTokens, UnDeleteUserRequestSchema, UnDeleteUserSuccess, UpdateUserGroupSchema, UpdateUserRequestSchema, UserEmails, UserGroupListResponseSchema, UserGroupResponseSchema, UserGroupUpdateData, UserPhoneNumbers, UserSchema, UserSearchResponseSchema }; + export { Accountkit, ArchiveUserRequestSchema, ArchiveUserSuccess, AuthenticationApiErrorSchema, BlockUserRequestSchema, BlockUserSuccess, Conditions, ConditionsSchema, CreateUserAttributeDefinition, CreateUserAttributeRequest, CreateUserGroup, CreateUserRequestSchema, CreateUserResponseSchema, CreateUserSessionRequestSchema, CreateUserSessionResponseSchema, CustomerListResponseSchema, DeleteAccountConsent, DeleteAccountReasons, Email, Facebook, FlashCard, Google, Login, LookAndFeel, MetaSchema, PaginationSchema, PartialUserGroupUpdateSchema, PhoneNumber, PlatformEmail, PlatformMobile, PlatformSchema, RegisterRequiredFields, RegisterRequiredFieldsEmail, RegisterRequiredFieldsMobile, RequiredFields, SessionDeleteResponseSchema, SessionExpiry, SessionListResponseInfo, SessionListResponseSchema, SessionsDeleteResponseSchema, Social, SocialTokens, SuccessMessageResponse, UnDeleteUserRequestSchema, UnDeleteUserSuccess, UpdateUserGroupSchema, UpdateUserRequestSchema, UserAttributeDefinition, UserAttributeDefinitionResponse, UserAttributeDefinitionValidation, UserAttributeResponse, UserEmails, UserGroupListResponseSchema, UserGroupResponseSchema, UserGroupUpdateData, UserPhoneNumbers, UserResponseErrorSchema, UserSchema, UserSearchResponseSchema }; } /** @returns {Accountkit} */ declare function Accountkit(): Accountkit; @@ -366,12 +471,50 @@ declare function BlockUserSuccess(): BlockUserSuccess; type BlockUserSuccess = { success?: boolean; }; -/** @returns {CreateUserGroupSchema} */ -declare function CreateUserGroupSchema(): CreateUserGroupSchema; -type CreateUserGroupSchema = { +/** @returns {Conditions} */ +declare function Conditions(): Conditions; +type Conditions = { + key?: string; + type?: string; + user_attribute_definition_id?: string; + value?: string; +}; +/** @returns {ConditionsSchema} */ +declare function ConditionsSchema(): ConditionsSchema; +type ConditionsSchema = { + type?: string; + user_attribute_definition_id?: string; + value?: string; +}; +/** @returns {CreateUserAttributeDefinition} */ +declare function CreateUserAttributeDefinition(): CreateUserAttributeDefinition; +type CreateUserAttributeDefinition = { + customer_editable?: boolean; + default_value?: string; + description?: string; + encrypted?: boolean; + multi_value?: boolean; + name?: string; + pin_order?: number; + pinned?: boolean; + slug?: string; + type?: string; + validations?: any[]; +}; +/** @returns {CreateUserAttributeRequest} */ +declare function CreateUserAttributeRequest(): CreateUserAttributeRequest; +type CreateUserAttributeRequest = { + attribute?: any; + customer_overriden?: boolean; +}; +/** @returns {CreateUserGroup} */ +declare function CreateUserGroup(): CreateUserGroup; +type CreateUserGroup = { + conditions?: ConditionsSchema[]; description: string; - file_url: string; + file_url?: string; name: string; + type?: string; }; /** @returns {CreateUserRequestSchema} */ declare function CreateUserRequestSchema(): CreateUserRequestSchema; @@ -621,6 +764,11 @@ type SocialTokens = { facebook?: Facebook; google?: Google; }; +/** @returns {SuccessMessageResponse} */ +declare function SuccessMessageResponse(): SuccessMessageResponse; +type SuccessMessageResponse = { + success?: string; +}; /** @returns {UnDeleteUserRequestSchema} */ declare function UnDeleteUserRequestSchema(): UnDeleteUserRequestSchema; type UnDeleteUserRequestSchema = { @@ -636,9 +784,11 @@ type UnDeleteUserSuccess = { /** @returns {UpdateUserGroupSchema} */ declare function UpdateUserGroupSchema(): UpdateUserGroupSchema; type UpdateUserGroupSchema = { + conditions?: ConditionsSchema[]; description?: string; file_url?: string; name?: string; + type?: string; }; /** @returns {UpdateUserRequestSchema} */ declare function UpdateUserRequestSchema(): UpdateUserRequestSchema; @@ -651,6 +801,183 @@ type UpdateUserRequestSchema = { meta?: any; phone_numbers?: UserPhoneNumbers[]; }; +/** @returns {UserAttributeDefinition} */ +declare function UserAttributeDefinition(): UserAttributeDefinition; +type UserAttributeDefinition = { + /** + * - The version number of the attribute. + */ + __v?: number; + /** + * - The unique identifier for the attribute definition. + */ + _id?: string; + /** + * - The application ID. + */ + application_id?: string; + /** + * - The creation date of the attribute. + */ + created_at?: string; + /** + * - Whether the attribute is customer-editable. + */ + customer_editable?: boolean; + /** + * - The description of the attribute. + */ + description?: string; + /** + * - Whether the attribute is encrypted. + */ + encrypted?: boolean; + /** + * - Whether the attribute is locked. + */ + is_locked?: boolean; + /** + * - The modification date of the attribute. + */ + modified_at?: string; + /** + * - Whether the attribute supports multiple values. + */ + multi_value?: boolean; + /** + * - The attribute name. + */ + name?: string; + /** + * - The order in which the attribute is pinned. + */ + pin_order?: number; + /** + * - Whether the attribute is pinned. + */ + pinned?: boolean; + /** + * - The attribute key. + */ + slug?: string; + /** + * - The attribute type. + */ + type?: string; + validations?: any[]; +}; +/** @returns {UserAttributeDefinitionResponse} */ +declare function UserAttributeDefinitionResponse(): UserAttributeDefinitionResponse; +type UserAttributeDefinitionResponse = { + /** + * - The unique identifier for the attribute definition. + */ + _id?: string; + /** + * - The application ID. + */ + application_id?: string; + /** + * - The creation date of the attribute definition. + */ + created_at?: string; + /** + * - The user who created the attribute. + */ + created_by?: string; + /** + * - Whether the attribute is customer-editable. + */ + customer_editable?: boolean; + /** + * - The description of the attribute. + */ + description?: string; + /** + * - Whether the attribute is encrypted. + */ + encrypted?: boolean; + /** + * - Whether the attribute is locked. + */ + is_locked?: boolean; + /** + * - The last modification date of the + * attribute definition. + */ + modified_at?: string; + /** + * - Whether the attribute supports multiple values. + */ + multi_value?: boolean; + /** + * - The attribute name. + */ + name?: string; + /** + * - The order in which the attribute is pinned. + */ + pin_order?: number; + /** + * - Whether the attribute is pinned. + */ + pinned?: boolean; + /** + * - The attribute key. + */ + slug?: string; + /** + * - The attribute type. + */ + type?: string; + /** + * - The user who last updated the attribute. + */ + updated_by?: string; + validations?: UserAttributeDefinitionValidation[]; +}; +/** @returns {UserAttributeDefinitionValidation} */ +declare function UserAttributeDefinitionValidation(): UserAttributeDefinitionValidation; +type UserAttributeDefinitionValidation = { + /** + * - The type of validation. + */ + type?: string; + /** + * - The validation value. + */ + value?: any; +}; +/** @returns {UserAttributeResponse} */ +declare function UserAttributeResponse(): UserAttributeResponse; +type UserAttributeResponse = { + /** + * - The unique identifier for the attribute definition. + */ + _id?: string; + /** + * - The application ID. + */ + application_id?: string; + attribute?: any; + /** + * - Whether the attribute is customer-editable. + */ + customer_overriden?: boolean; + /** + * - The name of user attribute definition. + */ + name?: string; + /** + * - The attribute type. + */ + type?: string; + updated_by?: string; + /** + * - The unique identifier for the user. + */ + user_id?: string; +}; /** @returns {UserEmails} */ declare function UserEmails(): UserEmails; type UserEmails = { @@ -671,12 +998,16 @@ type UserGroupResponseSchema = { __v?: number; _id?: string; application_id?: string; + conditions?: Conditions[]; created_at?: string; description?: string; + error?: UserResponseErrorSchema; file_url?: string; + is_active?: boolean; modified_at?: string; name?: string; status?: string; + type?: string; uid?: number; }; /** @returns {UserGroupUpdateData} */ @@ -705,6 +1036,12 @@ type UserPhoneNumbers = { primary?: boolean; verified?: boolean; }; +/** @returns {UserResponseErrorSchema} */ +declare function UserResponseErrorSchema(): UserResponseErrorSchema; +type UserResponseErrorSchema = { + count?: number; + file_url?: string; +}; /** @returns {UserSchema} */ declare function UserSchema(): UserSchema; type UserSchema = { diff --git a/sdk/platform/User/UserPlatformModel.js b/sdk/platform/User/UserPlatformModel.js index d3e57fc9c..2ecbfe33c 100644 --- a/sdk/platform/User/UserPlatformModel.js +++ b/sdk/platform/User/UserPlatformModel.js @@ -33,10 +33,48 @@ const Joi = require("joi"); */ /** - * @typedef CreateUserGroupSchema + * @typedef Conditions + * @property {string} [key] + * @property {string} [type] + * @property {string} [user_attribute_definition_id] + * @property {string} [value] + */ + +/** + * @typedef ConditionsSchema + * @property {string} [type] + * @property {string} [user_attribute_definition_id] + * @property {string} [value] + */ + +/** + * @typedef CreateUserAttributeDefinition + * @property {boolean} [customer_editable] + * @property {string} [default_value] + * @property {string} [description] + * @property {boolean} [encrypted] + * @property {boolean} [multi_value] + * @property {string} [name] + * @property {number} [pin_order] + * @property {boolean} [pinned] + * @property {string} [slug] + * @property {string} [type] + * @property {Object[]} [validations] + */ + +/** + * @typedef CreateUserAttributeRequest + * @property {Object} [attribute] + * @property {boolean} [customer_overriden] + */ + +/** + * @typedef CreateUserGroup + * @property {ConditionsSchema[]} [conditions] * @property {string} description - * @property {string} file_url + * @property {string} [file_url] * @property {string} name + * @property {string} [type] */ /** @@ -278,6 +316,11 @@ const Joi = require("joi"); * @property {Google} [google] */ +/** + * @typedef SuccessMessageResponse + * @property {string} [success] + */ + /** * @typedef UnDeleteUserRequestSchema * @property {string} [reason] @@ -292,9 +335,11 @@ const Joi = require("joi"); /** * @typedef UpdateUserGroupSchema + * @property {ConditionsSchema[]} [conditions] * @property {string} [description] * @property {string} [file_url] * @property {string} [name] + * @property {string} [type] */ /** @@ -308,6 +353,66 @@ const Joi = require("joi"); * @property {UserPhoneNumbers[]} [phone_numbers] */ +/** + * @typedef UserAttributeDefinition + * @property {number} [__v] - The version number of the attribute. + * @property {string} [_id] - The unique identifier for the attribute definition. + * @property {string} [application_id] - The application ID. + * @property {string} [created_at] - The creation date of the attribute. + * @property {boolean} [customer_editable] - Whether the attribute is customer-editable. + * @property {string} [description] - The description of the attribute. + * @property {boolean} [encrypted] - Whether the attribute is encrypted. + * @property {boolean} [is_locked] - Whether the attribute is locked. + * @property {string} [modified_at] - The modification date of the attribute. + * @property {boolean} [multi_value] - Whether the attribute supports multiple values. + * @property {string} [name] - The attribute name. + * @property {number} [pin_order] - The order in which the attribute is pinned. + * @property {boolean} [pinned] - Whether the attribute is pinned. + * @property {string} [slug] - The attribute key. + * @property {string} [type] - The attribute type. + * @property {Object[]} [validations] + */ + +/** + * @typedef UserAttributeDefinitionResponse + * @property {string} [_id] - The unique identifier for the attribute definition. + * @property {string} [application_id] - The application ID. + * @property {string} [created_at] - The creation date of the attribute definition. + * @property {string} [created_by] - The user who created the attribute. + * @property {boolean} [customer_editable] - Whether the attribute is customer-editable. + * @property {string} [description] - The description of the attribute. + * @property {boolean} [encrypted] - Whether the attribute is encrypted. + * @property {boolean} [is_locked] - Whether the attribute is locked. + * @property {string} [modified_at] - The last modification date of the + * attribute definition. + * @property {boolean} [multi_value] - Whether the attribute supports multiple values. + * @property {string} [name] - The attribute name. + * @property {number} [pin_order] - The order in which the attribute is pinned. + * @property {boolean} [pinned] - Whether the attribute is pinned. + * @property {string} [slug] - The attribute key. + * @property {string} [type] - The attribute type. + * @property {string} [updated_by] - The user who last updated the attribute. + * @property {UserAttributeDefinitionValidation[]} [validations] + */ + +/** + * @typedef UserAttributeDefinitionValidation + * @property {string} [type] - The type of validation. + * @property {Object} [value] - The validation value. + */ + +/** + * @typedef UserAttributeResponse + * @property {string} [_id] - The unique identifier for the attribute definition. + * @property {string} [application_id] - The application ID. + * @property {Object} [attribute] + * @property {boolean} [customer_overriden] - Whether the attribute is customer-editable. + * @property {string} [name] - The name of user attribute definition. + * @property {string} [type] - The attribute type. + * @property {string} [updated_by] + * @property {string} [user_id] - The unique identifier for the user. + */ + /** * @typedef UserEmails * @property {boolean} [active] @@ -327,12 +432,16 @@ const Joi = require("joi"); * @property {number} [__v] * @property {string} [_id] * @property {string} [application_id] + * @property {Conditions[]} [conditions] * @property {string} [created_at] * @property {string} [description] + * @property {UserResponseErrorSchema} [error] * @property {string} [file_url] + * @property {boolean} [is_active] * @property {string} [modified_at] * @property {string} [name] * @property {string} [status] + * @property {string} [type] * @property {number} [uid] */ @@ -353,6 +462,12 @@ const Joi = require("joi"); * @property {boolean} [verified] */ +/** + * @typedef UserResponseErrorSchema + * @property {number} [count] + * @property {string} [file_url] + */ + /** * @typedef UserSchema * @property {string} [_id] @@ -424,12 +539,58 @@ class UserPlatformModel { }); } - /** @returns {CreateUserGroupSchema} */ - static CreateUserGroupSchema() { + /** @returns {Conditions} */ + static Conditions() { + return Joi.object({ + key: Joi.string().allow(""), + type: Joi.string().allow(""), + user_attribute_definition_id: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {ConditionsSchema} */ + static ConditionsSchema() { + return Joi.object({ + type: Joi.string().allow(""), + user_attribute_definition_id: Joi.string().allow(""), + value: Joi.string().allow(""), + }); + } + + /** @returns {CreateUserAttributeDefinition} */ + static CreateUserAttributeDefinition() { + return Joi.object({ + customer_editable: Joi.boolean(), + default_value: Joi.string().allow(""), + description: Joi.string().allow(""), + encrypted: Joi.boolean(), + multi_value: Joi.boolean(), + name: Joi.string().allow(""), + pin_order: Joi.number(), + pinned: Joi.boolean(), + slug: Joi.string().allow(""), + type: Joi.string().allow(""), + validations: Joi.array().items(Joi.any()), + }); + } + + /** @returns {CreateUserAttributeRequest} */ + static CreateUserAttributeRequest() { return Joi.object({ + attribute: Joi.any(), + customer_overriden: Joi.boolean(), + }); + } + + /** @returns {CreateUserGroup} */ + static CreateUserGroup() { + return Joi.object({ + conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()), description: Joi.string().allow("").required(), - file_url: Joi.string().allow("").required(), + file_url: Joi.string().allow(""), name: Joi.string().allow("").required(), + type: Joi.string().allow(""), }); } @@ -730,6 +891,13 @@ class UserPlatformModel { }); } + /** @returns {SuccessMessageResponse} */ + static SuccessMessageResponse() { + return Joi.object({ + success: Joi.string().allow(""), + }); + } + /** @returns {UnDeleteUserRequestSchema} */ static UnDeleteUserRequestSchema() { return Joi.object({ @@ -749,9 +917,11 @@ class UserPlatformModel { /** @returns {UpdateUserGroupSchema} */ static UpdateUserGroupSchema() { return Joi.object({ + conditions: Joi.array().items(UserPlatformModel.ConditionsSchema()), description: Joi.string().allow(""), file_url: Joi.string().allow(""), name: Joi.string().allow(""), + type: Joi.string().allow(""), }); } @@ -768,6 +938,75 @@ class UserPlatformModel { }); } + /** @returns {UserAttributeDefinition} */ + static UserAttributeDefinition() { + return Joi.object({ + __v: Joi.number(), + _id: Joi.string().allow(""), + application_id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + customer_editable: Joi.boolean(), + description: Joi.string().allow(""), + encrypted: Joi.boolean(), + is_locked: Joi.boolean(), + modified_at: Joi.string().allow(""), + multi_value: Joi.boolean(), + name: Joi.string().allow(""), + pin_order: Joi.number(), + pinned: Joi.boolean(), + slug: Joi.string().allow(""), + type: Joi.string().allow(""), + validations: Joi.array().items(Joi.any()), + }); + } + + /** @returns {UserAttributeDefinitionResponse} */ + static UserAttributeDefinitionResponse() { + return Joi.object({ + _id: Joi.string().allow(""), + application_id: Joi.string().allow(""), + created_at: Joi.string().allow(""), + created_by: Joi.string().allow(""), + customer_editable: Joi.boolean(), + description: Joi.string().allow(""), + encrypted: Joi.boolean(), + is_locked: Joi.boolean(), + modified_at: Joi.string().allow(""), + multi_value: Joi.boolean(), + name: Joi.string().allow(""), + pin_order: Joi.number(), + pinned: Joi.boolean(), + slug: Joi.string().allow(""), + type: Joi.string().allow(""), + updated_by: Joi.string().allow(""), + validations: Joi.array().items( + UserPlatformModel.UserAttributeDefinitionValidation() + ), + }); + } + + /** @returns {UserAttributeDefinitionValidation} */ + static UserAttributeDefinitionValidation() { + return Joi.object({ + type: Joi.string().allow(""), + value: Joi.any(), + }); + } + + /** @returns {UserAttributeResponse} */ + static UserAttributeResponse() { + return Joi.object({ + _id: Joi.string().allow(""), + application_id: Joi.string().allow(""), + attribute: Joi.any(), + customer_overriden: Joi.boolean(), + name: Joi.string().allow(""), + type: Joi.string().allow(""), + updated_by: Joi.string().allow(""), + user_id: Joi.string().allow(""), + }); + } + /** @returns {UserEmails} */ static UserEmails() { return Joi.object({ @@ -792,12 +1031,16 @@ class UserPlatformModel { __v: Joi.number(), _id: Joi.string().allow(""), application_id: Joi.string().allow(""), + conditions: Joi.array().items(UserPlatformModel.Conditions()), created_at: Joi.string().allow(""), description: Joi.string().allow(""), + error: UserPlatformModel.UserResponseErrorSchema(), file_url: Joi.string().allow(""), + is_active: Joi.boolean(), modified_at: Joi.string().allow(""), name: Joi.string().allow(""), status: Joi.string().allow(""), + type: Joi.string().allow(""), uid: Joi.number(), }); } @@ -823,6 +1066,14 @@ class UserPlatformModel { }); } + /** @returns {UserResponseErrorSchema} */ + static UserResponseErrorSchema() { + return Joi.object({ + count: Joi.number(), + file_url: Joi.string().allow(""), + }); + } + /** @returns {UserSchema} */ static UserSchema() { return Joi.object({ diff --git a/sdk/platform/Webhook/WebhookPlatformClient.d.ts b/sdk/platform/Webhook/WebhookPlatformClient.d.ts index 65c2cdaa8..a696a77b8 100644 --- a/sdk/platform/Webhook/WebhookPlatformClient.d.ts +++ b/sdk/platform/Webhook/WebhookPlatformClient.d.ts @@ -8,61 +8,64 @@ declare class Webhook { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name cancelJobByName - * @summary: Cancel a report export - * @description: Cancel the export of a specific report for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/cancelJobByName/). + * @summary: Cancel a report export. + * @description: Cancel the export of a specific report for a company. + * - 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 + * @returns {Promise} - Success response * @name downloadDeliveryReport - * @summary: Download processed events report for a company - * @description: Download reports for a specific company based on the provided filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/downloadDeliveryReport/). + * @summary: Download processed events report for a company. + * @description: Download reports for a specific company based on the provided filters. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/downloadDeliveryReport/). */ - downloadDeliveryReport({ body, requestHeaders }?: WebhookPlatformValidator.DownloadDeliveryReportParam, { responseHeaders }?: object): Promise; + 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: - * @description: Get All Webhook Events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/fetchAllEventConfigurations/). + * @summary: Get All Webhook Events. + * @description: To fetch all webhook events. + * - 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 processed events report for a company - * @description: Retrieve a list of processed events for a specific company based on the provided filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getDeliveryReports/). + * @summary: Get processed events report for a company. + * @description: Retrieve a list of processed events for a specific company based on the provided filters. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getDeliveryReports/). */ getDeliveryReports({ body, requestHeaders }?: WebhookPlatformValidator.GetDeliveryReportsParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.GetEventCountsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - Success response * @name getEventCounts * @summary: Get the count of failed events for a company within a specified date range. * @description: Retrieves the count of failed events for a specific company within the specified date range. The user can filter the count based on specific event types if provided. * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getEventCounts/). */ - getEventCounts({ body, requestHeaders }?: WebhookPlatformValidator.GetEventCountsParam, { responseHeaders }?: object): Promise; + getEventCounts({ body, requestHeaders }?: WebhookPlatformValidator.GetEventCountsParam, { 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 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/platform/webhook/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/platform/webhook/getHistoricalReports/). */ getHistoricalReports({ body, requestHeaders }?: WebhookPlatformValidator.GetHistoricalReportsParam, { responseHeaders }?: object): Promise; /** @@ -80,12 +83,13 @@ declare class Webhook { * @param {WebhookPlatformValidator.GetReportFiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getReportFilters - * @summary: Get filters for a company - * @description: Retrieve filters for a specific company based on the provided subscriber IDs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getReportFilters/). + * @summary: Get filters for a company. + * @description: Retrieve filters for a specific company based on the provided subscriber IDs. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getReportFilters/). */ - getReportFilters({ body, requestHeaders }?: WebhookPlatformValidator.GetReportFiltersParam, { responseHeaders }?: object): Promise; + getReportFilters({ body, requestHeaders }?: WebhookPlatformValidator.GetReportFiltersParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.GetSubscriberByIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -100,12 +104,13 @@ declare class Webhook { * @param {WebhookPlatformValidator.GetSubscribersByCompanyParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSubscribersByCompany - * @summary: Get Subscribers By Company ID - * @description: Get Subscribers By CompanyId - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscribersByCompany/). + * @summary: Get Subscribers By CompanyId. + * @description: Get Subscribers By Company ID. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscribersByCompany/). */ - getSubscribersByCompany({ pageNo, pageSize, extensionId, requestHeaders }?: WebhookPlatformValidator.GetSubscribersByCompanyParam, { responseHeaders }?: object): Promise; + getSubscribersByCompany({ pageNo, pageSize, extensionId, requestHeaders }?: WebhookPlatformValidator.GetSubscribersByCompanyParam, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.GetSubscribersByExtensionIdParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -120,55 +125,58 @@ declare class Webhook { * @param {WebhookPlatformValidator.ManualRetryCancelParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name manualRetryCancel * @summary: Cancel the active manual retry for a company's failed events. * @description: Cancels the active manual retry for a specific company's failed events. If a manual retry is currently in progress, it will be cancelled. * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/manualRetryCancel/). */ - manualRetryCancel({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + manualRetryCancel({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {WebhookPlatformValidator.ManualRetryOfFailedEventParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name manualRetryOfFailedEvent * @summary: Initiate a manual retry for event processing. * @description: Initiates a manual retry for event processing for a specific company. This endpoint allows the user to specify the date range (start_date and end_date) within which the events should be retried. * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/manualRetryOfFailedEvent/). */ - manualRetryOfFailedEvent({ body, requestHeaders }?: WebhookPlatformValidator.ManualRetryOfFailedEventParam, { responseHeaders }?: object): Promise; + manualRetryOfFailedEvent({ body, requestHeaders }?: WebhookPlatformValidator.ManualRetryOfFailedEventParam, { 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 and validate webhook url - * @description: Ping and validate webhook url - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/pingWebhook/). + * @summary: Ping and validate webhook url. + * @description: Ping and validate webhook url. + * - 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 - * @description: Register Subscriber - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/). + * @summary: Register Subscriber. + * @description: Register Subscriber. + * - 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.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 Subscriber * @description: Update Subscriber - 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; } import WebhookPlatformValidator = require("./WebhookPlatformValidator"); import WebhookPlatformModel = require("./WebhookPlatformModel"); diff --git a/sdk/platform/Webhook/WebhookPlatformClient.js b/sdk/platform/Webhook/WebhookPlatformClient.js index 81b1550c8..2b439fad1 100644 --- a/sdk/platform/Webhook/WebhookPlatformClient.js +++ b/sdk/platform/Webhook/WebhookPlatformClient.js @@ -20,8 +20,9 @@ class Webhook { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name cancelJobByName - * @summary: Cancel a report export - * @description: Cancel the export of a specific report for a company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/cancelJobByName/). + * @summary: Cancel a report export. + * @description: Cancel the export of a specific report for a company. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/cancelJobByName/). */ async cancelJobByName( { filename, requestHeaders } = { requestHeaders: {} }, @@ -97,10 +98,11 @@ class Webhook { * @param {WebhookPlatformValidator.DownloadDeliveryReportParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name downloadDeliveryReport - * @summary: Download processed events report for a company - * @description: Download reports for a specific company based on the provided filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/downloadDeliveryReport/). + * @summary: Download processed events report for a company. + * @description: Download reports for a specific company based on the provided filters. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/downloadDeliveryReport/). */ async downloadDeliveryReport( { body, requestHeaders } = { requestHeaders: {} }, @@ -153,7 +155,9 @@ class Webhook { responseData = response[0]; } - const { error: res_error } = Joi.any().validate(responseData, { + const { + error: res_error, + } = WebhookPlatformModel.DownloadReportResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -176,10 +180,11 @@ class Webhook { * @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: - * @description: Get All Webhook Events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/fetchAllEventConfigurations/). + * @summary: Get All Webhook Events. + * @description: To fetch all webhook events. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/fetchAllEventConfigurations/). */ async fetchAllEventConfigurations( { requestHeaders } = { requestHeaders: {} }, @@ -228,9 +233,7 @@ class Webhook { responseData = response[0]; } - const { - error: res_error, - } = WebhookPlatformModel.EventConfigResponse().validate(responseData, { + const { error: res_error } = Joi.any().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -255,8 +258,9 @@ class Webhook { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name getDeliveryReports - * @summary: Get processed events report for a company - * @description: Retrieve a list of processed events for a specific company based on the provided filters. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getDeliveryReports/). + * @summary: Get processed events report for a company. + * @description: Retrieve a list of processed events for a specific company based on the provided filters. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getDeliveryReports/). */ async getDeliveryReports( { body, requestHeaders } = { requestHeaders: {} }, @@ -332,9 +336,7 @@ class Webhook { * @param {WebhookPlatformValidator.GetEventCountsParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - * - Success response - * + * @returns {Promise} - Success response * @name getEventCounts * @summary: Get the count of failed events for a company within a specified date range. * @description: Retrieves the count of failed events for a specific company within the specified date range. The user can filter the count based on specific event types if provided. @@ -391,10 +393,10 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.FailedEventsCountSuccessResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = WebhookPlatformModel.RetryCountResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -416,8 +418,9 @@ class Webhook { * @param {import("../PlatformAPIClient").Options} - Options * @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/platform/webhook/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/platform/webhook/getHistoricalReports/). */ async getHistoricalReports( { body, requestHeaders } = { requestHeaders: {} }, @@ -569,10 +572,11 @@ class Webhook { * @param {WebhookPlatformValidator.GetReportFiltersParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getReportFilters - * @summary: Get filters for a company - * @description: Retrieve filters for a specific company based on the provided subscriber IDs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getReportFilters/). + * @summary: Get filters for a company. + * @description: Retrieve filters for a specific company based on the provided subscriber IDs. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getReportFilters/). */ async getReportFilters( { body, requestHeaders } = { requestHeaders: {} }, @@ -623,12 +627,9 @@ class Webhook { responseData = response[0]; } - const { - error: res_error, - } = WebhookPlatformModel.ReportFilterResponse().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + const { error: res_error } = Joi.array() + .items(WebhookPlatformModel.ReportFilterResponse()) + .validate(responseData, { abortEarly: false, allowUnknown: true }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -727,10 +728,11 @@ class Webhook { * @param {WebhookPlatformValidator.GetSubscribersByCompanyParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name getSubscribersByCompany - * @summary: Get Subscribers By Company ID - * @description: Get Subscribers By CompanyId - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscribersByCompany/). + * @summary: Get Subscribers By CompanyId. + * @description: Get Subscribers By Company ID. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/getSubscribersByCompany/). */ async getSubscribersByCompany( { pageNo, pageSize, extensionId, requestHeaders } = { requestHeaders: {} }, @@ -778,7 +780,7 @@ class Webhook { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`, + `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -792,7 +794,7 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.SubscriberResponse().validate(responseData, { + } = WebhookPlatformModel.SubscriberConfigList().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -865,7 +867,7 @@ class Webhook { const response = await PlatformAPIClient.execute( this.config, "get", - `/service/platform/webhook/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscriber`, + `/service/platform/webhook/v1.0/company/${this.config.companyId}/extension/${extensionId}/subscriber/`, query_params, undefined, { ...xHeaders, ...requestHeaders }, @@ -902,7 +904,7 @@ class Webhook { * @param {WebhookPlatformValidator.ManualRetryCancelParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - Success response + * @returns {Promise} - Success response * @name manualRetryCancel * @summary: Cancel the active manual retry for a company's failed events. * @description: Cancels the active manual retry for a specific company's failed events. If a manual retry is currently in progress, it will be cancelled. @@ -953,12 +955,9 @@ class Webhook { responseData = response[0]; } - const { - error: res_error, - } = WebhookPlatformModel.EventSuccessResponse().validate(responseData, { - abortEarly: false, - allowUnknown: true, - }); + const { error: res_error } = Joi.string() + .allow("") + .validate(responseData, { abortEarly: false, allowUnknown: true }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -978,8 +977,7 @@ class Webhook { * @param {WebhookPlatformValidator.ManualRetryOfFailedEventParam} arg - Arg object * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` * @param {import("../PlatformAPIClient").Options} - Options - * @returns {Promise} - - * Success response + * @returns {Promise} - Success response * @name manualRetryOfFailedEvent * @summary: Initiate a manual retry for event processing. * @description: Initiates a manual retry for event processing for a specific company. This endpoint allows the user to specify the date range (start_date and end_date) within which the events should be retried. @@ -1038,10 +1036,10 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.EventProcessedSuccessResponse().validate( - responseData, - { abortEarly: false, allowUnknown: true } - ); + } = WebhookPlatformModel.RetrySuccessResponse().validate(responseData, { + abortEarly: false, + allowUnknown: true, + }); if (res_error) { if (this.config.options.strictResponseCheck === true) { @@ -1063,8 +1061,9 @@ class Webhook { * @param {import("../PlatformAPIClient").Options} - Options * @returns {Promise} - Success response * @name pingWebhook - * @summary: Ping and validate webhook url - * @description: Ping and validate webhook url - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/pingWebhook/). + * @summary: Ping and validate webhook url. + * @description: Ping and validate webhook url. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/pingWebhook/). */ async pingWebhook( { body, requestHeaders } = { requestHeaders: {} }, @@ -1138,10 +1137,12 @@ class Webhook { * @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 - * @description: Register Subscriber - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/). + * @summary: Register Subscriber. + * @description: Register Subscriber. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/registerSubscriberToEvent/). */ async registerSubscriberToEvent( { body, requestHeaders } = { requestHeaders: {} }, @@ -1182,7 +1183,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/`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -1196,7 +1197,7 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.SubscriberConfig().validate(responseData, { + } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); @@ -1219,7 +1220,8 @@ class Webhook { * @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 Subscriber * @description: Update Subscriber - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/webhook/updateSubscriberConfig/). @@ -1263,7 +1265,7 @@ class Webhook { const response = await PlatformAPIClient.execute( this.config, "put", - `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber`, + `/service/platform/webhook/v1.0/company/${this.config.companyId}/subscriber/`, query_params, body, { ...xHeaders, ...requestHeaders }, @@ -1277,7 +1279,7 @@ class Webhook { const { error: res_error, - } = WebhookPlatformModel.SubscriberConfig().validate(responseData, { + } = WebhookPlatformModel.SubscriberConfigResponse().validate(responseData, { abortEarly: false, allowUnknown: true, }); diff --git a/sdk/platform/Webhook/WebhookPlatformModel.d.ts b/sdk/platform/Webhook/WebhookPlatformModel.d.ts index e847874d3..76f981d37 100644 --- a/sdk/platform/Webhook/WebhookPlatformModel.d.ts +++ b/sdk/platform/Webhook/WebhookPlatformModel.d.ts @@ -6,10 +6,6 @@ export = WebhookPlatformModel; * @property {string} [criteria] * @property {string} [extension_id] */ -/** - * @typedef AssociationDetails - * @property {number} [company_id] - */ /** * @typedef AuthMeta * @property {string} [secret] @@ -17,12 +13,22 @@ export = WebhookPlatformModel; */ /** * @typedef CancelResponse - * @property {number} [code] - The HTTP status code of the response (e.g., 200). + * @property {string} [message] - The HTTP status code of the response (e.g., 200). */ /** * @typedef CdnObject * @property {Url[]} [urls] */ +/** + * @typedef DownloadReportResponse + * @property {string} [file_name] + */ +/** + * @typedef Err + * @property {string} [location] + * @property {string} [msg] + * @property {string} [param] + */ /** * @typedef Error * @property {string} [error] - Error message describing the reason for the failure. @@ -47,24 +53,39 @@ export = WebhookPlatformModel; */ /** * @typedef EventConfigResponse - * @property {EventConfig[]} [event_configs] - */ -/** - * @typedef EventCountItem - * @property {number} [count] - The count of events with the specified status - * @property {string} [status] - The status of the event (e.g., "FAILED"). + * @property {string} [created_on] + * @property {string} [description] + * @property {string} [display_name] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {Object} [event_schema] + * @property {string} [event_type] + * @property {number} [id] + * @property {string} [updated_on] + * @property {string} [version] */ /** - * @typedef EventProcessedSuccessResponse - * @property {string} [message] - * @property {boolean} [success] + * @typedef EventConfigs + * @property {string} [created_on] + * @property {string} [description] + * @property {string} [display_name] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {Object} [event_schema] + * @property {string} [event_type] + * @property {number} [id] + * @property {SubscriberEventMapping} [subscriber_event_mapping] + * @property {string} [updated_on] + * @property {string} [version] */ /** * @typedef EventProcessReportObject * @property {number} [attempt] - The attempt number of the event. - * @property {string} [data] - The data associated with the event. + * @property {Object} [data] - The data associated with the event. * @property {string} [event_name] - The name of the processed event. + * @property {string} [event_trace_id] * @property {number} [last_attempted_on] - The timestamp of the last attempted event. + * @property {string} [message_id] * @property {string} [name] - The name of the event. * @property {number} [response_code] - The response code of the event. * @property {string} [response_message] - The response message of the event. @@ -83,48 +104,27 @@ export = WebhookPlatformModel; * @property {Event[]} [event] * @property {string} [search_text] * @property {string} [start_date] + * @property {string} [status] * @property {number[]} [subscriber_ids] */ /** - * @typedef EventSuccessResponse - * @property {string} [message] - * @property {boolean} [success] - */ -/** - * @typedef FailedEventsCountSuccessResponse - * @property {EventCountItem[]} [items] - */ -/** - * @typedef FilterResponseObject - * @property {string} [filter_name] - The name of the filter. - * @property {FilterValues[]} [values] - */ -/** - * @typedef FilterValues - * @property {string} [text] - The display text for the filter value. - * @property {Object} [value] - The value associated with the filter value. + * @typedef HistoryAssociation + * @property {number} [company_id] + * @property {number[]} [subscriber_ids] */ /** * @typedef HistoryFilters * @property {string} [end_date] - The end date and time of the history report. + * @property {string[]} [events] + * @property {string} [search_text] * @property {string} [start_date] - The start date and time of the history report. * @property {string} [status] - The status of the history report (e.g., "FAILED"). * @property {number[]} [subscribers] - An array of subscriber IDs associated * with the history report. */ /** - * @typedef HistoryPayload - * @property {number} [page_no] - The page number of the history report. - * @property {number} [page_size] - The number of records per page. - * @property {string} [type] - The type of history report (e.g., "platform"). - */ -/** - * @typedef HistoryResponse - * @property {HistoryResponseObject[]} [items] - */ -/** - * @typedef HistoryResponseObject - * @property {AssociationDetails} [association] + * @typedef HistoryItems + * @property {HistoryAssociation} [association] * @property {string} [created_on] - The date and time when the history report * was created. * @property {string} [filename] - The filename of the history report. @@ -137,12 +137,20 @@ export = WebhookPlatformModel; * @property {UploadServiceObject} [upload_service_response] */ /** - * @typedef ManualRetryFailedResponse - * @property {string} [message] - * @property {Object} [meta] - * @property {string} [request_id] - * @property {string} [stack_trace] - * @property {boolean} [success] + * @typedef HistoryPayload + * @property {number} [page_no] - The page number of the history report. + * @property {number} [page_size] - The number of records per page. + * @property {string} [type] - The type of history report (e.g., "platform"). + */ +/** + * @typedef HistoryResponse + * @property {HistoryItems[]} [items] + * @property {Page} [page] + */ +/** + * @typedef Item + * @property {number} [count] + * @property {string} [status] */ /** * @typedef Page @@ -169,13 +177,31 @@ export = WebhookPlatformModel; */ /** * @typedef ReportFilterResponse - * @property {FilterResponseObject[]} [items] + * @property {string} [filter_name] - The name of the filter. + * @property {Object[]} [values] */ /** * @typedef ReportFiltersPayload * @property {number[]} [subscriber_ids] - An array of subscriber IDs for * filtering filters (optional). */ +/** + * @typedef RetryCountResponse + * @property {Item[]} [items] + */ +/** + * @typedef RetryEventRequest + * @property {string} [end_date] + * @property {Event[]} [event] + * @property {string} [search_text] + * @property {string} [start_date] + * @property {string} [status] + * @property {number[]} [subscriber_ids] + */ +/** + * @typedef RetryFailureResponse + * @property {Err[]} [err] + */ /** * @typedef RetryStatusResponse * @property {number} [failure_count] - The count of failed retry attempts. @@ -184,6 +210,11 @@ export = WebhookPlatformModel; * @property {number} [success_count] - The count of successfully retried events. * @property {number} [total_event] - The total number of events that require retry. */ +/** + * @typedef RetrySuccessResponse + * @property {string} [message] + * @property {boolean} [success] + */ /** * @typedef SubscriberConfig * @property {Association} [association] @@ -193,7 +224,7 @@ export = WebhookPlatformModel; * @property {number[]} [event_id] * @property {number} [id] * @property {string} [name] - * @property {SubscriberStatus} [status] + * @property {string} [status] * @property {string} [webhook_url] */ /** @@ -201,6 +232,35 @@ export = WebhookPlatformModel; * @property {SubscriberResponse[]} [items] * @property {Page} [page] */ +/** + * @typedef SubscriberConfigResponse + * @property {Association} [association] + * @property {AuthMeta} [auth_meta] + * @property {string} [created_on] + * @property {Object} [custom_headers] + * @property {string} [email_id] + * @property {number[]} [event_id] + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [status] + * @property {string} [type] + * @property {string} [updated_on] + * @property {string} [webhook_url] + */ +/** + * @typedef SubscriberEventMapping + * @property {string} [created_on] + * @property {number} [event_id] + * @property {number} [id] + * @property {number} [subscriber_id] + */ +/** + * @typedef SubscriberFailureResponse + * @property {string} [code] + * @property {string} [message] + * @property {string} [stack] + */ /** * @typedef SubscriberResponse * @property {Association} [association] @@ -208,10 +268,12 @@ export = WebhookPlatformModel; * @property {string} [created_on] * @property {Object} [custom_headers] * @property {string} [email_id] - * @property {EventConfig[]} [event_configs] + * @property {EventConfigs[]} [event_configs] * @property {number} [id] + * @property {string} [modified_by] * @property {string} [name] - * @property {SubscriberStatus} [status] + * @property {string} [status] + * @property {string} [type] * @property {string} [updated_on] * @property {string} [webhook_url] */ @@ -224,11 +286,10 @@ export = WebhookPlatformModel; * @property {string} [name] - The name of the uploaded report file. * @property {string} [url] - The URL of the uploaded report file. */ -/** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */ declare class WebhookPlatformModel { } declare namespace WebhookPlatformModel { - export { Association, AssociationDetails, AuthMeta, CancelResponse, CdnObject, Error, Event, EventConfig, EventConfigResponse, EventCountItem, EventProcessedSuccessResponse, EventProcessReportObject, EventProcessReports, EventProcessRequest, EventSuccessResponse, FailedEventsCountSuccessResponse, FilterResponseObject, FilterValues, HistoryFilters, HistoryPayload, HistoryResponse, HistoryResponseObject, ManualRetryFailedResponse, Page, PingWebhook, PingWebhookResponse, ReportFilterResponse, ReportFiltersPayload, RetryStatusResponse, SubscriberConfig, SubscriberConfigList, SubscriberResponse, UploadServiceObject, Url, SubscriberStatus }; + export { Association, AuthMeta, CancelResponse, CdnObject, DownloadReportResponse, Err, Error, Event, EventConfig, EventConfigResponse, EventConfigs, EventProcessReportObject, EventProcessReports, EventProcessRequest, HistoryAssociation, HistoryFilters, HistoryItems, HistoryPayload, HistoryResponse, Item, Page, PingWebhook, PingWebhookResponse, ReportFilterResponse, ReportFiltersPayload, RetryCountResponse, RetryEventRequest, RetryFailureResponse, RetryStatusResponse, RetrySuccessResponse, SubscriberConfig, SubscriberConfigList, SubscriberConfigResponse, SubscriberEventMapping, SubscriberFailureResponse, SubscriberResponse, UploadServiceObject, Url }; } /** @returns {Association} */ declare function Association(): Association; @@ -238,11 +299,6 @@ type Association = { criteria?: string; extension_id?: string; }; -/** @returns {AssociationDetails} */ -declare function AssociationDetails(): AssociationDetails; -type AssociationDetails = { - company_id?: number; -}; /** @returns {AuthMeta} */ declare function AuthMeta(): AuthMeta; type AuthMeta = { @@ -255,13 +311,25 @@ type CancelResponse = { /** * - The HTTP status code of the response (e.g., 200). */ - code?: number; + message?: string; }; /** @returns {CdnObject} */ declare function CdnObject(): CdnObject; type CdnObject = { urls?: Url[]; }; +/** @returns {DownloadReportResponse} */ +declare function DownloadReportResponse(): DownloadReportResponse; +type DownloadReportResponse = { + file_name?: string; +}; +/** @returns {Err} */ +declare function Err(): Err; +type Err = { + location?: string; + msg?: string; + param?: string; +}; /** @returns {Error} */ declare function Error(): Error; type Error = { @@ -293,25 +361,31 @@ type EventConfig = { /** @returns {EventConfigResponse} */ declare function EventConfigResponse(): EventConfigResponse; type EventConfigResponse = { - event_configs?: EventConfig[]; -}; -/** @returns {EventCountItem} */ -declare function EventCountItem(): EventCountItem; -type EventCountItem = { - /** - * - The count of events with the specified status - */ - count?: number; - /** - * - The status of the event (e.g., "FAILED"). - */ - status?: string; + created_on?: string; + description?: string; + display_name?: string; + event_category?: string; + event_name?: string; + event_schema?: any; + event_type?: string; + id?: number; + updated_on?: string; + version?: string; }; -/** @returns {EventProcessedSuccessResponse} */ -declare function EventProcessedSuccessResponse(): EventProcessedSuccessResponse; -type EventProcessedSuccessResponse = { - message?: string; - success?: boolean; +/** @returns {EventConfigs} */ +declare function EventConfigs(): EventConfigs; +type EventConfigs = { + created_on?: string; + description?: string; + display_name?: string; + event_category?: string; + event_name?: string; + event_schema?: any; + event_type?: string; + id?: number; + subscriber_event_mapping?: SubscriberEventMapping; + updated_on?: string; + version?: string; }; /** @returns {EventProcessReportObject} */ declare function EventProcessReportObject(): EventProcessReportObject; @@ -323,15 +397,17 @@ type EventProcessReportObject = { /** * - The data associated with the event. */ - data?: string; + data?: any; /** * - The name of the processed event. */ event_name?: string; + event_trace_id?: string; /** * - The timestamp of the last attempted event. */ last_attempted_on?: number; + message_id?: string; /** * - The name of the event. */ @@ -370,39 +446,14 @@ type EventProcessRequest = { event?: Event[]; search_text?: string; start_date?: string; + status?: string; subscriber_ids?: number[]; }; -/** @returns {EventSuccessResponse} */ -declare function EventSuccessResponse(): EventSuccessResponse; -type EventSuccessResponse = { - message?: string; - success?: boolean; -}; -/** @returns {FailedEventsCountSuccessResponse} */ -declare function FailedEventsCountSuccessResponse(): FailedEventsCountSuccessResponse; -type FailedEventsCountSuccessResponse = { - items?: EventCountItem[]; -}; -/** @returns {FilterResponseObject} */ -declare function FilterResponseObject(): FilterResponseObject; -type FilterResponseObject = { - /** - * - The name of the filter. - */ - filter_name?: string; - values?: FilterValues[]; -}; -/** @returns {FilterValues} */ -declare function FilterValues(): FilterValues; -type FilterValues = { - /** - * - The display text for the filter value. - */ - text?: string; - /** - * - The value associated with the filter value. - */ - value?: any; +/** @returns {HistoryAssociation} */ +declare function HistoryAssociation(): HistoryAssociation; +type HistoryAssociation = { + company_id?: number; + subscriber_ids?: number[]; }; /** @returns {HistoryFilters} */ declare function HistoryFilters(): HistoryFilters; @@ -411,6 +462,8 @@ type HistoryFilters = { * - The end date and time of the history report. */ end_date?: string; + events?: string[]; + search_text?: string; /** * - The start date and time of the history report. */ @@ -425,31 +478,10 @@ type HistoryFilters = { */ subscribers?: number[]; }; -/** @returns {HistoryPayload} */ -declare function HistoryPayload(): HistoryPayload; -type HistoryPayload = { - /** - * - The page number of the history report. - */ - page_no?: number; - /** - * - The number of records per page. - */ - page_size?: number; - /** - * - The type of history report (e.g., "platform"). - */ - type?: string; -}; -/** @returns {HistoryResponse} */ -declare function HistoryResponse(): HistoryResponse; -type HistoryResponse = { - items?: HistoryResponseObject[]; -}; -/** @returns {HistoryResponseObject} */ -declare function HistoryResponseObject(): HistoryResponseObject; -type HistoryResponseObject = { - association?: AssociationDetails; +/** @returns {HistoryItems} */ +declare function HistoryItems(): HistoryItems; +type HistoryItems = { + association?: HistoryAssociation; /** * - The date and time when the history report * was created. @@ -479,14 +511,33 @@ type HistoryResponseObject = { updated_on?: string; upload_service_response?: UploadServiceObject; }; -/** @returns {ManualRetryFailedResponse} */ -declare function ManualRetryFailedResponse(): ManualRetryFailedResponse; -type ManualRetryFailedResponse = { - message?: string; - meta?: any; - request_id?: string; - stack_trace?: string; - success?: boolean; +/** @returns {HistoryPayload} */ +declare function HistoryPayload(): HistoryPayload; +type HistoryPayload = { + /** + * - The page number of the history report. + */ + page_no?: number; + /** + * - The number of records per page. + */ + page_size?: number; + /** + * - The type of history report (e.g., "platform"). + */ + type?: string; +}; +/** @returns {HistoryResponse} */ +declare function HistoryResponse(): HistoryResponse; +type HistoryResponse = { + items?: HistoryItems[]; + page?: Page; +}; +/** @returns {Item} */ +declare function Item(): Item; +type Item = { + count?: number; + status?: string; }; /** @returns {Page} */ declare function Page(): Page; @@ -535,7 +586,11 @@ type PingWebhookResponse = { /** @returns {ReportFilterResponse} */ declare function ReportFilterResponse(): ReportFilterResponse; type ReportFilterResponse = { - items?: FilterResponseObject[]; + /** + * - The name of the filter. + */ + filter_name?: string; + values?: any[]; }; /** @returns {ReportFiltersPayload} */ declare function ReportFiltersPayload(): ReportFiltersPayload; @@ -546,6 +601,26 @@ type ReportFiltersPayload = { */ subscriber_ids?: number[]; }; +/** @returns {RetryCountResponse} */ +declare function RetryCountResponse(): RetryCountResponse; +type RetryCountResponse = { + items?: Item[]; +}; +/** @returns {RetryEventRequest} */ +declare function RetryEventRequest(): RetryEventRequest; +type RetryEventRequest = { + end_date?: string; + event?: Event[]; + search_text?: string; + start_date?: string; + status?: string; + subscriber_ids?: number[]; +}; +/** @returns {RetryFailureResponse} */ +declare function RetryFailureResponse(): RetryFailureResponse; +type RetryFailureResponse = { + err?: Err[]; +}; /** @returns {RetryStatusResponse} */ declare function RetryStatusResponse(): RetryStatusResponse; type RetryStatusResponse = { @@ -567,6 +642,12 @@ type RetryStatusResponse = { */ total_event?: number; }; +/** @returns {RetrySuccessResponse} */ +declare function RetrySuccessResponse(): RetrySuccessResponse; +type RetrySuccessResponse = { + message?: string; + success?: boolean; +}; /** @returns {SubscriberConfig} */ declare function SubscriberConfig(): SubscriberConfig; type SubscriberConfig = { @@ -577,7 +658,7 @@ type SubscriberConfig = { event_id?: number[]; id?: number; name?: string; - status?: SubscriberStatus; + status?: string; webhook_url?: string; }; /** @returns {SubscriberConfigList} */ @@ -586,6 +667,38 @@ type SubscriberConfigList = { items?: SubscriberResponse[]; page?: Page; }; +/** @returns {SubscriberConfigResponse} */ +declare function SubscriberConfigResponse(): SubscriberConfigResponse; +type SubscriberConfigResponse = { + association?: Association; + auth_meta?: AuthMeta; + created_on?: string; + custom_headers?: any; + email_id?: string; + event_id?: number[]; + id?: number; + modified_by?: string; + name?: string; + status?: string; + type?: string; + updated_on?: string; + webhook_url?: string; +}; +/** @returns {SubscriberEventMapping} */ +declare function SubscriberEventMapping(): SubscriberEventMapping; +type SubscriberEventMapping = { + created_on?: string; + event_id?: number; + id?: number; + subscriber_id?: number; +}; +/** @returns {SubscriberFailureResponse} */ +declare function SubscriberFailureResponse(): SubscriberFailureResponse; +type SubscriberFailureResponse = { + code?: string; + message?: string; + stack?: string; +}; /** @returns {SubscriberResponse} */ declare function SubscriberResponse(): SubscriberResponse; type SubscriberResponse = { @@ -594,10 +707,12 @@ type SubscriberResponse = { created_on?: string; custom_headers?: any; email_id?: string; - event_configs?: EventConfig[]; + event_configs?: EventConfigs[]; id?: number; + modified_by?: string; name?: string; - status?: SubscriberStatus; + status?: string; + type?: string; updated_on?: string; webhook_url?: string; }; @@ -618,10 +733,3 @@ type Url = { */ url?: string; }; -/** - * Enum: SubscriberStatus Used By: Webhook - * - * @returns {SubscriberStatus} - */ -declare function SubscriberStatus(): SubscriberStatus; -type SubscriberStatus = "active" | "inactive" | "blocked"; diff --git a/sdk/platform/Webhook/WebhookPlatformModel.js b/sdk/platform/Webhook/WebhookPlatformModel.js index a8c736985..598ba5e49 100644 --- a/sdk/platform/Webhook/WebhookPlatformModel.js +++ b/sdk/platform/Webhook/WebhookPlatformModel.js @@ -8,11 +8,6 @@ const Joi = require("joi"); * @property {string} [extension_id] */ -/** - * @typedef AssociationDetails - * @property {number} [company_id] - */ - /** * @typedef AuthMeta * @property {string} [secret] @@ -21,7 +16,7 @@ const Joi = require("joi"); /** * @typedef CancelResponse - * @property {number} [code] - The HTTP status code of the response (e.g., 200). + * @property {string} [message] - The HTTP status code of the response (e.g., 200). */ /** @@ -29,6 +24,18 @@ const Joi = require("joi"); * @property {Url[]} [urls] */ +/** + * @typedef DownloadReportResponse + * @property {string} [file_name] + */ + +/** + * @typedef Err + * @property {string} [location] + * @property {string} [msg] + * @property {string} [param] + */ + /** * @typedef Error * @property {string} [error] - Error message describing the reason for the failure. @@ -56,27 +63,41 @@ const Joi = require("joi"); /** * @typedef EventConfigResponse - * @property {EventConfig[]} [event_configs] - */ - -/** - * @typedef EventCountItem - * @property {number} [count] - The count of events with the specified status - * @property {string} [status] - The status of the event (e.g., "FAILED"). + * @property {string} [created_on] + * @property {string} [description] + * @property {string} [display_name] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {Object} [event_schema] + * @property {string} [event_type] + * @property {number} [id] + * @property {string} [updated_on] + * @property {string} [version] */ /** - * @typedef EventProcessedSuccessResponse - * @property {string} [message] - * @property {boolean} [success] + * @typedef EventConfigs + * @property {string} [created_on] + * @property {string} [description] + * @property {string} [display_name] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {Object} [event_schema] + * @property {string} [event_type] + * @property {number} [id] + * @property {SubscriberEventMapping} [subscriber_event_mapping] + * @property {string} [updated_on] + * @property {string} [version] */ /** * @typedef EventProcessReportObject * @property {number} [attempt] - The attempt number of the event. - * @property {string} [data] - The data associated with the event. + * @property {Object} [data] - The data associated with the event. * @property {string} [event_name] - The name of the processed event. + * @property {string} [event_trace_id] * @property {number} [last_attempted_on] - The timestamp of the last attempted event. + * @property {string} [message_id] * @property {string} [name] - The name of the event. * @property {number} [response_code] - The response code of the event. * @property {string} [response_message] - The response message of the event. @@ -97,35 +118,21 @@ const Joi = require("joi"); * @property {Event[]} [event] * @property {string} [search_text] * @property {string} [start_date] + * @property {string} [status] * @property {number[]} [subscriber_ids] */ /** - * @typedef EventSuccessResponse - * @property {string} [message] - * @property {boolean} [success] - */ - -/** - * @typedef FailedEventsCountSuccessResponse - * @property {EventCountItem[]} [items] - */ - -/** - * @typedef FilterResponseObject - * @property {string} [filter_name] - The name of the filter. - * @property {FilterValues[]} [values] - */ - -/** - * @typedef FilterValues - * @property {string} [text] - The display text for the filter value. - * @property {Object} [value] - The value associated with the filter value. + * @typedef HistoryAssociation + * @property {number} [company_id] + * @property {number[]} [subscriber_ids] */ /** * @typedef HistoryFilters * @property {string} [end_date] - The end date and time of the history report. + * @property {string[]} [events] + * @property {string} [search_text] * @property {string} [start_date] - The start date and time of the history report. * @property {string} [status] - The status of the history report (e.g., "FAILED"). * @property {number[]} [subscribers] - An array of subscriber IDs associated @@ -133,20 +140,8 @@ const Joi = require("joi"); */ /** - * @typedef HistoryPayload - * @property {number} [page_no] - The page number of the history report. - * @property {number} [page_size] - The number of records per page. - * @property {string} [type] - The type of history report (e.g., "platform"). - */ - -/** - * @typedef HistoryResponse - * @property {HistoryResponseObject[]} [items] - */ - -/** - * @typedef HistoryResponseObject - * @property {AssociationDetails} [association] + * @typedef HistoryItems + * @property {HistoryAssociation} [association] * @property {string} [created_on] - The date and time when the history report * was created. * @property {string} [filename] - The filename of the history report. @@ -160,12 +155,22 @@ const Joi = require("joi"); */ /** - * @typedef ManualRetryFailedResponse - * @property {string} [message] - * @property {Object} [meta] - * @property {string} [request_id] - * @property {string} [stack_trace] - * @property {boolean} [success] + * @typedef HistoryPayload + * @property {number} [page_no] - The page number of the history report. + * @property {number} [page_size] - The number of records per page. + * @property {string} [type] - The type of history report (e.g., "platform"). + */ + +/** + * @typedef HistoryResponse + * @property {HistoryItems[]} [items] + * @property {Page} [page] + */ + +/** + * @typedef Item + * @property {number} [count] + * @property {string} [status] */ /** @@ -196,7 +201,8 @@ const Joi = require("joi"); /** * @typedef ReportFilterResponse - * @property {FilterResponseObject[]} [items] + * @property {string} [filter_name] - The name of the filter. + * @property {Object[]} [values] */ /** @@ -205,6 +211,26 @@ const Joi = require("joi"); * filtering filters (optional). */ +/** + * @typedef RetryCountResponse + * @property {Item[]} [items] + */ + +/** + * @typedef RetryEventRequest + * @property {string} [end_date] + * @property {Event[]} [event] + * @property {string} [search_text] + * @property {string} [start_date] + * @property {string} [status] + * @property {number[]} [subscriber_ids] + */ + +/** + * @typedef RetryFailureResponse + * @property {Err[]} [err] + */ + /** * @typedef RetryStatusResponse * @property {number} [failure_count] - The count of failed retry attempts. @@ -214,6 +240,12 @@ const Joi = require("joi"); * @property {number} [total_event] - The total number of events that require retry. */ +/** + * @typedef RetrySuccessResponse + * @property {string} [message] + * @property {boolean} [success] + */ + /** * @typedef SubscriberConfig * @property {Association} [association] @@ -223,7 +255,7 @@ const Joi = require("joi"); * @property {number[]} [event_id] * @property {number} [id] * @property {string} [name] - * @property {SubscriberStatus} [status] + * @property {string} [status] * @property {string} [webhook_url] */ @@ -233,6 +265,38 @@ const Joi = require("joi"); * @property {Page} [page] */ +/** + * @typedef SubscriberConfigResponse + * @property {Association} [association] + * @property {AuthMeta} [auth_meta] + * @property {string} [created_on] + * @property {Object} [custom_headers] + * @property {string} [email_id] + * @property {number[]} [event_id] + * @property {number} [id] + * @property {string} [modified_by] + * @property {string} [name] + * @property {string} [status] + * @property {string} [type] + * @property {string} [updated_on] + * @property {string} [webhook_url] + */ + +/** + * @typedef SubscriberEventMapping + * @property {string} [created_on] + * @property {number} [event_id] + * @property {number} [id] + * @property {number} [subscriber_id] + */ + +/** + * @typedef SubscriberFailureResponse + * @property {string} [code] + * @property {string} [message] + * @property {string} [stack] + */ + /** * @typedef SubscriberResponse * @property {Association} [association] @@ -240,10 +304,12 @@ const Joi = require("joi"); * @property {string} [created_on] * @property {Object} [custom_headers] * @property {string} [email_id] - * @property {EventConfig[]} [event_configs] + * @property {EventConfigs[]} [event_configs] * @property {number} [id] + * @property {string} [modified_by] * @property {string} [name] - * @property {SubscriberStatus} [status] + * @property {string} [status] + * @property {string} [type] * @property {string} [updated_on] * @property {string} [webhook_url] */ @@ -259,8 +325,6 @@ const Joi = require("joi"); * @property {string} [url] - The URL of the uploaded report file. */ -/** @typedef {"active" | "inactive" | "blocked"} SubscriberStatus */ - class WebhookPlatformModel { /** @returns {Association} */ static Association() { @@ -272,13 +336,6 @@ class WebhookPlatformModel { }); } - /** @returns {AssociationDetails} */ - static AssociationDetails() { - return Joi.object({ - company_id: Joi.number(), - }); - } - /** @returns {AuthMeta} */ static AuthMeta() { return Joi.object({ @@ -290,7 +347,7 @@ class WebhookPlatformModel { /** @returns {CancelResponse} */ static CancelResponse() { return Joi.object({ - code: Joi.number(), + message: Joi.string().allow(""), }); } @@ -301,6 +358,22 @@ class WebhookPlatformModel { }); } + /** @returns {DownloadReportResponse} */ + static DownloadReportResponse() { + return Joi.object({ + file_name: Joi.string().allow(""), + }); + } + + /** @returns {Err} */ + static Err() { + return Joi.object({ + location: Joi.string().allow(""), + msg: Joi.string().allow(""), + param: Joi.string().allow(""), + }); + } + /** @returns {Error} */ static Error() { return Joi.object({ @@ -335,23 +408,33 @@ class WebhookPlatformModel { /** @returns {EventConfigResponse} */ static EventConfigResponse() { return Joi.object({ - event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()), - }); - } - - /** @returns {EventCountItem} */ - static EventCountItem() { - return Joi.object({ - count: Joi.number(), - status: Joi.string().allow(""), + created_on: Joi.string().allow(""), + description: Joi.string().allow("").allow(null), + display_name: Joi.string().allow(""), + event_category: Joi.string().allow(""), + event_name: Joi.string().allow(""), + event_schema: Joi.object().pattern(/\S/, Joi.any()), + event_type: Joi.string().allow(""), + id: Joi.number(), + updated_on: Joi.string().allow(""), + version: Joi.string().allow(""), }); } - /** @returns {EventProcessedSuccessResponse} */ - static EventProcessedSuccessResponse() { + /** @returns {EventConfigs} */ + static EventConfigs() { return Joi.object({ - message: Joi.string().allow(""), - success: Joi.boolean(), + created_on: Joi.string().allow(""), + description: Joi.string().allow(""), + display_name: Joi.string().allow(""), + event_category: Joi.string().allow(""), + event_name: Joi.string().allow(""), + event_schema: Joi.object().pattern(/\S/, Joi.any()), + event_type: Joi.string().allow(""), + id: Joi.number(), + subscriber_event_mapping: WebhookPlatformModel.SubscriberEventMapping(), + updated_on: Joi.string().allow(""), + version: Joi.string().allow(""), }); } @@ -359,9 +442,11 @@ class WebhookPlatformModel { static EventProcessReportObject() { return Joi.object({ attempt: Joi.number(), - data: Joi.string().allow(""), + data: Joi.object().pattern(/\S/, Joi.any()), event_name: Joi.string().allow(""), + event_trace_id: Joi.string().allow(""), last_attempted_on: Joi.number(), + message_id: Joi.string().allow(""), name: Joi.string().allow(""), response_code: Joi.number(), response_message: Joi.string().allow(""), @@ -386,38 +471,16 @@ class WebhookPlatformModel { event: Joi.array().items(WebhookPlatformModel.Event()), search_text: Joi.string().allow(""), start_date: Joi.string().allow(""), + status: Joi.string().allow(""), subscriber_ids: Joi.array().items(Joi.number()), }); } - /** @returns {EventSuccessResponse} */ - static EventSuccessResponse() { + /** @returns {HistoryAssociation} */ + static HistoryAssociation() { return Joi.object({ - message: Joi.string().allow(""), - success: Joi.boolean(), - }); - } - - /** @returns {FailedEventsCountSuccessResponse} */ - static FailedEventsCountSuccessResponse() { - return Joi.object({ - items: Joi.array().items(WebhookPlatformModel.EventCountItem()), - }); - } - - /** @returns {FilterResponseObject} */ - static FilterResponseObject() { - return Joi.object({ - filter_name: Joi.string().allow(""), - values: Joi.array().items(WebhookPlatformModel.FilterValues()), - }); - } - - /** @returns {FilterValues} */ - static FilterValues() { - return Joi.object({ - text: Joi.string().allow(""), - value: Joi.any(), + company_id: Joi.number(), + subscriber_ids: Joi.array().items(Joi.number()), }); } @@ -425,12 +488,29 @@ class WebhookPlatformModel { static HistoryFilters() { return Joi.object({ end_date: Joi.string().allow(""), + events: Joi.array().items(Joi.string().allow("")), + search_text: Joi.string().allow(""), start_date: Joi.string().allow(""), status: Joi.string().allow(""), subscribers: Joi.array().items(Joi.number()), }); } + /** @returns {HistoryItems} */ + static HistoryItems() { + return Joi.object({ + association: WebhookPlatformModel.HistoryAssociation(), + created_on: Joi.string().allow(""), + filename: Joi.string().allow(""), + filters: WebhookPlatformModel.HistoryFilters(), + id: Joi.number(), + message: Joi.string().allow(""), + status: Joi.string().allow(""), + updated_on: Joi.string().allow("").allow(null), + upload_service_response: WebhookPlatformModel.UploadServiceObject(), + }); + } + /** @returns {HistoryPayload} */ static HistoryPayload() { return Joi.object({ @@ -443,33 +523,16 @@ class WebhookPlatformModel { /** @returns {HistoryResponse} */ static HistoryResponse() { return Joi.object({ - items: Joi.array().items(WebhookPlatformModel.HistoryResponseObject()), + items: Joi.array().items(WebhookPlatformModel.HistoryItems()), + page: WebhookPlatformModel.Page(), }); } - /** @returns {HistoryResponseObject} */ - static HistoryResponseObject() { + /** @returns {Item} */ + static Item() { return Joi.object({ - association: WebhookPlatformModel.AssociationDetails(), - created_on: Joi.string().allow(""), - filename: Joi.string().allow(""), - filters: WebhookPlatformModel.HistoryFilters(), - id: Joi.number(), - message: Joi.string().allow(""), + count: Joi.number(), status: Joi.string().allow(""), - updated_on: Joi.string().allow(""), - upload_service_response: WebhookPlatformModel.UploadServiceObject(), - }); - } - - /** @returns {ManualRetryFailedResponse} */ - static ManualRetryFailedResponse() { - return Joi.object({ - message: Joi.string().allow(""), - meta: Joi.any(), - request_id: Joi.string().allow(""), - stack_trace: Joi.string().allow(""), - success: Joi.boolean(), }); } @@ -507,7 +570,8 @@ class WebhookPlatformModel { /** @returns {ReportFilterResponse} */ static ReportFilterResponse() { return Joi.object({ - items: Joi.array().items(WebhookPlatformModel.FilterResponseObject()), + filter_name: Joi.string().allow(""), + values: Joi.array().items(Joi.object().pattern(/\S/, Joi.any())), }); } @@ -518,6 +582,32 @@ class WebhookPlatformModel { }); } + /** @returns {RetryCountResponse} */ + static RetryCountResponse() { + return Joi.object({ + items: Joi.array().items(WebhookPlatformModel.Item()), + }); + } + + /** @returns {RetryEventRequest} */ + static RetryEventRequest() { + return Joi.object({ + end_date: Joi.string().allow(""), + event: Joi.array().items(WebhookPlatformModel.Event()), + search_text: Joi.string().allow(""), + start_date: Joi.string().allow(""), + status: Joi.string().allow(""), + subscriber_ids: Joi.array().items(Joi.number()), + }); + } + + /** @returns {RetryFailureResponse} */ + static RetryFailureResponse() { + return Joi.object({ + err: Joi.array().items(WebhookPlatformModel.Err()), + }); + } + /** @returns {RetryStatusResponse} */ static RetryStatusResponse() { return Joi.object({ @@ -528,6 +618,14 @@ class WebhookPlatformModel { }); } + /** @returns {RetrySuccessResponse} */ + static RetrySuccessResponse() { + return Joi.object({ + message: Joi.string().allow(""), + success: Joi.boolean(), + }); + } + /** @returns {SubscriberConfig} */ static SubscriberConfig() { return Joi.object({ @@ -538,7 +636,7 @@ class WebhookPlatformModel { event_id: Joi.array().items(Joi.number()), id: Joi.number(), name: Joi.string().allow(""), - status: WebhookPlatformModel.SubscriberStatus(), + status: Joi.string().allow(""), webhook_url: Joi.string().allow(""), }); } @@ -551,6 +649,44 @@ class WebhookPlatformModel { }); } + /** @returns {SubscriberConfigResponse} */ + static SubscriberConfigResponse() { + return Joi.object({ + association: WebhookPlatformModel.Association(), + auth_meta: WebhookPlatformModel.AuthMeta(), + created_on: Joi.string().allow(""), + custom_headers: Joi.any(), + email_id: Joi.string().allow(""), + event_id: Joi.array().items(Joi.number()), + id: Joi.number(), + modified_by: Joi.string().allow(""), + name: Joi.string().allow(""), + status: Joi.string().allow(""), + type: Joi.string().allow("").allow(null), + updated_on: Joi.string().allow(""), + webhook_url: Joi.string().allow(""), + }); + } + + /** @returns {SubscriberEventMapping} */ + static SubscriberEventMapping() { + return Joi.object({ + created_on: Joi.string().allow(""), + event_id: Joi.number(), + id: Joi.number(), + subscriber_id: Joi.number(), + }); + } + + /** @returns {SubscriberFailureResponse} */ + static SubscriberFailureResponse() { + return Joi.object({ + code: Joi.string().allow(""), + message: Joi.string().allow(""), + stack: Joi.string().allow(""), + }); + } + /** @returns {SubscriberResponse} */ static SubscriberResponse() { return Joi.object({ @@ -559,10 +695,12 @@ class WebhookPlatformModel { created_on: Joi.string().allow(""), custom_headers: Joi.any(), email_id: Joi.string().allow(""), - event_configs: Joi.array().items(WebhookPlatformModel.EventConfig()), + event_configs: Joi.array().items(WebhookPlatformModel.EventConfigs()), id: Joi.number(), + modified_by: Joi.string().allow(""), name: Joi.string().allow(""), - status: WebhookPlatformModel.SubscriberStatus(), + status: Joi.string().allow(""), + type: Joi.string().allow("").allow(null), updated_on: Joi.string().allow(""), webhook_url: Joi.string().allow(""), }); @@ -582,20 +720,5 @@ class WebhookPlatformModel { url: Joi.string().allow(""), }); } - - /** - * Enum: SubscriberStatus Used By: Webhook - * - * @returns {SubscriberStatus} - */ - static SubscriberStatus() { - return Joi.string().valid( - "active", - - "inactive", - - "blocked" - ); - } } module.exports = WebhookPlatformModel; diff --git a/sdk/platform/Webhook/WebhookPlatformValidator.d.ts b/sdk/platform/Webhook/WebhookPlatformValidator.d.ts index 753df2c70..987b5a12f 100644 --- a/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +++ b/sdk/platform/Webhook/WebhookPlatformValidator.d.ts @@ -1,7 +1,7 @@ export = WebhookPlatformValidator; /** * @typedef CancelJobByNameParam - * @property {string} filename - Filename of the specific report export to cancel. + * @property {string} filename */ /** * @typedef DownloadDeliveryReportParam @@ -14,7 +14,7 @@ export = WebhookPlatformValidator; */ /** * @typedef GetEventCountsParam - * @property {WebhookPlatformModel.EventProcessRequest} body + * @property {WebhookPlatformModel.RetryEventRequest} body */ /** * @typedef GetHistoricalReportsParam @@ -39,12 +39,12 @@ export = WebhookPlatformValidator; * @typedef GetSubscribersByExtensionIdParam * @property {number} [pageNo] - Page Number * @property {number} [pageSize] - Page Size - * @property {string} extensionId - Extension id + * @property {string} extensionId - Extension_id */ /** @typedef ManualRetryCancelParam */ /** * @typedef ManualRetryOfFailedEventParam - * @property {WebhookPlatformModel.EventProcessRequest} body + * @property {WebhookPlatformModel.RetryEventRequest} body */ /** * @typedef PingWebhookParam @@ -96,9 +96,6 @@ declare namespace WebhookPlatformValidator { export { CancelJobByNameParam, DownloadDeliveryReportParam, FetchAllEventConfigurationsParam, GetDeliveryReportsParam, GetEventCountsParam, GetHistoricalReportsParam, GetManualRetryStatusParam, GetReportFiltersParam, GetSubscriberByIdParam, GetSubscribersByCompanyParam, GetSubscribersByExtensionIdParam, ManualRetryCancelParam, ManualRetryOfFailedEventParam, PingWebhookParam, RegisterSubscriberToEventParam, UpdateSubscriberConfigParam }; } type CancelJobByNameParam = { - /** - * - Filename of the specific report export to cancel. - */ filename: string; }; type DownloadDeliveryReportParam = { @@ -108,7 +105,7 @@ type GetDeliveryReportsParam = { body: WebhookPlatformModel.EventProcessRequest; }; type GetEventCountsParam = { - body: WebhookPlatformModel.EventProcessRequest; + body: WebhookPlatformModel.RetryEventRequest; }; type GetHistoricalReportsParam = { body: WebhookPlatformModel.HistoryPayload; @@ -146,12 +143,12 @@ type GetSubscribersByExtensionIdParam = { */ pageSize?: number; /** - * - Extension id + * - Extension_id */ extensionId: string; }; type ManualRetryOfFailedEventParam = { - body: WebhookPlatformModel.EventProcessRequest; + body: WebhookPlatformModel.RetryEventRequest; }; type PingWebhookParam = { body: WebhookPlatformModel.PingWebhook; diff --git a/sdk/platform/Webhook/WebhookPlatformValidator.js b/sdk/platform/Webhook/WebhookPlatformValidator.js index 77b33dec9..a5fb041b4 100644 --- a/sdk/platform/Webhook/WebhookPlatformValidator.js +++ b/sdk/platform/Webhook/WebhookPlatformValidator.js @@ -4,7 +4,7 @@ const WebhookPlatformModel = require("./WebhookPlatformModel"); /** * @typedef CancelJobByNameParam - * @property {string} filename - Filename of the specific report export to cancel. + * @property {string} filename */ /** @@ -21,7 +21,7 @@ const WebhookPlatformModel = require("./WebhookPlatformModel"); /** * @typedef GetEventCountsParam - * @property {WebhookPlatformModel.EventProcessRequest} body + * @property {WebhookPlatformModel.RetryEventRequest} body */ /** @@ -52,14 +52,14 @@ const WebhookPlatformModel = require("./WebhookPlatformModel"); * @typedef GetSubscribersByExtensionIdParam * @property {number} [pageNo] - Page Number * @property {number} [pageSize] - Page Size - * @property {string} extensionId - Extension id + * @property {string} extensionId - Extension_id */ /** @typedef ManualRetryCancelParam */ /** * @typedef ManualRetryOfFailedEventParam - * @property {WebhookPlatformModel.EventProcessRequest} body + * @property {WebhookPlatformModel.RetryEventRequest} body */ /** @@ -107,7 +107,7 @@ class WebhookPlatformValidator { /** @returns {GetEventCountsParam} */ static getEventCounts() { return Joi.object({ - body: WebhookPlatformModel.EventProcessRequest().required(), + body: WebhookPlatformModel.RetryEventRequest().required(), }).required(); } @@ -163,7 +163,7 @@ class WebhookPlatformValidator { /** @returns {ManualRetryOfFailedEventParam} */ static manualRetryOfFailedEvent() { return Joi.object({ - body: WebhookPlatformModel.EventProcessRequest().required(), + body: WebhookPlatformModel.RetryEventRequest().required(), }).required(); } diff --git a/sdk/platform/index.d.ts b/sdk/platform/index.d.ts index cabf8b015..808ce8427 100644 --- a/sdk/platform/index.d.ts +++ b/sdk/platform/index.d.ts @@ -15,11 +15,11 @@ export namespace PlatformModel { const FinancePlatformModel: typeof import("./Finance/FinancePlatformModel"); const InventoryPlatformModel: typeof import("./Inventory/InventoryPlatformModel"); const LeadPlatformModel: typeof import("./Lead/LeadPlatformModel"); + const ServiceabilityPlatformModel: typeof import("./Serviceability/ServiceabilityPlatformModel"); const OrderPlatformModel: typeof import("./Order/OrderPlatformModel"); const PartnerPlatformModel: typeof import("./Partner/PartnerPlatformModel"); const PaymentPlatformModel: typeof import("./Payment/PaymentPlatformModel"); const RewardsPlatformModel: typeof import("./Rewards/RewardsPlatformModel"); - const ServiceabilityPlatformModel: typeof import("./Serviceability/ServiceabilityPlatformModel"); const SharePlatformModel: typeof import("./Share/SharePlatformModel"); const ThemePlatformModel: typeof import("./Theme/ThemePlatformModel"); const UserPlatformModel: typeof import("./User/UserPlatformModel"); diff --git a/sdk/platform/index.js b/sdk/platform/index.js index 016326d49..69c1a4a21 100644 --- a/sdk/platform/index.js +++ b/sdk/platform/index.js @@ -30,6 +30,8 @@ module.exports = { LeadPlatformModel: require("./Lead/LeadPlatformModel"), + ServiceabilityPlatformModel: require("./Serviceability/ServiceabilityPlatformModel"), + OrderPlatformModel: require("./Order/OrderPlatformModel"), PartnerPlatformModel: require("./Partner/PartnerPlatformModel"), @@ -38,8 +40,6 @@ module.exports = { RewardsPlatformModel: require("./Rewards/RewardsPlatformModel"), - ServiceabilityPlatformModel: require("./Serviceability/ServiceabilityPlatformModel"), - SharePlatformModel: require("./Share/SharePlatformModel"), ThemePlatformModel: require("./Theme/ThemePlatformModel"), diff --git a/sdk/public/Billing/BillingPublicClient.d.ts b/sdk/public/Billing/BillingPublicClient.d.ts new file mode 100644 index 000000000..402017720 --- /dev/null +++ b/sdk/public/Billing/BillingPublicClient.d.ts @@ -0,0 +1,23 @@ +export = Billing; +declare class Billing { + constructor(_conf: any); + _conf: any; + _relativeUrls: { + getStandardPlans: string; + }; + _urls: {}; + updateUrls(urls: any): void; + /** + * @param {BillingPublicValidator.GetStandardPlansParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PublicAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStandardPlans + * @summary: Get Standard/Public Plans + * @description: Get Standard/Public Plans. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getStandardPlans/). + */ + getStandardPlans({ platformType, requestHeaders }?: BillingPublicValidator.GetStandardPlansParam, { responseHeaders }?: object): Promise; +} +import BillingPublicValidator = require("./BillingPublicValidator"); +import BillingPublicModel = require("./BillingPublicModel"); diff --git a/sdk/public/Billing/BillingPublicClient.js b/sdk/public/Billing/BillingPublicClient.js new file mode 100644 index 000000000..08ad550bd --- /dev/null +++ b/sdk/public/Billing/BillingPublicClient.js @@ -0,0 +1,116 @@ +const PublicAPIClient = require("../PublicAPIClient"); +const { + FDKClientValidationError, + FDKResponseValidationError, +} = require("../../common/FDKError"); +const constructUrl = require("../constructUrl"); +const Paginator = require("../../common/Paginator"); +const BillingPublicValidator = require("./BillingPublicValidator"); +const BillingPublicModel = require("./BillingPublicModel"); +const { Logger } = require("./../../common/Logger"); +const Joi = require("joi"); + +class Billing { + constructor(_conf) { + this._conf = _conf; + this._relativeUrls = { + getStandardPlans: "/service/public/billing/v1.0/plan/detailed-list", + }; + 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 {BillingPublicValidator.GetStandardPlansParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PublicAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getStandardPlans + * @summary: Get Standard/Public Plans + * @description: Get Standard/Public Plans. + * - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/billing/getStandardPlans/). + */ + async getStandardPlans( + { platformType, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = BillingPublicValidator.getStandardPlans().validate( + { platformType }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = BillingPublicValidator.getStandardPlans().validate( + { platformType }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for public > Billing > getStandardPlans \n ${warrning}`, + }); + } + + const query_params = {}; + query_params["platform_type"] = platformType; + + const xHeaders = {}; + + const response = await PublicAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getStandardPlans"], + params: {}, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = BillingPublicModel.DetailList().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 > Billing > getStandardPlans \n ${res_error}`, + }); + } + } + + return response; + } +} + +module.exports = Billing; diff --git a/sdk/public/Billing/BillingPublicModel.d.ts b/sdk/public/Billing/BillingPublicModel.d.ts new file mode 100644 index 000000000..f4a473743 --- /dev/null +++ b/sdk/public/Billing/BillingPublicModel.d.ts @@ -0,0 +1,92 @@ +export = BillingPublicModel; +/** + * @typedef DetailList + * @property {string[]} [component_groups] + * @property {Plan[]} [plans] + * @property {Plan} [trial_plan] + */ +/** + * @typedef InternalServerError + * @property {string} [code] - Error code + * @property {string} [message] - Internal server Server error + */ +/** + * @typedef Plan + * @property {string} [_id] + * @property {string[]} [addons] + * @property {number} [amount] + * @property {string} [country] + * @property {string} [created_at] + * @property {string} [currency] + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_trial_plan] + * @property {boolean} [is_visible] + * @property {string} [modified_at] + * @property {string} [name] + * @property {string} [plan_group] + * @property {string} [product_suite_id] + * @property {PlanRecurring} [recurring] + * @property {string[]} [tag_lines] + * @property {string[]} [tags] + * @property {number} [trial_period] + * @property {string} [type] + */ +/** + * @typedef PlanRecurring + * @property {string} [interval] + * @property {number} [interval_count] + */ +declare class BillingPublicModel { +} +declare namespace BillingPublicModel { + export { DetailList, InternalServerError, Plan, PlanRecurring }; +} +/** @returns {DetailList} */ +declare function DetailList(): DetailList; +type DetailList = { + component_groups?: string[]; + plans?: Plan[]; + trial_plan?: Plan; +}; +/** @returns {InternalServerError} */ +declare function InternalServerError(): InternalServerError; +type InternalServerError = { + /** + * - Error code + */ + code?: string; + /** + * - Internal server Server error + */ + message?: string; +}; +/** @returns {Plan} */ +declare function Plan(): Plan; +type Plan = { + _id?: string; + addons?: string[]; + amount?: number; + country?: string; + created_at?: string; + currency?: string; + description?: string; + is_active?: boolean; + is_trial_plan?: boolean; + is_visible?: boolean; + modified_at?: string; + name?: string; + plan_group?: string; + product_suite_id?: string; + recurring?: PlanRecurring; + tag_lines?: string[]; + tags?: string[]; + trial_period?: number; + type?: string; +}; +/** @returns {PlanRecurring} */ +declare function PlanRecurring(): PlanRecurring; +type PlanRecurring = { + interval?: string; + interval_count?: number; +}; diff --git a/sdk/public/Billing/BillingPublicModel.js b/sdk/public/Billing/BillingPublicModel.js new file mode 100644 index 000000000..fb81e234d --- /dev/null +++ b/sdk/public/Billing/BillingPublicModel.js @@ -0,0 +1,96 @@ +const Joi = require("joi"); + +/** + * @typedef DetailList + * @property {string[]} [component_groups] + * @property {Plan[]} [plans] + * @property {Plan} [trial_plan] + */ + +/** + * @typedef InternalServerError + * @property {string} [code] - Error code + * @property {string} [message] - Internal server Server error + */ + +/** + * @typedef Plan + * @property {string} [_id] + * @property {string[]} [addons] + * @property {number} [amount] + * @property {string} [country] + * @property {string} [created_at] + * @property {string} [currency] + * @property {string} [description] + * @property {boolean} [is_active] + * @property {boolean} [is_trial_plan] + * @property {boolean} [is_visible] + * @property {string} [modified_at] + * @property {string} [name] + * @property {string} [plan_group] + * @property {string} [product_suite_id] + * @property {PlanRecurring} [recurring] + * @property {string[]} [tag_lines] + * @property {string[]} [tags] + * @property {number} [trial_period] + * @property {string} [type] + */ + +/** + * @typedef PlanRecurring + * @property {string} [interval] + * @property {number} [interval_count] + */ + +class BillingPublicModel { + /** @returns {DetailList} */ + static DetailList() { + return Joi.object({ + component_groups: Joi.array().items(Joi.string().allow("")), + plans: Joi.array().items(BillingPublicModel.Plan()), + trial_plan: BillingPublicModel.Plan(), + }); + } + + /** @returns {InternalServerError} */ + static InternalServerError() { + return Joi.object({ + code: Joi.string().allow(""), + message: Joi.string().allow(""), + }); + } + + /** @returns {Plan} */ + static Plan() { + return Joi.object({ + _id: Joi.string().allow(""), + addons: Joi.array().items(Joi.string().allow("")), + amount: Joi.number(), + country: Joi.string().allow(""), + created_at: Joi.string().allow(""), + currency: Joi.string().allow(""), + description: Joi.string().allow(""), + is_active: Joi.boolean(), + is_trial_plan: Joi.boolean(), + is_visible: Joi.boolean(), + modified_at: Joi.string().allow(""), + name: Joi.string().allow(""), + plan_group: Joi.string().allow(""), + product_suite_id: Joi.string().allow(""), + recurring: BillingPublicModel.PlanRecurring(), + tag_lines: Joi.array().items(Joi.string().allow("")), + tags: Joi.array().items(Joi.string().allow("")), + trial_period: Joi.number(), + type: Joi.string().allow(""), + }); + } + + /** @returns {PlanRecurring} */ + static PlanRecurring() { + return Joi.object({ + interval: Joi.string().allow(""), + interval_count: Joi.number(), + }); + } +} +module.exports = BillingPublicModel; diff --git a/sdk/public/Billing/BillingPublicValidator.d.ts b/sdk/public/Billing/BillingPublicValidator.d.ts new file mode 100644 index 000000000..87a76ab76 --- /dev/null +++ b/sdk/public/Billing/BillingPublicValidator.d.ts @@ -0,0 +1,18 @@ +export = BillingPublicValidator; +/** + * @typedef GetStandardPlansParam + * @property {string} platformType - The type of platform for which plans are requested. + */ +declare class BillingPublicValidator { + /** @returns {GetStandardPlansParam} */ + static getStandardPlans(): GetStandardPlansParam; +} +declare namespace BillingPublicValidator { + export { GetStandardPlansParam }; +} +type GetStandardPlansParam = { + /** + * - The type of platform for which plans are requested. + */ + platformType: string; +}; diff --git a/sdk/public/Billing/BillingPublicValidator.js b/sdk/public/Billing/BillingPublicValidator.js new file mode 100644 index 000000000..ea9fd0030 --- /dev/null +++ b/sdk/public/Billing/BillingPublicValidator.js @@ -0,0 +1,19 @@ +const Joi = require("joi"); + +const BillingPublicModel = require("./BillingPublicModel"); + +/** + * @typedef GetStandardPlansParam + * @property {string} platformType - The type of platform for which plans are requested. + */ + +class BillingPublicValidator { + /** @returns {GetStandardPlansParam} */ + static getStandardPlans() { + return Joi.object({ + platformType: Joi.string().allow("").required(), + }).required(); + } +} + +module.exports = BillingPublicValidator; diff --git a/sdk/public/Content/ContentPublicClient.d.ts b/sdk/public/Content/ContentPublicClient.d.ts new file mode 100644 index 000000000..098197704 --- /dev/null +++ b/sdk/public/Content/ContentPublicClient.d.ts @@ -0,0 +1,22 @@ +export = Content; +declare class Content { + constructor(_conf: any); + _conf: any; + _relativeUrls: { + getCredentialsByEntity: string; + }; + _urls: {}; + updateUrls(urls: any): void; + /** + * @param {ContentPublicValidator.GetCredentialsByEntityParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PublicAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCredentialsByEntity + * @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({ entity, requestHeaders }?: ContentPublicValidator.GetCredentialsByEntityParam, { responseHeaders }?: object): Promise; +} +import ContentPublicValidator = require("./ContentPublicValidator"); +import ContentPublicModel = require("./ContentPublicModel"); diff --git a/sdk/public/Content/ContentPublicClient.js b/sdk/public/Content/ContentPublicClient.js new file mode 100644 index 000000000..d26c12b7a --- /dev/null +++ b/sdk/public/Content/ContentPublicClient.js @@ -0,0 +1,114 @@ +const PublicAPIClient = require("../PublicAPIClient"); +const { + FDKClientValidationError, + FDKResponseValidationError, +} = require("../../common/FDKError"); +const constructUrl = require("../constructUrl"); +const Paginator = require("../../common/Paginator"); +const ContentPublicValidator = require("./ContentPublicValidator"); +const ContentPublicModel = require("./ContentPublicModel"); +const { Logger } = require("./../../common/Logger"); +const Joi = require("joi"); + +class Content { + constructor(_conf) { + this._conf = _conf; + this._relativeUrls = { + getCredentialsByEntity: "/service/public/content/credentials/{entity}", + }; + 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 {ContentPublicValidator.GetCredentialsByEntityParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PublicAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name getCredentialsByEntity + * @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/). + */ + async getCredentialsByEntity( + { entity, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = ContentPublicValidator.getCredentialsByEntity().validate( + { entity }, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = ContentPublicValidator.getCredentialsByEntity().validate( + { entity }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for public > Content > getCredentialsByEntity \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PublicAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["getCredentialsByEntity"], + params: { entity }, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = ContentPublicModel.CredentialsSchema().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 > getCredentialsByEntity \n ${res_error}`, + }); + } + } + + return response; + } +} + +module.exports = Content; diff --git a/sdk/public/Content/ContentPublicModel.d.ts b/sdk/public/Content/ContentPublicModel.d.ts new file mode 100644 index 000000000..dbb80d432 --- /dev/null +++ b/sdk/public/Content/ContentPublicModel.d.ts @@ -0,0 +1,53 @@ +export = ContentPublicModel; +/** + * @typedef ContentAPIError + * @property {string} [code] + * @property {string} [exception] + * @property {string} [info] + * @property {string} [message] + * @property {Object} [meta] + * @property {string} [request_id] + * @property {string} [stack_trace] + * @property {number} [status] + */ +/** + * @typedef CredentialSchema + * @property {Object} [configuration] + * @property {string} [entity_type] + * @property {boolean} [is_enable] + * @property {string} [type] + */ +/** + * @typedef CredentialsSchema + * @property {CredentialSchema[]} [items] + */ +declare class ContentPublicModel { +} +declare namespace ContentPublicModel { + export { ContentAPIError, CredentialSchema, CredentialsSchema }; +} +/** @returns {ContentAPIError} */ +declare function ContentAPIError(): ContentAPIError; +type ContentAPIError = { + code?: string; + exception?: string; + info?: string; + message?: string; + meta?: any; + request_id?: string; + stack_trace?: string; + status?: number; +}; +/** @returns {CredentialSchema} */ +declare function CredentialSchema(): CredentialSchema; +type CredentialSchema = { + configuration?: any; + entity_type?: string; + is_enable?: boolean; + type?: string; +}; +/** @returns {CredentialsSchema} */ +declare function CredentialsSchema(): CredentialsSchema; +type CredentialsSchema = { + items?: CredentialSchema[]; +}; diff --git a/sdk/public/Content/ContentPublicModel.js b/sdk/public/Content/ContentPublicModel.js new file mode 100644 index 000000000..40a544605 --- /dev/null +++ b/sdk/public/Content/ContentPublicModel.js @@ -0,0 +1,60 @@ +const Joi = require("joi"); + +/** + * @typedef ContentAPIError + * @property {string} [code] + * @property {string} [exception] + * @property {string} [info] + * @property {string} [message] + * @property {Object} [meta] + * @property {string} [request_id] + * @property {string} [stack_trace] + * @property {number} [status] + */ + +/** + * @typedef CredentialSchema + * @property {Object} [configuration] + * @property {string} [entity_type] + * @property {boolean} [is_enable] + * @property {string} [type] + */ + +/** + * @typedef CredentialsSchema + * @property {CredentialSchema[]} [items] + */ + +class ContentPublicModel { + /** @returns {ContentAPIError} */ + static ContentAPIError() { + return Joi.object({ + code: Joi.string().allow(""), + exception: Joi.string().allow(""), + info: Joi.string().allow(""), + message: Joi.string().allow(""), + meta: Joi.any(), + request_id: Joi.string().allow(""), + stack_trace: Joi.string().allow(""), + status: Joi.number(), + }); + } + + /** @returns {CredentialSchema} */ + static CredentialSchema() { + return Joi.object({ + configuration: Joi.any(), + entity_type: Joi.string().allow(""), + is_enable: Joi.boolean(), + type: Joi.string().allow(""), + }); + } + + /** @returns {CredentialsSchema} */ + static CredentialsSchema() { + return Joi.object({ + items: Joi.array().items(ContentPublicModel.CredentialSchema()), + }); + } +} +module.exports = ContentPublicModel; diff --git a/sdk/public/Content/ContentPublicValidator.d.ts b/sdk/public/Content/ContentPublicValidator.d.ts new file mode 100644 index 000000000..865fa1c73 --- /dev/null +++ b/sdk/public/Content/ContentPublicValidator.d.ts @@ -0,0 +1,18 @@ +export = ContentPublicValidator; +/** + * @typedef GetCredentialsByEntityParam + * @property {string} [entity] - Server Type + */ +declare class ContentPublicValidator { + /** @returns {GetCredentialsByEntityParam} */ + static getCredentialsByEntity(): GetCredentialsByEntityParam; +} +declare namespace ContentPublicValidator { + export { GetCredentialsByEntityParam }; +} +type GetCredentialsByEntityParam = { + /** + * - Server Type + */ + entity?: string; +}; diff --git a/sdk/public/Content/ContentPublicValidator.js b/sdk/public/Content/ContentPublicValidator.js new file mode 100644 index 000000000..99cc7afd4 --- /dev/null +++ b/sdk/public/Content/ContentPublicValidator.js @@ -0,0 +1,19 @@ +const Joi = require("joi"); + +const ContentPublicModel = require("./ContentPublicModel"); + +/** + * @typedef GetCredentialsByEntityParam + * @property {string} [entity] - Server Type + */ + +class ContentPublicValidator { + /** @returns {GetCredentialsByEntityParam} */ + static getCredentialsByEntity() { + return Joi.object({ + entity: Joi.string().allow(""), + }); + } +} + +module.exports = ContentPublicValidator; diff --git a/sdk/public/PublicClient.d.ts b/sdk/public/PublicClient.d.ts index fae157a9d..9a1126095 100644 --- a/sdk/public/PublicClient.d.ts +++ b/sdk/public/PublicClient.d.ts @@ -12,7 +12,9 @@ declare class PublicClient { */ constructor(config: import("./PublicConfig")); config: import("./PublicConfig"); + billing: Billing; configuration: Configuration; + content: Content; inventory: Inventory; partner: Partner; webhook: Webhook; @@ -24,7 +26,9 @@ declare class PublicClient { */ setExtraHeaders(header: object): void; } +import Billing = require("./Billing/BillingPublicClient"); import Configuration = require("./Configuration/ConfigurationPublicClient"); +import Content = require("./Content/ContentPublicClient"); import Inventory = require("./Inventory/InventoryPublicClient"); import Partner = require("./Partner/PartnerPublicClient"); import Webhook = require("./Webhook/WebhookPublicClient"); diff --git a/sdk/public/PublicClient.js b/sdk/public/PublicClient.js index 2c0bc2761..b781581c0 100644 --- a/sdk/public/PublicClient.js +++ b/sdk/public/PublicClient.js @@ -1,5 +1,9 @@ +const Billing = require("./Billing/BillingPublicClient"); + const Configuration = require("./Configuration/ConfigurationPublicClient"); +const Content = require("./Content/ContentPublicClient"); + const Inventory = require("./Inventory/InventoryPublicClient"); const Partner = require("./Partner/PartnerPublicClient"); @@ -22,8 +26,12 @@ class PublicClient { constructor(config) { this.config = config; + this.billing = new Billing(config); + this.configuration = new Configuration(config); + this.content = new Content(config); + this.inventory = new Inventory(config); this.partner = new Partner(config); diff --git a/sdk/public/Webhook/WebhookPublicClient.d.ts b/sdk/public/Webhook/WebhookPublicClient.d.ts index f01feb446..bf18dee32 100644 --- a/sdk/public/Webhook/WebhookPublicClient.d.ts +++ b/sdk/public/Webhook/WebhookPublicClient.d.ts @@ -4,7 +4,10 @@ declare class Webhook { _conf: any; _relativeUrls: { fetchAllWebhookEvents: string; + notifyDepricatedEvent: string; queryWebhookEventDetails: string; + testHandlerTransformation: string; + validateSchema: string; }; _urls: {}; updateUrls(urls: any): void; @@ -18,6 +21,16 @@ declare class Webhook { * @description: Get All Webhook Events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/fetchAllWebhookEvents/). */ fetchAllWebhookEvents({ requestHeaders }?: any, { responseHeaders }?: object): Promise; + /** + * @param {WebhookPublicValidator.NotifyDepricatedEventParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PublicAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name notifyDepricatedEvent + * @summary: Notifies all the events that are going to depricate + * @description: Notifies all the events that are subscribed and are going to deprecate or new version is available for those events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/notifyDepricatedEvent/). + */ + notifyDepricatedEvent({ requestHeaders }?: any, { responseHeaders }?: object): Promise; /** * @param {WebhookPublicValidator.QueryWebhookEventDetailsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -28,6 +41,26 @@ declare class Webhook { * @description: Get Webhook Event Details for provided events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/queryWebhookEventDetails/). */ 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 + * @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; + /** + * @param {WebhookPublicValidator.ValidateSchemaParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PublicAPIClient").Options} - Options + * @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; } import WebhookPublicModel = require("./WebhookPublicModel"); import WebhookPublicValidator = require("./WebhookPublicValidator"); diff --git a/sdk/public/Webhook/WebhookPublicClient.js b/sdk/public/Webhook/WebhookPublicClient.js index 78bbdd3d5..fd4d67160 100644 --- a/sdk/public/Webhook/WebhookPublicClient.js +++ b/sdk/public/Webhook/WebhookPublicClient.js @@ -15,8 +15,14 @@ class Webhook { this._conf = _conf; this._relativeUrls = { fetchAllWebhookEvents: "/service/common/webhook/v1.0/events", + notifyDepricatedEvent: + "/service/common/webhook/v1.0/events/depricated-event-notifier", queryWebhookEventDetails: "/service/common/webhook/v1.0/events/query-event-details", + testHandlerTransformation: + "/service/common/webhook/v1.0/events/transform-event", + validateSchema: + "/service/common/webhook/v1.0/events/validate-event-schema", }; this._urls = Object.entries(this._relativeUrls).reduce( (urls, [method, relativeUrl]) => { @@ -112,6 +118,84 @@ class Webhook { return response; } + /** + * @param {WebhookPublicValidator.NotifyDepricatedEventParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PublicAPIClient").Options} - Options + * @returns {Promise} - Success response + * @name notifyDepricatedEvent + * @summary: Notifies all the events that are going to depricate + * @description: Notifies all the events that are subscribed and are going to deprecate or new version is available for those events - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/webhook/notifyDepricatedEvent/). + */ + async notifyDepricatedEvent( + { requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPublicValidator.notifyDepricatedEvent().validate( + {}, + { abortEarly: false, allowUnknown: true } + ); + if (error) { + return Promise.reject(new FDKClientValidationError(error)); + } + + // Showing warrnings if extra unknown parameters are found + const { + error: warrning, + } = WebhookPublicValidator.notifyDepricatedEvent().validate( + {}, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for public > Webhook > notifyDepricatedEvent \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PublicAPIClient.execute( + this._conf, + "get", + constructUrl({ + url: this._urls["notifyDepricatedEvent"], + params: {}, + }), + query_params, + undefined, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPublicModel.EventNotifier().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 > Webhook > notifyDepricatedEvent \n ${res_error}`, + }); + } + } + + return response; + } + /** * @param {WebhookPublicValidator.QueryWebhookEventDetailsParam} arg - Arg object. * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` @@ -191,6 +275,164 @@ class Webhook { return response; } + + /** + * @param {WebhookPublicValidator.TestHandlerTransformationParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PublicAPIClient").Options} - Options + * @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/). + */ + async testHandlerTransformation( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { + error, + } = WebhookPublicValidator.testHandlerTransformation().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, + } = WebhookPublicValidator.testHandlerTransformation().validate( + { body }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for public > Webhook > testHandlerTransformation \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PublicAPIClient.execute( + this._conf, + "post", + constructUrl({ + url: this._urls["testHandlerTransformation"], + params: {}, + }), + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPublicModel.TransformEventResponse().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 > Webhook > testHandlerTransformation \n ${res_error}`, + }); + } + } + + return response; + } + + /** + * @param {WebhookPublicValidator.ValidateSchemaParam} arg - Arg object. + * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}` + * @param {import("../PublicAPIClient").Options} - Options + * @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/). + */ + async validateSchema( + { body, requestHeaders } = { requestHeaders: {} }, + { responseHeaders } = { responseHeaders: false } + ) { + const { error } = WebhookPublicValidator.validateSchema().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, + } = WebhookPublicValidator.validateSchema().validate( + { body }, + { abortEarly: false, allowUnknown: false } + ); + if (warrning) { + Logger({ + level: "WARN", + message: `Parameter Validation warrnings for public > Webhook > validateSchema \n ${warrning}`, + }); + } + + const query_params = {}; + + const xHeaders = {}; + + const response = await PublicAPIClient.execute( + this._conf, + "post", + constructUrl({ + url: this._urls["validateSchema"], + params: {}, + }), + query_params, + body, + { ...xHeaders, ...requestHeaders }, + { responseHeaders } + ); + + let responseData = response; + if (responseHeaders) { + responseData = response[0]; + } + + const { + error: res_error, + } = WebhookPublicModel.ValidateSchemaResponse().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 > Webhook > validateSchema \n ${res_error}`, + }); + } + } + + return response; + } } module.exports = Webhook; diff --git a/sdk/public/Webhook/WebhookPublicModel.d.ts b/sdk/public/Webhook/WebhookPublicModel.d.ts index 5c5652eb8..702f352ea 100644 --- a/sdk/public/Webhook/WebhookPublicModel.d.ts +++ b/sdk/public/Webhook/WebhookPublicModel.d.ts @@ -6,8 +6,10 @@ export = WebhookPublicModel; * @property {string} [display_name] * @property {string} [event_category] * @property {string} [event_name] + * @property {Object} [event_schema] * @property {string} [event_type] * @property {number} [id] + * @property {string} [updated_on] * @property {string} [version] */ /** @@ -21,10 +23,76 @@ export = WebhookPublicModel; * @typedef EventConfigResponse * @property {EventConfig[]} [event_configs] */ +/** + * @typedef EventNotifier + * @property {string[]} [emails] + * @property {string} [message] + */ +/** + * @typedef EventSchema + * @property {Object} [meta] + * @property {Object} [payload] + */ +/** + * @typedef InternalTransformEvent + * @property {number} [created_timestamp] + * @property {string} [name] + * @property {string[]} [trace_id] + * @property {string} [type] + * @property {string} [version] + */ +/** + * @typedef TransformEventAssociation + * @property {number} [company_id] + */ +/** + * @typedef TransformEventData + * @property {number} [company_id] + * @property {string[]} [contains] + * @property {InternalTransformEvent} [event] + * @property {Object} [payload] + */ +/** + * @typedef TransformEventRequest + * @property {EventSchema} [event] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_version] + */ +/** + * @typedef TransformEventResponse + * @property {TransformEventAssociation} [association] + * @property {TransformEventData} [data] + * @property {string} [event_name] + * @property {string[]} [event_trace_id] + * @property {string} [event_type] + * @property {TransformEventServiceMeta} [service_meta] + * @property {boolean} [status] + * @property {string} [version] + */ +/** + * @typedef TransformEventServiceMeta + * @property {string} [name] + */ +/** + * @typedef ValidateSchemaRequest + * @property {EventSchema} [event] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {Object} [event_schema] + * @property {string} [event_type] + * @property {string} [event_version] + */ +/** + * @typedef ValidateSchemaResponse + * @property {string} [message] + * @property {boolean} [status] + */ declare class WebhookPublicModel { } declare namespace WebhookPublicModel { - export { EventConfig, EventConfigBase, EventConfigResponse }; + export { EventConfig, EventConfigBase, EventConfigResponse, EventNotifier, EventSchema, InternalTransformEvent, TransformEventAssociation, TransformEventData, TransformEventRequest, TransformEventResponse, TransformEventServiceMeta, ValidateSchemaRequest, ValidateSchemaResponse }; } /** @returns {EventConfig} */ declare function EventConfig(): EventConfig; @@ -34,8 +102,10 @@ type EventConfig = { display_name?: string; event_category?: string; event_name?: string; + event_schema?: any; event_type?: string; id?: number; + updated_on?: string; version?: string; }; /** @returns {EventConfigBase} */ @@ -51,3 +121,79 @@ declare function EventConfigResponse(): EventConfigResponse; type EventConfigResponse = { event_configs?: EventConfig[]; }; +/** @returns {EventNotifier} */ +declare function EventNotifier(): EventNotifier; +type EventNotifier = { + emails?: string[]; + message?: string; +}; +/** @returns {EventSchema} */ +declare function EventSchema(): EventSchema; +type EventSchema = { + meta?: any; + payload?: any; +}; +/** @returns {InternalTransformEvent} */ +declare function InternalTransformEvent(): InternalTransformEvent; +type InternalTransformEvent = { + created_timestamp?: number; + name?: string; + trace_id?: string[]; + type?: string; + version?: string; +}; +/** @returns {TransformEventAssociation} */ +declare function TransformEventAssociation(): TransformEventAssociation; +type TransformEventAssociation = { + company_id?: number; +}; +/** @returns {TransformEventData} */ +declare function TransformEventData(): TransformEventData; +type TransformEventData = { + company_id?: number; + contains?: string[]; + event?: InternalTransformEvent; + payload?: any; +}; +/** @returns {TransformEventRequest} */ +declare function TransformEventRequest(): TransformEventRequest; +type TransformEventRequest = { + event?: EventSchema; + event_category?: string; + event_name?: string; + event_type?: string; + event_version?: string; +}; +/** @returns {TransformEventResponse} */ +declare function TransformEventResponse(): TransformEventResponse; +type TransformEventResponse = { + association?: TransformEventAssociation; + data?: TransformEventData; + event_name?: string; + event_trace_id?: string[]; + event_type?: string; + service_meta?: TransformEventServiceMeta; + status?: boolean; + version?: string; +}; +/** @returns {TransformEventServiceMeta} */ +declare function TransformEventServiceMeta(): TransformEventServiceMeta; +type TransformEventServiceMeta = { + name?: string; +}; +/** @returns {ValidateSchemaRequest} */ +declare function ValidateSchemaRequest(): ValidateSchemaRequest; +type ValidateSchemaRequest = { + event?: EventSchema; + event_category?: string; + event_name?: string; + event_schema?: any; + event_type?: string; + event_version?: string; +}; +/** @returns {ValidateSchemaResponse} */ +declare function ValidateSchemaResponse(): ValidateSchemaResponse; +type ValidateSchemaResponse = { + message?: string; + status?: boolean; +}; diff --git a/sdk/public/Webhook/WebhookPublicModel.js b/sdk/public/Webhook/WebhookPublicModel.js index 2a164992b..d93e7f623 100644 --- a/sdk/public/Webhook/WebhookPublicModel.js +++ b/sdk/public/Webhook/WebhookPublicModel.js @@ -7,8 +7,10 @@ const Joi = require("joi"); * @property {string} [display_name] * @property {string} [event_category] * @property {string} [event_name] + * @property {Object} [event_schema] * @property {string} [event_type] * @property {number} [id] + * @property {string} [updated_on] * @property {string} [version] */ @@ -25,17 +27,95 @@ const Joi = require("joi"); * @property {EventConfig[]} [event_configs] */ +/** + * @typedef EventNotifier + * @property {string[]} [emails] + * @property {string} [message] + */ + +/** + * @typedef EventSchema + * @property {Object} [meta] + * @property {Object} [payload] + */ + +/** + * @typedef InternalTransformEvent + * @property {number} [created_timestamp] + * @property {string} [name] + * @property {string[]} [trace_id] + * @property {string} [type] + * @property {string} [version] + */ + +/** + * @typedef TransformEventAssociation + * @property {number} [company_id] + */ + +/** + * @typedef TransformEventData + * @property {number} [company_id] + * @property {string[]} [contains] + * @property {InternalTransformEvent} [event] + * @property {Object} [payload] + */ + +/** + * @typedef TransformEventRequest + * @property {EventSchema} [event] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {string} [event_type] + * @property {string} [event_version] + */ + +/** + * @typedef TransformEventResponse + * @property {TransformEventAssociation} [association] + * @property {TransformEventData} [data] + * @property {string} [event_name] + * @property {string[]} [event_trace_id] + * @property {string} [event_type] + * @property {TransformEventServiceMeta} [service_meta] + * @property {boolean} [status] + * @property {string} [version] + */ + +/** + * @typedef TransformEventServiceMeta + * @property {string} [name] + */ + +/** + * @typedef ValidateSchemaRequest + * @property {EventSchema} [event] + * @property {string} [event_category] + * @property {string} [event_name] + * @property {Object} [event_schema] + * @property {string} [event_type] + * @property {string} [event_version] + */ + +/** + * @typedef ValidateSchemaResponse + * @property {string} [message] + * @property {boolean} [status] + */ + class WebhookPublicModel { /** @returns {EventConfig} */ static EventConfig() { return Joi.object({ created_on: Joi.string().allow(""), - description: Joi.string().allow(""), + description: Joi.string().allow("").allow(null), display_name: Joi.string().allow(""), event_category: Joi.string().allow(""), event_name: Joi.string().allow(""), + event_schema: Joi.object().pattern(/\S/, Joi.any()), event_type: Joi.string().allow(""), id: Joi.number(), + updated_on: Joi.string().allow(""), version: Joi.string().allow(""), }); } @@ -56,5 +136,101 @@ class WebhookPublicModel { event_configs: Joi.array().items(WebhookPublicModel.EventConfig()), }); } + + /** @returns {EventNotifier} */ + static EventNotifier() { + return Joi.object({ + emails: Joi.array().items(Joi.string().allow("")), + message: Joi.string().allow(""), + }); + } + + /** @returns {EventSchema} */ + static EventSchema() { + return Joi.object({ + meta: Joi.object().pattern(/\S/, Joi.any()), + payload: Joi.object().pattern(/\S/, Joi.any()), + }); + } + + /** @returns {InternalTransformEvent} */ + static InternalTransformEvent() { + return Joi.object({ + created_timestamp: Joi.number(), + name: Joi.string().allow(""), + trace_id: Joi.array().items(Joi.string().allow("")), + type: Joi.string().allow(""), + version: Joi.string().allow(""), + }); + } + + /** @returns {TransformEventAssociation} */ + static TransformEventAssociation() { + return Joi.object({ + company_id: Joi.number(), + }); + } + + /** @returns {TransformEventData} */ + static TransformEventData() { + return Joi.object({ + company_id: Joi.number(), + contains: Joi.array().items(Joi.string().allow("")), + event: WebhookPublicModel.InternalTransformEvent(), + payload: Joi.object().pattern(/\S/, Joi.any()), + }); + } + + /** @returns {TransformEventRequest} */ + static TransformEventRequest() { + return Joi.object({ + event: WebhookPublicModel.EventSchema(), + event_category: Joi.string().allow(""), + event_name: Joi.string().allow(""), + event_type: Joi.string().allow(""), + event_version: Joi.string().allow(""), + }); + } + + /** @returns {TransformEventResponse} */ + static TransformEventResponse() { + return Joi.object({ + association: WebhookPublicModel.TransformEventAssociation(), + data: WebhookPublicModel.TransformEventData(), + event_name: Joi.string().allow(""), + event_trace_id: Joi.array().items(Joi.string().allow("")), + event_type: Joi.string().allow(""), + service_meta: WebhookPublicModel.TransformEventServiceMeta(), + status: Joi.boolean(), + version: Joi.string().allow(""), + }); + } + + /** @returns {TransformEventServiceMeta} */ + static TransformEventServiceMeta() { + return Joi.object({ + name: Joi.string().allow(""), + }); + } + + /** @returns {ValidateSchemaRequest} */ + static ValidateSchemaRequest() { + return Joi.object({ + event: WebhookPublicModel.EventSchema(), + event_category: Joi.string().allow(""), + event_name: Joi.string().allow(""), + event_schema: Joi.object().pattern(/\S/, Joi.any()), + event_type: Joi.string().allow(""), + event_version: Joi.string().allow(""), + }); + } + + /** @returns {ValidateSchemaResponse} */ + static ValidateSchemaResponse() { + return Joi.object({ + message: Joi.string().allow(""), + status: Joi.boolean(), + }); + } } module.exports = WebhookPublicModel; diff --git a/sdk/public/Webhook/WebhookPublicValidator.d.ts b/sdk/public/Webhook/WebhookPublicValidator.d.ts index 2dbef1fbe..b3b0055e2 100644 --- a/sdk/public/Webhook/WebhookPublicValidator.d.ts +++ b/sdk/public/Webhook/WebhookPublicValidator.d.ts @@ -1,20 +1,42 @@ export = WebhookPublicValidator; /** @typedef FetchAllWebhookEventsParam */ +/** @typedef NotifyDepricatedEventParam */ /** * @typedef QueryWebhookEventDetailsParam * @property {WebhookPublicModel.EventConfigBase[]} body */ +/** + * @typedef TestHandlerTransformationParam + * @property {WebhookPublicModel.TransformEventRequest} body + */ +/** + * @typedef ValidateSchemaParam + * @property {WebhookPublicModel.ValidateSchemaRequest} body + */ declare class WebhookPublicValidator { /** @returns {FetchAllWebhookEventsParam} */ static fetchAllWebhookEvents(): any; + /** @returns {NotifyDepricatedEventParam} */ + static notifyDepricatedEvent(): any; /** @returns {QueryWebhookEventDetailsParam} */ static queryWebhookEventDetails(): QueryWebhookEventDetailsParam; + /** @returns {TestHandlerTransformationParam} */ + static testHandlerTransformation(): TestHandlerTransformationParam; + /** @returns {ValidateSchemaParam} */ + static validateSchema(): ValidateSchemaParam; } declare namespace WebhookPublicValidator { - export { FetchAllWebhookEventsParam, QueryWebhookEventDetailsParam }; + export { FetchAllWebhookEventsParam, NotifyDepricatedEventParam, QueryWebhookEventDetailsParam, TestHandlerTransformationParam, ValidateSchemaParam }; } type QueryWebhookEventDetailsParam = { body: WebhookPublicModel.EventConfigBase[]; }; +type TestHandlerTransformationParam = { + body: WebhookPublicModel.TransformEventRequest; +}; +type ValidateSchemaParam = { + body: WebhookPublicModel.ValidateSchemaRequest; +}; type FetchAllWebhookEventsParam = any; +type NotifyDepricatedEventParam = any; import WebhookPublicModel = require("./WebhookPublicModel"); diff --git a/sdk/public/Webhook/WebhookPublicValidator.js b/sdk/public/Webhook/WebhookPublicValidator.js index bead5b0e9..95f9e9198 100644 --- a/sdk/public/Webhook/WebhookPublicValidator.js +++ b/sdk/public/Webhook/WebhookPublicValidator.js @@ -4,23 +4,54 @@ const WebhookPublicModel = require("./WebhookPublicModel"); /** @typedef FetchAllWebhookEventsParam */ +/** @typedef NotifyDepricatedEventParam */ + /** * @typedef QueryWebhookEventDetailsParam * @property {WebhookPublicModel.EventConfigBase[]} body */ +/** + * @typedef TestHandlerTransformationParam + * @property {WebhookPublicModel.TransformEventRequest} body + */ + +/** + * @typedef ValidateSchemaParam + * @property {WebhookPublicModel.ValidateSchemaRequest} body + */ + class WebhookPublicValidator { /** @returns {FetchAllWebhookEventsParam} */ static fetchAllWebhookEvents() { return Joi.object({}); } + /** @returns {NotifyDepricatedEventParam} */ + static notifyDepricatedEvent() { + return Joi.object({}); + } + /** @returns {QueryWebhookEventDetailsParam} */ static queryWebhookEventDetails() { return Joi.object({ body: Joi.array().items(WebhookPublicModel.EventConfigBase()).required(), }).required(); } + + /** @returns {TestHandlerTransformationParam} */ + static testHandlerTransformation() { + return Joi.object({ + body: WebhookPublicModel.TransformEventRequest().required(), + }).required(); + } + + /** @returns {ValidateSchemaParam} */ + static validateSchema() { + return Joi.object({ + body: WebhookPublicModel.ValidateSchemaRequest().required(), + }).required(); + } } module.exports = WebhookPublicValidator; diff --git a/sdk/public/index.d.ts b/sdk/public/index.d.ts index 61838ab38..429c6d6cd 100644 --- a/sdk/public/index.d.ts +++ b/sdk/public/index.d.ts @@ -1,7 +1,9 @@ export const PublicConfig: typeof import("./PublicConfig"); export const PublicClient: typeof import("./PublicClient"); export namespace PublicModel { + const BillingPublicModel: typeof import("./Billing/BillingPublicModel"); const ConfigurationPublicModel: typeof import("./Configuration/ConfigurationPublicModel"); + const ContentPublicModel: typeof import("./Content/ContentPublicModel"); const InventoryPublicModel: typeof import("./Inventory/InventoryPublicModel"); const PartnerPublicModel: typeof import("./Partner/PartnerPublicModel"); const WebhookPublicModel: typeof import("./Webhook/WebhookPublicModel"); diff --git a/sdk/public/index.js b/sdk/public/index.js index d791aeb40..3d76ce35b 100644 --- a/sdk/public/index.js +++ b/sdk/public/index.js @@ -2,8 +2,12 @@ module.exports = { PublicConfig: require("./PublicConfig"), PublicClient: require("./PublicClient"), PublicModel: { + BillingPublicModel: require("./Billing/BillingPublicModel"), + ConfigurationPublicModel: require("./Configuration/ConfigurationPublicModel"), + ContentPublicModel: require("./Content/ContentPublicModel"), + InventoryPublicModel: require("./Inventory/InventoryPublicModel"), PartnerPublicModel: require("./Partner/PartnerPublicModel"),