@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,7 +1,7 @@
|
|
|
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 WebhookValidator = require("./WebhookPlatformValidator");
|
|
5
5
|
class Webhook {
|
|
6
6
|
constructor(config) {
|
|
7
7
|
this.config = config;
|
|
@@ -28,6 +28,22 @@ class Webhook {
|
|
|
28
28
|
return Promise.reject(new FDKClientValidationError(error));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
// Showing warrnings if extra unknown parameters are found
|
|
32
|
+
const {
|
|
33
|
+
error: warrning,
|
|
34
|
+
} = WebhookValidator.getSubscribersByCompany().validate(
|
|
35
|
+
{
|
|
36
|
+
pageNo,
|
|
37
|
+
pageSize,
|
|
38
|
+
extensionId,
|
|
39
|
+
},
|
|
40
|
+
{ abortEarly: false, allowUnknown: false }
|
|
41
|
+
);
|
|
42
|
+
if (warrning) {
|
|
43
|
+
console.log("Parameter Validation warrnings for getSubscribersByCompany");
|
|
44
|
+
console.log(warrning);
|
|
45
|
+
}
|
|
46
|
+
|
|
31
47
|
const query_params = {};
|
|
32
48
|
query_params["page_no"] = pageNo;
|
|
33
49
|
query_params["page_size"] = pageSize;
|
|
@@ -62,6 +78,22 @@ class Webhook {
|
|
|
62
78
|
return Promise.reject(new FDKClientValidationError(error));
|
|
63
79
|
}
|
|
64
80
|
|
|
81
|
+
// Showing warrnings if extra unknown parameters are found
|
|
82
|
+
const {
|
|
83
|
+
error: warrning,
|
|
84
|
+
} = WebhookValidator.registerSubscriberToEvent().validate(
|
|
85
|
+
{
|
|
86
|
+
body,
|
|
87
|
+
},
|
|
88
|
+
{ abortEarly: false, allowUnknown: false }
|
|
89
|
+
);
|
|
90
|
+
if (warrning) {
|
|
91
|
+
console.log(
|
|
92
|
+
"Parameter Validation warrnings for registerSubscriberToEvent"
|
|
93
|
+
);
|
|
94
|
+
console.log(warrning);
|
|
95
|
+
}
|
|
96
|
+
|
|
65
97
|
const query_params = {};
|
|
66
98
|
|
|
67
99
|
const xHeaders = {};
|
|
@@ -93,6 +125,20 @@ class Webhook {
|
|
|
93
125
|
return Promise.reject(new FDKClientValidationError(error));
|
|
94
126
|
}
|
|
95
127
|
|
|
128
|
+
// Showing warrnings if extra unknown parameters are found
|
|
129
|
+
const {
|
|
130
|
+
error: warrning,
|
|
131
|
+
} = WebhookValidator.updateSubscriberConfig().validate(
|
|
132
|
+
{
|
|
133
|
+
body,
|
|
134
|
+
},
|
|
135
|
+
{ abortEarly: false, allowUnknown: false }
|
|
136
|
+
);
|
|
137
|
+
if (warrning) {
|
|
138
|
+
console.log("Parameter Validation warrnings for updateSubscriberConfig");
|
|
139
|
+
console.log(warrning);
|
|
140
|
+
}
|
|
141
|
+
|
|
96
142
|
const query_params = {};
|
|
97
143
|
|
|
98
144
|
const xHeaders = {};
|
|
@@ -128,6 +174,24 @@ class Webhook {
|
|
|
128
174
|
return Promise.reject(new FDKClientValidationError(error));
|
|
129
175
|
}
|
|
130
176
|
|
|
177
|
+
// Showing warrnings if extra unknown parameters are found
|
|
178
|
+
const {
|
|
179
|
+
error: warrning,
|
|
180
|
+
} = WebhookValidator.getSubscribersByExtensionId().validate(
|
|
181
|
+
{
|
|
182
|
+
extensionId,
|
|
183
|
+
pageNo,
|
|
184
|
+
pageSize,
|
|
185
|
+
},
|
|
186
|
+
{ abortEarly: false, allowUnknown: false }
|
|
187
|
+
);
|
|
188
|
+
if (warrning) {
|
|
189
|
+
console.log(
|
|
190
|
+
"Parameter Validation warrnings for getSubscribersByExtensionId"
|
|
191
|
+
);
|
|
192
|
+
console.log(warrning);
|
|
193
|
+
}
|
|
194
|
+
|
|
131
195
|
const query_params = {};
|
|
132
196
|
query_params["page_no"] = pageNo;
|
|
133
197
|
query_params["page_size"] = pageSize;
|
|
@@ -161,6 +225,18 @@ class Webhook {
|
|
|
161
225
|
return Promise.reject(new FDKClientValidationError(error));
|
|
162
226
|
}
|
|
163
227
|
|
|
228
|
+
// Showing warrnings if extra unknown parameters are found
|
|
229
|
+
const { error: warrning } = WebhookValidator.getSubscriberById().validate(
|
|
230
|
+
{
|
|
231
|
+
subscriberId,
|
|
232
|
+
},
|
|
233
|
+
{ abortEarly: false, allowUnknown: false }
|
|
234
|
+
);
|
|
235
|
+
if (warrning) {
|
|
236
|
+
console.log("Parameter Validation warrnings for getSubscriberById");
|
|
237
|
+
console.log(warrning);
|
|
238
|
+
}
|
|
239
|
+
|
|
164
240
|
const query_params = {};
|
|
165
241
|
|
|
166
242
|
const xHeaders = {};
|
|
@@ -189,6 +265,20 @@ class Webhook {
|
|
|
189
265
|
return Promise.reject(new FDKClientValidationError(error));
|
|
190
266
|
}
|
|
191
267
|
|
|
268
|
+
// Showing warrnings if extra unknown parameters are found
|
|
269
|
+
const {
|
|
270
|
+
error: warrning,
|
|
271
|
+
} = WebhookValidator.fetchAllEventConfigurations().validate(
|
|
272
|
+
{},
|
|
273
|
+
{ abortEarly: false, allowUnknown: false }
|
|
274
|
+
);
|
|
275
|
+
if (warrning) {
|
|
276
|
+
console.log(
|
|
277
|
+
"Parameter Validation warrnings for fetchAllEventConfigurations"
|
|
278
|
+
);
|
|
279
|
+
console.log(warrning);
|
|
280
|
+
}
|
|
281
|
+
|
|
192
282
|
const query_params = {};
|
|
193
283
|
|
|
194
284
|
const xHeaders = {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export = WebhookModel;
|
|
2
|
+
declare class WebhookModel {
|
|
3
|
+
static EventConfig(): any;
|
|
4
|
+
static EventConfigList(): any;
|
|
5
|
+
static EventConfigResponse(): any;
|
|
6
|
+
static SubscriberConfigList(): any;
|
|
7
|
+
static Page(): any;
|
|
8
|
+
static EventProcessedStatus(): any;
|
|
9
|
+
static EventPayload(): any;
|
|
10
|
+
static SubscriberConfig(): any;
|
|
11
|
+
static SubscriberResponse(): any;
|
|
12
|
+
static SubscriberEvent(): any;
|
|
13
|
+
static AuthMeta(): any;
|
|
14
|
+
static Association(): any;
|
|
15
|
+
static EventConfigBase(): any;
|
|
16
|
+
static SubscriberStatus(): any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
class WebhookModel {
|
|
4
|
+
static EventConfig() {
|
|
5
|
+
return Joi.object({
|
|
6
|
+
id: Joi.number(),
|
|
7
|
+
|
|
8
|
+
event_name: Joi.string().allow(""),
|
|
9
|
+
|
|
10
|
+
event_type: Joi.string().allow(""),
|
|
11
|
+
|
|
12
|
+
event_category: Joi.string().allow(""),
|
|
13
|
+
|
|
14
|
+
version: Joi.string().allow(""),
|
|
15
|
+
|
|
16
|
+
display_name: Joi.string().allow(""),
|
|
17
|
+
|
|
18
|
+
description: Joi.string().allow(""),
|
|
19
|
+
|
|
20
|
+
created_on: Joi.string().allow(""),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static EventConfigList() {
|
|
25
|
+
return Joi.object({
|
|
26
|
+
items: Joi.array().items(WebhookModel.EventConfig()),
|
|
27
|
+
|
|
28
|
+
page: WebhookModel.Page(),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static EventConfigResponse() {
|
|
33
|
+
return Joi.object({
|
|
34
|
+
event_configs: Joi.array().items(WebhookModel.EventConfig()),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static SubscriberConfigList() {
|
|
39
|
+
return Joi.object({
|
|
40
|
+
items: Joi.array().items(WebhookModel.SubscriberResponse()),
|
|
41
|
+
|
|
42
|
+
page: WebhookModel.Page(),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static Page() {
|
|
47
|
+
return Joi.object({
|
|
48
|
+
item_total: Joi.number(),
|
|
49
|
+
|
|
50
|
+
next_id: Joi.string().allow(""),
|
|
51
|
+
|
|
52
|
+
has_previous: Joi.boolean(),
|
|
53
|
+
|
|
54
|
+
has_next: Joi.boolean(),
|
|
55
|
+
|
|
56
|
+
current: Joi.number(),
|
|
57
|
+
|
|
58
|
+
type: Joi.string().allow("").required(),
|
|
59
|
+
|
|
60
|
+
size: Joi.number(),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
static EventProcessedStatus() {
|
|
65
|
+
return Joi.object({
|
|
66
|
+
id: Joi.number(),
|
|
67
|
+
|
|
68
|
+
subscriber_id: Joi.string().allow(""),
|
|
69
|
+
|
|
70
|
+
attempt: Joi.number(),
|
|
71
|
+
|
|
72
|
+
response_code: Joi.string().allow(""),
|
|
73
|
+
|
|
74
|
+
response_message: Joi.string().allow(""),
|
|
75
|
+
|
|
76
|
+
created_on: Joi.string().allow(""),
|
|
77
|
+
|
|
78
|
+
processed_on: Joi.string().allow(""),
|
|
79
|
+
|
|
80
|
+
status: Joi.boolean(),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static EventPayload() {
|
|
85
|
+
return Joi.object({
|
|
86
|
+
id: Joi.number(),
|
|
87
|
+
|
|
88
|
+
event_trace_id: Joi.string().allow(""),
|
|
89
|
+
|
|
90
|
+
message_id: Joi.string().allow(""),
|
|
91
|
+
|
|
92
|
+
event_name: Joi.string().allow(""),
|
|
93
|
+
|
|
94
|
+
event_type: Joi.string().allow(""),
|
|
95
|
+
|
|
96
|
+
version: Joi.string().allow(""),
|
|
97
|
+
|
|
98
|
+
status: Joi.boolean(),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
static SubscriberConfig() {
|
|
103
|
+
return Joi.object({
|
|
104
|
+
id: Joi.number(),
|
|
105
|
+
|
|
106
|
+
name: Joi.string().allow(""),
|
|
107
|
+
|
|
108
|
+
webhook_url: Joi.string().allow(""),
|
|
109
|
+
|
|
110
|
+
association: WebhookModel.Association(),
|
|
111
|
+
|
|
112
|
+
custom_headers: Joi.any(),
|
|
113
|
+
|
|
114
|
+
status: WebhookModel.SubscriberStatus(),
|
|
115
|
+
|
|
116
|
+
email_id: Joi.string().allow(""),
|
|
117
|
+
|
|
118
|
+
auth_meta: WebhookModel.AuthMeta(),
|
|
119
|
+
|
|
120
|
+
event_id: Joi.array().items(Joi.number()),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
static SubscriberResponse() {
|
|
125
|
+
return Joi.object({
|
|
126
|
+
id: Joi.number(),
|
|
127
|
+
|
|
128
|
+
name: Joi.string().allow(""),
|
|
129
|
+
|
|
130
|
+
webhook_url: Joi.string().allow(""),
|
|
131
|
+
|
|
132
|
+
association: WebhookModel.Association(),
|
|
133
|
+
|
|
134
|
+
custom_headers: Joi.any(),
|
|
135
|
+
|
|
136
|
+
email_id: Joi.string().allow(""),
|
|
137
|
+
|
|
138
|
+
status: WebhookModel.SubscriberStatus(),
|
|
139
|
+
|
|
140
|
+
auth_meta: WebhookModel.AuthMeta(),
|
|
141
|
+
|
|
142
|
+
created_on: Joi.string().allow(""),
|
|
143
|
+
|
|
144
|
+
updated_on: Joi.string().allow(""),
|
|
145
|
+
|
|
146
|
+
event_configs: Joi.array().items(WebhookModel.EventConfig()),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
static SubscriberEvent() {
|
|
151
|
+
return Joi.object({
|
|
152
|
+
id: Joi.number(),
|
|
153
|
+
|
|
154
|
+
subscriber_id: Joi.number(),
|
|
155
|
+
|
|
156
|
+
event_id: Joi.number(),
|
|
157
|
+
|
|
158
|
+
created_date: Joi.string().allow(""),
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
static AuthMeta() {
|
|
163
|
+
return Joi.object({
|
|
164
|
+
type: Joi.string().allow(""),
|
|
165
|
+
|
|
166
|
+
secret: Joi.string().allow(""),
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
static Association() {
|
|
171
|
+
return Joi.object({
|
|
172
|
+
company_id: Joi.number(),
|
|
173
|
+
|
|
174
|
+
application_id: Joi.array().items(Joi.string().allow("")),
|
|
175
|
+
|
|
176
|
+
extension_id: Joi.string().allow(""),
|
|
177
|
+
|
|
178
|
+
criteria: Joi.string().allow(""),
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
static EventConfigBase() {
|
|
183
|
+
return Joi.object({
|
|
184
|
+
event_name: Joi.string().allow(""),
|
|
185
|
+
|
|
186
|
+
event_type: Joi.string().allow(""),
|
|
187
|
+
|
|
188
|
+
event_category: Joi.string().allow(""),
|
|
189
|
+
|
|
190
|
+
version: Joi.string().allow(""),
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/*
|
|
195
|
+
Enum: SubscriberStatus
|
|
196
|
+
Used By: Webhook
|
|
197
|
+
*/
|
|
198
|
+
static SubscriberStatus() {
|
|
199
|
+
return Joi.string().valid(
|
|
200
|
+
"active",
|
|
201
|
+
|
|
202
|
+
"inactive",
|
|
203
|
+
|
|
204
|
+
"blocked"
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
module.exports = WebhookModel;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const Joi = require("joi");
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
const WebhookModel = require("./WebhookPlatformModel");
|
|
3
4
|
class WebhookValidator {
|
|
4
5
|
static getSubscribersByCompany() {
|
|
5
6
|
return Joi.object({
|
|
@@ -11,13 +12,13 @@ class WebhookValidator {
|
|
|
11
12
|
|
|
12
13
|
static registerSubscriberToEvent() {
|
|
13
14
|
return Joi.object({
|
|
14
|
-
body:
|
|
15
|
+
body: WebhookModel.SubscriberConfig().required(),
|
|
15
16
|
}).required();
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
static updateSubscriberConfig() {
|
|
19
20
|
return Joi.object({
|
|
20
|
-
body:
|
|
21
|
+
body: WebhookModel.SubscriberConfig().required(),
|
|
21
22
|
}).required();
|
|
22
23
|
}
|
|
23
24
|
|
package/sdk/platform/index.d.ts
CHANGED
|
@@ -1,2 +1,26 @@
|
|
|
1
1
|
export const PlatformConfig: typeof import("./PlatformConfig");
|
|
2
2
|
export const PlatformClient: typeof import("./PlatformClient");
|
|
3
|
+
export namespace PlatformModel {
|
|
4
|
+
const CommonPlatformModel: typeof import("./Common/CommonPlatformModel");
|
|
5
|
+
const LeadPlatformModel: typeof import("./Lead/LeadPlatformModel");
|
|
6
|
+
const ThemePlatformModel: typeof import("./Theme/ThemePlatformModel");
|
|
7
|
+
const UserPlatformModel: typeof import("./User/UserPlatformModel");
|
|
8
|
+
const ContentPlatformModel: typeof import("./Content/ContentPlatformModel");
|
|
9
|
+
const BillingPlatformModel: typeof import("./Billing/BillingPlatformModel");
|
|
10
|
+
const CommunicationPlatformModel: typeof import("./Communication/CommunicationPlatformModel");
|
|
11
|
+
const PaymentPlatformModel: typeof import("./Payment/PaymentPlatformModel");
|
|
12
|
+
const OrderPlatformModel: typeof import("./Order/OrderPlatformModel");
|
|
13
|
+
const CatalogPlatformModel: typeof import("./Catalog/CatalogPlatformModel");
|
|
14
|
+
const CompanyProfilePlatformModel: typeof import("./CompanyProfile/CompanyProfilePlatformModel");
|
|
15
|
+
const FileStoragePlatformModel: typeof import("./FileStorage/FileStoragePlatformModel");
|
|
16
|
+
const SharePlatformModel: typeof import("./Share/SharePlatformModel");
|
|
17
|
+
const InventoryPlatformModel: typeof import("./Inventory/InventoryPlatformModel");
|
|
18
|
+
const ConfigurationPlatformModel: typeof import("./Configuration/ConfigurationPlatformModel");
|
|
19
|
+
const CartPlatformModel: typeof import("./Cart/CartPlatformModel");
|
|
20
|
+
const RewardsPlatformModel: typeof import("./Rewards/RewardsPlatformModel");
|
|
21
|
+
const AnalyticsPlatformModel: typeof import("./Analytics/AnalyticsPlatformModel");
|
|
22
|
+
const DiscountPlatformModel: typeof import("./Discount/DiscountPlatformModel");
|
|
23
|
+
const PartnerPlatformModel: typeof import("./Partner/PartnerPlatformModel");
|
|
24
|
+
const WebhookPlatformModel: typeof import("./Webhook/WebhookPlatformModel");
|
|
25
|
+
const AuditTrailPlatformModel: typeof import("./AuditTrail/AuditTrailPlatformModel");
|
|
26
|
+
}
|
package/sdk/platform/index.js
CHANGED
|
@@ -1,4 +1,49 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
PlatformConfig: require("./PlatformConfig"),
|
|
3
3
|
PlatformClient: require("./PlatformClient"),
|
|
4
|
+
PlatformModel: {
|
|
5
|
+
CommonPlatformModel: require("./Common/CommonPlatformModel"),
|
|
6
|
+
|
|
7
|
+
LeadPlatformModel: require("./Lead/LeadPlatformModel"),
|
|
8
|
+
|
|
9
|
+
ThemePlatformModel: require("./Theme/ThemePlatformModel"),
|
|
10
|
+
|
|
11
|
+
UserPlatformModel: require("./User/UserPlatformModel"),
|
|
12
|
+
|
|
13
|
+
ContentPlatformModel: require("./Content/ContentPlatformModel"),
|
|
14
|
+
|
|
15
|
+
BillingPlatformModel: require("./Billing/BillingPlatformModel"),
|
|
16
|
+
|
|
17
|
+
CommunicationPlatformModel: require("./Communication/CommunicationPlatformModel"),
|
|
18
|
+
|
|
19
|
+
PaymentPlatformModel: require("./Payment/PaymentPlatformModel"),
|
|
20
|
+
|
|
21
|
+
OrderPlatformModel: require("./Order/OrderPlatformModel"),
|
|
22
|
+
|
|
23
|
+
CatalogPlatformModel: require("./Catalog/CatalogPlatformModel"),
|
|
24
|
+
|
|
25
|
+
CompanyProfilePlatformModel: require("./CompanyProfile/CompanyProfilePlatformModel"),
|
|
26
|
+
|
|
27
|
+
FileStoragePlatformModel: require("./FileStorage/FileStoragePlatformModel"),
|
|
28
|
+
|
|
29
|
+
SharePlatformModel: require("./Share/SharePlatformModel"),
|
|
30
|
+
|
|
31
|
+
InventoryPlatformModel: require("./Inventory/InventoryPlatformModel"),
|
|
32
|
+
|
|
33
|
+
ConfigurationPlatformModel: require("./Configuration/ConfigurationPlatformModel"),
|
|
34
|
+
|
|
35
|
+
CartPlatformModel: require("./Cart/CartPlatformModel"),
|
|
36
|
+
|
|
37
|
+
RewardsPlatformModel: require("./Rewards/RewardsPlatformModel"),
|
|
38
|
+
|
|
39
|
+
AnalyticsPlatformModel: require("./Analytics/AnalyticsPlatformModel"),
|
|
40
|
+
|
|
41
|
+
DiscountPlatformModel: require("./Discount/DiscountPlatformModel"),
|
|
42
|
+
|
|
43
|
+
PartnerPlatformModel: require("./Partner/PartnerPlatformModel"),
|
|
44
|
+
|
|
45
|
+
WebhookPlatformModel: require("./Webhook/WebhookPlatformModel"),
|
|
46
|
+
|
|
47
|
+
AuditTrailPlatformModel: require("./AuditTrail/AuditTrailPlatformModel"),
|
|
48
|
+
},
|
|
4
49
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const constructUrl = require("../constructUrl");
|
|
4
|
-
const
|
|
4
|
+
const Paginator = require("../../common/Paginator");
|
|
5
|
+
const ConfigurationValidator = require("./ConfigurationPublicValidator");
|
|
5
6
|
class Configuration {
|
|
6
7
|
constructor(_conf) {
|
|
7
8
|
this._conf = _conf;
|
|
@@ -42,6 +43,19 @@ class Configuration {
|
|
|
42
43
|
if (error) {
|
|
43
44
|
return Promise.reject(new FDKClientValidationError(error));
|
|
44
45
|
}
|
|
46
|
+
|
|
47
|
+
// Showing warrnings if extra unknown parameters are found
|
|
48
|
+
const {
|
|
49
|
+
error: warrning,
|
|
50
|
+
} = ConfigurationValidator.searchApplication().validate(
|
|
51
|
+
{ authorization, query },
|
|
52
|
+
{ abortEarly: false, allowUnknown: false }
|
|
53
|
+
);
|
|
54
|
+
if (warrning) {
|
|
55
|
+
console.log("Parameter Validation warrnings for searchApplication");
|
|
56
|
+
console.log(warrning);
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
const query_params = {};
|
|
46
60
|
query_params["query"] = query;
|
|
47
61
|
|
|
@@ -80,6 +94,17 @@ class Configuration {
|
|
|
80
94
|
if (error) {
|
|
81
95
|
return Promise.reject(new FDKClientValidationError(error));
|
|
82
96
|
}
|
|
97
|
+
|
|
98
|
+
// Showing warrnings if extra unknown parameters are found
|
|
99
|
+
const { error: warrning } = ConfigurationValidator.getLocations().validate(
|
|
100
|
+
{ locationType, id },
|
|
101
|
+
{ abortEarly: false, allowUnknown: false }
|
|
102
|
+
);
|
|
103
|
+
if (warrning) {
|
|
104
|
+
console.log("Parameter Validation warrnings for getLocations");
|
|
105
|
+
console.log(warrning);
|
|
106
|
+
}
|
|
107
|
+
|
|
83
108
|
const query_params = {};
|
|
84
109
|
query_params["location_type"] = locationType;
|
|
85
110
|
query_params["id"] = id;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export = ConfigurationModel;
|
|
2
|
+
declare class ConfigurationModel {
|
|
3
|
+
static ApplicationResponse(): any;
|
|
4
|
+
static Currency(): any;
|
|
5
|
+
static Domain(): any;
|
|
6
|
+
static ApplicationWebsite(): any;
|
|
7
|
+
static ApplicationCors(): any;
|
|
8
|
+
static ApplicationAuth(): any;
|
|
9
|
+
static ApplicationRedirections(): any;
|
|
10
|
+
static ApplicationMeta(): any;
|
|
11
|
+
static SecureUrl(): any;
|
|
12
|
+
static Application(): any;
|
|
13
|
+
static NotFound(): any;
|
|
14
|
+
static BadRequest(): any;
|
|
15
|
+
static Page(): any;
|
|
16
|
+
static LocationDefaultLanguage(): any;
|
|
17
|
+
static LocationDefaultCurrency(): any;
|
|
18
|
+
static LocationCountry(): any;
|
|
19
|
+
static Locations(): any;
|
|
20
|
+
}
|