@gofynd/fdk-client-javascript 0.1.37 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/application.d.ts +2 -1
- package/application.js +2 -1
- package/documentation/application/CART.md +315 -289
- package/documentation/application/CATALOG.md +438 -415
- package/documentation/application/FILESTORAGE.md +2 -0
- package/documentation/application/LEAD.md +18 -18
- package/documentation/application/LOGISTIC.md +45 -45
- package/documentation/application/ORDER.md +277 -277
- package/documentation/application/PAYMENT.md +251 -251
- package/documentation/application/POSCART.md +318 -292
- package/documentation/application/REWARDS.md +1 -0
- package/documentation/application/USER.md +19 -14
- package/documentation/platform/CART.md +465 -462
- package/documentation/platform/CATALOG.md +2792 -2711
- package/documentation/platform/COMPANYPROFILE.md +200 -362
- package/documentation/platform/DISCOUNT.md +86 -0
- package/documentation/platform/FILESTORAGE.md +2 -0
- package/documentation/platform/LEAD.md +60 -60
- package/documentation/platform/ORDER.md +1451 -1654
- package/documentation/platform/PAYMENT.md +94 -94
- package/documentation/platform/REWARDS.md +145 -0
- package/documentation/platform/USER.md +24 -14
- package/index.d.ts +4 -1
- package/index.js +13 -4
- package/package.json +9 -9
- package/platform.d.ts +2 -1
- package/platform.js +3 -2
- package/public.d.ts +1 -0
- package/public.js +3 -2
- package/sdk/application/ApplicationAPIClient.js +3 -1
- package/sdk/application/ApplicationClient.d.ts +16 -16
- package/sdk/application/ApplicationClient.js +32 -16
- package/sdk/application/ApplicationConfig.js +3 -2
- package/sdk/application/ApplicationModels.d.ts +0 -832
- package/sdk/application/ApplicationModels.js +3 -10574
- package/sdk/application/{client → Cart}/CartApplicationClient.d.ts +9 -3
- package/sdk/application/{client → Cart}/CartApplicationClient.js +316 -8
- package/sdk/application/Cart/CartApplicationModel.d.ts +81 -0
- package/sdk/application/Cart/CartApplicationModel.js +1136 -0
- package/sdk/application/{models/CartValidator.js → Cart/CartApplicationValidator.js} +17 -12
- package/sdk/application/{client → Catalog}/CatalogApplicationClient.d.ts +8 -5
- package/sdk/application/{client → Catalog}/CatalogApplicationClient.js +389 -8
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +117 -0
- package/sdk/application/Catalog/CatalogApplicationModel.js +1606 -0
- package/sdk/application/{models/CatalogValidator.js → Catalog/CatalogApplicationValidator.js} +4 -1
- package/sdk/application/{client → Common}/CommonApplicationClient.js +24 -2
- package/sdk/application/Common/CommonApplicationModel.d.ts +20 -0
- package/sdk/application/Common/CommonApplicationModel.js +228 -0
- package/sdk/{platform/models/CommonValidator.js → application/Common/CommonApplicationValidator.js} +3 -1
- package/sdk/application/{client → Communication}/CommunicationApplicationClient.js +43 -2
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +15 -0
- package/sdk/application/Communication/CommunicationApplicationModel.js +144 -0
- package/sdk/application/{models/CommunicationValidator.js → Communication/CommunicationApplicationValidator.js} +5 -3
- package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.js +202 -2
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +111 -0
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1182 -0
- package/sdk/application/{models/ConfigurationValidator.js → Configuration/ConfigurationApplicationValidator.js} +4 -2
- package/sdk/application/{client → Content}/ContentApplicationClient.js +217 -2
- package/sdk/application/Content/ContentApplicationModel.d.ts +105 -0
- package/sdk/application/Content/ContentApplicationModel.js +1349 -0
- package/sdk/application/{models/ContentValidator.js → Content/ContentApplicationValidator.js} +3 -1
- package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.js +35 -2
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +21 -0
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +244 -0
- package/sdk/application/{models/FileStorageValidator.js → FileStorage/FileStorageApplicationValidator.js} +6 -4
- package/sdk/application/{client → Lead}/LeadApplicationClient.js +83 -2
- package/sdk/application/Lead/LeadApplicationModel.d.ts +55 -0
- package/sdk/application/Lead/LeadApplicationModel.js +690 -0
- package/sdk/application/{models/LeadValidator.js → Lead/LeadApplicationValidator.js} +6 -4
- package/sdk/application/{client → Logistic}/LogisticApplicationClient.js +46 -2
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +26 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +286 -0
- package/sdk/application/{models/LogisticValidator.js → Logistic/LogisticApplicationValidator.js} +5 -3
- package/sdk/application/{client → Order}/OrderApplicationClient.js +148 -2
- package/sdk/application/Order/OrderApplicationModel.d.ts +67 -0
- package/sdk/application/Order/OrderApplicationModel.js +872 -0
- package/sdk/application/{models/OrderValidator.js → Order/OrderApplicationValidator.js} +5 -3
- package/sdk/application/{client → Payment}/PaymentApplicationClient.js +530 -2
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +96 -0
- package/sdk/application/Payment/PaymentApplicationModel.js +1318 -0
- package/sdk/application/{models/PaymentValidator.js → Payment/PaymentApplicationValidator.js} +25 -23
- package/sdk/application/{client → PosCart}/PosCartApplicationClient.d.ts +9 -3
- package/sdk/application/{client → PosCart}/PosCartApplicationClient.js +343 -8
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +79 -0
- package/sdk/application/PosCart/PosCartApplicationModel.js +1132 -0
- package/sdk/application/{models/PosCartValidator.js → PosCart/PosCartApplicationValidator.js} +18 -13
- package/sdk/application/{client → Rewards}/RewardsApplicationClient.js +83 -2
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +23 -0
- package/sdk/application/Rewards/RewardsApplicationModel.js +276 -0
- package/sdk/application/{models/RewardsValidator.js → Rewards/RewardsApplicationValidator.js} +6 -4
- package/sdk/application/{client → Share}/ShareApplicationClient.js +89 -2
- package/sdk/application/Share/ShareApplicationModel.d.ts +16 -0
- package/sdk/application/Share/ShareApplicationModel.js +178 -0
- package/sdk/application/{models/ShareValidator.js → Share/ShareApplicationValidator.js} +4 -2
- package/sdk/application/{client → Theme}/ThemeApplicationClient.js +46 -2
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +49 -0
- package/sdk/application/Theme/ThemeApplicationModel.js +486 -0
- package/sdk/application/{models/ThemeValidator.js → Theme/ThemeApplicationValidator.js} +3 -1
- package/sdk/application/{client → User}/UserApplicationClient.js +407 -2
- package/sdk/application/User/UserApplicationModel.d.ts +95 -0
- package/sdk/application/User/UserApplicationModel.js +998 -0
- package/sdk/application/{models/UserValidator.js → User/UserApplicationValidator.js} +31 -29
- package/sdk/application/index.d.ts +18 -0
- package/sdk/application/index.js +33 -0
- package/sdk/common/AxiosHelper.js +23 -10
- package/sdk/common/Logger.d.ts +2 -0
- package/sdk/common/Logger.js +6 -0
- package/sdk/common/curlHelper.d.ts +2 -0
- package/sdk/common/curlHelper.js +95 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +101 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +399 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +11 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +56 -0
- package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.js +60 -2
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +23 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +252 -0
- package/sdk/platform/{models/AnalyticsValidator.js → Analytics/AnalyticsPlatformValidator.js} +5 -4
- package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.js +48 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +18 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +144 -0
- package/sdk/platform/{models/AuditTrailValidator.js → AuditTrail/AuditTrailPlatformValidator.js} +3 -2
- package/sdk/platform/{client → Billing}/BillingPlatformClient.js +162 -2
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +65 -0
- package/sdk/platform/Billing/BillingPlatformModel.js +906 -0
- package/sdk/platform/{models/BillingValidator.js → Billing/BillingPlatformValidator.js} +6 -5
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +293 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1001 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +20 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +138 -0
- package/sdk/platform/Cart/CartPlatformModel.d.ts +104 -0
- package/sdk/platform/Cart/CartPlatformModel.js +1516 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +856 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2927 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +56 -0
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +389 -0
- package/sdk/platform/{client → Catalog}/CatalogPlatformClient.js +1402 -349
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +317 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4702 -0
- package/sdk/platform/{models/CatalogValidator.js → Catalog/CatalogPlatformValidator.js} +92 -91
- package/sdk/platform/{client → Common}/CommonPlatformClient.js +28 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +20 -0
- package/sdk/platform/Common/CommonPlatformModel.js +228 -0
- package/sdk/{application/models/CommonValidator.js → platform/Common/CommonPlatformValidator.js} +2 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +611 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2243 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +43 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +277 -0
- package/sdk/platform/{client → Communication}/CommunicationPlatformClient.js +17 -2
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +102 -0
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1312 -0
- package/sdk/platform/{models/CommunicationValidator.js → Communication/CommunicationPlatformValidator.js} +2 -1
- package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.d.ts +0 -9
- package/sdk/platform/{client → CompanyProfile}/CompanyProfilePlatformClient.js +176 -28
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +44 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +706 -0
- package/sdk/platform/{models/CompanyProfileValidator.d.ts → CompanyProfile/CompanyProfilePlatformValidator.d.ts} +0 -1
- package/sdk/platform/{models/CompanyProfileValidator.js → CompanyProfile/CompanyProfilePlatformValidator.js} +9 -14
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +309 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1322 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +31 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +164 -0
- package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.js +284 -2
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +185 -0
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2072 -0
- package/sdk/platform/{models/ConfigurationValidator.js → Configuration/ConfigurationPlatformValidator.js} +9 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +781 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3074 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +71 -0
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +422 -0
- package/sdk/platform/Content/ContentPlatformModel.d.ts +105 -0
- package/sdk/platform/Content/ContentPlatformModel.js +1349 -0
- package/sdk/platform/{client → Discount}/DiscountPlatformClient.d.ts +11 -0
- package/sdk/platform/{client → Discount}/DiscountPlatformClient.js +187 -2
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +15 -0
- package/sdk/platform/Discount/DiscountPlatformModel.js +176 -0
- package/sdk/platform/{models/DiscountValidator.d.ts → Discount/DiscountPlatformValidator.d.ts} +1 -0
- package/sdk/platform/{models/DiscountValidator.js → Discount/DiscountPlatformValidator.js} +13 -5
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +114 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +301 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +38 -0
- package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.js +78 -2
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +21 -0
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +244 -0
- package/sdk/platform/{models/FileStorageValidator.js → FileStorage/FileStoragePlatformValidator.js} +6 -5
- package/sdk/platform/{client → Inventory}/InventoryPlatformClient.js +163 -2
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +62 -0
- package/sdk/platform/Inventory/InventoryPlatformModel.js +1178 -0
- package/sdk/platform/{models/InventoryValidator.js → Inventory/InventoryPlatformValidator.js} +5 -4
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +138 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +559 -0
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +16 -0
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +90 -0
- package/sdk/platform/{client → Lead}/LeadPlatformClient.js +142 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +55 -0
- package/sdk/platform/Lead/LeadPlatformModel.js +690 -0
- package/sdk/platform/{models/LeadValidator.js → Lead/LeadPlatformValidator.js} +7 -6
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +59 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +207 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +6 -0
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +37 -0
- package/sdk/platform/{client → Order}/OrderPlatformClient.d.ts +24 -55
- package/sdk/platform/{client → Order}/OrderPlatformClient.js +693 -146
- package/sdk/platform/Order/OrderPlatformModel.d.ts +222 -0
- package/sdk/platform/Order/OrderPlatformModel.js +3466 -0
- package/sdk/platform/{models/OrderValidator.d.ts → Order/OrderPlatformValidator.d.ts} +2 -3
- package/sdk/platform/{models/OrderValidator.js → Order/OrderPlatformValidator.js} +32 -48
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +30 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +100 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +20 -0
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +7 -0
- package/sdk/platform/Partner/PartnerPlatformModel.js +54 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +108 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +498 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +14 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +73 -0
- package/sdk/platform/{client → Payment}/PaymentPlatformClient.js +141 -2
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +44 -0
- package/sdk/platform/Payment/PaymentPlatformModel.js +552 -0
- package/sdk/platform/{models/PaymentValidator.js → Payment/PaymentPlatformValidator.js} +6 -5
- package/sdk/platform/PlatformAPIClient.js +2 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +2824 -18486
- package/sdk/platform/PlatformApplicationClient.js +3772 -13928
- package/sdk/platform/PlatformClient.d.ts +2824 -2881
- package/sdk/platform/PlatformClient.js +3710 -3145
- package/sdk/platform/PlatformConfig.js +2 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +150 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +597 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +16 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +91 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +24 -0
- package/sdk/platform/Rewards/RewardsPlatformModel.js +294 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +72 -0
- package/sdk/platform/Share/SharePlatformApplicationClient.js +235 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +7 -0
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +35 -0
- package/sdk/platform/Share/SharePlatformModel.d.ts +15 -0
- package/sdk/platform/Share/SharePlatformModel.js +170 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +238 -0
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +997 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +27 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +155 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +49 -0
- package/sdk/platform/Theme/ThemePlatformModel.js +486 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +121 -0
- package/sdk/platform/User/UserPlatformApplicationClient.js +506 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +15 -0
- package/sdk/platform/User/UserPlatformApplicationValidator.js +79 -0
- package/sdk/platform/User/UserPlatformModel.d.ts +95 -0
- package/sdk/platform/User/UserPlatformModel.js +998 -0
- package/sdk/platform/{client → Webhook}/WebhookPlatformClient.js +92 -2
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +17 -0
- package/sdk/platform/Webhook/WebhookPlatformModel.js +208 -0
- package/sdk/platform/{models/WebhookValidator.js → Webhook/WebhookPlatformValidator.js} +4 -3
- package/sdk/platform/index.d.ts +24 -0
- package/sdk/platform/index.js +45 -0
- package/sdk/public/{client → Configuration}/ConfigurationPublicClient.js +26 -1
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +20 -0
- package/sdk/public/Configuration/ConfigurationPublicModel.js +230 -0
- package/sdk/public/{models/ConfigurationValidator.js → Configuration/ConfigurationPublicValidator.js} +3 -1
- package/sdk/public/{client → Inventory}/InventoryPublicClient.js +76 -1
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +22 -0
- package/sdk/public/Inventory/InventoryPublicModel.js +334 -0
- package/sdk/public/{models/InventoryValidator.js → Inventory/InventoryPublicValidator.js} +4 -2
- package/sdk/public/PublicClient.d.ts +3 -3
- package/sdk/public/PublicClient.js +8 -3
- package/sdk/public/{client → Webhook}/WebhookPublicClient.js +30 -1
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +17 -0
- package/sdk/public/Webhook/WebhookPublicModel.js +208 -0
- package/sdk/public/{models/WebhookValidator.js → Webhook/WebhookPublicValidator.js} +4 -2
- package/sdk/public/index.d.ts +5 -0
- package/sdk/public/index.js +7 -0
- package/sdk/platform/PlatformApplicationModels.d.ts +0 -328
- package/sdk/platform/PlatformApplicationModels.js +0 -22658
- package/sdk/platform/PlatformModels.d.ts +0 -1477
- package/sdk/platform/PlatformModels.js +0 -20646
- package/sdk/platform/models/CartValidator.d.ts +0 -0
- package/sdk/platform/models/CartValidator.js +0 -0
- package/sdk/platform/models/ContentValidator.d.ts +0 -0
- package/sdk/platform/models/ContentValidator.js +0 -0
- package/sdk/platform/models/PartnerValidator.d.ts +0 -0
- package/sdk/platform/models/PartnerValidator.js +0 -0
- package/sdk/platform/models/RewardsValidator.d.ts +0 -0
- package/sdk/platform/models/RewardsValidator.js +0 -0
- package/sdk/platform/models/ShareValidator.d.ts +0 -0
- package/sdk/platform/models/ShareValidator.js +0 -0
- package/sdk/platform/models/ThemeValidator.d.ts +0 -0
- package/sdk/platform/models/ThemeValidator.js +0 -0
- package/sdk/platform/models/UserValidator.d.ts +0 -0
- package/sdk/platform/models/UserValidator.js +0 -0
- package/sdk/public/PublicModels.d.ts +0 -50
- package/sdk/public/PublicModels.js +0 -712
- package/sdk/application/{models/CartValidator.d.ts → Cart/CartApplicationValidator.d.ts} +0 -0
- package/sdk/application/{models/CatalogValidator.d.ts → Catalog/CatalogApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Common}/CommonApplicationClient.d.ts +0 -0
- package/sdk/application/{models/CommonValidator.d.ts → Common/CommonApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Communication}/CommunicationApplicationClient.d.ts +0 -0
- package/sdk/application/{models/CommunicationValidator.d.ts → Communication/CommunicationApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.d.ts +0 -0
- package/sdk/application/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Content}/ContentApplicationClient.d.ts +0 -0
- package/sdk/application/{models/ContentValidator.d.ts → Content/ContentApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.d.ts +0 -0
- package/sdk/application/{models/FileStorageValidator.d.ts → FileStorage/FileStorageApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Lead}/LeadApplicationClient.d.ts +0 -0
- package/sdk/application/{models/LeadValidator.d.ts → Lead/LeadApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Logistic}/LogisticApplicationClient.d.ts +0 -0
- package/sdk/application/{models/LogisticValidator.d.ts → Logistic/LogisticApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Order}/OrderApplicationClient.d.ts +0 -0
- package/sdk/application/{models/OrderValidator.d.ts → Order/OrderApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Payment}/PaymentApplicationClient.d.ts +0 -0
- package/sdk/application/{models/PaymentValidator.d.ts → Payment/PaymentApplicationValidator.d.ts} +0 -0
- package/sdk/application/{models/PosCartValidator.d.ts → PosCart/PosCartApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Rewards}/RewardsApplicationClient.d.ts +0 -0
- package/sdk/application/{models/RewardsValidator.d.ts → Rewards/RewardsApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Share}/ShareApplicationClient.d.ts +0 -0
- package/sdk/application/{models/ShareValidator.d.ts → Share/ShareApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → Theme}/ThemeApplicationClient.d.ts +0 -0
- package/sdk/application/{models/ThemeValidator.d.ts → Theme/ThemeApplicationValidator.d.ts} +0 -0
- package/sdk/application/{client → User}/UserApplicationClient.d.ts +0 -0
- package/sdk/application/{models/UserValidator.d.ts → User/UserApplicationValidator.d.ts} +0 -0
- package/sdk/platform/{client → Analytics}/AnalyticsPlatformClient.d.ts +0 -0
- package/sdk/platform/{models/AnalyticsValidator.d.ts → Analytics/AnalyticsPlatformValidator.d.ts} +0 -0
- package/sdk/platform/{client → AuditTrail}/AuditTrailPlatformClient.d.ts +0 -0
- package/sdk/platform/{models/AuditTrailValidator.d.ts → AuditTrail/AuditTrailPlatformValidator.d.ts} +0 -0
- package/sdk/platform/{client → Billing}/BillingPlatformClient.d.ts +0 -0
- package/sdk/platform/{models/BillingValidator.d.ts → Billing/BillingPlatformValidator.d.ts} +0 -0
- package/sdk/platform/{client → Catalog}/CatalogPlatformClient.d.ts +149 -149
- package/sdk/platform/{models/CatalogValidator.d.ts → Catalog/CatalogPlatformValidator.d.ts} +21 -21
- /package/sdk/platform/{client → Common}/CommonPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/CommonValidator.d.ts → Common/CommonPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Communication}/CommunicationPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/CommunicationValidator.d.ts → Communication/CommunicationPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Configuration}/ConfigurationPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → FileStorage}/FileStoragePlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/FileStorageValidator.d.ts → FileStorage/FileStoragePlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Inventory}/InventoryPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/InventoryValidator.d.ts → Inventory/InventoryPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Lead}/LeadPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/LeadValidator.d.ts → Lead/LeadPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Payment}/PaymentPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/PaymentValidator.d.ts → Payment/PaymentPlatformValidator.d.ts} +0 -0
- /package/sdk/platform/{client → Webhook}/WebhookPlatformClient.d.ts +0 -0
- /package/sdk/platform/{models/WebhookValidator.d.ts → Webhook/WebhookPlatformValidator.d.ts} +0 -0
- /package/sdk/public/{client → Configuration}/ConfigurationPublicClient.d.ts +0 -0
- /package/sdk/public/{models/ConfigurationValidator.d.ts → Configuration/ConfigurationPublicValidator.d.ts} +0 -0
- /package/sdk/public/{client → Inventory}/InventoryPublicClient.d.ts +0 -0
- /package/sdk/public/{models/InventoryValidator.d.ts → Inventory/InventoryPublicValidator.d.ts} +0 -0
- /package/sdk/public/{client → Webhook}/WebhookPublicClient.d.ts +0 -0
- /package/sdk/public/{models/WebhookValidator.d.ts → Webhook/WebhookPublicValidator.d.ts} +0 -0
|
@@ -1,43 +1,12 @@
|
|
|
1
1
|
const Paginator = require("../../common/Paginator");
|
|
2
|
-
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
|
-
const
|
|
3
|
+
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
4
|
+
const CatalogValidator = require("./CatalogPlatformValidator");
|
|
5
5
|
class Catalog {
|
|
6
6
|
constructor(config) {
|
|
7
7
|
this.config = config;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* @param {Object} arg - Arg object.
|
|
12
|
-
* @param {ProductBundleRequest} arg.body
|
|
13
|
-
* @summary: Create Product Bundle
|
|
14
|
-
* @description: Create Product Bundle. See `ProductBundleRequest` for the request body parameter need to create a product bundle. On successful request, returns in `ProductBundleRequest` with id
|
|
15
|
-
*/
|
|
16
|
-
createProductBundle({ body } = {}) {
|
|
17
|
-
const { error } = CatalogValidator.createProductBundle().validate(
|
|
18
|
-
{
|
|
19
|
-
body,
|
|
20
|
-
},
|
|
21
|
-
{ abortEarly: false, allowUnknown: true }
|
|
22
|
-
);
|
|
23
|
-
if (error) {
|
|
24
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const query_params = {};
|
|
28
|
-
|
|
29
|
-
const xHeaders = {};
|
|
30
|
-
|
|
31
|
-
return PlatformAPIClient.execute(
|
|
32
|
-
this.config,
|
|
33
|
-
"post",
|
|
34
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/`,
|
|
35
|
-
query_params,
|
|
36
|
-
body,
|
|
37
|
-
xHeaders
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
10
|
/**
|
|
42
11
|
* @param {Object} arg - Arg object.
|
|
43
12
|
* @param {string} [arg.q] - A search string that is searched with product
|
|
@@ -58,6 +27,19 @@ class Catalog {
|
|
|
58
27
|
return Promise.reject(new FDKClientValidationError(error));
|
|
59
28
|
}
|
|
60
29
|
|
|
30
|
+
// Showing warrnings if extra unknown parameters are found
|
|
31
|
+
const { error: warrning } = CatalogValidator.getProductBundle().validate(
|
|
32
|
+
{
|
|
33
|
+
q,
|
|
34
|
+
slug,
|
|
35
|
+
},
|
|
36
|
+
{ abortEarly: false, allowUnknown: false }
|
|
37
|
+
);
|
|
38
|
+
if (warrning) {
|
|
39
|
+
console.log("Parameter Validation warrnings for getProductBundle");
|
|
40
|
+
console.log(warrning);
|
|
41
|
+
}
|
|
42
|
+
|
|
61
43
|
const query_params = {};
|
|
62
44
|
query_params["q"] = q;
|
|
63
45
|
query_params["slug"] = slug;
|
|
@@ -76,16 +58,13 @@ class Catalog {
|
|
|
76
58
|
|
|
77
59
|
/**
|
|
78
60
|
* @param {Object} arg - Arg object.
|
|
79
|
-
* @param {
|
|
80
|
-
*
|
|
81
|
-
* @
|
|
82
|
-
* @summary: Update a Product Bundle
|
|
83
|
-
* @description: Update a Product Bundle by its id. On successful request, returns the updated product bundle
|
|
61
|
+
* @param {ProductBundleRequest} arg.body
|
|
62
|
+
* @summary: Create Product Bundle
|
|
63
|
+
* @description: Create Product Bundle. See `ProductBundleRequest` for the request body parameter need to create a product bundle. On successful request, returns in `ProductBundleRequest` with id
|
|
84
64
|
*/
|
|
85
|
-
|
|
86
|
-
const { error } = CatalogValidator.
|
|
65
|
+
createProductBundle({ body } = {}) {
|
|
66
|
+
const { error } = CatalogValidator.createProductBundle().validate(
|
|
87
67
|
{
|
|
88
|
-
id,
|
|
89
68
|
body,
|
|
90
69
|
},
|
|
91
70
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -94,14 +73,26 @@ class Catalog {
|
|
|
94
73
|
return Promise.reject(new FDKClientValidationError(error));
|
|
95
74
|
}
|
|
96
75
|
|
|
76
|
+
// Showing warrnings if extra unknown parameters are found
|
|
77
|
+
const { error: warrning } = CatalogValidator.createProductBundle().validate(
|
|
78
|
+
{
|
|
79
|
+
body,
|
|
80
|
+
},
|
|
81
|
+
{ abortEarly: false, allowUnknown: false }
|
|
82
|
+
);
|
|
83
|
+
if (warrning) {
|
|
84
|
+
console.log("Parameter Validation warrnings for createProductBundle");
|
|
85
|
+
console.log(warrning);
|
|
86
|
+
}
|
|
87
|
+
|
|
97
88
|
const query_params = {};
|
|
98
89
|
|
|
99
90
|
const xHeaders = {};
|
|
100
91
|
|
|
101
92
|
return PlatformAPIClient.execute(
|
|
102
93
|
this.config,
|
|
103
|
-
"
|
|
104
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle
|
|
94
|
+
"post",
|
|
95
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/`,
|
|
105
96
|
query_params,
|
|
106
97
|
body,
|
|
107
98
|
xHeaders
|
|
@@ -126,6 +117,20 @@ class Catalog {
|
|
|
126
117
|
return Promise.reject(new FDKClientValidationError(error));
|
|
127
118
|
}
|
|
128
119
|
|
|
120
|
+
// Showing warrnings if extra unknown parameters are found
|
|
121
|
+
const {
|
|
122
|
+
error: warrning,
|
|
123
|
+
} = CatalogValidator.getProductBundleDetail().validate(
|
|
124
|
+
{
|
|
125
|
+
id,
|
|
126
|
+
},
|
|
127
|
+
{ abortEarly: false, allowUnknown: false }
|
|
128
|
+
);
|
|
129
|
+
if (warrning) {
|
|
130
|
+
console.log("Parameter Validation warrnings for getProductBundleDetail");
|
|
131
|
+
console.log(warrning);
|
|
132
|
+
}
|
|
133
|
+
|
|
129
134
|
const query_params = {};
|
|
130
135
|
|
|
131
136
|
const xHeaders = {};
|
|
@@ -142,13 +147,16 @@ class Catalog {
|
|
|
142
147
|
|
|
143
148
|
/**
|
|
144
149
|
* @param {Object} arg - Arg object.
|
|
145
|
-
* @param {
|
|
146
|
-
*
|
|
147
|
-
* @
|
|
150
|
+
* @param {string} arg.id - A `id` is a unique identifier for a particular
|
|
151
|
+
* detail. Pass the `id` of the keywords which you want to delete.
|
|
152
|
+
* @param {ProductBundleUpdateRequest} arg.body
|
|
153
|
+
* @summary: Update a Product Bundle
|
|
154
|
+
* @description: Update a Product Bundle by its id. On successful request, returns the updated product bundle
|
|
148
155
|
*/
|
|
149
|
-
|
|
150
|
-
const { error } = CatalogValidator.
|
|
156
|
+
updateProductBundle({ id, body } = {}) {
|
|
157
|
+
const { error } = CatalogValidator.updateProductBundle().validate(
|
|
151
158
|
{
|
|
159
|
+
id,
|
|
152
160
|
body,
|
|
153
161
|
},
|
|
154
162
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -157,14 +165,27 @@ class Catalog {
|
|
|
157
165
|
return Promise.reject(new FDKClientValidationError(error));
|
|
158
166
|
}
|
|
159
167
|
|
|
168
|
+
// Showing warrnings if extra unknown parameters are found
|
|
169
|
+
const { error: warrning } = CatalogValidator.updateProductBundle().validate(
|
|
170
|
+
{
|
|
171
|
+
id,
|
|
172
|
+
body,
|
|
173
|
+
},
|
|
174
|
+
{ abortEarly: false, allowUnknown: false }
|
|
175
|
+
);
|
|
176
|
+
if (warrning) {
|
|
177
|
+
console.log("Parameter Validation warrnings for updateProductBundle");
|
|
178
|
+
console.log(warrning);
|
|
179
|
+
}
|
|
180
|
+
|
|
160
181
|
const query_params = {};
|
|
161
182
|
|
|
162
183
|
const xHeaders = {};
|
|
163
184
|
|
|
164
185
|
return PlatformAPIClient.execute(
|
|
165
186
|
this.config,
|
|
166
|
-
"
|
|
167
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
187
|
+
"put",
|
|
188
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/product-bundle/${id}/`,
|
|
168
189
|
query_params,
|
|
169
190
|
body,
|
|
170
191
|
xHeaders
|
|
@@ -198,6 +219,22 @@ class Catalog {
|
|
|
198
219
|
return Promise.reject(new FDKClientValidationError(error));
|
|
199
220
|
}
|
|
200
221
|
|
|
222
|
+
// Showing warrnings if extra unknown parameters are found
|
|
223
|
+
const { error: warrning } = CatalogValidator.getSizeGuides().validate(
|
|
224
|
+
{
|
|
225
|
+
active,
|
|
226
|
+
q,
|
|
227
|
+
tag,
|
|
228
|
+
pageNo,
|
|
229
|
+
pageSize,
|
|
230
|
+
},
|
|
231
|
+
{ abortEarly: false, allowUnknown: false }
|
|
232
|
+
);
|
|
233
|
+
if (warrning) {
|
|
234
|
+
console.log("Parameter Validation warrnings for getSizeGuides");
|
|
235
|
+
console.log(warrning);
|
|
236
|
+
}
|
|
237
|
+
|
|
201
238
|
const query_params = {};
|
|
202
239
|
query_params["active"] = active;
|
|
203
240
|
query_params["q"] = q;
|
|
@@ -219,15 +256,13 @@ class Catalog {
|
|
|
219
256
|
|
|
220
257
|
/**
|
|
221
258
|
* @param {Object} arg - Arg object.
|
|
222
|
-
* @param {string} arg.id - Mongo id of the size guide to be edited
|
|
223
259
|
* @param {ValidateSizeGuide} arg.body
|
|
224
|
-
* @summary:
|
|
225
|
-
* @description: This API allows to
|
|
260
|
+
* @summary: Create a size guide.
|
|
261
|
+
* @description: This API allows to create a size guide associated to a brand.
|
|
226
262
|
*/
|
|
227
|
-
|
|
228
|
-
const { error } = CatalogValidator.
|
|
263
|
+
createSizeGuide({ body } = {}) {
|
|
264
|
+
const { error } = CatalogValidator.createSizeGuide().validate(
|
|
229
265
|
{
|
|
230
|
-
id,
|
|
231
266
|
body,
|
|
232
267
|
},
|
|
233
268
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -236,14 +271,26 @@ class Catalog {
|
|
|
236
271
|
return Promise.reject(new FDKClientValidationError(error));
|
|
237
272
|
}
|
|
238
273
|
|
|
274
|
+
// Showing warrnings if extra unknown parameters are found
|
|
275
|
+
const { error: warrning } = CatalogValidator.createSizeGuide().validate(
|
|
276
|
+
{
|
|
277
|
+
body,
|
|
278
|
+
},
|
|
279
|
+
{ abortEarly: false, allowUnknown: false }
|
|
280
|
+
);
|
|
281
|
+
if (warrning) {
|
|
282
|
+
console.log("Parameter Validation warrnings for createSizeGuide");
|
|
283
|
+
console.log(warrning);
|
|
284
|
+
}
|
|
285
|
+
|
|
239
286
|
const query_params = {};
|
|
240
287
|
|
|
241
288
|
const xHeaders = {};
|
|
242
289
|
|
|
243
290
|
return PlatformAPIClient.execute(
|
|
244
291
|
this.config,
|
|
245
|
-
"
|
|
246
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide
|
|
292
|
+
"post",
|
|
293
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide`,
|
|
247
294
|
query_params,
|
|
248
295
|
body,
|
|
249
296
|
xHeaders
|
|
@@ -267,6 +314,18 @@ class Catalog {
|
|
|
267
314
|
return Promise.reject(new FDKClientValidationError(error));
|
|
268
315
|
}
|
|
269
316
|
|
|
317
|
+
// Showing warrnings if extra unknown parameters are found
|
|
318
|
+
const { error: warrning } = CatalogValidator.getSizeGuide().validate(
|
|
319
|
+
{
|
|
320
|
+
id,
|
|
321
|
+
},
|
|
322
|
+
{ abortEarly: false, allowUnknown: false }
|
|
323
|
+
);
|
|
324
|
+
if (warrning) {
|
|
325
|
+
console.log("Parameter Validation warrnings for getSizeGuide");
|
|
326
|
+
console.log(warrning);
|
|
327
|
+
}
|
|
328
|
+
|
|
270
329
|
const query_params = {};
|
|
271
330
|
|
|
272
331
|
const xHeaders = {};
|
|
@@ -281,6 +340,52 @@ class Catalog {
|
|
|
281
340
|
);
|
|
282
341
|
}
|
|
283
342
|
|
|
343
|
+
/**
|
|
344
|
+
* @param {Object} arg - Arg object.
|
|
345
|
+
* @param {string} arg.id - Mongo id of the size guide to be edited
|
|
346
|
+
* @param {ValidateSizeGuide} arg.body
|
|
347
|
+
* @summary: Edit a size guide.
|
|
348
|
+
* @description: This API allows to edit a size guide.
|
|
349
|
+
*/
|
|
350
|
+
updateSizeGuide({ id, body } = {}) {
|
|
351
|
+
const { error } = CatalogValidator.updateSizeGuide().validate(
|
|
352
|
+
{
|
|
353
|
+
id,
|
|
354
|
+
body,
|
|
355
|
+
},
|
|
356
|
+
{ abortEarly: false, allowUnknown: true }
|
|
357
|
+
);
|
|
358
|
+
if (error) {
|
|
359
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// Showing warrnings if extra unknown parameters are found
|
|
363
|
+
const { error: warrning } = CatalogValidator.updateSizeGuide().validate(
|
|
364
|
+
{
|
|
365
|
+
id,
|
|
366
|
+
body,
|
|
367
|
+
},
|
|
368
|
+
{ abortEarly: false, allowUnknown: false }
|
|
369
|
+
);
|
|
370
|
+
if (warrning) {
|
|
371
|
+
console.log("Parameter Validation warrnings for updateSizeGuide");
|
|
372
|
+
console.log(warrning);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
const query_params = {};
|
|
376
|
+
|
|
377
|
+
const xHeaders = {};
|
|
378
|
+
|
|
379
|
+
return PlatformAPIClient.execute(
|
|
380
|
+
this.config,
|
|
381
|
+
"put",
|
|
382
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/sizeguide/${id}/`,
|
|
383
|
+
query_params,
|
|
384
|
+
body,
|
|
385
|
+
xHeaders
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
|
|
284
389
|
/**
|
|
285
390
|
* @param {Object} arg - Arg object.
|
|
286
391
|
* @param {string} arg.sellerAppId - Id of the seller application which is
|
|
@@ -299,6 +404,18 @@ class Catalog {
|
|
|
299
404
|
return Promise.reject(new FDKClientValidationError(error));
|
|
300
405
|
}
|
|
301
406
|
|
|
407
|
+
// Showing warrnings if extra unknown parameters are found
|
|
408
|
+
const { error: warrning } = CatalogValidator.getSellerInsights().validate(
|
|
409
|
+
{
|
|
410
|
+
sellerAppId,
|
|
411
|
+
},
|
|
412
|
+
{ abortEarly: false, allowUnknown: false }
|
|
413
|
+
);
|
|
414
|
+
if (warrning) {
|
|
415
|
+
console.log("Parameter Validation warrnings for getSellerInsights");
|
|
416
|
+
console.log(warrning);
|
|
417
|
+
}
|
|
418
|
+
|
|
302
419
|
const query_params = {};
|
|
303
420
|
|
|
304
421
|
const xHeaders = {};
|
|
@@ -333,6 +450,21 @@ class Catalog {
|
|
|
333
450
|
return Promise.reject(new FDKClientValidationError(error));
|
|
334
451
|
}
|
|
335
452
|
|
|
453
|
+
// Showing warrnings if extra unknown parameters are found
|
|
454
|
+
const {
|
|
455
|
+
error: warrning,
|
|
456
|
+
} = CatalogValidator.createMarketplaceOptin().validate(
|
|
457
|
+
{
|
|
458
|
+
marketplace,
|
|
459
|
+
body,
|
|
460
|
+
},
|
|
461
|
+
{ abortEarly: false, allowUnknown: false }
|
|
462
|
+
);
|
|
463
|
+
if (warrning) {
|
|
464
|
+
console.log("Parameter Validation warrnings for createMarketplaceOptin");
|
|
465
|
+
console.log(warrning);
|
|
466
|
+
}
|
|
467
|
+
|
|
336
468
|
const query_params = {};
|
|
337
469
|
|
|
338
470
|
const xHeaders = {};
|
|
@@ -361,6 +493,20 @@ class Catalog {
|
|
|
361
493
|
return Promise.reject(new FDKClientValidationError(error));
|
|
362
494
|
}
|
|
363
495
|
|
|
496
|
+
// Showing warrnings if extra unknown parameters are found
|
|
497
|
+
const {
|
|
498
|
+
error: warrning,
|
|
499
|
+
} = CatalogValidator.getMarketplaceOptinDetail().validate(
|
|
500
|
+
{},
|
|
501
|
+
{ abortEarly: false, allowUnknown: false }
|
|
502
|
+
);
|
|
503
|
+
if (warrning) {
|
|
504
|
+
console.log(
|
|
505
|
+
"Parameter Validation warrnings for getMarketplaceOptinDetail"
|
|
506
|
+
);
|
|
507
|
+
console.log(warrning);
|
|
508
|
+
}
|
|
509
|
+
|
|
364
510
|
const query_params = {};
|
|
365
511
|
|
|
366
512
|
const xHeaders = {};
|
|
@@ -389,6 +535,16 @@ class Catalog {
|
|
|
389
535
|
return Promise.reject(new FDKClientValidationError(error));
|
|
390
536
|
}
|
|
391
537
|
|
|
538
|
+
// Showing warrnings if extra unknown parameters are found
|
|
539
|
+
const { error: warrning } = CatalogValidator.getCompanyDetail().validate(
|
|
540
|
+
{},
|
|
541
|
+
{ abortEarly: false, allowUnknown: false }
|
|
542
|
+
);
|
|
543
|
+
if (warrning) {
|
|
544
|
+
console.log("Parameter Validation warrnings for getCompanyDetail");
|
|
545
|
+
console.log(warrning);
|
|
546
|
+
}
|
|
547
|
+
|
|
392
548
|
const query_params = {};
|
|
393
549
|
|
|
394
550
|
const xHeaders = {};
|
|
@@ -430,6 +586,24 @@ class Catalog {
|
|
|
430
586
|
return Promise.reject(new FDKClientValidationError(error));
|
|
431
587
|
}
|
|
432
588
|
|
|
589
|
+
// Showing warrnings if extra unknown parameters are found
|
|
590
|
+
const {
|
|
591
|
+
error: warrning,
|
|
592
|
+
} = CatalogValidator.getCompanyBrandDetail().validate(
|
|
593
|
+
{
|
|
594
|
+
isActive,
|
|
595
|
+
q,
|
|
596
|
+
pageNo,
|
|
597
|
+
pageSize,
|
|
598
|
+
marketplace,
|
|
599
|
+
},
|
|
600
|
+
{ abortEarly: false, allowUnknown: false }
|
|
601
|
+
);
|
|
602
|
+
if (warrning) {
|
|
603
|
+
console.log("Parameter Validation warrnings for getCompanyBrandDetail");
|
|
604
|
+
console.log(warrning);
|
|
605
|
+
}
|
|
606
|
+
|
|
433
607
|
const query_params = {};
|
|
434
608
|
query_params["is_active"] = isActive;
|
|
435
609
|
query_params["q"] = q;
|
|
@@ -463,6 +637,16 @@ class Catalog {
|
|
|
463
637
|
return Promise.reject(new FDKClientValidationError(error));
|
|
464
638
|
}
|
|
465
639
|
|
|
640
|
+
// Showing warrnings if extra unknown parameters are found
|
|
641
|
+
const { error: warrning } = CatalogValidator.getCompanyMetrics().validate(
|
|
642
|
+
{},
|
|
643
|
+
{ abortEarly: false, allowUnknown: false }
|
|
644
|
+
);
|
|
645
|
+
if (warrning) {
|
|
646
|
+
console.log("Parameter Validation warrnings for getCompanyMetrics");
|
|
647
|
+
console.log(warrning);
|
|
648
|
+
}
|
|
649
|
+
|
|
466
650
|
const query_params = {};
|
|
467
651
|
|
|
468
652
|
const xHeaders = {};
|
|
@@ -499,6 +683,20 @@ class Catalog {
|
|
|
499
683
|
return Promise.reject(new FDKClientValidationError(error));
|
|
500
684
|
}
|
|
501
685
|
|
|
686
|
+
// Showing warrnings if extra unknown parameters are found
|
|
687
|
+
const { error: warrning } = CatalogValidator.getStoreDetail().validate(
|
|
688
|
+
{
|
|
689
|
+
q,
|
|
690
|
+
pageNo,
|
|
691
|
+
pageSize,
|
|
692
|
+
},
|
|
693
|
+
{ abortEarly: false, allowUnknown: false }
|
|
694
|
+
);
|
|
695
|
+
if (warrning) {
|
|
696
|
+
console.log("Parameter Validation warrnings for getStoreDetail");
|
|
697
|
+
console.log(warrning);
|
|
698
|
+
}
|
|
699
|
+
|
|
502
700
|
const query_params = {};
|
|
503
701
|
query_params["q"] = q;
|
|
504
702
|
query_params["page_no"] = pageNo;
|
|
@@ -534,6 +732,18 @@ class Catalog {
|
|
|
534
732
|
return Promise.reject(new FDKClientValidationError(error));
|
|
535
733
|
}
|
|
536
734
|
|
|
735
|
+
// Showing warrnings if extra unknown parameters are found
|
|
736
|
+
const { error: warrning } = CatalogValidator.getGenderAttribute().validate(
|
|
737
|
+
{
|
|
738
|
+
attributeSlug,
|
|
739
|
+
},
|
|
740
|
+
{ abortEarly: false, allowUnknown: false }
|
|
741
|
+
);
|
|
742
|
+
if (warrning) {
|
|
743
|
+
console.log("Parameter Validation warrnings for getGenderAttribute");
|
|
744
|
+
console.log(warrning);
|
|
745
|
+
}
|
|
746
|
+
|
|
537
747
|
const query_params = {};
|
|
538
748
|
|
|
539
749
|
const xHeaders = {};
|
|
@@ -569,6 +779,23 @@ class Catalog {
|
|
|
569
779
|
return Promise.reject(new FDKClientValidationError(error));
|
|
570
780
|
}
|
|
571
781
|
|
|
782
|
+
// Showing warrnings if extra unknown parameters are found
|
|
783
|
+
const {
|
|
784
|
+
error: warrning,
|
|
785
|
+
} = CatalogValidator.listProductTemplateCategories().validate(
|
|
786
|
+
{
|
|
787
|
+
departments,
|
|
788
|
+
itemType,
|
|
789
|
+
},
|
|
790
|
+
{ abortEarly: false, allowUnknown: false }
|
|
791
|
+
);
|
|
792
|
+
if (warrning) {
|
|
793
|
+
console.log(
|
|
794
|
+
"Parameter Validation warrnings for listProductTemplateCategories"
|
|
795
|
+
);
|
|
796
|
+
console.log(warrning);
|
|
797
|
+
}
|
|
798
|
+
|
|
572
799
|
const query_params = {};
|
|
573
800
|
query_params["departments"] = departments;
|
|
574
801
|
query_params["item_type"] = itemType;
|
|
@@ -587,14 +814,26 @@ class Catalog {
|
|
|
587
814
|
|
|
588
815
|
/**
|
|
589
816
|
* @param {Object} arg - Arg object.
|
|
590
|
-
* @param {
|
|
591
|
-
*
|
|
592
|
-
* @
|
|
817
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
818
|
+
* given set of results
|
|
819
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
820
|
+
* page. Default is 10.
|
|
821
|
+
* @param {string} [arg.name] - Can search departments by passing name.
|
|
822
|
+
* @param {string} [arg.search] - Can search departments by passing name of
|
|
823
|
+
* the department in search parameter.
|
|
824
|
+
* @param {boolean} [arg.isActive] - Can query for departments based on
|
|
825
|
+
* whether they are active or inactive.
|
|
826
|
+
* @summary: List all Departments.
|
|
827
|
+
* @description: Allows you to list all departments, also can search using name and filter active and incative departments, and item type.
|
|
593
828
|
*/
|
|
594
|
-
|
|
595
|
-
const { error } = CatalogValidator.
|
|
829
|
+
listDepartmentsData({ pageNo, pageSize, name, search, isActive } = {}) {
|
|
830
|
+
const { error } = CatalogValidator.listDepartmentsData().validate(
|
|
596
831
|
{
|
|
597
|
-
|
|
832
|
+
pageNo,
|
|
833
|
+
pageSize,
|
|
834
|
+
name,
|
|
835
|
+
search,
|
|
836
|
+
isActive,
|
|
598
837
|
},
|
|
599
838
|
{ abortEarly: false, allowUnknown: true }
|
|
600
839
|
);
|
|
@@ -602,36 +841,8 @@ class Catalog {
|
|
|
602
841
|
return Promise.reject(new FDKClientValidationError(error));
|
|
603
842
|
}
|
|
604
843
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
const xHeaders = {};
|
|
608
|
-
|
|
609
|
-
return PlatformAPIClient.execute(
|
|
610
|
-
this.config,
|
|
611
|
-
"post",
|
|
612
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/`,
|
|
613
|
-
query_params,
|
|
614
|
-
body,
|
|
615
|
-
xHeaders
|
|
616
|
-
);
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
/**
|
|
620
|
-
* @param {Object} arg - Arg object.
|
|
621
|
-
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
622
|
-
* given set of results
|
|
623
|
-
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
624
|
-
* page. Default is 10.
|
|
625
|
-
* @param {string} [arg.name] - Can search departments by passing name.
|
|
626
|
-
* @param {string} [arg.search] - Can search departments by passing name of
|
|
627
|
-
* the department in search parameter.
|
|
628
|
-
* @param {boolean} [arg.isActive] - Can query for departments based on
|
|
629
|
-
* whether they are active or inactive.
|
|
630
|
-
* @summary: List all Departments.
|
|
631
|
-
* @description: Allows you to list all departments, also can search using name and filter active and incative departments, and item type.
|
|
632
|
-
*/
|
|
633
|
-
listDepartmentsData({ pageNo, pageSize, name, search, isActive } = {}) {
|
|
634
|
-
const { error } = CatalogValidator.listDepartmentsData().validate(
|
|
844
|
+
// Showing warrnings if extra unknown parameters are found
|
|
845
|
+
const { error: warrning } = CatalogValidator.listDepartmentsData().validate(
|
|
635
846
|
{
|
|
636
847
|
pageNo,
|
|
637
848
|
pageSize,
|
|
@@ -639,10 +850,11 @@ class Catalog {
|
|
|
639
850
|
search,
|
|
640
851
|
isActive,
|
|
641
852
|
},
|
|
642
|
-
{ abortEarly: false, allowUnknown:
|
|
853
|
+
{ abortEarly: false, allowUnknown: false }
|
|
643
854
|
);
|
|
644
|
-
if (
|
|
645
|
-
|
|
855
|
+
if (warrning) {
|
|
856
|
+
console.log("Parameter Validation warrnings for listDepartmentsData");
|
|
857
|
+
console.log(warrning);
|
|
646
858
|
}
|
|
647
859
|
|
|
648
860
|
const query_params = {};
|
|
@@ -666,15 +878,13 @@ class Catalog {
|
|
|
666
878
|
|
|
667
879
|
/**
|
|
668
880
|
* @param {Object} arg - Arg object.
|
|
669
|
-
* @param {string} arg.uid - A `uid` is a unique identifier of a department.
|
|
670
881
|
* @param {DepartmentCreateUpdate} arg.body
|
|
671
|
-
* @summary:
|
|
672
|
-
* @description:
|
|
882
|
+
* @summary: Create the department.
|
|
883
|
+
* @description: Create departments using the API.
|
|
673
884
|
*/
|
|
674
|
-
|
|
675
|
-
const { error } = CatalogValidator.
|
|
885
|
+
createDepartments({ body } = {}) {
|
|
886
|
+
const { error } = CatalogValidator.createDepartments().validate(
|
|
676
887
|
{
|
|
677
|
-
uid,
|
|
678
888
|
body,
|
|
679
889
|
},
|
|
680
890
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -683,14 +893,26 @@ class Catalog {
|
|
|
683
893
|
return Promise.reject(new FDKClientValidationError(error));
|
|
684
894
|
}
|
|
685
895
|
|
|
896
|
+
// Showing warrnings if extra unknown parameters are found
|
|
897
|
+
const { error: warrning } = CatalogValidator.createDepartments().validate(
|
|
898
|
+
{
|
|
899
|
+
body,
|
|
900
|
+
},
|
|
901
|
+
{ abortEarly: false, allowUnknown: false }
|
|
902
|
+
);
|
|
903
|
+
if (warrning) {
|
|
904
|
+
console.log("Parameter Validation warrnings for createDepartments");
|
|
905
|
+
console.log(warrning);
|
|
906
|
+
}
|
|
907
|
+
|
|
686
908
|
const query_params = {};
|
|
687
909
|
|
|
688
910
|
const xHeaders = {};
|
|
689
911
|
|
|
690
912
|
return PlatformAPIClient.execute(
|
|
691
913
|
this.config,
|
|
692
|
-
"
|
|
693
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments
|
|
914
|
+
"post",
|
|
915
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/`,
|
|
694
916
|
query_params,
|
|
695
917
|
body,
|
|
696
918
|
xHeaders
|
|
@@ -714,6 +936,18 @@ class Catalog {
|
|
|
714
936
|
return Promise.reject(new FDKClientValidationError(error));
|
|
715
937
|
}
|
|
716
938
|
|
|
939
|
+
// Showing warrnings if extra unknown parameters are found
|
|
940
|
+
const { error: warrning } = CatalogValidator.getDepartmentData().validate(
|
|
941
|
+
{
|
|
942
|
+
uid,
|
|
943
|
+
},
|
|
944
|
+
{ abortEarly: false, allowUnknown: false }
|
|
945
|
+
);
|
|
946
|
+
if (warrning) {
|
|
947
|
+
console.log("Parameter Validation warrnings for getDepartmentData");
|
|
948
|
+
console.log(warrning);
|
|
949
|
+
}
|
|
950
|
+
|
|
717
951
|
const query_params = {};
|
|
718
952
|
|
|
719
953
|
const xHeaders = {};
|
|
@@ -728,6 +962,52 @@ class Catalog {
|
|
|
728
962
|
);
|
|
729
963
|
}
|
|
730
964
|
|
|
965
|
+
/**
|
|
966
|
+
* @param {Object} arg - Arg object.
|
|
967
|
+
* @param {string} arg.uid - A `uid` is a unique identifier of a department.
|
|
968
|
+
* @param {DepartmentCreateUpdate} arg.body
|
|
969
|
+
* @summary: Update the department by their uid.
|
|
970
|
+
* @description: Update the department by their uid using this API.
|
|
971
|
+
*/
|
|
972
|
+
updateDepartment({ uid, body } = {}) {
|
|
973
|
+
const { error } = CatalogValidator.updateDepartment().validate(
|
|
974
|
+
{
|
|
975
|
+
uid,
|
|
976
|
+
body,
|
|
977
|
+
},
|
|
978
|
+
{ abortEarly: false, allowUnknown: true }
|
|
979
|
+
);
|
|
980
|
+
if (error) {
|
|
981
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
// Showing warrnings if extra unknown parameters are found
|
|
985
|
+
const { error: warrning } = CatalogValidator.updateDepartment().validate(
|
|
986
|
+
{
|
|
987
|
+
uid,
|
|
988
|
+
body,
|
|
989
|
+
},
|
|
990
|
+
{ abortEarly: false, allowUnknown: false }
|
|
991
|
+
);
|
|
992
|
+
if (warrning) {
|
|
993
|
+
console.log("Parameter Validation warrnings for updateDepartment");
|
|
994
|
+
console.log(warrning);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
const query_params = {};
|
|
998
|
+
|
|
999
|
+
const xHeaders = {};
|
|
1000
|
+
|
|
1001
|
+
return PlatformAPIClient.execute(
|
|
1002
|
+
this.config,
|
|
1003
|
+
"put",
|
|
1004
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/departments/${uid}/`,
|
|
1005
|
+
query_params,
|
|
1006
|
+
body,
|
|
1007
|
+
xHeaders
|
|
1008
|
+
);
|
|
1009
|
+
}
|
|
1010
|
+
|
|
731
1011
|
/**
|
|
732
1012
|
* @param {Object} arg - Arg object.
|
|
733
1013
|
* @param {string} arg.department - A `department` is the name of a
|
|
@@ -746,6 +1026,18 @@ class Catalog {
|
|
|
746
1026
|
return Promise.reject(new FDKClientValidationError(error));
|
|
747
1027
|
}
|
|
748
1028
|
|
|
1029
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1030
|
+
const { error: warrning } = CatalogValidator.listProductTemplate().validate(
|
|
1031
|
+
{
|
|
1032
|
+
department,
|
|
1033
|
+
},
|
|
1034
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1035
|
+
);
|
|
1036
|
+
if (warrning) {
|
|
1037
|
+
console.log("Parameter Validation warrnings for listProductTemplate");
|
|
1038
|
+
console.log(warrning);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
749
1041
|
const query_params = {};
|
|
750
1042
|
query_params["department"] = department;
|
|
751
1043
|
|
|
@@ -779,6 +1071,20 @@ class Catalog {
|
|
|
779
1071
|
return Promise.reject(new FDKClientValidationError(error));
|
|
780
1072
|
}
|
|
781
1073
|
|
|
1074
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1075
|
+
const {
|
|
1076
|
+
error: warrning,
|
|
1077
|
+
} = CatalogValidator.validateProductTemplate().validate(
|
|
1078
|
+
{
|
|
1079
|
+
slug,
|
|
1080
|
+
},
|
|
1081
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1082
|
+
);
|
|
1083
|
+
if (warrning) {
|
|
1084
|
+
console.log("Parameter Validation warrnings for validateProductTemplate");
|
|
1085
|
+
console.log(warrning);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
782
1088
|
const query_params = {};
|
|
783
1089
|
|
|
784
1090
|
const xHeaders = {};
|
|
@@ -811,6 +1117,22 @@ class Catalog {
|
|
|
811
1117
|
return Promise.reject(new FDKClientValidationError(error));
|
|
812
1118
|
}
|
|
813
1119
|
|
|
1120
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1121
|
+
const {
|
|
1122
|
+
error: warrning,
|
|
1123
|
+
} = CatalogValidator.downloadProductTemplateViews().validate(
|
|
1124
|
+
{
|
|
1125
|
+
slug,
|
|
1126
|
+
},
|
|
1127
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1128
|
+
);
|
|
1129
|
+
if (warrning) {
|
|
1130
|
+
console.log(
|
|
1131
|
+
"Parameter Validation warrnings for downloadProductTemplateViews"
|
|
1132
|
+
);
|
|
1133
|
+
console.log(warrning);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
814
1136
|
const query_params = {};
|
|
815
1137
|
|
|
816
1138
|
const xHeaders = {};
|
|
@@ -842,6 +1164,22 @@ class Catalog {
|
|
|
842
1164
|
return Promise.reject(new FDKClientValidationError(error));
|
|
843
1165
|
}
|
|
844
1166
|
|
|
1167
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1168
|
+
const {
|
|
1169
|
+
error: warrning,
|
|
1170
|
+
} = CatalogValidator.downloadInventoryTemplateView().validate(
|
|
1171
|
+
{
|
|
1172
|
+
itemType,
|
|
1173
|
+
},
|
|
1174
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1175
|
+
);
|
|
1176
|
+
if (warrning) {
|
|
1177
|
+
console.log(
|
|
1178
|
+
"Parameter Validation warrnings for downloadInventoryTemplateView"
|
|
1179
|
+
);
|
|
1180
|
+
console.log(warrning);
|
|
1181
|
+
}
|
|
1182
|
+
|
|
845
1183
|
const query_params = {};
|
|
846
1184
|
query_params["item_type"] = itemType;
|
|
847
1185
|
|
|
@@ -875,6 +1213,22 @@ class Catalog {
|
|
|
875
1213
|
return Promise.reject(new FDKClientValidationError(error));
|
|
876
1214
|
}
|
|
877
1215
|
|
|
1216
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1217
|
+
const {
|
|
1218
|
+
error: warrning,
|
|
1219
|
+
} = CatalogValidator.validateProductTemplateSchema().validate(
|
|
1220
|
+
{
|
|
1221
|
+
itemType,
|
|
1222
|
+
},
|
|
1223
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1224
|
+
);
|
|
1225
|
+
if (warrning) {
|
|
1226
|
+
console.log(
|
|
1227
|
+
"Parameter Validation warrnings for validateProductTemplateSchema"
|
|
1228
|
+
);
|
|
1229
|
+
console.log(warrning);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
878
1232
|
const query_params = {};
|
|
879
1233
|
query_params["item_type"] = itemType;
|
|
880
1234
|
|
|
@@ -904,6 +1258,16 @@ class Catalog {
|
|
|
904
1258
|
return Promise.reject(new FDKClientValidationError(error));
|
|
905
1259
|
}
|
|
906
1260
|
|
|
1261
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1262
|
+
const { error: warrning } = CatalogValidator.listHSNCodes().validate(
|
|
1263
|
+
{},
|
|
1264
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1265
|
+
);
|
|
1266
|
+
if (warrning) {
|
|
1267
|
+
console.log("Parameter Validation warrnings for listHSNCodes");
|
|
1268
|
+
console.log(warrning);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
907
1271
|
const query_params = {};
|
|
908
1272
|
|
|
909
1273
|
const xHeaders = {};
|
|
@@ -934,6 +1298,20 @@ class Catalog {
|
|
|
934
1298
|
return Promise.reject(new FDKClientValidationError(error));
|
|
935
1299
|
}
|
|
936
1300
|
|
|
1301
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1302
|
+
const {
|
|
1303
|
+
error: warrning,
|
|
1304
|
+
} = CatalogValidator.listProductTemplateExportDetails().validate(
|
|
1305
|
+
{},
|
|
1306
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1307
|
+
);
|
|
1308
|
+
if (warrning) {
|
|
1309
|
+
console.log(
|
|
1310
|
+
"Parameter Validation warrnings for listProductTemplateExportDetails"
|
|
1311
|
+
);
|
|
1312
|
+
console.log(warrning);
|
|
1313
|
+
}
|
|
1314
|
+
|
|
937
1315
|
const query_params = {};
|
|
938
1316
|
|
|
939
1317
|
const xHeaders = {};
|
|
@@ -966,48 +1344,33 @@ class Catalog {
|
|
|
966
1344
|
return Promise.reject(new FDKClientValidationError(error));
|
|
967
1345
|
}
|
|
968
1346
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
return PlatformAPIClient.execute(
|
|
975
|
-
this.config,
|
|
976
|
-
"get",
|
|
977
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/downloads/configuration/`,
|
|
978
|
-
query_params,
|
|
979
|
-
undefined,
|
|
980
|
-
xHeaders
|
|
981
|
-
);
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
/**
|
|
985
|
-
* @param {Object} arg - Arg object.
|
|
986
|
-
* @param {CategoryRequestBody} arg.body
|
|
987
|
-
* @summary: Create product categories
|
|
988
|
-
* @description: This API lets user create product categories
|
|
989
|
-
*/
|
|
990
|
-
createCategories({ body } = {}) {
|
|
991
|
-
const { error } = CatalogValidator.createCategories().validate(
|
|
1347
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1348
|
+
const {
|
|
1349
|
+
error: warrning,
|
|
1350
|
+
} = CatalogValidator.listTemplateBrandTypeValues().validate(
|
|
992
1351
|
{
|
|
993
|
-
|
|
1352
|
+
filter,
|
|
994
1353
|
},
|
|
995
|
-
{ abortEarly: false, allowUnknown:
|
|
1354
|
+
{ abortEarly: false, allowUnknown: false }
|
|
996
1355
|
);
|
|
997
|
-
if (
|
|
998
|
-
|
|
1356
|
+
if (warrning) {
|
|
1357
|
+
console.log(
|
|
1358
|
+
"Parameter Validation warrnings for listTemplateBrandTypeValues"
|
|
1359
|
+
);
|
|
1360
|
+
console.log(warrning);
|
|
999
1361
|
}
|
|
1000
1362
|
|
|
1001
1363
|
const query_params = {};
|
|
1364
|
+
query_params["filter"] = filter;
|
|
1002
1365
|
|
|
1003
1366
|
const xHeaders = {};
|
|
1004
1367
|
|
|
1005
1368
|
return PlatformAPIClient.execute(
|
|
1006
1369
|
this.config,
|
|
1007
|
-
"
|
|
1008
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
1370
|
+
"get",
|
|
1371
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/downloads/configuration/`,
|
|
1009
1372
|
query_params,
|
|
1010
|
-
|
|
1373
|
+
undefined,
|
|
1011
1374
|
xHeaders
|
|
1012
1375
|
);
|
|
1013
1376
|
}
|
|
@@ -1039,6 +1402,22 @@ class Catalog {
|
|
|
1039
1402
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1040
1403
|
}
|
|
1041
1404
|
|
|
1405
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1406
|
+
const { error: warrning } = CatalogValidator.listCategories().validate(
|
|
1407
|
+
{
|
|
1408
|
+
level,
|
|
1409
|
+
departments,
|
|
1410
|
+
q,
|
|
1411
|
+
pageNo,
|
|
1412
|
+
pageSize,
|
|
1413
|
+
},
|
|
1414
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1415
|
+
);
|
|
1416
|
+
if (warrning) {
|
|
1417
|
+
console.log("Parameter Validation warrnings for listCategories");
|
|
1418
|
+
console.log(warrning);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1042
1421
|
const query_params = {};
|
|
1043
1422
|
query_params["level"] = level;
|
|
1044
1423
|
query_params["departments"] = departments;
|
|
@@ -1060,15 +1439,13 @@ class Catalog {
|
|
|
1060
1439
|
|
|
1061
1440
|
/**
|
|
1062
1441
|
* @param {Object} arg - Arg object.
|
|
1063
|
-
* @param {string} arg.uid - Category unique id
|
|
1064
1442
|
* @param {CategoryRequestBody} arg.body
|
|
1065
|
-
* @summary:
|
|
1066
|
-
* @description:
|
|
1443
|
+
* @summary: Create product categories
|
|
1444
|
+
* @description: This API lets user create product categories
|
|
1067
1445
|
*/
|
|
1068
|
-
|
|
1069
|
-
const { error } = CatalogValidator.
|
|
1446
|
+
createCategories({ body } = {}) {
|
|
1447
|
+
const { error } = CatalogValidator.createCategories().validate(
|
|
1070
1448
|
{
|
|
1071
|
-
uid,
|
|
1072
1449
|
body,
|
|
1073
1450
|
},
|
|
1074
1451
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1077,14 +1454,26 @@ class Catalog {
|
|
|
1077
1454
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1078
1455
|
}
|
|
1079
1456
|
|
|
1457
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1458
|
+
const { error: warrning } = CatalogValidator.createCategories().validate(
|
|
1459
|
+
{
|
|
1460
|
+
body,
|
|
1461
|
+
},
|
|
1462
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1463
|
+
);
|
|
1464
|
+
if (warrning) {
|
|
1465
|
+
console.log("Parameter Validation warrnings for createCategories");
|
|
1466
|
+
console.log(warrning);
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1080
1469
|
const query_params = {};
|
|
1081
1470
|
|
|
1082
1471
|
const xHeaders = {};
|
|
1083
1472
|
|
|
1084
1473
|
return PlatformAPIClient.execute(
|
|
1085
1474
|
this.config,
|
|
1086
|
-
"
|
|
1087
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category
|
|
1475
|
+
"post",
|
|
1476
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category/`,
|
|
1088
1477
|
query_params,
|
|
1089
1478
|
body,
|
|
1090
1479
|
xHeaders
|
|
@@ -1108,6 +1497,18 @@ class Catalog {
|
|
|
1108
1497
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1109
1498
|
}
|
|
1110
1499
|
|
|
1500
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1501
|
+
const { error: warrning } = CatalogValidator.getCategoryData().validate(
|
|
1502
|
+
{
|
|
1503
|
+
uid,
|
|
1504
|
+
},
|
|
1505
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1506
|
+
);
|
|
1507
|
+
if (warrning) {
|
|
1508
|
+
console.log("Parameter Validation warrnings for getCategoryData");
|
|
1509
|
+
console.log(warrning);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1111
1512
|
const query_params = {};
|
|
1112
1513
|
|
|
1113
1514
|
const xHeaders = {};
|
|
@@ -1124,13 +1525,15 @@ class Catalog {
|
|
|
1124
1525
|
|
|
1125
1526
|
/**
|
|
1126
1527
|
* @param {Object} arg - Arg object.
|
|
1127
|
-
* @param {
|
|
1128
|
-
* @
|
|
1129
|
-
* @
|
|
1528
|
+
* @param {string} arg.uid - Category unique id
|
|
1529
|
+
* @param {CategoryRequestBody} arg.body
|
|
1530
|
+
* @summary: Update product categories
|
|
1531
|
+
* @description: Update a product category using this apu
|
|
1130
1532
|
*/
|
|
1131
|
-
|
|
1132
|
-
const { error } = CatalogValidator.
|
|
1533
|
+
updateCategory({ uid, body } = {}) {
|
|
1534
|
+
const { error } = CatalogValidator.updateCategory().validate(
|
|
1133
1535
|
{
|
|
1536
|
+
uid,
|
|
1134
1537
|
body,
|
|
1135
1538
|
},
|
|
1136
1539
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1139,14 +1542,27 @@ class Catalog {
|
|
|
1139
1542
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1140
1543
|
}
|
|
1141
1544
|
|
|
1545
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1546
|
+
const { error: warrning } = CatalogValidator.updateCategory().validate(
|
|
1547
|
+
{
|
|
1548
|
+
uid,
|
|
1549
|
+
body,
|
|
1550
|
+
},
|
|
1551
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1552
|
+
);
|
|
1553
|
+
if (warrning) {
|
|
1554
|
+
console.log("Parameter Validation warrnings for updateCategory");
|
|
1555
|
+
console.log(warrning);
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1142
1558
|
const query_params = {};
|
|
1143
1559
|
|
|
1144
1560
|
const xHeaders = {};
|
|
1145
1561
|
|
|
1146
1562
|
return PlatformAPIClient.execute(
|
|
1147
1563
|
this.config,
|
|
1148
|
-
"
|
|
1149
|
-
`/service/platform/catalog/
|
|
1564
|
+
"put",
|
|
1565
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/category/${uid}/`,
|
|
1150
1566
|
query_params,
|
|
1151
1567
|
body,
|
|
1152
1568
|
xHeaders
|
|
@@ -1200,6 +1616,26 @@ class Catalog {
|
|
|
1200
1616
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1201
1617
|
}
|
|
1202
1618
|
|
|
1619
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1620
|
+
const { error: warrning } = CatalogValidator.getProducts().validate(
|
|
1621
|
+
{
|
|
1622
|
+
brandIds,
|
|
1623
|
+
categoryIds,
|
|
1624
|
+
itemIds,
|
|
1625
|
+
departmentIds,
|
|
1626
|
+
itemCode,
|
|
1627
|
+
q,
|
|
1628
|
+
tags,
|
|
1629
|
+
pageNo,
|
|
1630
|
+
pageSize,
|
|
1631
|
+
},
|
|
1632
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1633
|
+
);
|
|
1634
|
+
if (warrning) {
|
|
1635
|
+
console.log("Parameter Validation warrnings for getProducts");
|
|
1636
|
+
console.log(warrning);
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1203
1639
|
const query_params = {};
|
|
1204
1640
|
query_params["brand_ids"] = brandIds;
|
|
1205
1641
|
query_params["category_ids"] = categoryIds;
|
|
@@ -1225,12 +1661,55 @@ class Catalog {
|
|
|
1225
1661
|
|
|
1226
1662
|
/**
|
|
1227
1663
|
* @param {Object} arg - Arg object.
|
|
1228
|
-
* @param {
|
|
1229
|
-
* @
|
|
1230
|
-
* @
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1664
|
+
* @param {ProductCreateUpdateSchemaV2} arg.body
|
|
1665
|
+
* @summary: Create a product.
|
|
1666
|
+
* @description: This API allows to create product.
|
|
1667
|
+
*/
|
|
1668
|
+
createProduct({ body } = {}) {
|
|
1669
|
+
const { error } = CatalogValidator.createProduct().validate(
|
|
1670
|
+
{
|
|
1671
|
+
body,
|
|
1672
|
+
},
|
|
1673
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1674
|
+
);
|
|
1675
|
+
if (error) {
|
|
1676
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1680
|
+
const { error: warrning } = CatalogValidator.createProduct().validate(
|
|
1681
|
+
{
|
|
1682
|
+
body,
|
|
1683
|
+
},
|
|
1684
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1685
|
+
);
|
|
1686
|
+
if (warrning) {
|
|
1687
|
+
console.log("Parameter Validation warrnings for createProduct");
|
|
1688
|
+
console.log(warrning);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
const query_params = {};
|
|
1692
|
+
|
|
1693
|
+
const xHeaders = {};
|
|
1694
|
+
|
|
1695
|
+
return PlatformAPIClient.execute(
|
|
1696
|
+
this.config,
|
|
1697
|
+
"post",
|
|
1698
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/`,
|
|
1699
|
+
query_params,
|
|
1700
|
+
body,
|
|
1701
|
+
xHeaders
|
|
1702
|
+
);
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
/**
|
|
1706
|
+
* @param {Object} arg - Arg object.
|
|
1707
|
+
* @param {number} arg.itemId - Get list of variants of item Id
|
|
1708
|
+
* @param {string} arg.variantType - Get multiple products filtered by variant type
|
|
1709
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
1710
|
+
* given set of results
|
|
1711
|
+
* @param {number} [arg.pageSize] - Number of items to retrieve in each
|
|
1712
|
+
* page. Default is 10.
|
|
1234
1713
|
* @summary: Get product list
|
|
1235
1714
|
* @description: This API gets meta associated to products.
|
|
1236
1715
|
*/
|
|
@@ -1248,6 +1727,23 @@ class Catalog {
|
|
|
1248
1727
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1249
1728
|
}
|
|
1250
1729
|
|
|
1730
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1731
|
+
const {
|
|
1732
|
+
error: warrning,
|
|
1733
|
+
} = CatalogValidator.getVariantsOfProducts().validate(
|
|
1734
|
+
{
|
|
1735
|
+
itemId,
|
|
1736
|
+
variantType,
|
|
1737
|
+
pageNo,
|
|
1738
|
+
pageSize,
|
|
1739
|
+
},
|
|
1740
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1741
|
+
);
|
|
1742
|
+
if (warrning) {
|
|
1743
|
+
console.log("Parameter Validation warrnings for getVariantsOfProducts");
|
|
1744
|
+
console.log(warrning);
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1251
1747
|
const query_params = {};
|
|
1252
1748
|
query_params["page_no"] = pageNo;
|
|
1253
1749
|
query_params["page_size"] = pageSize;
|
|
@@ -1284,6 +1780,21 @@ class Catalog {
|
|
|
1284
1780
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1285
1781
|
}
|
|
1286
1782
|
|
|
1783
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1784
|
+
const {
|
|
1785
|
+
error: warrning,
|
|
1786
|
+
} = CatalogValidator.getProductAttributes().validate(
|
|
1787
|
+
{
|
|
1788
|
+
category,
|
|
1789
|
+
filter,
|
|
1790
|
+
},
|
|
1791
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1792
|
+
);
|
|
1793
|
+
if (warrning) {
|
|
1794
|
+
console.log("Parameter Validation warrnings for getProductAttributes");
|
|
1795
|
+
console.log(warrning);
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1287
1798
|
const query_params = {};
|
|
1288
1799
|
query_params["category"] = category;
|
|
1289
1800
|
query_params["filter"] = filter;
|
|
@@ -1302,14 +1813,18 @@ class Catalog {
|
|
|
1302
1813
|
|
|
1303
1814
|
/**
|
|
1304
1815
|
* @param {Object} arg - Arg object.
|
|
1305
|
-
* @param {number} arg.itemId - Id of the product
|
|
1306
|
-
* @
|
|
1307
|
-
* @
|
|
1816
|
+
* @param {number} arg.itemId - Item Id of the product.
|
|
1817
|
+
* @param {number} [arg.brandUid] - Brand Id of the product.
|
|
1818
|
+
* @param {string} [arg.itemCode] - Item code of the product.
|
|
1819
|
+
* @summary: Get a single product.
|
|
1820
|
+
* @description: This API helps to get data associated to a particular product.
|
|
1308
1821
|
*/
|
|
1309
|
-
|
|
1310
|
-
const { error } = CatalogValidator.
|
|
1822
|
+
getProduct({ itemId, brandUid, itemCode } = {}) {
|
|
1823
|
+
const { error } = CatalogValidator.getProduct().validate(
|
|
1311
1824
|
{
|
|
1312
1825
|
itemId,
|
|
1826
|
+
brandUid,
|
|
1827
|
+
itemCode,
|
|
1313
1828
|
},
|
|
1314
1829
|
{ abortEarly: false, allowUnknown: true }
|
|
1315
1830
|
);
|
|
@@ -1317,13 +1832,29 @@ class Catalog {
|
|
|
1317
1832
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1318
1833
|
}
|
|
1319
1834
|
|
|
1835
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1836
|
+
const { error: warrning } = CatalogValidator.getProduct().validate(
|
|
1837
|
+
{
|
|
1838
|
+
itemId,
|
|
1839
|
+
brandUid,
|
|
1840
|
+
itemCode,
|
|
1841
|
+
},
|
|
1842
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1843
|
+
);
|
|
1844
|
+
if (warrning) {
|
|
1845
|
+
console.log("Parameter Validation warrnings for getProduct");
|
|
1846
|
+
console.log(warrning);
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1320
1849
|
const query_params = {};
|
|
1850
|
+
query_params["brand_uid"] = brandUid;
|
|
1851
|
+
query_params["item_code"] = itemCode;
|
|
1321
1852
|
|
|
1322
1853
|
const xHeaders = {};
|
|
1323
1854
|
|
|
1324
1855
|
return PlatformAPIClient.execute(
|
|
1325
1856
|
this.config,
|
|
1326
|
-
"
|
|
1857
|
+
"get",
|
|
1327
1858
|
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
1328
1859
|
query_params,
|
|
1329
1860
|
undefined,
|
|
@@ -1350,6 +1881,19 @@ class Catalog {
|
|
|
1350
1881
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1351
1882
|
}
|
|
1352
1883
|
|
|
1884
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1885
|
+
const { error: warrning } = CatalogValidator.editProduct().validate(
|
|
1886
|
+
{
|
|
1887
|
+
itemId,
|
|
1888
|
+
body,
|
|
1889
|
+
},
|
|
1890
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1891
|
+
);
|
|
1892
|
+
if (warrning) {
|
|
1893
|
+
console.log("Parameter Validation warrnings for editProduct");
|
|
1894
|
+
console.log(warrning);
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1353
1897
|
const query_params = {};
|
|
1354
1898
|
|
|
1355
1899
|
const xHeaders = {};
|
|
@@ -1366,18 +1910,14 @@ class Catalog {
|
|
|
1366
1910
|
|
|
1367
1911
|
/**
|
|
1368
1912
|
* @param {Object} arg - Arg object.
|
|
1369
|
-
* @param {number} arg.itemId -
|
|
1370
|
-
* @
|
|
1371
|
-
* @
|
|
1372
|
-
* @summary: Get a single product.
|
|
1373
|
-
* @description: This API helps to get data associated to a particular product.
|
|
1913
|
+
* @param {number} arg.itemId - Id of the product to be updated.
|
|
1914
|
+
* @summary: Delete a product.
|
|
1915
|
+
* @description: This API allows to delete product.
|
|
1374
1916
|
*/
|
|
1375
|
-
|
|
1376
|
-
const { error } = CatalogValidator.
|
|
1917
|
+
deleteProduct({ itemId } = {}) {
|
|
1918
|
+
const { error } = CatalogValidator.deleteProduct().validate(
|
|
1377
1919
|
{
|
|
1378
1920
|
itemId,
|
|
1379
|
-
brandUid,
|
|
1380
|
-
itemCode,
|
|
1381
1921
|
},
|
|
1382
1922
|
{ abortEarly: false, allowUnknown: true }
|
|
1383
1923
|
);
|
|
@@ -1385,15 +1925,25 @@ class Catalog {
|
|
|
1385
1925
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1386
1926
|
}
|
|
1387
1927
|
|
|
1928
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1929
|
+
const { error: warrning } = CatalogValidator.deleteProduct().validate(
|
|
1930
|
+
{
|
|
1931
|
+
itemId,
|
|
1932
|
+
},
|
|
1933
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1934
|
+
);
|
|
1935
|
+
if (warrning) {
|
|
1936
|
+
console.log("Parameter Validation warrnings for deleteProduct");
|
|
1937
|
+
console.log(warrning);
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1388
1940
|
const query_params = {};
|
|
1389
|
-
query_params["brand_uid"] = brandUid;
|
|
1390
|
-
query_params["item_code"] = itemCode;
|
|
1391
1941
|
|
|
1392
1942
|
const xHeaders = {};
|
|
1393
1943
|
|
|
1394
1944
|
return PlatformAPIClient.execute(
|
|
1395
1945
|
this.config,
|
|
1396
|
-
"
|
|
1946
|
+
"delete",
|
|
1397
1947
|
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/`,
|
|
1398
1948
|
query_params,
|
|
1399
1949
|
undefined,
|
|
@@ -1418,6 +1968,18 @@ class Catalog {
|
|
|
1418
1968
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1419
1969
|
}
|
|
1420
1970
|
|
|
1971
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1972
|
+
const { error: warrning } = CatalogValidator.allSizes().validate(
|
|
1973
|
+
{
|
|
1974
|
+
itemId,
|
|
1975
|
+
},
|
|
1976
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1977
|
+
);
|
|
1978
|
+
if (warrning) {
|
|
1979
|
+
console.log("Parameter Validation warrnings for allSizes");
|
|
1980
|
+
console.log(warrning);
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1421
1983
|
const query_params = {};
|
|
1422
1984
|
|
|
1423
1985
|
const xHeaders = {};
|
|
@@ -1446,6 +2008,18 @@ class Catalog {
|
|
|
1446
2008
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1447
2009
|
}
|
|
1448
2010
|
|
|
2011
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2012
|
+
const {
|
|
2013
|
+
error: warrning,
|
|
2014
|
+
} = CatalogValidator.getProductValidation().validate(
|
|
2015
|
+
{},
|
|
2016
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2017
|
+
);
|
|
2018
|
+
if (warrning) {
|
|
2019
|
+
console.log("Parameter Validation warrnings for getProductValidation");
|
|
2020
|
+
console.log(warrning);
|
|
2021
|
+
}
|
|
2022
|
+
|
|
1449
2023
|
const query_params = {};
|
|
1450
2024
|
|
|
1451
2025
|
const xHeaders = {};
|
|
@@ -1483,6 +2057,21 @@ class Catalog {
|
|
|
1483
2057
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1484
2058
|
}
|
|
1485
2059
|
|
|
2060
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2061
|
+
const { error: warrning } = CatalogValidator.getProductSize().validate(
|
|
2062
|
+
{
|
|
2063
|
+
itemId,
|
|
2064
|
+
itemCode,
|
|
2065
|
+
brandUid,
|
|
2066
|
+
uid,
|
|
2067
|
+
},
|
|
2068
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2069
|
+
);
|
|
2070
|
+
if (warrning) {
|
|
2071
|
+
console.log("Parameter Validation warrnings for getProductSize");
|
|
2072
|
+
console.log(warrning);
|
|
2073
|
+
}
|
|
2074
|
+
|
|
1486
2075
|
const query_params = {};
|
|
1487
2076
|
query_params["item_code"] = itemCode;
|
|
1488
2077
|
query_params["brand_uid"] = brandUid;
|
|
@@ -1500,37 +2089,6 @@ class Catalog {
|
|
|
1500
2089
|
);
|
|
1501
2090
|
}
|
|
1502
2091
|
|
|
1503
|
-
/**
|
|
1504
|
-
* @param {Object} arg - Arg object.
|
|
1505
|
-
* @param {BulkJob} arg.body
|
|
1506
|
-
* @summary: Create a Bulk product to upload job.
|
|
1507
|
-
* @description: This API helps to create a bulk products upload job.
|
|
1508
|
-
*/
|
|
1509
|
-
createBulkProductUploadJob({ body } = {}) {
|
|
1510
|
-
const { error } = CatalogValidator.createBulkProductUploadJob().validate(
|
|
1511
|
-
{
|
|
1512
|
-
body,
|
|
1513
|
-
},
|
|
1514
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1515
|
-
);
|
|
1516
|
-
if (error) {
|
|
1517
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
const query_params = {};
|
|
1521
|
-
|
|
1522
|
-
const xHeaders = {};
|
|
1523
|
-
|
|
1524
|
-
return PlatformAPIClient.execute(
|
|
1525
|
-
this.config,
|
|
1526
|
-
"post",
|
|
1527
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/bulk`,
|
|
1528
|
-
query_params,
|
|
1529
|
-
body,
|
|
1530
|
-
xHeaders
|
|
1531
|
-
);
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
2092
|
/**
|
|
1535
2093
|
* @param {Object} arg - Arg object.
|
|
1536
2094
|
* @param {string} [arg.search] - Search string to filter the results by batch id
|
|
@@ -1554,6 +2112,24 @@ class Catalog {
|
|
|
1554
2112
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1555
2113
|
}
|
|
1556
2114
|
|
|
2115
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2116
|
+
const {
|
|
2117
|
+
error: warrning,
|
|
2118
|
+
} = CatalogValidator.getProductBulkUploadHistory().validate(
|
|
2119
|
+
{
|
|
2120
|
+
search,
|
|
2121
|
+
pageNo,
|
|
2122
|
+
pageSize,
|
|
2123
|
+
},
|
|
2124
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2125
|
+
);
|
|
2126
|
+
if (warrning) {
|
|
2127
|
+
console.log(
|
|
2128
|
+
"Parameter Validation warrnings for getProductBulkUploadHistory"
|
|
2129
|
+
);
|
|
2130
|
+
console.log(warrning);
|
|
2131
|
+
}
|
|
2132
|
+
|
|
1557
2133
|
const query_params = {};
|
|
1558
2134
|
query_params["search"] = search;
|
|
1559
2135
|
query_params["page_no"] = pageNo;
|
|
@@ -1573,18 +2149,13 @@ class Catalog {
|
|
|
1573
2149
|
|
|
1574
2150
|
/**
|
|
1575
2151
|
* @param {Object} arg - Arg object.
|
|
1576
|
-
* @param {string} arg.department - Department of the product to be uploaded.
|
|
1577
|
-
* @param {string} arg.productType - Product type of the product to be
|
|
1578
|
-
* uploaded i.e. set, standard , digital.
|
|
1579
2152
|
* @param {BulkJob} arg.body
|
|
1580
2153
|
* @summary: Create a Bulk product to upload job.
|
|
1581
2154
|
* @description: This API helps to create a bulk products upload job.
|
|
1582
2155
|
*/
|
|
1583
|
-
|
|
1584
|
-
const { error } = CatalogValidator.
|
|
2156
|
+
createBulkProductUploadJob({ body } = {}) {
|
|
2157
|
+
const { error } = CatalogValidator.createBulkProductUploadJob().validate(
|
|
1585
2158
|
{
|
|
1586
|
-
department,
|
|
1587
|
-
productType,
|
|
1588
2159
|
body,
|
|
1589
2160
|
},
|
|
1590
2161
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1593,16 +2164,30 @@ class Catalog {
|
|
|
1593
2164
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1594
2165
|
}
|
|
1595
2166
|
|
|
2167
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2168
|
+
const {
|
|
2169
|
+
error: warrning,
|
|
2170
|
+
} = CatalogValidator.createBulkProductUploadJob().validate(
|
|
2171
|
+
{
|
|
2172
|
+
body,
|
|
2173
|
+
},
|
|
2174
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2175
|
+
);
|
|
2176
|
+
if (warrning) {
|
|
2177
|
+
console.log(
|
|
2178
|
+
"Parameter Validation warrnings for createBulkProductUploadJob"
|
|
2179
|
+
);
|
|
2180
|
+
console.log(warrning);
|
|
2181
|
+
}
|
|
2182
|
+
|
|
1596
2183
|
const query_params = {};
|
|
1597
|
-
query_params["department"] = department;
|
|
1598
|
-
query_params["product_type"] = productType;
|
|
1599
2184
|
|
|
1600
2185
|
const xHeaders = {};
|
|
1601
2186
|
|
|
1602
2187
|
return PlatformAPIClient.execute(
|
|
1603
2188
|
this.config,
|
|
1604
2189
|
"post",
|
|
1605
|
-
`/service/platform/catalog/
|
|
2190
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/bulk`,
|
|
1606
2191
|
query_params,
|
|
1607
2192
|
body,
|
|
1608
2193
|
xHeaders
|
|
@@ -1611,15 +2196,18 @@ class Catalog {
|
|
|
1611
2196
|
|
|
1612
2197
|
/**
|
|
1613
2198
|
* @param {Object} arg - Arg object.
|
|
1614
|
-
* @param {string} arg.
|
|
1615
|
-
* @param {
|
|
1616
|
-
*
|
|
1617
|
-
* @
|
|
2199
|
+
* @param {string} arg.department - Department of the product to be uploaded.
|
|
2200
|
+
* @param {string} arg.productType - Product type of the product to be
|
|
2201
|
+
* uploaded i.e. set, standard , digital.
|
|
2202
|
+
* @param {BulkJob} arg.body
|
|
2203
|
+
* @summary: Create a Bulk product to upload job.
|
|
2204
|
+
* @description: This API helps to create a bulk products upload job.
|
|
1618
2205
|
*/
|
|
1619
|
-
|
|
1620
|
-
const { error } = CatalogValidator.
|
|
2206
|
+
uploadBulkProducts({ department, productType, body } = {}) {
|
|
2207
|
+
const { error } = CatalogValidator.uploadBulkProducts().validate(
|
|
1621
2208
|
{
|
|
1622
|
-
|
|
2209
|
+
department,
|
|
2210
|
+
productType,
|
|
1623
2211
|
body,
|
|
1624
2212
|
},
|
|
1625
2213
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -1628,14 +2216,30 @@ class Catalog {
|
|
|
1628
2216
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1629
2217
|
}
|
|
1630
2218
|
|
|
2219
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2220
|
+
const { error: warrning } = CatalogValidator.uploadBulkProducts().validate(
|
|
2221
|
+
{
|
|
2222
|
+
department,
|
|
2223
|
+
productType,
|
|
2224
|
+
body,
|
|
2225
|
+
},
|
|
2226
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2227
|
+
);
|
|
2228
|
+
if (warrning) {
|
|
2229
|
+
console.log("Parameter Validation warrnings for uploadBulkProducts");
|
|
2230
|
+
console.log(warrning);
|
|
2231
|
+
}
|
|
2232
|
+
|
|
1631
2233
|
const query_params = {};
|
|
2234
|
+
query_params["department"] = department;
|
|
2235
|
+
query_params["product_type"] = productType;
|
|
1632
2236
|
|
|
1633
2237
|
const xHeaders = {};
|
|
1634
2238
|
|
|
1635
2239
|
return PlatformAPIClient.execute(
|
|
1636
2240
|
this.config,
|
|
1637
2241
|
"post",
|
|
1638
|
-
`/service/platform/catalog/
|
|
2242
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/bulk`,
|
|
1639
2243
|
query_params,
|
|
1640
2244
|
body,
|
|
1641
2245
|
xHeaders
|
|
@@ -1659,6 +2263,20 @@ class Catalog {
|
|
|
1659
2263
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1660
2264
|
}
|
|
1661
2265
|
|
|
2266
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2267
|
+
const {
|
|
2268
|
+
error: warrning,
|
|
2269
|
+
} = CatalogValidator.deleteProductBulkJob().validate(
|
|
2270
|
+
{
|
|
2271
|
+
batchId,
|
|
2272
|
+
},
|
|
2273
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2274
|
+
);
|
|
2275
|
+
if (warrning) {
|
|
2276
|
+
console.log("Parameter Validation warrnings for deleteProductBulkJob");
|
|
2277
|
+
console.log(warrning);
|
|
2278
|
+
}
|
|
2279
|
+
|
|
1662
2280
|
const query_params = {};
|
|
1663
2281
|
|
|
1664
2282
|
const xHeaders = {};
|
|
@@ -1675,59 +2293,86 @@ class Catalog {
|
|
|
1675
2293
|
|
|
1676
2294
|
/**
|
|
1677
2295
|
* @param {Object} arg - Arg object.
|
|
1678
|
-
* @
|
|
1679
|
-
* @
|
|
2296
|
+
* @param {string} arg.batchId - Batch Id in which assets to be uploaded.
|
|
2297
|
+
* @param {BulkProductRequest} arg.body
|
|
2298
|
+
* @summary: Create products in bulk associated with given batch Id.
|
|
2299
|
+
* @description: This API helps to create products in bulk push to kafka for approval/creation.
|
|
1680
2300
|
*/
|
|
1681
|
-
|
|
1682
|
-
const { error } = CatalogValidator.
|
|
1683
|
-
{
|
|
2301
|
+
createProductsInBulk({ batchId, body } = {}) {
|
|
2302
|
+
const { error } = CatalogValidator.createProductsInBulk().validate(
|
|
2303
|
+
{
|
|
2304
|
+
batchId,
|
|
2305
|
+
body,
|
|
2306
|
+
},
|
|
1684
2307
|
{ abortEarly: false, allowUnknown: true }
|
|
1685
2308
|
);
|
|
1686
2309
|
if (error) {
|
|
1687
2310
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1688
2311
|
}
|
|
1689
2312
|
|
|
2313
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2314
|
+
const {
|
|
2315
|
+
error: warrning,
|
|
2316
|
+
} = CatalogValidator.createProductsInBulk().validate(
|
|
2317
|
+
{
|
|
2318
|
+
batchId,
|
|
2319
|
+
body,
|
|
2320
|
+
},
|
|
2321
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2322
|
+
);
|
|
2323
|
+
if (warrning) {
|
|
2324
|
+
console.log("Parameter Validation warrnings for createProductsInBulk");
|
|
2325
|
+
console.log(warrning);
|
|
2326
|
+
}
|
|
2327
|
+
|
|
1690
2328
|
const query_params = {};
|
|
1691
2329
|
|
|
1692
2330
|
const xHeaders = {};
|
|
1693
2331
|
|
|
1694
2332
|
return PlatformAPIClient.execute(
|
|
1695
2333
|
this.config,
|
|
1696
|
-
"
|
|
1697
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/
|
|
2334
|
+
"post",
|
|
2335
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/bulk/${batchId}`,
|
|
1698
2336
|
query_params,
|
|
1699
|
-
|
|
2337
|
+
body,
|
|
1700
2338
|
xHeaders
|
|
1701
2339
|
);
|
|
1702
2340
|
}
|
|
1703
2341
|
|
|
1704
2342
|
/**
|
|
1705
2343
|
* @param {Object} arg - Arg object.
|
|
1706
|
-
* @
|
|
1707
|
-
* @
|
|
1708
|
-
* @description: This API helps to create a bulk asset upload job.
|
|
2344
|
+
* @summary: Get a list of all tags associated with company.
|
|
2345
|
+
* @description: This API helps to get tags data associated to a particular company.
|
|
1709
2346
|
*/
|
|
1710
|
-
|
|
1711
|
-
const { error } = CatalogValidator.
|
|
1712
|
-
{
|
|
1713
|
-
body,
|
|
1714
|
-
},
|
|
2347
|
+
getProductTags({} = {}) {
|
|
2348
|
+
const { error } = CatalogValidator.getProductTags().validate(
|
|
2349
|
+
{},
|
|
1715
2350
|
{ abortEarly: false, allowUnknown: true }
|
|
1716
2351
|
);
|
|
1717
2352
|
if (error) {
|
|
1718
2353
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1719
2354
|
}
|
|
1720
2355
|
|
|
2356
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2357
|
+
const { error: warrning } = CatalogValidator.getProductTags().validate(
|
|
2358
|
+
{},
|
|
2359
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2360
|
+
);
|
|
2361
|
+
if (warrning) {
|
|
2362
|
+
console.log("Parameter Validation warrnings for getProductTags");
|
|
2363
|
+
console.log(warrning);
|
|
2364
|
+
}
|
|
2365
|
+
|
|
1721
2366
|
const query_params = {};
|
|
1722
2367
|
|
|
1723
2368
|
const xHeaders = {};
|
|
1724
2369
|
|
|
1725
2370
|
return PlatformAPIClient.execute(
|
|
1726
2371
|
this.config,
|
|
1727
|
-
"
|
|
1728
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/
|
|
2372
|
+
"get",
|
|
2373
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/tags`,
|
|
1729
2374
|
query_params,
|
|
1730
|
-
|
|
2375
|
+
undefined,
|
|
1731
2376
|
xHeaders
|
|
1732
2377
|
);
|
|
1733
2378
|
}
|
|
@@ -1753,6 +2398,21 @@ class Catalog {
|
|
|
1753
2398
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1754
2399
|
}
|
|
1755
2400
|
|
|
2401
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2402
|
+
const {
|
|
2403
|
+
error: warrning,
|
|
2404
|
+
} = CatalogValidator.getProductAssetsInBulk().validate(
|
|
2405
|
+
{
|
|
2406
|
+
pageNo,
|
|
2407
|
+
pageSize,
|
|
2408
|
+
},
|
|
2409
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2410
|
+
);
|
|
2411
|
+
if (warrning) {
|
|
2412
|
+
console.log("Parameter Validation warrnings for getProductAssetsInBulk");
|
|
2413
|
+
console.log(warrning);
|
|
2414
|
+
}
|
|
2415
|
+
|
|
1756
2416
|
const query_params = {};
|
|
1757
2417
|
query_params["page_no"] = pageNo;
|
|
1758
2418
|
query_params["page_size"] = pageSize;
|
|
@@ -1771,17 +2431,14 @@ class Catalog {
|
|
|
1771
2431
|
|
|
1772
2432
|
/**
|
|
1773
2433
|
* @param {Object} arg - Arg object.
|
|
1774
|
-
* @param {
|
|
1775
|
-
*
|
|
1776
|
-
* @
|
|
1777
|
-
* @summary: Delete a Size associated with product.
|
|
1778
|
-
* @description: This API allows to delete size associated with product.
|
|
2434
|
+
* @param {ProductBulkAssets} arg.body
|
|
2435
|
+
* @summary: Create a Bulk asset upload Job.
|
|
2436
|
+
* @description: This API helps to create a bulk asset upload job.
|
|
1779
2437
|
*/
|
|
1780
|
-
|
|
1781
|
-
const { error } = CatalogValidator.
|
|
2438
|
+
createProductAssetsInBulk({ body } = {}) {
|
|
2439
|
+
const { error } = CatalogValidator.createProductAssetsInBulk().validate(
|
|
1782
2440
|
{
|
|
1783
|
-
|
|
1784
|
-
size,
|
|
2441
|
+
body,
|
|
1785
2442
|
},
|
|
1786
2443
|
{ abortEarly: false, allowUnknown: true }
|
|
1787
2444
|
);
|
|
@@ -1789,34 +2446,49 @@ class Catalog {
|
|
|
1789
2446
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1790
2447
|
}
|
|
1791
2448
|
|
|
2449
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2450
|
+
const {
|
|
2451
|
+
error: warrning,
|
|
2452
|
+
} = CatalogValidator.createProductAssetsInBulk().validate(
|
|
2453
|
+
{
|
|
2454
|
+
body,
|
|
2455
|
+
},
|
|
2456
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2457
|
+
);
|
|
2458
|
+
if (warrning) {
|
|
2459
|
+
console.log(
|
|
2460
|
+
"Parameter Validation warrnings for createProductAssetsInBulk"
|
|
2461
|
+
);
|
|
2462
|
+
console.log(warrning);
|
|
2463
|
+
}
|
|
2464
|
+
|
|
1792
2465
|
const query_params = {};
|
|
1793
2466
|
|
|
1794
2467
|
const xHeaders = {};
|
|
1795
2468
|
|
|
1796
2469
|
return PlatformAPIClient.execute(
|
|
1797
2470
|
this.config,
|
|
1798
|
-
"
|
|
1799
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products
|
|
2471
|
+
"post",
|
|
2472
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/assets/bulk/`,
|
|
1800
2473
|
query_params,
|
|
1801
|
-
|
|
2474
|
+
body,
|
|
1802
2475
|
xHeaders
|
|
1803
2476
|
);
|
|
1804
2477
|
}
|
|
1805
2478
|
|
|
1806
2479
|
/**
|
|
1807
2480
|
* @param {Object} arg - Arg object.
|
|
1808
|
-
* @param {number} arg.itemId - Item
|
|
1809
|
-
*
|
|
1810
|
-
* @param {
|
|
1811
|
-
* @summary:
|
|
1812
|
-
* @description: This API allows
|
|
2481
|
+
* @param {number} arg.itemId - Item Id of the product associated with size
|
|
2482
|
+
* to be deleted.
|
|
2483
|
+
* @param {string} arg.size - Size to be deleted.
|
|
2484
|
+
* @summary: Delete a Size associated with product.
|
|
2485
|
+
* @description: This API allows to delete size associated with product.
|
|
1813
2486
|
*/
|
|
1814
|
-
|
|
1815
|
-
const { error } = CatalogValidator.
|
|
2487
|
+
deleteSize({ itemId, size } = {}) {
|
|
2488
|
+
const { error } = CatalogValidator.deleteSize().validate(
|
|
1816
2489
|
{
|
|
1817
2490
|
itemId,
|
|
1818
2491
|
size,
|
|
1819
|
-
body,
|
|
1820
2492
|
},
|
|
1821
2493
|
{ abortEarly: false, allowUnknown: true }
|
|
1822
2494
|
);
|
|
@@ -1824,16 +2496,29 @@ class Catalog {
|
|
|
1824
2496
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1825
2497
|
}
|
|
1826
2498
|
|
|
2499
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2500
|
+
const { error: warrning } = CatalogValidator.deleteSize().validate(
|
|
2501
|
+
{
|
|
2502
|
+
itemId,
|
|
2503
|
+
size,
|
|
2504
|
+
},
|
|
2505
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2506
|
+
);
|
|
2507
|
+
if (warrning) {
|
|
2508
|
+
console.log("Parameter Validation warrnings for deleteSize");
|
|
2509
|
+
console.log(warrning);
|
|
2510
|
+
}
|
|
2511
|
+
|
|
1827
2512
|
const query_params = {};
|
|
1828
2513
|
|
|
1829
2514
|
const xHeaders = {};
|
|
1830
2515
|
|
|
1831
2516
|
return PlatformAPIClient.execute(
|
|
1832
2517
|
this.config,
|
|
1833
|
-
"
|
|
2518
|
+
"delete",
|
|
1834
2519
|
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
|
|
1835
2520
|
query_params,
|
|
1836
|
-
|
|
2521
|
+
undefined,
|
|
1837
2522
|
xHeaders
|
|
1838
2523
|
);
|
|
1839
2524
|
}
|
|
@@ -1867,6 +2552,23 @@ class Catalog {
|
|
|
1867
2552
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1868
2553
|
}
|
|
1869
2554
|
|
|
2555
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2556
|
+
const { error: warrning } = CatalogValidator.getInventoryBySize().validate(
|
|
2557
|
+
{
|
|
2558
|
+
itemId,
|
|
2559
|
+
size,
|
|
2560
|
+
pageNo,
|
|
2561
|
+
pageSize,
|
|
2562
|
+
q,
|
|
2563
|
+
sellable,
|
|
2564
|
+
},
|
|
2565
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2566
|
+
);
|
|
2567
|
+
if (warrning) {
|
|
2568
|
+
console.log("Parameter Validation warrnings for getInventoryBySize");
|
|
2569
|
+
console.log(warrning);
|
|
2570
|
+
}
|
|
2571
|
+
|
|
1870
2572
|
const query_params = {};
|
|
1871
2573
|
query_params["page_no"] = pageNo;
|
|
1872
2574
|
query_params["page_size"] = pageSize;
|
|
@@ -1885,6 +2587,55 @@ class Catalog {
|
|
|
1885
2587
|
);
|
|
1886
2588
|
}
|
|
1887
2589
|
|
|
2590
|
+
/**
|
|
2591
|
+
* @param {Object} arg - Arg object.
|
|
2592
|
+
* @param {number} arg.itemId - Item code of the product of which size is to be get.
|
|
2593
|
+
* @param {string} arg.size - Size in which inventory is to be added.
|
|
2594
|
+
* @param {InventoryRequest} arg.body
|
|
2595
|
+
* @summary: Add Inventory for particular size and store.
|
|
2596
|
+
* @description: This API allows add Inventory for particular size and store.
|
|
2597
|
+
*/
|
|
2598
|
+
addInventory({ itemId, size, body } = {}) {
|
|
2599
|
+
const { error } = CatalogValidator.addInventory().validate(
|
|
2600
|
+
{
|
|
2601
|
+
itemId,
|
|
2602
|
+
size,
|
|
2603
|
+
body,
|
|
2604
|
+
},
|
|
2605
|
+
{ abortEarly: false, allowUnknown: true }
|
|
2606
|
+
);
|
|
2607
|
+
if (error) {
|
|
2608
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2612
|
+
const { error: warrning } = CatalogValidator.addInventory().validate(
|
|
2613
|
+
{
|
|
2614
|
+
itemId,
|
|
2615
|
+
size,
|
|
2616
|
+
body,
|
|
2617
|
+
},
|
|
2618
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2619
|
+
);
|
|
2620
|
+
if (warrning) {
|
|
2621
|
+
console.log("Parameter Validation warrnings for addInventory");
|
|
2622
|
+
console.log(warrning);
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
const query_params = {};
|
|
2626
|
+
|
|
2627
|
+
const xHeaders = {};
|
|
2628
|
+
|
|
2629
|
+
return PlatformAPIClient.execute(
|
|
2630
|
+
this.config,
|
|
2631
|
+
"post",
|
|
2632
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}`,
|
|
2633
|
+
query_params,
|
|
2634
|
+
body,
|
|
2635
|
+
xHeaders
|
|
2636
|
+
);
|
|
2637
|
+
}
|
|
2638
|
+
|
|
1888
2639
|
/**
|
|
1889
2640
|
* @param {Object} arg - Arg object.
|
|
1890
2641
|
* @param {string} arg.itemId - Item code of the product of which size is to be get.
|
|
@@ -1922,6 +2673,27 @@ class Catalog {
|
|
|
1922
2673
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1923
2674
|
}
|
|
1924
2675
|
|
|
2676
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2677
|
+
const {
|
|
2678
|
+
error: warrning,
|
|
2679
|
+
} = CatalogValidator.getInventoryBySizeIdentifier().validate(
|
|
2680
|
+
{
|
|
2681
|
+
itemId,
|
|
2682
|
+
sizeIdentifier,
|
|
2683
|
+
pageNo,
|
|
2684
|
+
pageSize,
|
|
2685
|
+
q,
|
|
2686
|
+
locationIds,
|
|
2687
|
+
},
|
|
2688
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2689
|
+
);
|
|
2690
|
+
if (warrning) {
|
|
2691
|
+
console.log(
|
|
2692
|
+
"Parameter Validation warrnings for getInventoryBySizeIdentifier"
|
|
2693
|
+
);
|
|
2694
|
+
console.log(warrning);
|
|
2695
|
+
}
|
|
2696
|
+
|
|
1925
2697
|
const query_params = {};
|
|
1926
2698
|
query_params["page_no"] = pageNo;
|
|
1927
2699
|
query_params["page_size"] = pageSize;
|
|
@@ -1983,6 +2755,25 @@ class Catalog {
|
|
|
1983
2755
|
return Promise.reject(new FDKClientValidationError(error));
|
|
1984
2756
|
}
|
|
1985
2757
|
|
|
2758
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2759
|
+
const { error: warrning } = CatalogValidator.getInventories().validate(
|
|
2760
|
+
{
|
|
2761
|
+
itemId,
|
|
2762
|
+
size,
|
|
2763
|
+
pageNo,
|
|
2764
|
+
pageSize,
|
|
2765
|
+
q,
|
|
2766
|
+
sellable,
|
|
2767
|
+
storeIds,
|
|
2768
|
+
sizeIdentifier,
|
|
2769
|
+
},
|
|
2770
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2771
|
+
);
|
|
2772
|
+
if (warrning) {
|
|
2773
|
+
console.log("Parameter Validation warrnings for getInventories");
|
|
2774
|
+
console.log(warrning);
|
|
2775
|
+
}
|
|
2776
|
+
|
|
1986
2777
|
const query_params = {};
|
|
1987
2778
|
query_params["item_id"] = itemId;
|
|
1988
2779
|
query_params["size"] = size;
|
|
@@ -2028,35 +2819,18 @@ class Catalog {
|
|
|
2028
2819
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2029
2820
|
}
|
|
2030
2821
|
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
const xHeaders = {};
|
|
2034
|
-
|
|
2035
|
-
return PlatformAPIClient.execute(
|
|
2036
|
-
this.config,
|
|
2037
|
-
"delete",
|
|
2038
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}/location/${locationId}/`,
|
|
2039
|
-
query_params,
|
|
2040
|
-
undefined,
|
|
2041
|
-
xHeaders
|
|
2042
|
-
);
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
/**
|
|
2046
|
-
* @param {Object} arg - Arg object.
|
|
2047
|
-
* @param {BulkJob} arg.body
|
|
2048
|
-
* @summary: Create a Bulk Inventory upload Job.
|
|
2049
|
-
* @description: This API helps to create a bulk Inventory upload job.
|
|
2050
|
-
*/
|
|
2051
|
-
createBulkInventoryJob({ body } = {}) {
|
|
2052
|
-
const { error } = CatalogValidator.createBulkInventoryJob().validate(
|
|
2822
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2823
|
+
const { error: warrning } = CatalogValidator.deleteInventory().validate(
|
|
2053
2824
|
{
|
|
2054
|
-
|
|
2825
|
+
size,
|
|
2826
|
+
itemId,
|
|
2827
|
+
locationId,
|
|
2055
2828
|
},
|
|
2056
|
-
{ abortEarly: false, allowUnknown:
|
|
2829
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2057
2830
|
);
|
|
2058
|
-
if (
|
|
2059
|
-
|
|
2831
|
+
if (warrning) {
|
|
2832
|
+
console.log("Parameter Validation warrnings for deleteInventory");
|
|
2833
|
+
console.log(warrning);
|
|
2060
2834
|
}
|
|
2061
2835
|
|
|
2062
2836
|
const query_params = {};
|
|
@@ -2065,10 +2839,10 @@ class Catalog {
|
|
|
2065
2839
|
|
|
2066
2840
|
return PlatformAPIClient.execute(
|
|
2067
2841
|
this.config,
|
|
2068
|
-
"
|
|
2069
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/
|
|
2842
|
+
"delete",
|
|
2843
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/products/${itemId}/sizes/${size}/location/${locationId}/`,
|
|
2070
2844
|
query_params,
|
|
2071
|
-
|
|
2845
|
+
undefined,
|
|
2072
2846
|
xHeaders
|
|
2073
2847
|
);
|
|
2074
2848
|
}
|
|
@@ -2094,6 +2868,23 @@ class Catalog {
|
|
|
2094
2868
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2095
2869
|
}
|
|
2096
2870
|
|
|
2871
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2872
|
+
const {
|
|
2873
|
+
error: warrning,
|
|
2874
|
+
} = CatalogValidator.getInventoryBulkUploadHistory().validate(
|
|
2875
|
+
{
|
|
2876
|
+
pageNo,
|
|
2877
|
+
pageSize,
|
|
2878
|
+
},
|
|
2879
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2880
|
+
);
|
|
2881
|
+
if (warrning) {
|
|
2882
|
+
console.log(
|
|
2883
|
+
"Parameter Validation warrnings for getInventoryBulkUploadHistory"
|
|
2884
|
+
);
|
|
2885
|
+
console.log(warrning);
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2097
2888
|
const query_params = {};
|
|
2098
2889
|
query_params["page_no"] = pageNo;
|
|
2099
2890
|
query_params["page_size"] = pageSize;
|
|
@@ -2110,17 +2901,15 @@ class Catalog {
|
|
|
2110
2901
|
);
|
|
2111
2902
|
}
|
|
2112
2903
|
|
|
2113
|
-
/**
|
|
2114
|
-
* @param {Object} arg - Arg object.
|
|
2115
|
-
* @param {
|
|
2116
|
-
* @
|
|
2117
|
-
* @
|
|
2118
|
-
* @description: This API helps to create products in bulk push to kafka for approval/creation.
|
|
2904
|
+
/**
|
|
2905
|
+
* @param {Object} arg - Arg object.
|
|
2906
|
+
* @param {BulkJob} arg.body
|
|
2907
|
+
* @summary: Create a Bulk Inventory upload Job.
|
|
2908
|
+
* @description: This API helps to create a bulk Inventory upload job.
|
|
2119
2909
|
*/
|
|
2120
|
-
|
|
2121
|
-
const { error } = CatalogValidator.
|
|
2910
|
+
createBulkInventoryJob({ body } = {}) {
|
|
2911
|
+
const { error } = CatalogValidator.createBulkInventoryJob().validate(
|
|
2122
2912
|
{
|
|
2123
|
-
batchId,
|
|
2124
2913
|
body,
|
|
2125
2914
|
},
|
|
2126
2915
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2129,6 +2918,20 @@ class Catalog {
|
|
|
2129
2918
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2130
2919
|
}
|
|
2131
2920
|
|
|
2921
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2922
|
+
const {
|
|
2923
|
+
error: warrning,
|
|
2924
|
+
} = CatalogValidator.createBulkInventoryJob().validate(
|
|
2925
|
+
{
|
|
2926
|
+
body,
|
|
2927
|
+
},
|
|
2928
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2929
|
+
);
|
|
2930
|
+
if (warrning) {
|
|
2931
|
+
console.log("Parameter Validation warrnings for createBulkInventoryJob");
|
|
2932
|
+
console.log(warrning);
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2132
2935
|
const query_params = {};
|
|
2133
2936
|
|
|
2134
2937
|
const xHeaders = {};
|
|
@@ -2136,7 +2939,7 @@ class Catalog {
|
|
|
2136
2939
|
return PlatformAPIClient.execute(
|
|
2137
2940
|
this.config,
|
|
2138
2941
|
"post",
|
|
2139
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk
|
|
2942
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/`,
|
|
2140
2943
|
query_params,
|
|
2141
2944
|
body,
|
|
2142
2945
|
xHeaders
|
|
@@ -2160,6 +2963,20 @@ class Catalog {
|
|
|
2160
2963
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2161
2964
|
}
|
|
2162
2965
|
|
|
2966
|
+
// Showing warrnings if extra unknown parameters are found
|
|
2967
|
+
const {
|
|
2968
|
+
error: warrning,
|
|
2969
|
+
} = CatalogValidator.deleteBulkInventoryJob().validate(
|
|
2970
|
+
{
|
|
2971
|
+
batchId,
|
|
2972
|
+
},
|
|
2973
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2974
|
+
);
|
|
2975
|
+
if (warrning) {
|
|
2976
|
+
console.log("Parameter Validation warrnings for deleteBulkInventoryJob");
|
|
2977
|
+
console.log(warrning);
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2163
2980
|
const query_params = {};
|
|
2164
2981
|
|
|
2165
2982
|
const xHeaders = {};
|
|
@@ -2176,13 +2993,15 @@ class Catalog {
|
|
|
2176
2993
|
|
|
2177
2994
|
/**
|
|
2178
2995
|
* @param {Object} arg - Arg object.
|
|
2179
|
-
* @param {
|
|
2180
|
-
* @
|
|
2181
|
-
* @
|
|
2996
|
+
* @param {string} arg.batchId - Batch Id of the bulk create job.
|
|
2997
|
+
* @param {InventoryBulkRequest} arg.body
|
|
2998
|
+
* @summary: Create products in bulk associated with given batch Id.
|
|
2999
|
+
* @description: This API helps to create products in bulk push to kafka for approval/creation.
|
|
2182
3000
|
*/
|
|
2183
|
-
|
|
2184
|
-
const { error } = CatalogValidator.
|
|
3001
|
+
createBulkInventory({ batchId, body } = {}) {
|
|
3002
|
+
const { error } = CatalogValidator.createBulkInventory().validate(
|
|
2185
3003
|
{
|
|
3004
|
+
batchId,
|
|
2186
3005
|
body,
|
|
2187
3006
|
},
|
|
2188
3007
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2191,6 +3010,19 @@ class Catalog {
|
|
|
2191
3010
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2192
3011
|
}
|
|
2193
3012
|
|
|
3013
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3014
|
+
const { error: warrning } = CatalogValidator.createBulkInventory().validate(
|
|
3015
|
+
{
|
|
3016
|
+
batchId,
|
|
3017
|
+
body,
|
|
3018
|
+
},
|
|
3019
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3020
|
+
);
|
|
3021
|
+
if (warrning) {
|
|
3022
|
+
console.log("Parameter Validation warrnings for createBulkInventory");
|
|
3023
|
+
console.log(warrning);
|
|
3024
|
+
}
|
|
3025
|
+
|
|
2194
3026
|
const query_params = {};
|
|
2195
3027
|
|
|
2196
3028
|
const xHeaders = {};
|
|
@@ -2198,7 +3030,7 @@ class Catalog {
|
|
|
2198
3030
|
return PlatformAPIClient.execute(
|
|
2199
3031
|
this.config,
|
|
2200
3032
|
"post",
|
|
2201
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/
|
|
3033
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/bulk/${batchId}/`,
|
|
2202
3034
|
query_params,
|
|
2203
3035
|
body,
|
|
2204
3036
|
xHeaders
|
|
@@ -2219,6 +3051,16 @@ class Catalog {
|
|
|
2219
3051
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2220
3052
|
}
|
|
2221
3053
|
|
|
3054
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3055
|
+
const { error: warrning } = CatalogValidator.getInventoryExport().validate(
|
|
3056
|
+
{},
|
|
3057
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3058
|
+
);
|
|
3059
|
+
if (warrning) {
|
|
3060
|
+
console.log("Parameter Validation warrnings for getInventoryExport");
|
|
3061
|
+
console.log(warrning);
|
|
3062
|
+
}
|
|
3063
|
+
|
|
2222
3064
|
const query_params = {};
|
|
2223
3065
|
|
|
2224
3066
|
const xHeaders = {};
|
|
@@ -2233,6 +3075,53 @@ class Catalog {
|
|
|
2233
3075
|
);
|
|
2234
3076
|
}
|
|
2235
3077
|
|
|
3078
|
+
/**
|
|
3079
|
+
* @param {Object} arg - Arg object.
|
|
3080
|
+
* @param {InventoryExportRequest} arg.body
|
|
3081
|
+
* @summary: Create a Inventory export Job.
|
|
3082
|
+
* @description: This API helps to create a Inventory export job.
|
|
3083
|
+
*/
|
|
3084
|
+
createInventoryExportJob({ body } = {}) {
|
|
3085
|
+
const { error } = CatalogValidator.createInventoryExportJob().validate(
|
|
3086
|
+
{
|
|
3087
|
+
body,
|
|
3088
|
+
},
|
|
3089
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3090
|
+
);
|
|
3091
|
+
if (error) {
|
|
3092
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3096
|
+
const {
|
|
3097
|
+
error: warrning,
|
|
3098
|
+
} = CatalogValidator.createInventoryExportJob().validate(
|
|
3099
|
+
{
|
|
3100
|
+
body,
|
|
3101
|
+
},
|
|
3102
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3103
|
+
);
|
|
3104
|
+
if (warrning) {
|
|
3105
|
+
console.log(
|
|
3106
|
+
"Parameter Validation warrnings for createInventoryExportJob"
|
|
3107
|
+
);
|
|
3108
|
+
console.log(warrning);
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3111
|
+
const query_params = {};
|
|
3112
|
+
|
|
3113
|
+
const xHeaders = {};
|
|
3114
|
+
|
|
3115
|
+
return PlatformAPIClient.execute(
|
|
3116
|
+
this.config,
|
|
3117
|
+
"post",
|
|
3118
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/inventory/download/`,
|
|
3119
|
+
query_params,
|
|
3120
|
+
body,
|
|
3121
|
+
xHeaders
|
|
3122
|
+
);
|
|
3123
|
+
}
|
|
3124
|
+
|
|
2236
3125
|
/**
|
|
2237
3126
|
* @param {Object} arg - Arg object.
|
|
2238
3127
|
* @param {string} [arg.filterType] - Filter type from any one of ['brand',
|
|
@@ -2251,6 +3140,20 @@ class Catalog {
|
|
|
2251
3140
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2252
3141
|
}
|
|
2253
3142
|
|
|
3143
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3144
|
+
const {
|
|
3145
|
+
error: warrning,
|
|
3146
|
+
} = CatalogValidator.exportInventoryConfig().validate(
|
|
3147
|
+
{
|
|
3148
|
+
filterType,
|
|
3149
|
+
},
|
|
3150
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3151
|
+
);
|
|
3152
|
+
if (warrning) {
|
|
3153
|
+
console.log("Parameter Validation warrnings for exportInventoryConfig");
|
|
3154
|
+
console.log(warrning);
|
|
3155
|
+
}
|
|
3156
|
+
|
|
2254
3157
|
const query_params = {};
|
|
2255
3158
|
query_params["filter_type"] = filterType;
|
|
2256
3159
|
|
|
@@ -2275,8 +3178,8 @@ class Catalog {
|
|
|
2275
3178
|
* @summary: Add Inventory for particular size and store.
|
|
2276
3179
|
* @description: This API allows add Inventory for particular size and store.
|
|
2277
3180
|
*/
|
|
2278
|
-
|
|
2279
|
-
const { error } = CatalogValidator.
|
|
3181
|
+
deleteRealtimeInventory({ itemId, sellerIdentifier, body } = {}) {
|
|
3182
|
+
const { error } = CatalogValidator.deleteRealtimeInventory().validate(
|
|
2280
3183
|
{
|
|
2281
3184
|
itemId,
|
|
2282
3185
|
sellerIdentifier,
|
|
@@ -2288,13 +3191,29 @@ class Catalog {
|
|
|
2288
3191
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2289
3192
|
}
|
|
2290
3193
|
|
|
3194
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3195
|
+
const {
|
|
3196
|
+
error: warrning,
|
|
3197
|
+
} = CatalogValidator.deleteRealtimeInventory().validate(
|
|
3198
|
+
{
|
|
3199
|
+
itemId,
|
|
3200
|
+
sellerIdentifier,
|
|
3201
|
+
body,
|
|
3202
|
+
},
|
|
3203
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3204
|
+
);
|
|
3205
|
+
if (warrning) {
|
|
3206
|
+
console.log("Parameter Validation warrnings for deleteRealtimeInventory");
|
|
3207
|
+
console.log(warrning);
|
|
3208
|
+
}
|
|
3209
|
+
|
|
2291
3210
|
const query_params = {};
|
|
2292
3211
|
|
|
2293
3212
|
const xHeaders = {};
|
|
2294
3213
|
|
|
2295
3214
|
return PlatformAPIClient.execute(
|
|
2296
3215
|
this.config,
|
|
2297
|
-
"
|
|
3216
|
+
"delete",
|
|
2298
3217
|
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/inventory/${sellerIdentifier}/`,
|
|
2299
3218
|
query_params,
|
|
2300
3219
|
body,
|
|
@@ -2311,8 +3230,8 @@ class Catalog {
|
|
|
2311
3230
|
* @summary: Add Inventory for particular size and store.
|
|
2312
3231
|
* @description: This API allows add Inventory for particular size and store.
|
|
2313
3232
|
*/
|
|
2314
|
-
|
|
2315
|
-
const { error } = CatalogValidator.
|
|
3233
|
+
updateRealtimeInventory({ itemId, sellerIdentifier, body } = {}) {
|
|
3234
|
+
const { error } = CatalogValidator.updateRealtimeInventory().validate(
|
|
2316
3235
|
{
|
|
2317
3236
|
itemId,
|
|
2318
3237
|
sellerIdentifier,
|
|
@@ -2324,13 +3243,29 @@ class Catalog {
|
|
|
2324
3243
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2325
3244
|
}
|
|
2326
3245
|
|
|
3246
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3247
|
+
const {
|
|
3248
|
+
error: warrning,
|
|
3249
|
+
} = CatalogValidator.updateRealtimeInventory().validate(
|
|
3250
|
+
{
|
|
3251
|
+
itemId,
|
|
3252
|
+
sellerIdentifier,
|
|
3253
|
+
body,
|
|
3254
|
+
},
|
|
3255
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3256
|
+
);
|
|
3257
|
+
if (warrning) {
|
|
3258
|
+
console.log("Parameter Validation warrnings for updateRealtimeInventory");
|
|
3259
|
+
console.log(warrning);
|
|
3260
|
+
}
|
|
3261
|
+
|
|
2327
3262
|
const query_params = {};
|
|
2328
3263
|
|
|
2329
3264
|
const xHeaders = {};
|
|
2330
3265
|
|
|
2331
3266
|
return PlatformAPIClient.execute(
|
|
2332
3267
|
this.config,
|
|
2333
|
-
"
|
|
3268
|
+
"post",
|
|
2334
3269
|
`/service/platform/catalog/v2.0/company/${this.config.companyId}/products/${itemId}/inventory/${sellerIdentifier}/`,
|
|
2335
3270
|
query_params,
|
|
2336
3271
|
body,
|
|
@@ -2355,35 +3290,16 @@ class Catalog {
|
|
|
2355
3290
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2356
3291
|
}
|
|
2357
3292
|
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
const xHeaders = {};
|
|
2361
|
-
|
|
2362
|
-
return PlatformAPIClient.execute(
|
|
2363
|
-
this.config,
|
|
2364
|
-
"post",
|
|
2365
|
-
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/`,
|
|
2366
|
-
query_params,
|
|
2367
|
-
body,
|
|
2368
|
-
xHeaders
|
|
2369
|
-
);
|
|
2370
|
-
}
|
|
2371
|
-
|
|
2372
|
-
/**
|
|
2373
|
-
* @param {Object} arg - Arg object.
|
|
2374
|
-
* @param {HsnUpsert} arg.body
|
|
2375
|
-
* @summary: Create Hsn Code.
|
|
2376
|
-
* @description: Create Hsn Code.
|
|
2377
|
-
*/
|
|
2378
|
-
createHsnCode({ body } = {}) {
|
|
2379
|
-
const { error } = CatalogValidator.createHsnCode().validate(
|
|
3293
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3294
|
+
const { error: warrning } = CatalogValidator.updateInventories().validate(
|
|
2380
3295
|
{
|
|
2381
3296
|
body,
|
|
2382
3297
|
},
|
|
2383
|
-
{ abortEarly: false, allowUnknown:
|
|
3298
|
+
{ abortEarly: false, allowUnknown: false }
|
|
2384
3299
|
);
|
|
2385
|
-
if (
|
|
2386
|
-
|
|
3300
|
+
if (warrning) {
|
|
3301
|
+
console.log("Parameter Validation warrnings for updateInventories");
|
|
3302
|
+
console.log(warrning);
|
|
2387
3303
|
}
|
|
2388
3304
|
|
|
2389
3305
|
const query_params = {};
|
|
@@ -2393,7 +3309,7 @@ class Catalog {
|
|
|
2393
3309
|
return PlatformAPIClient.execute(
|
|
2394
3310
|
this.config,
|
|
2395
3311
|
"post",
|
|
2396
|
-
`/service/platform/catalog/
|
|
3312
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/inventory/`,
|
|
2397
3313
|
query_params,
|
|
2398
3314
|
body,
|
|
2399
3315
|
xHeaders
|
|
@@ -2421,6 +3337,20 @@ class Catalog {
|
|
|
2421
3337
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2422
3338
|
}
|
|
2423
3339
|
|
|
3340
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3341
|
+
const { error: warrning } = CatalogValidator.getAllHsnCodes().validate(
|
|
3342
|
+
{
|
|
3343
|
+
pageNo,
|
|
3344
|
+
pageSize,
|
|
3345
|
+
q,
|
|
3346
|
+
},
|
|
3347
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3348
|
+
);
|
|
3349
|
+
if (warrning) {
|
|
3350
|
+
console.log("Parameter Validation warrnings for getAllHsnCodes");
|
|
3351
|
+
console.log(warrning);
|
|
3352
|
+
}
|
|
3353
|
+
|
|
2424
3354
|
const query_params = {};
|
|
2425
3355
|
query_params["page_no"] = pageNo;
|
|
2426
3356
|
query_params["page_size"] = pageSize;
|
|
@@ -2440,15 +3370,13 @@ class Catalog {
|
|
|
2440
3370
|
|
|
2441
3371
|
/**
|
|
2442
3372
|
* @param {Object} arg - Arg object.
|
|
2443
|
-
* @param {string} arg.id - Unique id
|
|
2444
3373
|
* @param {HsnUpsert} arg.body
|
|
2445
|
-
* @summary:
|
|
2446
|
-
* @description:
|
|
3374
|
+
* @summary: Create Hsn Code.
|
|
3375
|
+
* @description: Create Hsn Code.
|
|
2447
3376
|
*/
|
|
2448
|
-
|
|
2449
|
-
const { error } = CatalogValidator.
|
|
3377
|
+
createHsnCode({ body } = {}) {
|
|
3378
|
+
const { error } = CatalogValidator.createHsnCode().validate(
|
|
2450
3379
|
{
|
|
2451
|
-
id,
|
|
2452
3380
|
body,
|
|
2453
3381
|
},
|
|
2454
3382
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2457,14 +3385,26 @@ class Catalog {
|
|
|
2457
3385
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2458
3386
|
}
|
|
2459
3387
|
|
|
3388
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3389
|
+
const { error: warrning } = CatalogValidator.createHsnCode().validate(
|
|
3390
|
+
{
|
|
3391
|
+
body,
|
|
3392
|
+
},
|
|
3393
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3394
|
+
);
|
|
3395
|
+
if (warrning) {
|
|
3396
|
+
console.log("Parameter Validation warrnings for createHsnCode");
|
|
3397
|
+
console.log(warrning);
|
|
3398
|
+
}
|
|
3399
|
+
|
|
2460
3400
|
const query_params = {};
|
|
2461
3401
|
|
|
2462
3402
|
const xHeaders = {};
|
|
2463
3403
|
|
|
2464
3404
|
return PlatformAPIClient.execute(
|
|
2465
3405
|
this.config,
|
|
2466
|
-
"
|
|
2467
|
-
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn
|
|
3406
|
+
"post",
|
|
3407
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/`,
|
|
2468
3408
|
query_params,
|
|
2469
3409
|
body,
|
|
2470
3410
|
xHeaders
|
|
@@ -2488,6 +3428,18 @@ class Catalog {
|
|
|
2488
3428
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2489
3429
|
}
|
|
2490
3430
|
|
|
3431
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3432
|
+
const { error: warrning } = CatalogValidator.getHsnCode().validate(
|
|
3433
|
+
{
|
|
3434
|
+
id,
|
|
3435
|
+
},
|
|
3436
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3437
|
+
);
|
|
3438
|
+
if (warrning) {
|
|
3439
|
+
console.log("Parameter Validation warrnings for getHsnCode");
|
|
3440
|
+
console.log(warrning);
|
|
3441
|
+
}
|
|
3442
|
+
|
|
2491
3443
|
const query_params = {};
|
|
2492
3444
|
|
|
2493
3445
|
const xHeaders = {};
|
|
@@ -2502,6 +3454,52 @@ class Catalog {
|
|
|
2502
3454
|
);
|
|
2503
3455
|
}
|
|
2504
3456
|
|
|
3457
|
+
/**
|
|
3458
|
+
* @param {Object} arg - Arg object.
|
|
3459
|
+
* @param {string} arg.id - Unique id
|
|
3460
|
+
* @param {HsnUpsert} arg.body
|
|
3461
|
+
* @summary: Update Hsn Code.
|
|
3462
|
+
* @description: Update Hsn Code.
|
|
3463
|
+
*/
|
|
3464
|
+
updateHsnCode({ id, body } = {}) {
|
|
3465
|
+
const { error } = CatalogValidator.updateHsnCode().validate(
|
|
3466
|
+
{
|
|
3467
|
+
id,
|
|
3468
|
+
body,
|
|
3469
|
+
},
|
|
3470
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3471
|
+
);
|
|
3472
|
+
if (error) {
|
|
3473
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3474
|
+
}
|
|
3475
|
+
|
|
3476
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3477
|
+
const { error: warrning } = CatalogValidator.updateHsnCode().validate(
|
|
3478
|
+
{
|
|
3479
|
+
id,
|
|
3480
|
+
body,
|
|
3481
|
+
},
|
|
3482
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3483
|
+
);
|
|
3484
|
+
if (warrning) {
|
|
3485
|
+
console.log("Parameter Validation warrnings for updateHsnCode");
|
|
3486
|
+
console.log(warrning);
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3489
|
+
const query_params = {};
|
|
3490
|
+
|
|
3491
|
+
const xHeaders = {};
|
|
3492
|
+
|
|
3493
|
+
return PlatformAPIClient.execute(
|
|
3494
|
+
this.config,
|
|
3495
|
+
"put",
|
|
3496
|
+
`/service/platform/catalog/v1.0/company/${this.config.companyId}/hsn/${id}/`,
|
|
3497
|
+
query_params,
|
|
3498
|
+
body,
|
|
3499
|
+
xHeaders
|
|
3500
|
+
);
|
|
3501
|
+
}
|
|
3502
|
+
|
|
2505
3503
|
/**
|
|
2506
3504
|
* @param {Object} arg - Arg object.
|
|
2507
3505
|
* @param {BulkHsnUpsert} arg.body
|
|
@@ -2519,6 +3517,18 @@ class Catalog {
|
|
|
2519
3517
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2520
3518
|
}
|
|
2521
3519
|
|
|
3520
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3521
|
+
const { error: warrning } = CatalogValidator.bulkHsnCode().validate(
|
|
3522
|
+
{
|
|
3523
|
+
body,
|
|
3524
|
+
},
|
|
3525
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3526
|
+
);
|
|
3527
|
+
if (warrning) {
|
|
3528
|
+
console.log("Parameter Validation warrnings for bulkHsnCode");
|
|
3529
|
+
console.log(warrning);
|
|
3530
|
+
}
|
|
3531
|
+
|
|
2522
3532
|
const query_params = {};
|
|
2523
3533
|
|
|
2524
3534
|
const xHeaders = {};
|
|
@@ -2556,6 +3566,23 @@ class Catalog {
|
|
|
2556
3566
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2557
3567
|
}
|
|
2558
3568
|
|
|
3569
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3570
|
+
const {
|
|
3571
|
+
error: warrning,
|
|
3572
|
+
} = CatalogValidator.getAllProductHsnCodes().validate(
|
|
3573
|
+
{
|
|
3574
|
+
pageNo,
|
|
3575
|
+
pageSize,
|
|
3576
|
+
q,
|
|
3577
|
+
type,
|
|
3578
|
+
},
|
|
3579
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3580
|
+
);
|
|
3581
|
+
if (warrning) {
|
|
3582
|
+
console.log("Parameter Validation warrnings for getAllProductHsnCodes");
|
|
3583
|
+
console.log(warrning);
|
|
3584
|
+
}
|
|
3585
|
+
|
|
2559
3586
|
const query_params = {};
|
|
2560
3587
|
query_params["page_no"] = pageNo;
|
|
2561
3588
|
query_params["page_size"] = pageSize;
|
|
@@ -2591,6 +3618,20 @@ class Catalog {
|
|
|
2591
3618
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2592
3619
|
}
|
|
2593
3620
|
|
|
3621
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3622
|
+
const {
|
|
3623
|
+
error: warrning,
|
|
3624
|
+
} = CatalogValidator.getSingleProductHSNCode().validate(
|
|
3625
|
+
{
|
|
3626
|
+
reportingHsn,
|
|
3627
|
+
},
|
|
3628
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3629
|
+
);
|
|
3630
|
+
if (warrning) {
|
|
3631
|
+
console.log("Parameter Validation warrnings for getSingleProductHSNCode");
|
|
3632
|
+
console.log(warrning);
|
|
3633
|
+
}
|
|
3634
|
+
|
|
2594
3635
|
const query_params = {};
|
|
2595
3636
|
|
|
2596
3637
|
const xHeaders = {};
|
|
@@ -2622,6 +3663,18 @@ class Catalog {
|
|
|
2622
3663
|
return Promise.reject(new FDKClientValidationError(error));
|
|
2623
3664
|
}
|
|
2624
3665
|
|
|
3666
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3667
|
+
const { error: warrning } = CatalogValidator.getOptimalLocations().validate(
|
|
3668
|
+
{
|
|
3669
|
+
body,
|
|
3670
|
+
},
|
|
3671
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3672
|
+
);
|
|
3673
|
+
if (warrning) {
|
|
3674
|
+
console.log("Parameter Validation warrnings for getOptimalLocations");
|
|
3675
|
+
console.log(warrning);
|
|
3676
|
+
}
|
|
3677
|
+
|
|
2625
3678
|
const query_params = {};
|
|
2626
3679
|
|
|
2627
3680
|
const xHeaders = {};
|