@gofynd/fdk-client-javascript 0.1.37 → 1.0.0
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 +427 -404
- 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 +287 -287
- package/documentation/application/PAYMENT.md +278 -278
- 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 +2691 -2624
- package/documentation/platform/COMPANYPROFILE.md +186 -348
- 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 +1299 -1621
- package/documentation/platform/PAYMENT.md +89 -89
- package/documentation/platform/REWARDS.md +145 -0
- package/documentation/platform/USER.md +24 -14
- package/index.d.ts +4 -1
- package/index.js +6 -3
- 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 +14 -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} +16 -12
- package/sdk/application/{client → Catalog}/CatalogApplicationClient.d.ts +8 -5
- package/sdk/application/{client → Catalog}/CatalogApplicationClient.js +11 -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} +3 -1
- package/sdk/application/{client → Common}/CommonApplicationClient.js +2 -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} +2 -1
- package/sdk/application/{client → Communication}/CommunicationApplicationClient.js +2 -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} +4 -3
- package/sdk/application/{client → Configuration}/ConfigurationApplicationClient.js +2 -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} +3 -2
- package/sdk/application/{client → Content}/ContentApplicationClient.js +2 -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} +2 -1
- package/sdk/application/{client → FileStorage}/FileStorageApplicationClient.js +2 -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} +5 -4
- package/sdk/application/{client → Lead}/LeadApplicationClient.js +2 -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} +5 -4
- package/sdk/application/{client → Logistic}/LogisticApplicationClient.js +2 -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} +4 -3
- package/sdk/application/{client → Order}/OrderApplicationClient.js +2 -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} +4 -3
- package/sdk/application/{client → Payment}/PaymentApplicationClient.js +2 -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} +24 -23
- package/sdk/application/{client → PosCart}/PosCartApplicationClient.d.ts +9 -3
- package/sdk/application/{client → PosCart}/PosCartApplicationClient.js +14 -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} +17 -13
- package/sdk/application/{client → Rewards}/RewardsApplicationClient.js +2 -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} +5 -4
- package/sdk/application/{client → Share}/ShareApplicationClient.js +2 -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} +3 -2
- package/sdk/application/{client → Theme}/ThemeApplicationClient.js +2 -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} +2 -1
- package/sdk/application/{client → User}/UserApplicationClient.js +2 -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} +30 -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 +285 -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 +2 -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 +2 -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 +2 -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 +755 -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 +2136 -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 +338 -338
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +316 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4690 -0
- package/sdk/platform/{models/CatalogValidator.js → Catalog/CatalogPlatformValidator.js} +89 -88
- package/sdk/platform/{client → Common}/CommonPlatformClient.js +2 -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 +1656 -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 +2 -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 +2 -33
- 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 +940 -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 +2 -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 +2208 -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 +35 -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 +247 -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 +2 -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 +2 -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 +397 -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 +2 -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 +152 -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 +9 -49
- package/sdk/platform/{client → Order}/OrderPlatformClient.js +18 -130
- package/sdk/platform/Order/OrderPlatformModel.d.ts +215 -0
- package/sdk/platform/Order/OrderPlatformModel.js +3530 -0
- package/sdk/platform/{models/OrderValidator.d.ts → Order/OrderPlatformValidator.d.ts} +0 -2
- package/sdk/platform/{models/OrderValidator.js → Order/OrderPlatformValidator.js} +22 -44
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +30 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +74 -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 +333 -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 +2 -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 +2979 -18615
- package/sdk/platform/PlatformApplicationClient.js +3811 -13957
- package/sdk/platform/PlatformClient.d.ts +2982 -3013
- package/sdk/platform/PlatformClient.js +3806 -3231
- package/sdk/platform/PlatformConfig.js +2 -1
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +150 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +428 -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 +182 -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 +704 -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 +361 -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 +2 -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 +1 -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} +1 -1
- package/sdk/public/{client → Inventory}/InventoryPublicClient.js +1 -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} +2 -2
- package/sdk/public/PublicClient.d.ts +3 -3
- package/sdk/public/PublicClient.js +8 -3
- package/sdk/public/{client → Webhook}/WebhookPublicClient.js +1 -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} +2 -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 +126 -126
- package/sdk/platform/{models/CatalogValidator.d.ts → Catalog/CatalogPlatformValidator.d.ts} +15 -15
- /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
|
@@ -0,0 +1,940 @@
|
|
|
1
|
+
const Paginator = require("../../common/Paginator");
|
|
2
|
+
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
|
+
const ConfigurationValidator = require("./ConfigurationPlatformApplicationValidator");
|
|
5
|
+
|
|
6
|
+
class Configuration {
|
|
7
|
+
constructor(config, applicationId) {
|
|
8
|
+
this.config = config;
|
|
9
|
+
this.applicationId = applicationId;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {Object} arg - Arg object.
|
|
14
|
+
* @param {string} arg.platformType - Current platform name
|
|
15
|
+
* @summary: Get latest build config
|
|
16
|
+
* @description: Get latest build config
|
|
17
|
+
*/
|
|
18
|
+
getBuildConfig({ platformType } = {}) {
|
|
19
|
+
const { error } = ConfigurationValidator.getBuildConfig().validate(
|
|
20
|
+
{
|
|
21
|
+
platformType,
|
|
22
|
+
},
|
|
23
|
+
{ abortEarly: false, allowUnknown: true }
|
|
24
|
+
);
|
|
25
|
+
if (error) {
|
|
26
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const query_params = {};
|
|
30
|
+
|
|
31
|
+
return PlatformAPIClient.execute(
|
|
32
|
+
this.config,
|
|
33
|
+
"get",
|
|
34
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
|
|
35
|
+
query_params,
|
|
36
|
+
undefined
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @param {Object} arg - Arg object.
|
|
42
|
+
* @param {string} arg.platformType - Current platform name
|
|
43
|
+
* @param {MobileAppConfigRequest} arg.body
|
|
44
|
+
* @summary: Update build config for next build
|
|
45
|
+
* @description: Update build config for next build
|
|
46
|
+
*/
|
|
47
|
+
updateBuildConfig({ platformType, body } = {}) {
|
|
48
|
+
const { error } = ConfigurationValidator.updateBuildConfig().validate(
|
|
49
|
+
{
|
|
50
|
+
platformType,
|
|
51
|
+
body,
|
|
52
|
+
},
|
|
53
|
+
{ abortEarly: false, allowUnknown: true }
|
|
54
|
+
);
|
|
55
|
+
if (error) {
|
|
56
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const query_params = {};
|
|
60
|
+
|
|
61
|
+
return PlatformAPIClient.execute(
|
|
62
|
+
this.config,
|
|
63
|
+
"put",
|
|
64
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/configuration`,
|
|
65
|
+
query_params,
|
|
66
|
+
body
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @param {Object} arg - Arg object.
|
|
72
|
+
* @param {string} arg.platformType - Current platform name
|
|
73
|
+
* @summary: Get previous build versions
|
|
74
|
+
* @description: Get previous build versions
|
|
75
|
+
*/
|
|
76
|
+
getPreviousVersions({ platformType } = {}) {
|
|
77
|
+
const { error } = ConfigurationValidator.getPreviousVersions().validate(
|
|
78
|
+
{
|
|
79
|
+
platformType,
|
|
80
|
+
},
|
|
81
|
+
{ abortEarly: false, allowUnknown: true }
|
|
82
|
+
);
|
|
83
|
+
if (error) {
|
|
84
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const query_params = {};
|
|
88
|
+
|
|
89
|
+
return PlatformAPIClient.execute(
|
|
90
|
+
this.config,
|
|
91
|
+
"get",
|
|
92
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/build/${platformType}/versions`,
|
|
93
|
+
query_params,
|
|
94
|
+
undefined
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @param {Object} arg - Arg object.
|
|
100
|
+
* @summary: Get features of application
|
|
101
|
+
* @description: Get features of application
|
|
102
|
+
*/
|
|
103
|
+
getAppFeatures({} = {}) {
|
|
104
|
+
const { error } = ConfigurationValidator.getAppFeatures().validate(
|
|
105
|
+
{},
|
|
106
|
+
{ abortEarly: false, allowUnknown: true }
|
|
107
|
+
);
|
|
108
|
+
if (error) {
|
|
109
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const query_params = {};
|
|
113
|
+
|
|
114
|
+
return PlatformAPIClient.execute(
|
|
115
|
+
this.config,
|
|
116
|
+
"get",
|
|
117
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
|
|
118
|
+
query_params,
|
|
119
|
+
undefined
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @param {Object} arg - Arg object.
|
|
125
|
+
* @param {AppFeatureRequest} arg.body
|
|
126
|
+
* @summary: Update features of application
|
|
127
|
+
* @description: Update features of application
|
|
128
|
+
*/
|
|
129
|
+
updateAppFeatures({ body } = {}) {
|
|
130
|
+
const { error } = ConfigurationValidator.updateAppFeatures().validate(
|
|
131
|
+
{
|
|
132
|
+
body,
|
|
133
|
+
},
|
|
134
|
+
{ abortEarly: false, allowUnknown: true }
|
|
135
|
+
);
|
|
136
|
+
if (error) {
|
|
137
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const query_params = {};
|
|
141
|
+
|
|
142
|
+
return PlatformAPIClient.execute(
|
|
143
|
+
this.config,
|
|
144
|
+
"post",
|
|
145
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/feature`,
|
|
146
|
+
query_params,
|
|
147
|
+
body
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @param {Object} arg - Arg object.
|
|
153
|
+
* @summary: Get basic application details
|
|
154
|
+
* @description: Get basic application details like name
|
|
155
|
+
*/
|
|
156
|
+
getAppBasicDetails({} = {}) {
|
|
157
|
+
const { error } = ConfigurationValidator.getAppBasicDetails().validate(
|
|
158
|
+
{},
|
|
159
|
+
{ abortEarly: false, allowUnknown: true }
|
|
160
|
+
);
|
|
161
|
+
if (error) {
|
|
162
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const query_params = {};
|
|
166
|
+
|
|
167
|
+
return PlatformAPIClient.execute(
|
|
168
|
+
this.config,
|
|
169
|
+
"get",
|
|
170
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
|
|
171
|
+
query_params,
|
|
172
|
+
undefined
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* @param {Object} arg - Arg object.
|
|
178
|
+
* @param {ApplicationDetail} arg.body
|
|
179
|
+
* @summary: Add or update application's basic details
|
|
180
|
+
* @description: Add or update application's basic details
|
|
181
|
+
*/
|
|
182
|
+
updateAppBasicDetails({ body } = {}) {
|
|
183
|
+
const { error } = ConfigurationValidator.updateAppBasicDetails().validate(
|
|
184
|
+
{
|
|
185
|
+
body,
|
|
186
|
+
},
|
|
187
|
+
{ abortEarly: false, allowUnknown: true }
|
|
188
|
+
);
|
|
189
|
+
if (error) {
|
|
190
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const query_params = {};
|
|
194
|
+
|
|
195
|
+
return PlatformAPIClient.execute(
|
|
196
|
+
this.config,
|
|
197
|
+
"put",
|
|
198
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
|
|
199
|
+
query_params,
|
|
200
|
+
body
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @param {Object} arg - Arg object.
|
|
206
|
+
* @summary: Get application information
|
|
207
|
+
* @description: Get Application Current Information. This includes information about social links, address and contact information of company/seller/brand of the application.
|
|
208
|
+
*/
|
|
209
|
+
getAppContactInfo({} = {}) {
|
|
210
|
+
const { error } = ConfigurationValidator.getAppContactInfo().validate(
|
|
211
|
+
{},
|
|
212
|
+
{ abortEarly: false, allowUnknown: true }
|
|
213
|
+
);
|
|
214
|
+
if (error) {
|
|
215
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const query_params = {};
|
|
219
|
+
|
|
220
|
+
return PlatformAPIClient.execute(
|
|
221
|
+
this.config,
|
|
222
|
+
"get",
|
|
223
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
|
|
224
|
+
query_params,
|
|
225
|
+
undefined
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @param {Object} arg - Arg object.
|
|
231
|
+
* @param {ApplicationInformation} arg.body
|
|
232
|
+
* @summary: Get application information
|
|
233
|
+
* @description: Save Application Current Information. This includes information about social links, address and contact information of an application.
|
|
234
|
+
*/
|
|
235
|
+
updateAppContactInfo({ body } = {}) {
|
|
236
|
+
const { error } = ConfigurationValidator.updateAppContactInfo().validate(
|
|
237
|
+
{
|
|
238
|
+
body,
|
|
239
|
+
},
|
|
240
|
+
{ abortEarly: false, allowUnknown: true }
|
|
241
|
+
);
|
|
242
|
+
if (error) {
|
|
243
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const query_params = {};
|
|
247
|
+
|
|
248
|
+
return PlatformAPIClient.execute(
|
|
249
|
+
this.config,
|
|
250
|
+
"put",
|
|
251
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/information`,
|
|
252
|
+
query_params,
|
|
253
|
+
body
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @param {Object} arg - Arg object.
|
|
259
|
+
* @summary: Get social tokens
|
|
260
|
+
* @description: Get social tokens.
|
|
261
|
+
*/
|
|
262
|
+
getAppApiTokens({} = {}) {
|
|
263
|
+
const { error } = ConfigurationValidator.getAppApiTokens().validate(
|
|
264
|
+
{},
|
|
265
|
+
{ abortEarly: false, allowUnknown: true }
|
|
266
|
+
);
|
|
267
|
+
if (error) {
|
|
268
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
const query_params = {};
|
|
272
|
+
|
|
273
|
+
return PlatformAPIClient.execute(
|
|
274
|
+
this.config,
|
|
275
|
+
"get",
|
|
276
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
|
|
277
|
+
query_params,
|
|
278
|
+
undefined
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* @param {Object} arg - Arg object.
|
|
284
|
+
* @param {TokenResponse} arg.body
|
|
285
|
+
* @summary: Add social tokens
|
|
286
|
+
* @description: Add social tokens.
|
|
287
|
+
*/
|
|
288
|
+
updateAppApiTokens({ body } = {}) {
|
|
289
|
+
const { error } = ConfigurationValidator.updateAppApiTokens().validate(
|
|
290
|
+
{
|
|
291
|
+
body,
|
|
292
|
+
},
|
|
293
|
+
{ abortEarly: false, allowUnknown: true }
|
|
294
|
+
);
|
|
295
|
+
if (error) {
|
|
296
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const query_params = {};
|
|
300
|
+
|
|
301
|
+
return PlatformAPIClient.execute(
|
|
302
|
+
this.config,
|
|
303
|
+
"post",
|
|
304
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/token`,
|
|
305
|
+
query_params,
|
|
306
|
+
body
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @param {Object} arg - Arg object.
|
|
312
|
+
* @param {number} [arg.uid] - Uid of companies to be fetched
|
|
313
|
+
* @param {number} [arg.pageNo] - Current page no
|
|
314
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
315
|
+
* @summary: Application inventory enabled companies
|
|
316
|
+
* @description: Application inventory enabled companies.
|
|
317
|
+
*/
|
|
318
|
+
getAppCompanies({ uid, pageNo, pageSize } = {}) {
|
|
319
|
+
const { error } = ConfigurationValidator.getAppCompanies().validate(
|
|
320
|
+
{
|
|
321
|
+
uid,
|
|
322
|
+
pageNo,
|
|
323
|
+
pageSize,
|
|
324
|
+
},
|
|
325
|
+
{ abortEarly: false, allowUnknown: true }
|
|
326
|
+
);
|
|
327
|
+
if (error) {
|
|
328
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
const query_params = {};
|
|
332
|
+
query_params["uid"] = uid;
|
|
333
|
+
query_params["page_no"] = pageNo;
|
|
334
|
+
query_params["page_size"] = pageSize;
|
|
335
|
+
|
|
336
|
+
return PlatformAPIClient.execute(
|
|
337
|
+
this.config,
|
|
338
|
+
"get",
|
|
339
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/companies`,
|
|
340
|
+
query_params,
|
|
341
|
+
undefined
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* @param {Object} arg - Arg object.
|
|
347
|
+
* @param {string} arg.companyId - Current company id
|
|
348
|
+
* @param {string} arg.applicationId - Current application id
|
|
349
|
+
* @param {number} [arg.uid] - Uid of companies to be fetched
|
|
350
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
351
|
+
* @summary: Application inventory enabled companies
|
|
352
|
+
* @description: Application inventory enabled companies.
|
|
353
|
+
*/
|
|
354
|
+
getAppCompaniesPaginator({ companyId, applicationId, uid, pageSize } = {}) {
|
|
355
|
+
const paginator = new Paginator();
|
|
356
|
+
const callback = async () => {
|
|
357
|
+
const pageId = paginator.nextId;
|
|
358
|
+
const pageNo = paginator.pageNo;
|
|
359
|
+
const pageType = "number";
|
|
360
|
+
const data = await this.getAppCompanies({
|
|
361
|
+
companyId: companyId,
|
|
362
|
+
applicationId: applicationId,
|
|
363
|
+
uid: uid,
|
|
364
|
+
pageNo: pageNo,
|
|
365
|
+
pageSize: pageSize,
|
|
366
|
+
});
|
|
367
|
+
paginator.setPaginator({
|
|
368
|
+
hasNext: data.page.has_next ? true : false,
|
|
369
|
+
nextId: data.page.next_id,
|
|
370
|
+
});
|
|
371
|
+
return data;
|
|
372
|
+
};
|
|
373
|
+
paginator.setCallback(callback.bind(this));
|
|
374
|
+
return paginator;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* @param {Object} arg - Arg object.
|
|
379
|
+
* @param {number} [arg.pageNo] - Current page no
|
|
380
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
381
|
+
* @summary: Application inventory enabled stores
|
|
382
|
+
* @description: Application inventory enabled stores.
|
|
383
|
+
*/
|
|
384
|
+
getAppStores({ pageNo, pageSize } = {}) {
|
|
385
|
+
const { error } = ConfigurationValidator.getAppStores().validate(
|
|
386
|
+
{
|
|
387
|
+
pageNo,
|
|
388
|
+
pageSize,
|
|
389
|
+
},
|
|
390
|
+
{ abortEarly: false, allowUnknown: true }
|
|
391
|
+
);
|
|
392
|
+
if (error) {
|
|
393
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const query_params = {};
|
|
397
|
+
query_params["page_no"] = pageNo;
|
|
398
|
+
query_params["page_size"] = pageSize;
|
|
399
|
+
|
|
400
|
+
return PlatformAPIClient.execute(
|
|
401
|
+
this.config,
|
|
402
|
+
"get",
|
|
403
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/stores`,
|
|
404
|
+
query_params,
|
|
405
|
+
undefined
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* @param {Object} arg - Arg object.
|
|
411
|
+
* @param {string} arg.companyId - Current company id
|
|
412
|
+
* @param {string} arg.applicationId - Current application id
|
|
413
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
414
|
+
* @summary: Application inventory enabled stores
|
|
415
|
+
* @description: Application inventory enabled stores.
|
|
416
|
+
*/
|
|
417
|
+
getAppStoresPaginator({ companyId, applicationId, pageSize } = {}) {
|
|
418
|
+
const paginator = new Paginator();
|
|
419
|
+
const callback = async () => {
|
|
420
|
+
const pageId = paginator.nextId;
|
|
421
|
+
const pageNo = paginator.pageNo;
|
|
422
|
+
const pageType = "number";
|
|
423
|
+
const data = await this.getAppStores({
|
|
424
|
+
companyId: companyId,
|
|
425
|
+
applicationId: applicationId,
|
|
426
|
+
pageNo: pageNo,
|
|
427
|
+
pageSize: pageSize,
|
|
428
|
+
});
|
|
429
|
+
paginator.setPaginator({
|
|
430
|
+
hasNext: data.page.has_next ? true : false,
|
|
431
|
+
nextId: data.page.next_id,
|
|
432
|
+
});
|
|
433
|
+
return data;
|
|
434
|
+
};
|
|
435
|
+
paginator.setCallback(callback.bind(this));
|
|
436
|
+
return paginator;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* @param {Object} arg - Arg object.
|
|
441
|
+
* @summary: Get application configuration
|
|
442
|
+
* @description: Get application configuration for various features and data
|
|
443
|
+
*/
|
|
444
|
+
getInventoryConfig({} = {}) {
|
|
445
|
+
const { error } = ConfigurationValidator.getInventoryConfig().validate(
|
|
446
|
+
{},
|
|
447
|
+
{ abortEarly: false, allowUnknown: true }
|
|
448
|
+
);
|
|
449
|
+
if (error) {
|
|
450
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
const query_params = {};
|
|
454
|
+
|
|
455
|
+
return PlatformAPIClient.execute(
|
|
456
|
+
this.config,
|
|
457
|
+
"get",
|
|
458
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
459
|
+
query_params,
|
|
460
|
+
undefined
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* @param {Object} arg - Arg object.
|
|
466
|
+
* @param {ApplicationInventory} arg.body
|
|
467
|
+
* @summary: Update application configuration
|
|
468
|
+
* @description: Update application configuration for various features and data
|
|
469
|
+
*/
|
|
470
|
+
updateInventoryConfig({ body } = {}) {
|
|
471
|
+
const { error } = ConfigurationValidator.updateInventoryConfig().validate(
|
|
472
|
+
{
|
|
473
|
+
body,
|
|
474
|
+
},
|
|
475
|
+
{ abortEarly: false, allowUnknown: true }
|
|
476
|
+
);
|
|
477
|
+
if (error) {
|
|
478
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
const query_params = {};
|
|
482
|
+
|
|
483
|
+
return PlatformAPIClient.execute(
|
|
484
|
+
this.config,
|
|
485
|
+
"put",
|
|
486
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
487
|
+
query_params,
|
|
488
|
+
body
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* @param {Object} arg - Arg object.
|
|
494
|
+
* @param {AppInventoryPartialUpdate} arg.body
|
|
495
|
+
* @summary: Partially update application configuration
|
|
496
|
+
* @description: Partially update application configuration for various features and data
|
|
497
|
+
*/
|
|
498
|
+
partiallyUpdateInventoryConfig({ body } = {}) {
|
|
499
|
+
const {
|
|
500
|
+
error,
|
|
501
|
+
} = ConfigurationValidator.partiallyUpdateInventoryConfig().validate(
|
|
502
|
+
{
|
|
503
|
+
body,
|
|
504
|
+
},
|
|
505
|
+
{ abortEarly: false, allowUnknown: true }
|
|
506
|
+
);
|
|
507
|
+
if (error) {
|
|
508
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
const query_params = {};
|
|
512
|
+
|
|
513
|
+
return PlatformAPIClient.execute(
|
|
514
|
+
this.config,
|
|
515
|
+
"patch",
|
|
516
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/configuration`,
|
|
517
|
+
query_params,
|
|
518
|
+
body
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* @param {Object} arg - Arg object.
|
|
524
|
+
* @summary: Get application enabled currency list
|
|
525
|
+
* @description: Get application enabled currency list
|
|
526
|
+
*/
|
|
527
|
+
getAppCurrencyConfig({} = {}) {
|
|
528
|
+
const { error } = ConfigurationValidator.getAppCurrencyConfig().validate(
|
|
529
|
+
{},
|
|
530
|
+
{ abortEarly: false, allowUnknown: true }
|
|
531
|
+
);
|
|
532
|
+
if (error) {
|
|
533
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
const query_params = {};
|
|
537
|
+
|
|
538
|
+
return PlatformAPIClient.execute(
|
|
539
|
+
this.config,
|
|
540
|
+
"get",
|
|
541
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
|
|
542
|
+
query_params,
|
|
543
|
+
undefined
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* @param {Object} arg - Arg object.
|
|
549
|
+
* @param {AppSupportedCurrency} arg.body
|
|
550
|
+
* @summary: Add initial application supported currency
|
|
551
|
+
* @description: Add initial application supported currency for various features and data. Default INR will be enabled.
|
|
552
|
+
*/
|
|
553
|
+
updateAppCurrencyConfig({ body } = {}) {
|
|
554
|
+
const { error } = ConfigurationValidator.updateAppCurrencyConfig().validate(
|
|
555
|
+
{
|
|
556
|
+
body,
|
|
557
|
+
},
|
|
558
|
+
{ abortEarly: false, allowUnknown: true }
|
|
559
|
+
);
|
|
560
|
+
if (error) {
|
|
561
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
const query_params = {};
|
|
565
|
+
|
|
566
|
+
return PlatformAPIClient.execute(
|
|
567
|
+
this.config,
|
|
568
|
+
"post",
|
|
569
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency`,
|
|
570
|
+
query_params,
|
|
571
|
+
body
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* @param {Object} arg - Arg object.
|
|
577
|
+
* @summary: Get currencies enabled in the application
|
|
578
|
+
* @description: Use this API to get a list of currencies allowed in the current application. Moreover, get the name, code, symbol, and the decimal digits of the currencies.
|
|
579
|
+
*/
|
|
580
|
+
getAppSupportedCurrency({} = {}) {
|
|
581
|
+
const { error } = ConfigurationValidator.getAppSupportedCurrency().validate(
|
|
582
|
+
{},
|
|
583
|
+
{ abortEarly: false, allowUnknown: true }
|
|
584
|
+
);
|
|
585
|
+
if (error) {
|
|
586
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
const query_params = {};
|
|
590
|
+
|
|
591
|
+
return PlatformAPIClient.execute(
|
|
592
|
+
this.config,
|
|
593
|
+
"get",
|
|
594
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/currency/supported`,
|
|
595
|
+
query_params,
|
|
596
|
+
undefined
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* @param {Object} arg - Arg object.
|
|
602
|
+
* @param {number} [arg.pageNo] - Current page no
|
|
603
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
604
|
+
* @param {FilterOrderingStoreRequest} arg.body
|
|
605
|
+
* @summary: Get ordering store by filter
|
|
606
|
+
* @description: Get ordering store by filter
|
|
607
|
+
*/
|
|
608
|
+
getOrderingStoresByFilter({ body, pageNo, pageSize } = {}) {
|
|
609
|
+
const {
|
|
610
|
+
error,
|
|
611
|
+
} = ConfigurationValidator.getOrderingStoresByFilter().validate(
|
|
612
|
+
{
|
|
613
|
+
body,
|
|
614
|
+
pageNo,
|
|
615
|
+
pageSize,
|
|
616
|
+
},
|
|
617
|
+
{ abortEarly: false, allowUnknown: true }
|
|
618
|
+
);
|
|
619
|
+
if (error) {
|
|
620
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
const query_params = {};
|
|
624
|
+
query_params["page_no"] = pageNo;
|
|
625
|
+
query_params["page_size"] = pageSize;
|
|
626
|
+
|
|
627
|
+
return PlatformAPIClient.execute(
|
|
628
|
+
this.config,
|
|
629
|
+
"post",
|
|
630
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/stores/filter`,
|
|
631
|
+
query_params,
|
|
632
|
+
body
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* @param {Object} arg - Arg object.
|
|
638
|
+
* @param {string} arg.companyId - Current company id
|
|
639
|
+
* @param {string} arg.applicationId - Current application id
|
|
640
|
+
* @param {number} [arg.pageSize] - Current request items count
|
|
641
|
+
* @param {FilterOrderingStoreRequest} arg.body
|
|
642
|
+
* @summary: Get ordering store by filter
|
|
643
|
+
* @description: Get ordering store by filter
|
|
644
|
+
*/
|
|
645
|
+
getOrderingStoresByFilterPaginator({
|
|
646
|
+
companyId,
|
|
647
|
+
applicationId,
|
|
648
|
+
pageSize,
|
|
649
|
+
body,
|
|
650
|
+
} = {}) {
|
|
651
|
+
const paginator = new Paginator();
|
|
652
|
+
const callback = async () => {
|
|
653
|
+
const pageId = paginator.nextId;
|
|
654
|
+
const pageNo = paginator.pageNo;
|
|
655
|
+
const pageType = "number";
|
|
656
|
+
const data = await this.getOrderingStoresByFilter({
|
|
657
|
+
companyId: companyId,
|
|
658
|
+
applicationId: applicationId,
|
|
659
|
+
body: body,
|
|
660
|
+
pageNo: pageNo,
|
|
661
|
+
pageSize: pageSize,
|
|
662
|
+
});
|
|
663
|
+
paginator.setPaginator({
|
|
664
|
+
hasNext: data.page.has_next ? true : false,
|
|
665
|
+
nextId: data.page.next_id,
|
|
666
|
+
});
|
|
667
|
+
return data;
|
|
668
|
+
};
|
|
669
|
+
paginator.setCallback(callback.bind(this));
|
|
670
|
+
return paginator;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* @param {Object} arg - Arg object.
|
|
675
|
+
* @param {OrderingStoreConfig} arg.body
|
|
676
|
+
* @summary: Add/Update ordering store config
|
|
677
|
+
* @description: Add/Update ordering store config.
|
|
678
|
+
*/
|
|
679
|
+
updateOrderingStoreConfig({ body } = {}) {
|
|
680
|
+
const {
|
|
681
|
+
error,
|
|
682
|
+
} = ConfigurationValidator.updateOrderingStoreConfig().validate(
|
|
683
|
+
{
|
|
684
|
+
body,
|
|
685
|
+
},
|
|
686
|
+
{ abortEarly: false, allowUnknown: true }
|
|
687
|
+
);
|
|
688
|
+
if (error) {
|
|
689
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
const query_params = {};
|
|
693
|
+
|
|
694
|
+
return PlatformAPIClient.execute(
|
|
695
|
+
this.config,
|
|
696
|
+
"post",
|
|
697
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store`,
|
|
698
|
+
query_params,
|
|
699
|
+
body
|
|
700
|
+
);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* @param {Object} arg - Arg object.
|
|
705
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
706
|
+
* given set of results. Default value is 1.
|
|
707
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
708
|
+
* page. Default value is 10.
|
|
709
|
+
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
710
|
+
* @summary: Get deployment stores
|
|
711
|
+
* @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders).
|
|
712
|
+
*/
|
|
713
|
+
getStaffOrderingStores({ pageNo, pageSize, q } = {}) {
|
|
714
|
+
const { error } = ConfigurationValidator.getStaffOrderingStores().validate(
|
|
715
|
+
{
|
|
716
|
+
pageNo,
|
|
717
|
+
pageSize,
|
|
718
|
+
q,
|
|
719
|
+
},
|
|
720
|
+
{ abortEarly: false, allowUnknown: true }
|
|
721
|
+
);
|
|
722
|
+
if (error) {
|
|
723
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
const query_params = {};
|
|
727
|
+
query_params["page_no"] = pageNo;
|
|
728
|
+
query_params["page_size"] = pageSize;
|
|
729
|
+
query_params["q"] = q;
|
|
730
|
+
|
|
731
|
+
return PlatformAPIClient.execute(
|
|
732
|
+
this.config,
|
|
733
|
+
"get",
|
|
734
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/ordering-store/staff-stores`,
|
|
735
|
+
query_params,
|
|
736
|
+
undefined
|
|
737
|
+
);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* @param {Object} arg - Arg object.
|
|
742
|
+
* @param {string} arg.companyId - Current company id
|
|
743
|
+
* @param {string} arg.applicationId - Current application id
|
|
744
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
745
|
+
* page. Default value is 10.
|
|
746
|
+
* @param {string} [arg.q] - Store code or name of the ordering store.
|
|
747
|
+
* @summary: Get deployment stores
|
|
748
|
+
* @description: Use this API to retrieve the details of all stores access given to the staff member (the selling locations where the application will be utilized for placing orders).
|
|
749
|
+
*/
|
|
750
|
+
getStaffOrderingStoresPaginator({
|
|
751
|
+
companyId,
|
|
752
|
+
applicationId,
|
|
753
|
+
pageSize,
|
|
754
|
+
q,
|
|
755
|
+
} = {}) {
|
|
756
|
+
const paginator = new Paginator();
|
|
757
|
+
const callback = async () => {
|
|
758
|
+
const pageId = paginator.nextId;
|
|
759
|
+
const pageNo = paginator.pageNo;
|
|
760
|
+
const pageType = "number";
|
|
761
|
+
const data = await this.getStaffOrderingStores({
|
|
762
|
+
companyId: companyId,
|
|
763
|
+
applicationId: applicationId,
|
|
764
|
+
pageNo: pageNo,
|
|
765
|
+
pageSize: pageSize,
|
|
766
|
+
q: q,
|
|
767
|
+
});
|
|
768
|
+
paginator.setPaginator({
|
|
769
|
+
hasNext: data.page.has_next ? true : false,
|
|
770
|
+
nextId: data.page.next_id,
|
|
771
|
+
});
|
|
772
|
+
return data;
|
|
773
|
+
};
|
|
774
|
+
paginator.setCallback(callback.bind(this));
|
|
775
|
+
return paginator;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* @param {Object} arg - Arg object.
|
|
780
|
+
* @summary: Get attached domain list
|
|
781
|
+
* @description: Get attached domain list.
|
|
782
|
+
*/
|
|
783
|
+
getDomains({} = {}) {
|
|
784
|
+
const { error } = ConfigurationValidator.getDomains().validate(
|
|
785
|
+
{},
|
|
786
|
+
{ abortEarly: false, allowUnknown: true }
|
|
787
|
+
);
|
|
788
|
+
if (error) {
|
|
789
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
const query_params = {};
|
|
793
|
+
|
|
794
|
+
return PlatformAPIClient.execute(
|
|
795
|
+
this.config,
|
|
796
|
+
"get",
|
|
797
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
|
|
798
|
+
query_params,
|
|
799
|
+
undefined
|
|
800
|
+
);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* @param {Object} arg - Arg object.
|
|
805
|
+
* @param {DomainAddRequest} arg.body
|
|
806
|
+
* @summary: Add new domain to application
|
|
807
|
+
* @description: Add new domain to application.
|
|
808
|
+
*/
|
|
809
|
+
addDomain({ body } = {}) {
|
|
810
|
+
const { error } = ConfigurationValidator.addDomain().validate(
|
|
811
|
+
{
|
|
812
|
+
body,
|
|
813
|
+
},
|
|
814
|
+
{ abortEarly: false, allowUnknown: true }
|
|
815
|
+
);
|
|
816
|
+
if (error) {
|
|
817
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
const query_params = {};
|
|
821
|
+
|
|
822
|
+
return PlatformAPIClient.execute(
|
|
823
|
+
this.config,
|
|
824
|
+
"post",
|
|
825
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain`,
|
|
826
|
+
query_params,
|
|
827
|
+
body
|
|
828
|
+
);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* @param {Object} arg - Arg object.
|
|
833
|
+
* @param {string} arg.id - Domain _id
|
|
834
|
+
* @summary: Remove attached domain
|
|
835
|
+
* @description: Remove attached domain.
|
|
836
|
+
*/
|
|
837
|
+
removeDomainById({ id } = {}) {
|
|
838
|
+
const { error } = ConfigurationValidator.removeDomainById().validate(
|
|
839
|
+
{
|
|
840
|
+
id,
|
|
841
|
+
},
|
|
842
|
+
{ abortEarly: false, allowUnknown: true }
|
|
843
|
+
);
|
|
844
|
+
if (error) {
|
|
845
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
const query_params = {};
|
|
849
|
+
|
|
850
|
+
return PlatformAPIClient.execute(
|
|
851
|
+
this.config,
|
|
852
|
+
"delete",
|
|
853
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/${id}`,
|
|
854
|
+
query_params,
|
|
855
|
+
undefined
|
|
856
|
+
);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* @param {Object} arg - Arg object.
|
|
861
|
+
* @param {UpdateDomainTypeRequest} arg.body
|
|
862
|
+
* @summary: Change domain type
|
|
863
|
+
* @description: Change a domain to Primary or Shortlink domain
|
|
864
|
+
*/
|
|
865
|
+
changeDomainType({ body } = {}) {
|
|
866
|
+
const { error } = ConfigurationValidator.changeDomainType().validate(
|
|
867
|
+
{
|
|
868
|
+
body,
|
|
869
|
+
},
|
|
870
|
+
{ abortEarly: false, allowUnknown: true }
|
|
871
|
+
);
|
|
872
|
+
if (error) {
|
|
873
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
const query_params = {};
|
|
877
|
+
|
|
878
|
+
return PlatformAPIClient.execute(
|
|
879
|
+
this.config,
|
|
880
|
+
"post",
|
|
881
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/set-domain`,
|
|
882
|
+
query_params,
|
|
883
|
+
body
|
|
884
|
+
);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* @param {Object} arg - Arg object.
|
|
889
|
+
* @param {DomainStatusRequest} arg.body
|
|
890
|
+
* @summary: Get domain connected status.
|
|
891
|
+
* @description: Get domain connected status. Check if domain is live and mapped to appropriate IP to fynd servers.
|
|
892
|
+
*/
|
|
893
|
+
getDomainStatus({ body } = {}) {
|
|
894
|
+
const { error } = ConfigurationValidator.getDomainStatus().validate(
|
|
895
|
+
{
|
|
896
|
+
body,
|
|
897
|
+
},
|
|
898
|
+
{ abortEarly: false, allowUnknown: true }
|
|
899
|
+
);
|
|
900
|
+
if (error) {
|
|
901
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
const query_params = {};
|
|
905
|
+
|
|
906
|
+
return PlatformAPIClient.execute(
|
|
907
|
+
this.config,
|
|
908
|
+
"post",
|
|
909
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}/domain/domain-status`,
|
|
910
|
+
query_params,
|
|
911
|
+
body
|
|
912
|
+
);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* @param {Object} arg - Arg object.
|
|
917
|
+
* @summary: Get application data from id
|
|
918
|
+
* @description: Get application data from id
|
|
919
|
+
*/
|
|
920
|
+
getApplicationById({} = {}) {
|
|
921
|
+
const { error } = ConfigurationValidator.getApplicationById().validate(
|
|
922
|
+
{},
|
|
923
|
+
{ abortEarly: false, allowUnknown: true }
|
|
924
|
+
);
|
|
925
|
+
if (error) {
|
|
926
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
const query_params = {};
|
|
930
|
+
|
|
931
|
+
return PlatformAPIClient.execute(
|
|
932
|
+
this.config,
|
|
933
|
+
"get",
|
|
934
|
+
`/service/platform/configuration/v1.0/company/${this.config.companyId}/application/${this.applicationId}`,
|
|
935
|
+
query_params,
|
|
936
|
+
undefined
|
|
937
|
+
);
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
module.exports = Configuration;
|