@gofynd/fdk-client-javascript 0.1.36 → 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 +313 -281
- package/documentation/application/CATALOG.md +458 -435
- package/documentation/application/FILESTORAGE.md +2 -0
- package/documentation/application/LEAD.md +18 -18
- package/documentation/application/LOGISTIC.md +424 -102
- package/documentation/application/ORDER.md +293 -293
- package/documentation/application/PAYMENT.md +278 -278
- package/documentation/application/POSCART.md +350 -318
- package/documentation/application/README.md +1 -1
- package/documentation/application/REWARDS.md +1 -0
- package/documentation/application/USER.md +19 -14
- package/documentation/platform/AUDITTRAIL.md +2 -2
- package/documentation/platform/CART.md +442 -439
- package/documentation/platform/CATALOG.md +2925 -2641
- package/documentation/platform/COMPANYPROFILE.md +228 -369
- 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 +1296 -1618
- 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 +6 -1
- package/sdk/application/ApplicationClient.d.ts +17 -16
- package/sdk/application/ApplicationClient.js +43 -17
- package/sdk/application/ApplicationConfig.d.ts +1 -0
- package/sdk/application/ApplicationConfig.js +4 -2
- package/sdk/application/ApplicationModels.d.ts +0 -827
- package/sdk/application/ApplicationModels.js +6 -10486
- 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/Logistic/LogisticApplicationClient.d.ts +53 -0
- package/sdk/application/{client → Logistic}/LogisticApplicationClient.js +64 -29
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +26 -0
- package/sdk/application/Logistic/LogisticApplicationModel.js +286 -0
- package/sdk/application/{models/LogisticValidator.d.ts → Logistic/LogisticApplicationValidator.d.ts} +2 -1
- package/sdk/application/{models/LogisticValidator.js → Logistic/LogisticApplicationValidator.js} +13 -7
- 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.d.ts +132 -123
- package/sdk/platform/{client → Catalog}/CatalogPlatformClient.js +354 -323
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +316 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4690 -0
- package/sdk/platform/{models/CatalogValidator.d.ts → Catalog/CatalogPlatformValidator.d.ts} +15 -14
- package/sdk/platform/{models/CatalogValidator.js → Catalog/CatalogPlatformValidator.js} +91 -84
- 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 +2884 -18377
- package/sdk/platform/PlatformApplicationClient.js +3750 -13814
- package/sdk/platform/PlatformClient.d.ts +2898 -2861
- package/sdk/platform/PlatformClient.js +3714 -3057
- 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/application/client/LogisticApplicationClient.d.ts +0 -42
- package/sdk/platform/PlatformApplicationModels.d.ts +0 -328
- package/sdk/platform/PlatformApplicationModels.js +0 -22522
- package/sdk/platform/PlatformModels.d.ts +0 -1470
- package/sdk/platform/PlatformModels.js +0 -20510
- 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 → 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 → 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,704 @@
|
|
|
1
|
+
const Paginator = require("../../common/Paginator");
|
|
2
|
+
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
4
|
+
const ThemeValidator = require("./ThemePlatformApplicationValidator");
|
|
5
|
+
|
|
6
|
+
class Theme {
|
|
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.themeId - ID of the theme to be retrieved
|
|
15
|
+
* @summary: Get all pages of a theme
|
|
16
|
+
* @description: Use this API to retrieve all the available pages of a theme by its ID.
|
|
17
|
+
*/
|
|
18
|
+
getAllPages({ themeId } = {}) {
|
|
19
|
+
const { error } = ThemeValidator.getAllPages().validate(
|
|
20
|
+
{
|
|
21
|
+
themeId,
|
|
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/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
|
|
35
|
+
query_params,
|
|
36
|
+
undefined
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @param {Object} arg - Arg object.
|
|
42
|
+
* @param {string} arg.themeId - ID of the theme
|
|
43
|
+
* @param {AvailablePageSchema} arg.body
|
|
44
|
+
* @summary: Create a page
|
|
45
|
+
* @description: Use this API to create a page for a theme by its ID.
|
|
46
|
+
*/
|
|
47
|
+
createPage({ themeId, body } = {}) {
|
|
48
|
+
const { error } = ThemeValidator.createPage().validate(
|
|
49
|
+
{
|
|
50
|
+
themeId,
|
|
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
|
+
"post",
|
|
64
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
|
|
65
|
+
query_params,
|
|
66
|
+
body
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @param {Object} arg - Arg object.
|
|
72
|
+
* @param {string} arg.themeId - ID of the theme to be retrieved
|
|
73
|
+
* @param {AllAvailablePageSchema} arg.body
|
|
74
|
+
* @summary: Update multiple pages of a theme
|
|
75
|
+
* @description: Use this API to update multiple pages of a theme by its ID.
|
|
76
|
+
*/
|
|
77
|
+
updateMultiplePages({ themeId, body } = {}) {
|
|
78
|
+
const { error } = ThemeValidator.updateMultiplePages().validate(
|
|
79
|
+
{
|
|
80
|
+
themeId,
|
|
81
|
+
body,
|
|
82
|
+
},
|
|
83
|
+
{ abortEarly: false, allowUnknown: true }
|
|
84
|
+
);
|
|
85
|
+
if (error) {
|
|
86
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const query_params = {};
|
|
90
|
+
|
|
91
|
+
return PlatformAPIClient.execute(
|
|
92
|
+
this.config,
|
|
93
|
+
"put",
|
|
94
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/page`,
|
|
95
|
+
query_params,
|
|
96
|
+
body
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @param {Object} arg - Arg object.
|
|
102
|
+
* @param {string} arg.themeId - ID of the theme to be retrieved
|
|
103
|
+
* @param {string} arg.pageValue - Value of the page to be retrieved
|
|
104
|
+
* @summary: Get page of a theme
|
|
105
|
+
* @description: Use this API to retrieve a page of a theme.
|
|
106
|
+
*/
|
|
107
|
+
getPage({ themeId, pageValue } = {}) {
|
|
108
|
+
const { error } = ThemeValidator.getPage().validate(
|
|
109
|
+
{
|
|
110
|
+
themeId,
|
|
111
|
+
pageValue,
|
|
112
|
+
},
|
|
113
|
+
{ abortEarly: false, allowUnknown: true }
|
|
114
|
+
);
|
|
115
|
+
if (error) {
|
|
116
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const query_params = {};
|
|
120
|
+
|
|
121
|
+
return PlatformAPIClient.execute(
|
|
122
|
+
this.config,
|
|
123
|
+
"get",
|
|
124
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
|
|
125
|
+
query_params,
|
|
126
|
+
undefined
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @param {Object} arg - Arg object.
|
|
132
|
+
* @param {string} arg.themeId - ID of the theme
|
|
133
|
+
* @param {string} arg.pageValue - Value of the page to be updated
|
|
134
|
+
* @param {AvailablePageSchema} arg.body
|
|
135
|
+
* @summary: Updates a page
|
|
136
|
+
* @description: Use this API to update a page for a theme by its ID.
|
|
137
|
+
*/
|
|
138
|
+
updatePage({ themeId, pageValue, body } = {}) {
|
|
139
|
+
const { error } = ThemeValidator.updatePage().validate(
|
|
140
|
+
{
|
|
141
|
+
themeId,
|
|
142
|
+
pageValue,
|
|
143
|
+
body,
|
|
144
|
+
},
|
|
145
|
+
{ abortEarly: false, allowUnknown: true }
|
|
146
|
+
);
|
|
147
|
+
if (error) {
|
|
148
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const query_params = {};
|
|
152
|
+
|
|
153
|
+
return PlatformAPIClient.execute(
|
|
154
|
+
this.config,
|
|
155
|
+
"put",
|
|
156
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
|
|
157
|
+
query_params,
|
|
158
|
+
body
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @param {Object} arg - Arg object.
|
|
164
|
+
* @param {string} arg.themeId - ID of the theme
|
|
165
|
+
* @param {string} arg.pageValue - Value of the page to be updated
|
|
166
|
+
* @summary: Deletes a page
|
|
167
|
+
* @description: Use this API to delete a page for a theme by its ID and page_value.
|
|
168
|
+
*/
|
|
169
|
+
deletePage({ themeId, pageValue } = {}) {
|
|
170
|
+
const { error } = ThemeValidator.deletePage().validate(
|
|
171
|
+
{
|
|
172
|
+
themeId,
|
|
173
|
+
pageValue,
|
|
174
|
+
},
|
|
175
|
+
{ abortEarly: false, allowUnknown: true }
|
|
176
|
+
);
|
|
177
|
+
if (error) {
|
|
178
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const query_params = {};
|
|
182
|
+
|
|
183
|
+
return PlatformAPIClient.execute(
|
|
184
|
+
this.config,
|
|
185
|
+
"delete",
|
|
186
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/${pageValue}`,
|
|
187
|
+
query_params,
|
|
188
|
+
undefined
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @param {Object} arg - Arg object.
|
|
194
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
195
|
+
* page. Default value is 10.
|
|
196
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
197
|
+
* given set of results. Default value is 1.
|
|
198
|
+
* @summary: Get a list of themes from the theme library
|
|
199
|
+
* @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to fetch a list of themes from the library along with their configuration details.
|
|
200
|
+
*/
|
|
201
|
+
getThemeLibrary({ pageSize, pageNo } = {}) {
|
|
202
|
+
const { error } = ThemeValidator.getThemeLibrary().validate(
|
|
203
|
+
{
|
|
204
|
+
pageSize,
|
|
205
|
+
pageNo,
|
|
206
|
+
},
|
|
207
|
+
{ abortEarly: false, allowUnknown: true }
|
|
208
|
+
);
|
|
209
|
+
if (error) {
|
|
210
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
const query_params = {};
|
|
214
|
+
query_params["page_size"] = pageSize;
|
|
215
|
+
query_params["page_no"] = pageNo;
|
|
216
|
+
|
|
217
|
+
return PlatformAPIClient.execute(
|
|
218
|
+
this.config,
|
|
219
|
+
"get",
|
|
220
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
|
|
221
|
+
query_params,
|
|
222
|
+
undefined
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @param {Object} arg - Arg object.
|
|
228
|
+
* @param {AddThemeRequestSchema} arg.body
|
|
229
|
+
* @summary: Add a theme to the theme library
|
|
230
|
+
* @description: Theme library is a personalized collection of themes that are chosen and added from the available themes. Use this API to choose a theme and add it to the theme library.
|
|
231
|
+
*/
|
|
232
|
+
addToThemeLibrary({ body } = {}) {
|
|
233
|
+
const { error } = ThemeValidator.addToThemeLibrary().validate(
|
|
234
|
+
{
|
|
235
|
+
body,
|
|
236
|
+
},
|
|
237
|
+
{ abortEarly: false, allowUnknown: true }
|
|
238
|
+
);
|
|
239
|
+
if (error) {
|
|
240
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
const query_params = {};
|
|
244
|
+
|
|
245
|
+
return PlatformAPIClient.execute(
|
|
246
|
+
this.config,
|
|
247
|
+
"post",
|
|
248
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/library`,
|
|
249
|
+
query_params,
|
|
250
|
+
body
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @param {Object} arg - Arg object.
|
|
256
|
+
* @param {AddThemeRequestSchema} arg.body
|
|
257
|
+
* @summary: Apply a theme
|
|
258
|
+
* @description: Use this API to apply a theme to the website.
|
|
259
|
+
*/
|
|
260
|
+
applyTheme({ body } = {}) {
|
|
261
|
+
const { error } = ThemeValidator.applyTheme().validate(
|
|
262
|
+
{
|
|
263
|
+
body,
|
|
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
|
+
"post",
|
|
276
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/apply`,
|
|
277
|
+
query_params,
|
|
278
|
+
body
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* @param {Object} arg - Arg object.
|
|
284
|
+
* @param {string} arg.themeId - Theme ID
|
|
285
|
+
* @summary: Checks if theme is upgradable
|
|
286
|
+
* @description: There's always a possibility that new features get added to a theme. Use this API to check if the applied theme has an upgrade available.
|
|
287
|
+
*/
|
|
288
|
+
isUpgradable({ themeId } = {}) {
|
|
289
|
+
const { error } = ThemeValidator.isUpgradable().validate(
|
|
290
|
+
{
|
|
291
|
+
themeId,
|
|
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
|
+
"get",
|
|
304
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgradable`,
|
|
305
|
+
query_params,
|
|
306
|
+
undefined
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @param {Object} arg - Arg object.
|
|
312
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
313
|
+
* @summary: Upgrade a theme
|
|
314
|
+
* @description: Use this API to upgrade the current theme to its latest version.
|
|
315
|
+
*/
|
|
316
|
+
upgradeTheme({ themeId } = {}) {
|
|
317
|
+
const { error } = ThemeValidator.upgradeTheme().validate(
|
|
318
|
+
{
|
|
319
|
+
themeId,
|
|
320
|
+
},
|
|
321
|
+
{ abortEarly: false, allowUnknown: true }
|
|
322
|
+
);
|
|
323
|
+
if (error) {
|
|
324
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const query_params = {};
|
|
328
|
+
|
|
329
|
+
return PlatformAPIClient.execute(
|
|
330
|
+
this.config,
|
|
331
|
+
"put",
|
|
332
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/upgrade`,
|
|
333
|
+
query_params,
|
|
334
|
+
undefined
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @param {Object} arg - Arg object.
|
|
340
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
341
|
+
* page. Default value is 10.
|
|
342
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
343
|
+
* given set of results. Default value is 1.
|
|
344
|
+
* @summary: Get all public themes
|
|
345
|
+
* @description: Use this API to get a list of free themes that you can apply to your website.
|
|
346
|
+
*/
|
|
347
|
+
getPublicThemes({ pageSize, pageNo } = {}) {
|
|
348
|
+
const { error } = ThemeValidator.getPublicThemes().validate(
|
|
349
|
+
{
|
|
350
|
+
pageSize,
|
|
351
|
+
pageNo,
|
|
352
|
+
},
|
|
353
|
+
{ abortEarly: false, allowUnknown: true }
|
|
354
|
+
);
|
|
355
|
+
if (error) {
|
|
356
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const query_params = {};
|
|
360
|
+
query_params["page_size"] = pageSize;
|
|
361
|
+
query_params["page_no"] = pageNo;
|
|
362
|
+
|
|
363
|
+
return PlatformAPIClient.execute(
|
|
364
|
+
this.config,
|
|
365
|
+
"get",
|
|
366
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/list/public`,
|
|
367
|
+
query_params,
|
|
368
|
+
undefined
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* @param {Object} arg - Arg object.
|
|
374
|
+
* @param {ThemesSchema} arg.body
|
|
375
|
+
* @summary: Create a new theme
|
|
376
|
+
* @description: Themes improve the look and appearance of a website. Use this API to create a theme.
|
|
377
|
+
*/
|
|
378
|
+
createTheme({ body } = {}) {
|
|
379
|
+
const { error } = ThemeValidator.createTheme().validate(
|
|
380
|
+
{
|
|
381
|
+
body,
|
|
382
|
+
},
|
|
383
|
+
{ abortEarly: false, allowUnknown: true }
|
|
384
|
+
);
|
|
385
|
+
if (error) {
|
|
386
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
const query_params = {};
|
|
390
|
+
|
|
391
|
+
return PlatformAPIClient.execute(
|
|
392
|
+
this.config,
|
|
393
|
+
"post",
|
|
394
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
|
|
395
|
+
query_params,
|
|
396
|
+
body
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* @param {Object} arg - Arg object.
|
|
402
|
+
* @summary: Get the applied theme
|
|
403
|
+
* @description: Use this API to retrieve the theme that is currently applied to the website along with its details.
|
|
404
|
+
*/
|
|
405
|
+
getAppliedTheme({} = {}) {
|
|
406
|
+
const { error } = ThemeValidator.getAppliedTheme().validate(
|
|
407
|
+
{},
|
|
408
|
+
{ abortEarly: false, allowUnknown: true }
|
|
409
|
+
);
|
|
410
|
+
if (error) {
|
|
411
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
const query_params = {};
|
|
415
|
+
|
|
416
|
+
return PlatformAPIClient.execute(
|
|
417
|
+
this.config,
|
|
418
|
+
"get",
|
|
419
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/`,
|
|
420
|
+
query_params,
|
|
421
|
+
undefined
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* @param {Object} arg - Arg object.
|
|
427
|
+
* @summary: Get all the supported fonts in a theme
|
|
428
|
+
* @description: Font is a collection of characters with a similar design. Use this API to retrieve a list of website fonts.
|
|
429
|
+
*/
|
|
430
|
+
getFonts({} = {}) {
|
|
431
|
+
const { error } = ThemeValidator.getFonts().validate(
|
|
432
|
+
{},
|
|
433
|
+
{ abortEarly: false, allowUnknown: true }
|
|
434
|
+
);
|
|
435
|
+
if (error) {
|
|
436
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
const query_params = {};
|
|
440
|
+
|
|
441
|
+
return PlatformAPIClient.execute(
|
|
442
|
+
this.config,
|
|
443
|
+
"get",
|
|
444
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/fonts`,
|
|
445
|
+
query_params,
|
|
446
|
+
undefined
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* @param {Object} arg - Arg object.
|
|
452
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
453
|
+
* @summary: Gets theme by id
|
|
454
|
+
* @description: Use this API to retrieve the details of a specific theme by using its ID.
|
|
455
|
+
*/
|
|
456
|
+
getThemeById({ themeId } = {}) {
|
|
457
|
+
const { error } = ThemeValidator.getThemeById().validate(
|
|
458
|
+
{
|
|
459
|
+
themeId,
|
|
460
|
+
},
|
|
461
|
+
{ abortEarly: false, allowUnknown: true }
|
|
462
|
+
);
|
|
463
|
+
if (error) {
|
|
464
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
const query_params = {};
|
|
468
|
+
|
|
469
|
+
return PlatformAPIClient.execute(
|
|
470
|
+
this.config,
|
|
471
|
+
"get",
|
|
472
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
|
|
473
|
+
query_params,
|
|
474
|
+
undefined
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @param {Object} arg - Arg object.
|
|
480
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
481
|
+
* @param {ThemesSchema} arg.body
|
|
482
|
+
* @summary: Update a theme
|
|
483
|
+
* @description: Use this API to edit an existing theme. You can customize the website font, sections, images, styles, and many more.
|
|
484
|
+
*/
|
|
485
|
+
updateTheme({ themeId, body } = {}) {
|
|
486
|
+
const { error } = ThemeValidator.updateTheme().validate(
|
|
487
|
+
{
|
|
488
|
+
themeId,
|
|
489
|
+
body,
|
|
490
|
+
},
|
|
491
|
+
{ abortEarly: false, allowUnknown: true }
|
|
492
|
+
);
|
|
493
|
+
if (error) {
|
|
494
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
const query_params = {};
|
|
498
|
+
|
|
499
|
+
return PlatformAPIClient.execute(
|
|
500
|
+
this.config,
|
|
501
|
+
"put",
|
|
502
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
|
|
503
|
+
query_params,
|
|
504
|
+
body
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* @param {Object} arg - Arg object.
|
|
510
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
511
|
+
* @summary: Delete a theme
|
|
512
|
+
* @description: Use this API to delete a theme from the theme library.
|
|
513
|
+
*/
|
|
514
|
+
deleteTheme({ themeId } = {}) {
|
|
515
|
+
const { error } = ThemeValidator.deleteTheme().validate(
|
|
516
|
+
{
|
|
517
|
+
themeId,
|
|
518
|
+
},
|
|
519
|
+
{ abortEarly: false, allowUnknown: true }
|
|
520
|
+
);
|
|
521
|
+
if (error) {
|
|
522
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
const query_params = {};
|
|
526
|
+
|
|
527
|
+
return PlatformAPIClient.execute(
|
|
528
|
+
this.config,
|
|
529
|
+
"delete",
|
|
530
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}`,
|
|
531
|
+
query_params,
|
|
532
|
+
undefined
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* @param {Object} arg - Arg object.
|
|
538
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
539
|
+
* @summary: Get a theme preview
|
|
540
|
+
* @description: A theme can be previewed before applying it. Use this API to retrieve the theme preview by using its ID.
|
|
541
|
+
*/
|
|
542
|
+
getThemeForPreview({ themeId } = {}) {
|
|
543
|
+
const { error } = ThemeValidator.getThemeForPreview().validate(
|
|
544
|
+
{
|
|
545
|
+
themeId,
|
|
546
|
+
},
|
|
547
|
+
{ abortEarly: false, allowUnknown: true }
|
|
548
|
+
);
|
|
549
|
+
if (error) {
|
|
550
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
const query_params = {};
|
|
554
|
+
|
|
555
|
+
return PlatformAPIClient.execute(
|
|
556
|
+
this.config,
|
|
557
|
+
"get",
|
|
558
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/preview`,
|
|
559
|
+
query_params,
|
|
560
|
+
undefined
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* @param {Object} arg - Arg object.
|
|
566
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
567
|
+
* @summary: Publish a theme
|
|
568
|
+
* @description: Use this API to publish a theme that is either newly created or edited.
|
|
569
|
+
*/
|
|
570
|
+
publishTheme({ themeId } = {}) {
|
|
571
|
+
const { error } = ThemeValidator.publishTheme().validate(
|
|
572
|
+
{
|
|
573
|
+
themeId,
|
|
574
|
+
},
|
|
575
|
+
{ abortEarly: false, allowUnknown: true }
|
|
576
|
+
);
|
|
577
|
+
if (error) {
|
|
578
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
const query_params = {};
|
|
582
|
+
|
|
583
|
+
return PlatformAPIClient.execute(
|
|
584
|
+
this.config,
|
|
585
|
+
"put",
|
|
586
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/publish`,
|
|
587
|
+
query_params,
|
|
588
|
+
undefined
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* @param {Object} arg - Arg object.
|
|
594
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
595
|
+
* @summary: Unpublish a theme
|
|
596
|
+
* @description: Use this API to remove an existing theme from the list of available themes.
|
|
597
|
+
*/
|
|
598
|
+
unpublishTheme({ themeId } = {}) {
|
|
599
|
+
const { error } = ThemeValidator.unpublishTheme().validate(
|
|
600
|
+
{
|
|
601
|
+
themeId,
|
|
602
|
+
},
|
|
603
|
+
{ abortEarly: false, allowUnknown: true }
|
|
604
|
+
);
|
|
605
|
+
if (error) {
|
|
606
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
const query_params = {};
|
|
610
|
+
|
|
611
|
+
return PlatformAPIClient.execute(
|
|
612
|
+
this.config,
|
|
613
|
+
"put",
|
|
614
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unpublish`,
|
|
615
|
+
query_params,
|
|
616
|
+
undefined
|
|
617
|
+
);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* @param {Object} arg - Arg object.
|
|
622
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
623
|
+
* @summary: Archive a theme
|
|
624
|
+
* @description: Use this API to store an existing theme but not delete it so that it can be used in future if required.
|
|
625
|
+
*/
|
|
626
|
+
archiveTheme({ themeId } = {}) {
|
|
627
|
+
const { error } = ThemeValidator.archiveTheme().validate(
|
|
628
|
+
{
|
|
629
|
+
themeId,
|
|
630
|
+
},
|
|
631
|
+
{ abortEarly: false, allowUnknown: true }
|
|
632
|
+
);
|
|
633
|
+
if (error) {
|
|
634
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
const query_params = {};
|
|
638
|
+
|
|
639
|
+
return PlatformAPIClient.execute(
|
|
640
|
+
this.config,
|
|
641
|
+
"put",
|
|
642
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/archive`,
|
|
643
|
+
query_params,
|
|
644
|
+
undefined
|
|
645
|
+
);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* @param {Object} arg - Arg object.
|
|
650
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
651
|
+
* @summary: Unarchive a theme
|
|
652
|
+
* @description: Use this API to restore an archived theme and bring it back for editing or publishing.
|
|
653
|
+
*/
|
|
654
|
+
unarchiveTheme({ themeId } = {}) {
|
|
655
|
+
const { error } = ThemeValidator.unarchiveTheme().validate(
|
|
656
|
+
{
|
|
657
|
+
themeId,
|
|
658
|
+
},
|
|
659
|
+
{ abortEarly: false, allowUnknown: true }
|
|
660
|
+
);
|
|
661
|
+
if (error) {
|
|
662
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
const query_params = {};
|
|
666
|
+
|
|
667
|
+
return PlatformAPIClient.execute(
|
|
668
|
+
this.config,
|
|
669
|
+
"put",
|
|
670
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/unarchive`,
|
|
671
|
+
query_params,
|
|
672
|
+
undefined
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* @param {Object} arg - Arg object.
|
|
678
|
+
* @param {string} arg.themeId - ID allotted to the theme.
|
|
679
|
+
* @summary: Fetch last modified timestamp
|
|
680
|
+
* @description: Use this API to fetch Last-Modified timestamp in header metadata.
|
|
681
|
+
*/
|
|
682
|
+
getThemeLastModified({ themeId } = {}) {
|
|
683
|
+
const { error } = ThemeValidator.getThemeLastModified().validate(
|
|
684
|
+
{
|
|
685
|
+
themeId,
|
|
686
|
+
},
|
|
687
|
+
{ abortEarly: false, allowUnknown: true }
|
|
688
|
+
);
|
|
689
|
+
if (error) {
|
|
690
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
const query_params = {};
|
|
694
|
+
|
|
695
|
+
return PlatformAPIClient.execute(
|
|
696
|
+
this.config,
|
|
697
|
+
"head",
|
|
698
|
+
`/service/platform/theme/v1.0/company/${this.config.companyId}/application/${this.applicationId}/${themeId}/polling`,
|
|
699
|
+
query_params,
|
|
700
|
+
undefined
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
module.exports = Theme;
|