@gofynd/fdk-client-javascript 1.0.1 → 1.0.3
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/documentation/application/CART.md +5934 -4502
- package/documentation/application/CATALOG.md +6338 -7245
- package/documentation/application/COMMON.md +95 -222
- package/documentation/application/COMMUNICATION.md +106 -186
- package/documentation/application/CONFIGURATION.md +903 -1597
- package/documentation/application/CONTENT.md +562 -1270
- package/documentation/application/FILESTORAGE.md +84 -220
- package/documentation/application/LEAD.md +314 -660
- package/documentation/application/LOGISTIC.md +229 -305
- package/documentation/application/ORDER.md +642 -1137
- package/documentation/application/PAYMENT.md +2285 -3031
- package/documentation/application/POSCART.md +6079 -4642
- package/documentation/application/REWARDS.md +94 -248
- package/documentation/application/SHARE.md +152 -250
- package/documentation/application/THEME.md +952 -1235
- package/documentation/application/USER.md +1228 -1765
- package/documentation/platform/ANALYTICS.md +207 -349
- package/documentation/platform/AUDITTRAIL.md +121 -204
- package/documentation/platform/BILLING.md +865 -1376
- package/documentation/platform/CART.md +2814 -3662
- package/documentation/platform/CATALOG.md +15266 -17619
- package/documentation/platform/COMMON.md +95 -222
- package/documentation/platform/COMMUNICATION.md +1632 -2380
- package/documentation/platform/COMPANYPROFILE.md +572 -957
- package/documentation/platform/CONFIGURATION.md +3050 -4073
- package/documentation/platform/CONTENT.md +3509 -4121
- package/documentation/platform/DISCOUNT.md +140 -236
- package/documentation/platform/FILESTORAGE.md +187 -323
- package/documentation/platform/INVENTORY.md +268 -911
- package/documentation/platform/LEAD.md +2195 -2541
- package/documentation/platform/ORDER.md +3750 -5636
- package/documentation/platform/PARTNER.md +9 -36
- package/documentation/platform/PAYMENT.md +903 -1213
- package/documentation/platform/REWARDS.md +183 -347
- package/documentation/platform/SHARE.md +120 -213
- package/documentation/platform/THEME.md +12956 -13239
- package/documentation/platform/USER.md +975 -1120
- package/documentation/platform/WEBHOOK.md +78 -184
- package/documentation/public/CONFIGURATION.md +95 -222
- package/documentation/public/INVENTORY.md +100 -282
- package/documentation/public/WEBHOOK.md +27 -133
- package/package.json +1 -1
- package/sdk/application/ApplicationConfig.js +1 -1
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +1058 -547
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +489 -886
- package/sdk/application/Cart/CartApplicationValidator.d.ts +17 -17
- package/sdk/application/Cart/CartApplicationValidator.js +98 -98
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +358 -358
- package/sdk/application/Catalog/CatalogApplicationClient.js +1545 -949
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +692 -1258
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +19 -19
- package/sdk/application/Catalog/CatalogApplicationValidator.js +110 -110
- package/sdk/application/Common/CommonApplicationClient.d.ts +13 -13
- package/sdk/application/Common/CommonApplicationClient.js +76 -36
- package/sdk/application/Common/CommonApplicationModel.d.ts +12 -12
- package/sdk/application/Common/CommonApplicationModel.js +83 -160
- package/sdk/application/Common/CommonApplicationValidator.d.ts +1 -1
- package/sdk/application/Common/CommonApplicationValidator.js +6 -6
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +11 -11
- package/sdk/application/Communication/CommunicationApplicationClient.js +92 -31
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +6 -6
- package/sdk/application/Communication/CommunicationApplicationModel.js +38 -83
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +1 -1
- package/sdk/application/Communication/CommunicationApplicationValidator.js +4 -4
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +116 -116
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +638 -312
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +85 -85
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +480 -851
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +8 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +33 -33
- package/sdk/application/Content/ContentApplicationClient.d.ts +67 -67
- package/sdk/application/Content/ContentApplicationClient.js +581 -213
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -75
- package/sdk/application/Content/ContentApplicationModel.js +468 -875
- package/sdk/application/Content/ContentApplicationValidator.d.ts +5 -5
- package/sdk/application/Content/ContentApplicationValidator.js +24 -24
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +25 -25
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +121 -59
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +13 -13
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +86 -169
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +1 -1
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +7 -7
- package/sdk/application/Lead/LeadApplicationClient.d.ts +24 -24
- package/sdk/application/Lead/LeadApplicationClient.js +230 -96
- package/sdk/application/Lead/LeadApplicationModel.d.ts +35 -35
- package/sdk/application/Lead/LeadApplicationModel.js +267 -474
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +2 -2
- package/sdk/application/Lead/LeadApplicationValidator.js +11 -11
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +30 -19
- package/sdk/application/Logistic/LogisticApplicationClient.js +196 -47
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +17 -14
- package/sdk/application/Logistic/LogisticApplicationModel.js +133 -201
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +3 -2
- package/sdk/application/Logistic/LogisticApplicationValidator.js +14 -8
- package/sdk/application/Order/OrderApplicationClient.d.ts +86 -86
- package/sdk/application/Order/OrderApplicationClient.js +448 -215
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +357 -661
- package/sdk/application/Order/OrderApplicationValidator.d.ts +7 -7
- package/sdk/application/Order/OrderApplicationValidator.js +28 -28
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +318 -318
- package/sdk/application/Payment/PaymentApplicationClient.js +1525 -750
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +565 -1033
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +28 -28
- package/sdk/application/Payment/PaymentApplicationValidator.js +107 -107
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +254 -254
- package/sdk/application/PosCart/PosCartApplicationClient.js +1137 -606
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +61 -60
- package/sdk/application/PosCart/PosCartApplicationModel.js +477 -873
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +18 -18
- package/sdk/application/PosCart/PosCartApplicationValidator.js +103 -103
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +27 -27
- package/sdk/application/Rewards/RewardsApplicationClient.js +253 -113
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationModel.js +96 -191
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +3 -3
- package/sdk/application/Rewards/RewardsApplicationValidator.js +12 -12
- package/sdk/application/Share/ShareApplicationClient.d.ts +37 -37
- package/sdk/application/Share/ShareApplicationClient.js +221 -96
- package/sdk/application/Share/ShareApplicationModel.d.ts +8 -8
- package/sdk/application/Share/ShareApplicationModel.js +63 -123
- package/sdk/application/Share/ShareApplicationValidator.d.ts +4 -4
- package/sdk/application/Share/ShareApplicationValidator.js +12 -12
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -8
- package/sdk/application/Theme/ThemeApplicationClient.js +115 -37
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +34 -34
- package/sdk/application/Theme/ThemeApplicationModel.js +190 -336
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +1 -1
- package/sdk/application/Theme/ThemeApplicationValidator.js +4 -4
- package/sdk/application/User/UserApplicationClient.d.ts +280 -280
- package/sdk/application/User/UserApplicationClient.js +1201 -543
- package/sdk/application/User/UserApplicationModel.d.ts +79 -72
- package/sdk/application/User/UserApplicationModel.js +440 -689
- package/sdk/application/User/UserApplicationValidator.d.ts +24 -24
- package/sdk/application/User/UserApplicationValidator.js +89 -89
- package/sdk/common/AxiosHelper.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +55 -47
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +308 -151
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +20 -20
- package/sdk/platform/Analytics/AnalyticsPlatformClient.d.ts +8 -4
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +103 -16
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +16 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +131 -44
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +50 -89
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +6 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +68 -56
- package/sdk/platform/Billing/BillingPlatformClient.js +416 -171
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +40 -40
- package/sdk/platform/Billing/BillingPlatformModel.js +342 -668
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +8 -8
- package/sdk/platform/Billing/BillingPlatformValidator.js +25 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +176 -159
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +837 -500
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +11 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +63 -63
- package/sdk/platform/Cart/CartPlatformModel.d.ts +86 -85
- package/sdk/platform/Cart/CartPlatformModel.js +677 -1211
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +582 -529
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2642 -1533
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +708 -590
- package/sdk/platform/Catalog/CatalogPlatformClient.js +3103 -1362
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +293 -284
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2149 -3660
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -64
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +235 -216
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -12
- package/sdk/platform/Common/CommonPlatformClient.js +80 -37
- package/sdk/platform/Common/CommonPlatformModel.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformModel.js +83 -160
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +1 -1
- package/sdk/platform/Common/CommonPlatformValidator.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +333 -293
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1687 -855
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +87 -87
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +28 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +70 -57
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +463 -182
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +28 -28
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +294 -557
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +24 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +175 -137
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1168 -521
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +69 -63
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +137 -119
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +691 -316
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +148 -146
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +854 -1508
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +38 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +542 -461
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +2600 -1160
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +50 -49
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +159 -152
- package/sdk/platform/Content/ContentPlatformModel.d.ts +79 -75
- package/sdk/platform/Content/ContentPlatformModel.js +486 -867
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +72 -61
- package/sdk/platform/Discount/DiscountPlatformClient.js +424 -198
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +7 -7
- package/sdk/platform/Discount/DiscountPlatformModel.js +60 -121
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +6 -6
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +26 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -59
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +58 -52
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +240 -114
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +13 -13
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +86 -169
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +76 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +461 -197
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +30 -30
- package/sdk/platform/Inventory/InventoryPlatformModel.js +497 -964
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +7 -7
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +84 -71
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +441 -182
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +28 -28
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +86 -75
- package/sdk/platform/Lead/LeadPlatformClient.js +434 -212
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +35 -35
- package/sdk/platform/Lead/LeadPlatformModel.js +267 -474
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +6 -6
- package/sdk/platform/Lead/LeadPlatformValidator.js +24 -24
- package/sdk/platform/OAuthClient.js +8 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +14 -11
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +113 -49
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +6 -6
- package/sdk/platform/Order/OrderPlatformClient.d.ts +367 -315
- package/sdk/platform/Order/OrderPlatformClient.js +1775 -893
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -192
- package/sdk/platform/Order/OrderPlatformModel.js +1591 -2822
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +160 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -2
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -8
- package/sdk/platform/Partner/PartnerPlatformModel.js +6 -22
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +65 -54
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +395 -164
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +23 -23
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +55 -45
- package/sdk/platform/Payment/PaymentPlatformClient.js +362 -147
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +220 -408
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +21 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10153
- package/sdk/platform/PlatformApplicationClient.js +1584 -13691
- package/sdk/platform/PlatformClient.d.ts +7918 -7666
- package/sdk/platform/PlatformClient.js +8701 -9926
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +91 -78
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +507 -253
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +34 -34
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -12
- package/sdk/platform/Share/SharePlatformApplicationClient.js +130 -52
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +6 -6
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +148 -124
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +770 -295
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +44 -44
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +146 -67
- package/sdk/platform/User/UserPlatformApplicationClient.js +742 -155
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +61 -23
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +35 -29
- package/sdk/platform/Webhook/WebhookPlatformClient.js +218 -91
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +7 -7
- package/sdk/platform/Webhook/WebhookPlatformModel.js +68 -136
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +3 -3
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +14 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +81 -38
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +12 -12
- package/sdk/public/Configuration/ConfigurationPublicModel.js +85 -162
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +6 -6
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +34 -34
- package/sdk/public/Inventory/InventoryPublicClient.js +228 -105
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +10 -10
- package/sdk/public/Inventory/InventoryPublicModel.js +119 -245
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +3 -3
- package/sdk/public/Inventory/InventoryPublicValidator.js +15 -15
- package/sdk/public/Webhook/WebhookPublicClient.js +51 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/tests/application/catalog.spec.js +7 -0
|
@@ -3,6 +3,8 @@ const constructUrl = require("../constructUrl");
|
|
|
3
3
|
const Paginator = require("../../common/Paginator");
|
|
4
4
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
5
5
|
const ContentValidator = require("./ContentApplicationValidator");
|
|
6
|
+
const ContentModel = require("./ContentApplicationModel");
|
|
7
|
+
const { Logger } = require("./../../common/Logger");
|
|
6
8
|
|
|
7
9
|
class Content {
|
|
8
10
|
constructor(_conf) {
|
|
@@ -12,23 +14,23 @@ class Content {
|
|
|
12
14
|
getBlog: "/service/application/content/v1.0/blogs/{slug}",
|
|
13
15
|
getBlogs: "/service/application/content/v1.0/blogs/",
|
|
14
16
|
getDataLoaders: "/service/application/content/v1.0/data-loader",
|
|
15
|
-
getFaqs: "/service/application/content/v1.0/faq",
|
|
16
|
-
getFaqCategories: "/service/application/content/v1.0/faq/categories",
|
|
17
17
|
getFaqBySlug: "/service/application/content/v1.0/faq/{slug}",
|
|
18
|
+
getFaqCategories: "/service/application/content/v1.0/faq/categories",
|
|
18
19
|
getFaqCategoryBySlug:
|
|
19
20
|
"/service/application/content/v1.0/faq/category/{slug}",
|
|
21
|
+
getFaqs: "/service/application/content/v1.0/faq",
|
|
20
22
|
getFaqsByCategorySlug:
|
|
21
23
|
"/service/application/content/v1.0/faq/category/{slug}/faqs",
|
|
22
24
|
getLandingPage: "/service/application/content/v1.0/landing-page",
|
|
23
25
|
getLegalInformation: "/service/application/content/v1.0/legal",
|
|
24
26
|
getNavigations: "/service/application/content/v1.0/navigations/",
|
|
27
|
+
getPage: "/service/application/content/v2.0/pages/{slug}",
|
|
28
|
+
getPages: "/service/application/content/v2.0/pages/",
|
|
25
29
|
getSEOConfiguration: "/service/application/content/v1.0/seo",
|
|
26
|
-
getSlideshows: "/service/application/content/v1.0/slideshow/",
|
|
27
30
|
getSlideshow: "/service/application/content/v1.0/slideshow/{slug}",
|
|
31
|
+
getSlideshows: "/service/application/content/v1.0/slideshow/",
|
|
28
32
|
getSupportInformation: "/service/application/content/v1.0/support",
|
|
29
33
|
getTags: "/service/application/content/v1.0/tags",
|
|
30
|
-
getPage: "/service/application/content/v2.0/pages/{slug}",
|
|
31
|
-
getPages: "/service/application/content/v2.0/pages/",
|
|
32
34
|
};
|
|
33
35
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
34
36
|
(urls, [method, relativeUrl]) => {
|
|
@@ -52,7 +54,7 @@ class Content {
|
|
|
52
54
|
* @summary: Get live announcements
|
|
53
55
|
* @description: Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve live announcements. Get announcements on individual pages or for all pages.
|
|
54
56
|
*/
|
|
55
|
-
getAnnouncements({} = {}) {
|
|
57
|
+
async getAnnouncements({} = {}) {
|
|
56
58
|
const { error } = ContentValidator.getAnnouncements().validate(
|
|
57
59
|
{},
|
|
58
60
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -67,15 +69,18 @@ class Content {
|
|
|
67
69
|
{ abortEarly: false, allowUnknown: false }
|
|
68
70
|
);
|
|
69
71
|
if (warrning) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
Logger({
|
|
73
|
+
level: "WARN",
|
|
74
|
+
message: "Parameter Validation warrnings for getAnnouncements",
|
|
75
|
+
});
|
|
76
|
+
Logger({ level: "WARN", message: warrning });
|
|
72
77
|
}
|
|
73
78
|
|
|
74
79
|
const query_params = {};
|
|
75
80
|
|
|
76
81
|
const xHeaders = {};
|
|
77
82
|
|
|
78
|
-
|
|
83
|
+
const response = await APIClient.execute(
|
|
79
84
|
this._conf,
|
|
80
85
|
"get",
|
|
81
86
|
constructUrl({
|
|
@@ -86,6 +91,23 @@ class Content {
|
|
|
86
91
|
undefined,
|
|
87
92
|
xHeaders
|
|
88
93
|
);
|
|
94
|
+
|
|
95
|
+
const {
|
|
96
|
+
error: res_error,
|
|
97
|
+
} = ContentModel.AnnouncementsResponseSchema().validate(response, {
|
|
98
|
+
abortEarly: false,
|
|
99
|
+
allowUnknown: false,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
if (res_error) {
|
|
103
|
+
Logger({
|
|
104
|
+
level: "WARN",
|
|
105
|
+
message: "Response Validation Warnnings for getAnnouncements",
|
|
106
|
+
});
|
|
107
|
+
Logger({ level: "WARN", message: res_error });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return response;
|
|
89
111
|
}
|
|
90
112
|
|
|
91
113
|
/**
|
|
@@ -98,7 +120,7 @@ class Content {
|
|
|
98
120
|
* @summary: Get a blog
|
|
99
121
|
* @description: Use this API to get the details of a blog using its slug. Details include the title, reading time, publish status, feature image, tags, author, etc.
|
|
100
122
|
*/
|
|
101
|
-
getBlog({ slug, rootId } = {}) {
|
|
123
|
+
async getBlog({ slug, rootId } = {}) {
|
|
102
124
|
const { error } = ContentValidator.getBlog().validate(
|
|
103
125
|
{ slug, rootId },
|
|
104
126
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -113,8 +135,11 @@ class Content {
|
|
|
113
135
|
{ abortEarly: false, allowUnknown: false }
|
|
114
136
|
);
|
|
115
137
|
if (warrning) {
|
|
116
|
-
|
|
117
|
-
|
|
138
|
+
Logger({
|
|
139
|
+
level: "WARN",
|
|
140
|
+
message: "Parameter Validation warrnings for getBlog",
|
|
141
|
+
});
|
|
142
|
+
Logger({ level: "WARN", message: warrning });
|
|
118
143
|
}
|
|
119
144
|
|
|
120
145
|
const query_params = {};
|
|
@@ -122,7 +147,7 @@ class Content {
|
|
|
122
147
|
|
|
123
148
|
const xHeaders = {};
|
|
124
149
|
|
|
125
|
-
|
|
150
|
+
const response = await APIClient.execute(
|
|
126
151
|
this._conf,
|
|
127
152
|
"get",
|
|
128
153
|
constructUrl({
|
|
@@ -133,6 +158,21 @@ class Content {
|
|
|
133
158
|
undefined,
|
|
134
159
|
xHeaders
|
|
135
160
|
);
|
|
161
|
+
|
|
162
|
+
const { error: res_error } = ContentModel.BlogSchema().validate(response, {
|
|
163
|
+
abortEarly: false,
|
|
164
|
+
allowUnknown: false,
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
if (res_error) {
|
|
168
|
+
Logger({
|
|
169
|
+
level: "WARN",
|
|
170
|
+
message: "Response Validation Warnnings for getBlog",
|
|
171
|
+
});
|
|
172
|
+
Logger({ level: "WARN", message: res_error });
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return response;
|
|
136
176
|
}
|
|
137
177
|
|
|
138
178
|
/**
|
|
@@ -144,7 +184,7 @@ class Content {
|
|
|
144
184
|
* @summary: Get a list of blogs
|
|
145
185
|
* @description: Use this API to get all the blogs.
|
|
146
186
|
*/
|
|
147
|
-
getBlogs({ pageNo, pageSize } = {}) {
|
|
187
|
+
async getBlogs({ pageNo, pageSize } = {}) {
|
|
148
188
|
const { error } = ContentValidator.getBlogs().validate(
|
|
149
189
|
{ pageNo, pageSize },
|
|
150
190
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -159,8 +199,11 @@ class Content {
|
|
|
159
199
|
{ abortEarly: false, allowUnknown: false }
|
|
160
200
|
);
|
|
161
201
|
if (warrning) {
|
|
162
|
-
|
|
163
|
-
|
|
202
|
+
Logger({
|
|
203
|
+
level: "WARN",
|
|
204
|
+
message: "Parameter Validation warrnings for getBlogs",
|
|
205
|
+
});
|
|
206
|
+
Logger({ level: "WARN", message: warrning });
|
|
164
207
|
}
|
|
165
208
|
|
|
166
209
|
const query_params = {};
|
|
@@ -169,7 +212,7 @@ class Content {
|
|
|
169
212
|
|
|
170
213
|
const xHeaders = {};
|
|
171
214
|
|
|
172
|
-
|
|
215
|
+
const response = await APIClient.execute(
|
|
173
216
|
this._conf,
|
|
174
217
|
"get",
|
|
175
218
|
constructUrl({
|
|
@@ -180,6 +223,23 @@ class Content {
|
|
|
180
223
|
undefined,
|
|
181
224
|
xHeaders
|
|
182
225
|
);
|
|
226
|
+
|
|
227
|
+
const {
|
|
228
|
+
error: res_error,
|
|
229
|
+
} = ContentModel.BlogGetResponse().validate(response, {
|
|
230
|
+
abortEarly: false,
|
|
231
|
+
allowUnknown: false,
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
if (res_error) {
|
|
235
|
+
Logger({
|
|
236
|
+
level: "WARN",
|
|
237
|
+
message: "Response Validation Warnnings for getBlogs",
|
|
238
|
+
});
|
|
239
|
+
Logger({ level: "WARN", message: res_error });
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return response;
|
|
183
243
|
}
|
|
184
244
|
|
|
185
245
|
/**
|
|
@@ -214,7 +274,7 @@ class Content {
|
|
|
214
274
|
* @summary: Get the data loaders associated with an application
|
|
215
275
|
* @description: Use this API to get all selected data loaders of the application in the form of tags.
|
|
216
276
|
*/
|
|
217
|
-
getDataLoaders({} = {}) {
|
|
277
|
+
async getDataLoaders({} = {}) {
|
|
218
278
|
const { error } = ContentValidator.getDataLoaders().validate(
|
|
219
279
|
{},
|
|
220
280
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -229,15 +289,18 @@ class Content {
|
|
|
229
289
|
{ abortEarly: false, allowUnknown: false }
|
|
230
290
|
);
|
|
231
291
|
if (warrning) {
|
|
232
|
-
|
|
233
|
-
|
|
292
|
+
Logger({
|
|
293
|
+
level: "WARN",
|
|
294
|
+
message: "Parameter Validation warrnings for getDataLoaders",
|
|
295
|
+
});
|
|
296
|
+
Logger({ level: "WARN", message: warrning });
|
|
234
297
|
}
|
|
235
298
|
|
|
236
299
|
const query_params = {};
|
|
237
300
|
|
|
238
301
|
const xHeaders = {};
|
|
239
302
|
|
|
240
|
-
|
|
303
|
+
const response = await APIClient.execute(
|
|
241
304
|
this._conf,
|
|
242
305
|
"get",
|
|
243
306
|
constructUrl({
|
|
@@ -248,17 +311,37 @@ class Content {
|
|
|
248
311
|
undefined,
|
|
249
312
|
xHeaders
|
|
250
313
|
);
|
|
314
|
+
|
|
315
|
+
const {
|
|
316
|
+
error: res_error,
|
|
317
|
+
} = ContentModel.DataLoadersSchema().validate(response, {
|
|
318
|
+
abortEarly: false,
|
|
319
|
+
allowUnknown: false,
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
if (res_error) {
|
|
323
|
+
Logger({
|
|
324
|
+
level: "WARN",
|
|
325
|
+
message: "Response Validation Warnnings for getDataLoaders",
|
|
326
|
+
});
|
|
327
|
+
Logger({ level: "WARN", message: res_error });
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
return response;
|
|
251
331
|
}
|
|
252
332
|
|
|
253
333
|
/**
|
|
254
334
|
* @param {Object} arg - Arg object.
|
|
255
|
-
* @
|
|
256
|
-
*
|
|
257
|
-
*
|
|
335
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
336
|
+
* identifier of an FAQ. You can get slug value from the endpoint
|
|
337
|
+
* /service/application/content/v1.0/faq.
|
|
338
|
+
* @returns {Promise<FaqSchema>} - Success response
|
|
339
|
+
* @summary: Get an FAQ
|
|
340
|
+
* @description: Use this API to get a particular FAQ by its slug.
|
|
258
341
|
*/
|
|
259
|
-
|
|
260
|
-
const { error } = ContentValidator.
|
|
261
|
-
{},
|
|
342
|
+
async getFaqBySlug({ slug } = {}) {
|
|
343
|
+
const { error } = ContentValidator.getFaqBySlug().validate(
|
|
344
|
+
{ slug },
|
|
262
345
|
{ abortEarly: false, allowUnknown: true }
|
|
263
346
|
);
|
|
264
347
|
if (error) {
|
|
@@ -266,30 +349,48 @@ class Content {
|
|
|
266
349
|
}
|
|
267
350
|
|
|
268
351
|
// Showing warrnings if extra unknown parameters are found
|
|
269
|
-
const { error: warrning } = ContentValidator.
|
|
270
|
-
{},
|
|
352
|
+
const { error: warrning } = ContentValidator.getFaqBySlug().validate(
|
|
353
|
+
{ slug },
|
|
271
354
|
{ abortEarly: false, allowUnknown: false }
|
|
272
355
|
);
|
|
273
356
|
if (warrning) {
|
|
274
|
-
|
|
275
|
-
|
|
357
|
+
Logger({
|
|
358
|
+
level: "WARN",
|
|
359
|
+
message: "Parameter Validation warrnings for getFaqBySlug",
|
|
360
|
+
});
|
|
361
|
+
Logger({ level: "WARN", message: warrning });
|
|
276
362
|
}
|
|
277
363
|
|
|
278
364
|
const query_params = {};
|
|
279
365
|
|
|
280
366
|
const xHeaders = {};
|
|
281
367
|
|
|
282
|
-
|
|
368
|
+
const response = await APIClient.execute(
|
|
283
369
|
this._conf,
|
|
284
370
|
"get",
|
|
285
371
|
constructUrl({
|
|
286
|
-
url: this._urls["
|
|
287
|
-
params: {},
|
|
372
|
+
url: this._urls["getFaqBySlug"],
|
|
373
|
+
params: { slug },
|
|
288
374
|
}),
|
|
289
375
|
query_params,
|
|
290
376
|
undefined,
|
|
291
377
|
xHeaders
|
|
292
378
|
);
|
|
379
|
+
|
|
380
|
+
const { error: res_error } = ContentModel.FaqSchema().validate(response, {
|
|
381
|
+
abortEarly: false,
|
|
382
|
+
allowUnknown: false,
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
if (res_error) {
|
|
386
|
+
Logger({
|
|
387
|
+
level: "WARN",
|
|
388
|
+
message: "Response Validation Warnnings for getFaqBySlug",
|
|
389
|
+
});
|
|
390
|
+
Logger({ level: "WARN", message: res_error });
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return response;
|
|
293
394
|
}
|
|
294
395
|
|
|
295
396
|
/**
|
|
@@ -298,7 +399,7 @@ class Content {
|
|
|
298
399
|
* @summary: Get a list of FAQ categories
|
|
299
400
|
* @description: FAQs can be divided into categories. Use this API to get a list of FAQ categories.
|
|
300
401
|
*/
|
|
301
|
-
getFaqCategories({} = {}) {
|
|
402
|
+
async getFaqCategories({} = {}) {
|
|
302
403
|
const { error } = ContentValidator.getFaqCategories().validate(
|
|
303
404
|
{},
|
|
304
405
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -313,15 +414,18 @@ class Content {
|
|
|
313
414
|
{ abortEarly: false, allowUnknown: false }
|
|
314
415
|
);
|
|
315
416
|
if (warrning) {
|
|
316
|
-
|
|
317
|
-
|
|
417
|
+
Logger({
|
|
418
|
+
level: "WARN",
|
|
419
|
+
message: "Parameter Validation warrnings for getFaqCategories",
|
|
420
|
+
});
|
|
421
|
+
Logger({ level: "WARN", message: warrning });
|
|
318
422
|
}
|
|
319
423
|
|
|
320
424
|
const query_params = {};
|
|
321
425
|
|
|
322
426
|
const xHeaders = {};
|
|
323
427
|
|
|
324
|
-
|
|
428
|
+
const response = await APIClient.execute(
|
|
325
429
|
this._conf,
|
|
326
430
|
"get",
|
|
327
431
|
constructUrl({
|
|
@@ -332,19 +436,36 @@ class Content {
|
|
|
332
436
|
undefined,
|
|
333
437
|
xHeaders
|
|
334
438
|
);
|
|
439
|
+
|
|
440
|
+
const {
|
|
441
|
+
error: res_error,
|
|
442
|
+
} = ContentModel.GetFaqCategoriesSchema().validate(response, {
|
|
443
|
+
abortEarly: false,
|
|
444
|
+
allowUnknown: false,
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
if (res_error) {
|
|
448
|
+
Logger({
|
|
449
|
+
level: "WARN",
|
|
450
|
+
message: "Response Validation Warnnings for getFaqCategories",
|
|
451
|
+
});
|
|
452
|
+
Logger({ level: "WARN", message: res_error });
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return response;
|
|
335
456
|
}
|
|
336
457
|
|
|
337
458
|
/**
|
|
338
459
|
* @param {Object} arg - Arg object.
|
|
339
460
|
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
340
|
-
* identifier of an FAQ. You can get slug value from the endpoint
|
|
341
|
-
* /service/application/content/v1.0/faq.
|
|
342
|
-
* @returns {Promise<
|
|
343
|
-
* @summary: Get
|
|
344
|
-
* @description: Use this API to get
|
|
461
|
+
* identifier of an FAQ category. You can get slug value from the endpoint
|
|
462
|
+
* /service/application/content/v1.0/faq/categories.
|
|
463
|
+
* @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
|
|
464
|
+
* @summary: Get the FAQ category
|
|
465
|
+
* @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
|
|
345
466
|
*/
|
|
346
|
-
|
|
347
|
-
const { error } = ContentValidator.
|
|
467
|
+
async getFaqCategoryBySlug({ slug } = {}) {
|
|
468
|
+
const { error } = ContentValidator.getFaqCategoryBySlug().validate(
|
|
348
469
|
{ slug },
|
|
349
470
|
{ abortEarly: false, allowUnknown: true }
|
|
350
471
|
);
|
|
@@ -353,44 +474,63 @@ class Content {
|
|
|
353
474
|
}
|
|
354
475
|
|
|
355
476
|
// Showing warrnings if extra unknown parameters are found
|
|
356
|
-
const {
|
|
477
|
+
const {
|
|
478
|
+
error: warrning,
|
|
479
|
+
} = ContentValidator.getFaqCategoryBySlug().validate(
|
|
357
480
|
{ slug },
|
|
358
481
|
{ abortEarly: false, allowUnknown: false }
|
|
359
482
|
);
|
|
360
483
|
if (warrning) {
|
|
361
|
-
|
|
362
|
-
|
|
484
|
+
Logger({
|
|
485
|
+
level: "WARN",
|
|
486
|
+
message: "Parameter Validation warrnings for getFaqCategoryBySlug",
|
|
487
|
+
});
|
|
488
|
+
Logger({ level: "WARN", message: warrning });
|
|
363
489
|
}
|
|
364
490
|
|
|
365
491
|
const query_params = {};
|
|
366
492
|
|
|
367
493
|
const xHeaders = {};
|
|
368
494
|
|
|
369
|
-
|
|
495
|
+
const response = await APIClient.execute(
|
|
370
496
|
this._conf,
|
|
371
497
|
"get",
|
|
372
498
|
constructUrl({
|
|
373
|
-
url: this._urls["
|
|
499
|
+
url: this._urls["getFaqCategoryBySlug"],
|
|
374
500
|
params: { slug },
|
|
375
501
|
}),
|
|
376
502
|
query_params,
|
|
377
503
|
undefined,
|
|
378
504
|
xHeaders
|
|
379
505
|
);
|
|
506
|
+
|
|
507
|
+
const {
|
|
508
|
+
error: res_error,
|
|
509
|
+
} = ContentModel.GetFaqCategoryBySlugSchema().validate(response, {
|
|
510
|
+
abortEarly: false,
|
|
511
|
+
allowUnknown: false,
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
if (res_error) {
|
|
515
|
+
Logger({
|
|
516
|
+
level: "WARN",
|
|
517
|
+
message: "Response Validation Warnnings for getFaqCategoryBySlug",
|
|
518
|
+
});
|
|
519
|
+
Logger({ level: "WARN", message: res_error });
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
return response;
|
|
380
523
|
}
|
|
381
524
|
|
|
382
525
|
/**
|
|
383
526
|
* @param {Object} arg - Arg object.
|
|
384
|
-
* @
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
* @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
|
|
388
|
-
* @summary: Get the FAQ category
|
|
389
|
-
* @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
|
|
527
|
+
* @returns {Promise<FaqResponseSchema>} - Success response
|
|
528
|
+
* @summary: Get a list of FAQs
|
|
529
|
+
* @description: Use this API to get a list of frequently asked questions. Users will benefit from it when facing any issue with the website.
|
|
390
530
|
*/
|
|
391
|
-
|
|
392
|
-
const { error } = ContentValidator.
|
|
393
|
-
{
|
|
531
|
+
async getFaqs({} = {}) {
|
|
532
|
+
const { error } = ContentValidator.getFaqs().validate(
|
|
533
|
+
{},
|
|
394
534
|
{ abortEarly: false, allowUnknown: true }
|
|
395
535
|
);
|
|
396
536
|
if (error) {
|
|
@@ -398,32 +538,50 @@ class Content {
|
|
|
398
538
|
}
|
|
399
539
|
|
|
400
540
|
// Showing warrnings if extra unknown parameters are found
|
|
401
|
-
const {
|
|
402
|
-
|
|
403
|
-
} = ContentValidator.getFaqCategoryBySlug().validate(
|
|
404
|
-
{ slug },
|
|
541
|
+
const { error: warrning } = ContentValidator.getFaqs().validate(
|
|
542
|
+
{},
|
|
405
543
|
{ abortEarly: false, allowUnknown: false }
|
|
406
544
|
);
|
|
407
545
|
if (warrning) {
|
|
408
|
-
|
|
409
|
-
|
|
546
|
+
Logger({
|
|
547
|
+
level: "WARN",
|
|
548
|
+
message: "Parameter Validation warrnings for getFaqs",
|
|
549
|
+
});
|
|
550
|
+
Logger({ level: "WARN", message: warrning });
|
|
410
551
|
}
|
|
411
552
|
|
|
412
553
|
const query_params = {};
|
|
413
554
|
|
|
414
555
|
const xHeaders = {};
|
|
415
556
|
|
|
416
|
-
|
|
557
|
+
const response = await APIClient.execute(
|
|
417
558
|
this._conf,
|
|
418
559
|
"get",
|
|
419
560
|
constructUrl({
|
|
420
|
-
url: this._urls["
|
|
421
|
-
params: {
|
|
561
|
+
url: this._urls["getFaqs"],
|
|
562
|
+
params: {},
|
|
422
563
|
}),
|
|
423
564
|
query_params,
|
|
424
565
|
undefined,
|
|
425
566
|
xHeaders
|
|
426
567
|
);
|
|
568
|
+
|
|
569
|
+
const {
|
|
570
|
+
error: res_error,
|
|
571
|
+
} = ContentModel.FaqResponseSchema().validate(response, {
|
|
572
|
+
abortEarly: false,
|
|
573
|
+
allowUnknown: false,
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
if (res_error) {
|
|
577
|
+
Logger({
|
|
578
|
+
level: "WARN",
|
|
579
|
+
message: "Response Validation Warnnings for getFaqs",
|
|
580
|
+
});
|
|
581
|
+
Logger({ level: "WARN", message: res_error });
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
return response;
|
|
427
585
|
}
|
|
428
586
|
|
|
429
587
|
/**
|
|
@@ -435,7 +593,7 @@ class Content {
|
|
|
435
593
|
* @summary: Get FAQs using the slug of FAQ category
|
|
436
594
|
* @description: FAQs can be divided into categories. Use this API to get all the FAQs belonging to a category by using the category slug.
|
|
437
595
|
*/
|
|
438
|
-
getFaqsByCategorySlug({ slug } = {}) {
|
|
596
|
+
async getFaqsByCategorySlug({ slug } = {}) {
|
|
439
597
|
const { error } = ContentValidator.getFaqsByCategorySlug().validate(
|
|
440
598
|
{ slug },
|
|
441
599
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -452,15 +610,18 @@ class Content {
|
|
|
452
610
|
{ abortEarly: false, allowUnknown: false }
|
|
453
611
|
);
|
|
454
612
|
if (warrning) {
|
|
455
|
-
|
|
456
|
-
|
|
613
|
+
Logger({
|
|
614
|
+
level: "WARN",
|
|
615
|
+
message: "Parameter Validation warrnings for getFaqsByCategorySlug",
|
|
616
|
+
});
|
|
617
|
+
Logger({ level: "WARN", message: warrning });
|
|
457
618
|
}
|
|
458
619
|
|
|
459
620
|
const query_params = {};
|
|
460
621
|
|
|
461
622
|
const xHeaders = {};
|
|
462
623
|
|
|
463
|
-
|
|
624
|
+
const response = await APIClient.execute(
|
|
464
625
|
this._conf,
|
|
465
626
|
"get",
|
|
466
627
|
constructUrl({
|
|
@@ -471,6 +632,21 @@ class Content {
|
|
|
471
632
|
undefined,
|
|
472
633
|
xHeaders
|
|
473
634
|
);
|
|
635
|
+
|
|
636
|
+
const { error: res_error } = ContentModel.GetFaqSchema().validate(
|
|
637
|
+
response,
|
|
638
|
+
{ abortEarly: false, allowUnknown: false }
|
|
639
|
+
);
|
|
640
|
+
|
|
641
|
+
if (res_error) {
|
|
642
|
+
Logger({
|
|
643
|
+
level: "WARN",
|
|
644
|
+
message: "Response Validation Warnnings for getFaqsByCategorySlug",
|
|
645
|
+
});
|
|
646
|
+
Logger({ level: "WARN", message: res_error });
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
return response;
|
|
474
650
|
}
|
|
475
651
|
|
|
476
652
|
/**
|
|
@@ -479,7 +655,7 @@ class Content {
|
|
|
479
655
|
* @summary: Get the landing page
|
|
480
656
|
* @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch the details of a landing page.
|
|
481
657
|
*/
|
|
482
|
-
getLandingPage({} = {}) {
|
|
658
|
+
async getLandingPage({} = {}) {
|
|
483
659
|
const { error } = ContentValidator.getLandingPage().validate(
|
|
484
660
|
{},
|
|
485
661
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -494,15 +670,18 @@ class Content {
|
|
|
494
670
|
{ abortEarly: false, allowUnknown: false }
|
|
495
671
|
);
|
|
496
672
|
if (warrning) {
|
|
497
|
-
|
|
498
|
-
|
|
673
|
+
Logger({
|
|
674
|
+
level: "WARN",
|
|
675
|
+
message: "Parameter Validation warrnings for getLandingPage",
|
|
676
|
+
});
|
|
677
|
+
Logger({ level: "WARN", message: warrning });
|
|
499
678
|
}
|
|
500
679
|
|
|
501
680
|
const query_params = {};
|
|
502
681
|
|
|
503
682
|
const xHeaders = {};
|
|
504
683
|
|
|
505
|
-
|
|
684
|
+
const response = await APIClient.execute(
|
|
506
685
|
this._conf,
|
|
507
686
|
"get",
|
|
508
687
|
constructUrl({
|
|
@@ -513,6 +692,23 @@ class Content {
|
|
|
513
692
|
undefined,
|
|
514
693
|
xHeaders
|
|
515
694
|
);
|
|
695
|
+
|
|
696
|
+
const {
|
|
697
|
+
error: res_error,
|
|
698
|
+
} = ContentModel.LandingPageSchema().validate(response, {
|
|
699
|
+
abortEarly: false,
|
|
700
|
+
allowUnknown: false,
|
|
701
|
+
});
|
|
702
|
+
|
|
703
|
+
if (res_error) {
|
|
704
|
+
Logger({
|
|
705
|
+
level: "WARN",
|
|
706
|
+
message: "Response Validation Warnnings for getLandingPage",
|
|
707
|
+
});
|
|
708
|
+
Logger({ level: "WARN", message: res_error });
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
return response;
|
|
516
712
|
}
|
|
517
713
|
|
|
518
714
|
/**
|
|
@@ -521,7 +717,7 @@ class Content {
|
|
|
521
717
|
* @summary: Get legal information
|
|
522
718
|
* @description: Use this API to get the legal information of an application, which includes Privacy Policy, Terms and Conditions, Shipping Policy and FAQs regarding the usage of the application.
|
|
523
719
|
*/
|
|
524
|
-
getLegalInformation({} = {}) {
|
|
720
|
+
async getLegalInformation({} = {}) {
|
|
525
721
|
const { error } = ContentValidator.getLegalInformation().validate(
|
|
526
722
|
{},
|
|
527
723
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -536,15 +732,18 @@ class Content {
|
|
|
536
732
|
{ abortEarly: false, allowUnknown: false }
|
|
537
733
|
);
|
|
538
734
|
if (warrning) {
|
|
539
|
-
|
|
540
|
-
|
|
735
|
+
Logger({
|
|
736
|
+
level: "WARN",
|
|
737
|
+
message: "Parameter Validation warrnings for getLegalInformation",
|
|
738
|
+
});
|
|
739
|
+
Logger({ level: "WARN", message: warrning });
|
|
541
740
|
}
|
|
542
741
|
|
|
543
742
|
const query_params = {};
|
|
544
743
|
|
|
545
744
|
const xHeaders = {};
|
|
546
745
|
|
|
547
|
-
|
|
746
|
+
const response = await APIClient.execute(
|
|
548
747
|
this._conf,
|
|
549
748
|
"get",
|
|
550
749
|
constructUrl({
|
|
@@ -555,6 +754,23 @@ class Content {
|
|
|
555
754
|
undefined,
|
|
556
755
|
xHeaders
|
|
557
756
|
);
|
|
757
|
+
|
|
758
|
+
const {
|
|
759
|
+
error: res_error,
|
|
760
|
+
} = ContentModel.ApplicationLegal().validate(response, {
|
|
761
|
+
abortEarly: false,
|
|
762
|
+
allowUnknown: false,
|
|
763
|
+
});
|
|
764
|
+
|
|
765
|
+
if (res_error) {
|
|
766
|
+
Logger({
|
|
767
|
+
level: "WARN",
|
|
768
|
+
message: "Response Validation Warnnings for getLegalInformation",
|
|
769
|
+
});
|
|
770
|
+
Logger({ level: "WARN", message: res_error });
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
return response;
|
|
558
774
|
}
|
|
559
775
|
|
|
560
776
|
/**
|
|
@@ -566,7 +782,7 @@ class Content {
|
|
|
566
782
|
* @summary: Get the navigation
|
|
567
783
|
* @description: Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the links and sub-navigations.
|
|
568
784
|
*/
|
|
569
|
-
getNavigations({ pageNo, pageSize } = {}) {
|
|
785
|
+
async getNavigations({ pageNo, pageSize } = {}) {
|
|
570
786
|
const { error } = ContentValidator.getNavigations().validate(
|
|
571
787
|
{ pageNo, pageSize },
|
|
572
788
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -581,8 +797,11 @@ class Content {
|
|
|
581
797
|
{ abortEarly: false, allowUnknown: false }
|
|
582
798
|
);
|
|
583
799
|
if (warrning) {
|
|
584
|
-
|
|
585
|
-
|
|
800
|
+
Logger({
|
|
801
|
+
level: "WARN",
|
|
802
|
+
message: "Parameter Validation warrnings for getNavigations",
|
|
803
|
+
});
|
|
804
|
+
Logger({ level: "WARN", message: warrning });
|
|
586
805
|
}
|
|
587
806
|
|
|
588
807
|
const query_params = {};
|
|
@@ -591,7 +810,7 @@ class Content {
|
|
|
591
810
|
|
|
592
811
|
const xHeaders = {};
|
|
593
812
|
|
|
594
|
-
|
|
813
|
+
const response = await APIClient.execute(
|
|
595
814
|
this._conf,
|
|
596
815
|
"get",
|
|
597
816
|
constructUrl({
|
|
@@ -602,6 +821,23 @@ class Content {
|
|
|
602
821
|
undefined,
|
|
603
822
|
xHeaders
|
|
604
823
|
);
|
|
824
|
+
|
|
825
|
+
const {
|
|
826
|
+
error: res_error,
|
|
827
|
+
} = ContentModel.NavigationGetResponse().validate(response, {
|
|
828
|
+
abortEarly: false,
|
|
829
|
+
allowUnknown: false,
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
if (res_error) {
|
|
833
|
+
Logger({
|
|
834
|
+
level: "WARN",
|
|
835
|
+
message: "Response Validation Warnnings for getNavigations",
|
|
836
|
+
});
|
|
837
|
+
Logger({ level: "WARN", message: res_error });
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
return response;
|
|
605
841
|
}
|
|
606
842
|
|
|
607
843
|
/**
|
|
@@ -632,13 +868,17 @@ class Content {
|
|
|
632
868
|
|
|
633
869
|
/**
|
|
634
870
|
* @param {Object} arg - Arg object.
|
|
635
|
-
* @
|
|
636
|
-
*
|
|
637
|
-
*
|
|
871
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
872
|
+
* identifier of a page. You can get slug value from the endpoint
|
|
873
|
+
* /service/application/content/v2.0/pages/.
|
|
874
|
+
* @param {string} [arg.rootId] - ID given to the HTML element
|
|
875
|
+
* @returns {Promise<PageSchema>} - Success response
|
|
876
|
+
* @summary: Get a page
|
|
877
|
+
* @description: Use this API to get the details of a page using its slug. Details include the title, seo, publish status, feature image, tags, meta, etc.
|
|
638
878
|
*/
|
|
639
|
-
|
|
640
|
-
const { error } = ContentValidator.
|
|
641
|
-
{},
|
|
879
|
+
async getPage({ slug, rootId } = {}) {
|
|
880
|
+
const { error } = ContentValidator.getPage().validate(
|
|
881
|
+
{ slug, rootId },
|
|
642
882
|
{ abortEarly: false, allowUnknown: true }
|
|
643
883
|
);
|
|
644
884
|
if (error) {
|
|
@@ -646,30 +886,49 @@ class Content {
|
|
|
646
886
|
}
|
|
647
887
|
|
|
648
888
|
// Showing warrnings if extra unknown parameters are found
|
|
649
|
-
const { error: warrning } = ContentValidator.
|
|
650
|
-
{},
|
|
889
|
+
const { error: warrning } = ContentValidator.getPage().validate(
|
|
890
|
+
{ slug, rootId },
|
|
651
891
|
{ abortEarly: false, allowUnknown: false }
|
|
652
892
|
);
|
|
653
893
|
if (warrning) {
|
|
654
|
-
|
|
655
|
-
|
|
894
|
+
Logger({
|
|
895
|
+
level: "WARN",
|
|
896
|
+
message: "Parameter Validation warrnings for getPage",
|
|
897
|
+
});
|
|
898
|
+
Logger({ level: "WARN", message: warrning });
|
|
656
899
|
}
|
|
657
900
|
|
|
658
901
|
const query_params = {};
|
|
902
|
+
query_params["root_id"] = rootId;
|
|
659
903
|
|
|
660
904
|
const xHeaders = {};
|
|
661
905
|
|
|
662
|
-
|
|
906
|
+
const response = await APIClient.execute(
|
|
663
907
|
this._conf,
|
|
664
908
|
"get",
|
|
665
909
|
constructUrl({
|
|
666
|
-
url: this._urls["
|
|
667
|
-
params: {},
|
|
910
|
+
url: this._urls["getPage"],
|
|
911
|
+
params: { slug },
|
|
668
912
|
}),
|
|
669
913
|
query_params,
|
|
670
914
|
undefined,
|
|
671
915
|
xHeaders
|
|
672
916
|
);
|
|
917
|
+
|
|
918
|
+
const { error: res_error } = ContentModel.PageSchema().validate(response, {
|
|
919
|
+
abortEarly: false,
|
|
920
|
+
allowUnknown: false,
|
|
921
|
+
});
|
|
922
|
+
|
|
923
|
+
if (res_error) {
|
|
924
|
+
Logger({
|
|
925
|
+
level: "WARN",
|
|
926
|
+
message: "Response Validation Warnnings for getPage",
|
|
927
|
+
});
|
|
928
|
+
Logger({ level: "WARN", message: res_error });
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
return response;
|
|
673
932
|
}
|
|
674
933
|
|
|
675
934
|
/**
|
|
@@ -677,12 +936,12 @@ class Content {
|
|
|
677
936
|
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
678
937
|
* given set of results. Default value is 1.
|
|
679
938
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
680
|
-
* @returns {Promise<
|
|
681
|
-
* @summary: Get
|
|
682
|
-
* @description: Use this API to get a list of
|
|
939
|
+
* @returns {Promise<PageGetResponse>} - Success response
|
|
940
|
+
* @summary: Get all pages
|
|
941
|
+
* @description: Use this API to get a list of pages.
|
|
683
942
|
*/
|
|
684
|
-
|
|
685
|
-
const { error } = ContentValidator.
|
|
943
|
+
async getPages({ pageNo, pageSize } = {}) {
|
|
944
|
+
const { error } = ContentValidator.getPages().validate(
|
|
686
945
|
{ pageNo, pageSize },
|
|
687
946
|
{ abortEarly: false, allowUnknown: true }
|
|
688
947
|
);
|
|
@@ -691,13 +950,16 @@ class Content {
|
|
|
691
950
|
}
|
|
692
951
|
|
|
693
952
|
// Showing warrnings if extra unknown parameters are found
|
|
694
|
-
const { error: warrning } = ContentValidator.
|
|
953
|
+
const { error: warrning } = ContentValidator.getPages().validate(
|
|
695
954
|
{ pageNo, pageSize },
|
|
696
955
|
{ abortEarly: false, allowUnknown: false }
|
|
697
956
|
);
|
|
698
957
|
if (warrning) {
|
|
699
|
-
|
|
700
|
-
|
|
958
|
+
Logger({
|
|
959
|
+
level: "WARN",
|
|
960
|
+
message: "Parameter Validation warrnings for getPages",
|
|
961
|
+
});
|
|
962
|
+
Logger({ level: "WARN", message: warrning });
|
|
701
963
|
}
|
|
702
964
|
|
|
703
965
|
const query_params = {};
|
|
@@ -706,32 +968,49 @@ class Content {
|
|
|
706
968
|
|
|
707
969
|
const xHeaders = {};
|
|
708
970
|
|
|
709
|
-
|
|
971
|
+
const response = await APIClient.execute(
|
|
710
972
|
this._conf,
|
|
711
973
|
"get",
|
|
712
974
|
constructUrl({
|
|
713
|
-
url: this._urls["
|
|
975
|
+
url: this._urls["getPages"],
|
|
714
976
|
params: {},
|
|
715
977
|
}),
|
|
716
978
|
query_params,
|
|
717
979
|
undefined,
|
|
718
980
|
xHeaders
|
|
719
981
|
);
|
|
982
|
+
|
|
983
|
+
const {
|
|
984
|
+
error: res_error,
|
|
985
|
+
} = ContentModel.PageGetResponse().validate(response, {
|
|
986
|
+
abortEarly: false,
|
|
987
|
+
allowUnknown: false,
|
|
988
|
+
});
|
|
989
|
+
|
|
990
|
+
if (res_error) {
|
|
991
|
+
Logger({
|
|
992
|
+
level: "WARN",
|
|
993
|
+
message: "Response Validation Warnnings for getPages",
|
|
994
|
+
});
|
|
995
|
+
Logger({ level: "WARN", message: res_error });
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
return response;
|
|
720
999
|
}
|
|
721
1000
|
|
|
722
1001
|
/**
|
|
723
1002
|
* @param {Object} arg - Arg object.
|
|
724
1003
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
725
|
-
* @summary: Get
|
|
726
|
-
* @description: Use this API to get a list of
|
|
1004
|
+
* @summary: Get all pages
|
|
1005
|
+
* @description: Use this API to get a list of pages.
|
|
727
1006
|
*/
|
|
728
|
-
|
|
1007
|
+
getPagesPaginator({ pageSize } = {}) {
|
|
729
1008
|
const paginator = new Paginator();
|
|
730
1009
|
const callback = async () => {
|
|
731
1010
|
const pageId = paginator.nextId;
|
|
732
1011
|
const pageNo = paginator.pageNo;
|
|
733
1012
|
const pageType = "number";
|
|
734
|
-
const data = await this.
|
|
1013
|
+
const data = await this.getPages({
|
|
735
1014
|
pageNo: pageNo,
|
|
736
1015
|
pageSize: pageSize,
|
|
737
1016
|
});
|
|
@@ -747,16 +1026,13 @@ class Content {
|
|
|
747
1026
|
|
|
748
1027
|
/**
|
|
749
1028
|
* @param {Object} arg - Arg object.
|
|
750
|
-
* @
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
* @returns {Promise<SlideshowSchema>} - Success response
|
|
754
|
-
* @summary: Get a slideshow
|
|
755
|
-
* @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a slideshow using its `slug`.
|
|
1029
|
+
* @returns {Promise<SeoComponent>} - Success response
|
|
1030
|
+
* @summary: Get the SEO of an application
|
|
1031
|
+
* @description: Use this API to get the SEO details of an application, which includes a robot.txt, meta-tags and sitemap.
|
|
756
1032
|
*/
|
|
757
|
-
|
|
758
|
-
const { error } = ContentValidator.
|
|
759
|
-
{
|
|
1033
|
+
async getSEOConfiguration({} = {}) {
|
|
1034
|
+
const { error } = ContentValidator.getSEOConfiguration().validate(
|
|
1035
|
+
{},
|
|
760
1036
|
{ abortEarly: false, allowUnknown: true }
|
|
761
1037
|
);
|
|
762
1038
|
if (error) {
|
|
@@ -764,41 +1040,62 @@ class Content {
|
|
|
764
1040
|
}
|
|
765
1041
|
|
|
766
1042
|
// Showing warrnings if extra unknown parameters are found
|
|
767
|
-
const { error: warrning } = ContentValidator.
|
|
768
|
-
{
|
|
1043
|
+
const { error: warrning } = ContentValidator.getSEOConfiguration().validate(
|
|
1044
|
+
{},
|
|
769
1045
|
{ abortEarly: false, allowUnknown: false }
|
|
770
1046
|
);
|
|
771
1047
|
if (warrning) {
|
|
772
|
-
|
|
773
|
-
|
|
1048
|
+
Logger({
|
|
1049
|
+
level: "WARN",
|
|
1050
|
+
message: "Parameter Validation warrnings for getSEOConfiguration",
|
|
1051
|
+
});
|
|
1052
|
+
Logger({ level: "WARN", message: warrning });
|
|
774
1053
|
}
|
|
775
1054
|
|
|
776
1055
|
const query_params = {};
|
|
777
1056
|
|
|
778
1057
|
const xHeaders = {};
|
|
779
1058
|
|
|
780
|
-
|
|
1059
|
+
const response = await APIClient.execute(
|
|
781
1060
|
this._conf,
|
|
782
1061
|
"get",
|
|
783
1062
|
constructUrl({
|
|
784
|
-
url: this._urls["
|
|
785
|
-
params: {
|
|
1063
|
+
url: this._urls["getSEOConfiguration"],
|
|
1064
|
+
params: {},
|
|
786
1065
|
}),
|
|
787
1066
|
query_params,
|
|
788
1067
|
undefined,
|
|
789
1068
|
xHeaders
|
|
790
1069
|
);
|
|
1070
|
+
|
|
1071
|
+
const { error: res_error } = ContentModel.SeoComponent().validate(
|
|
1072
|
+
response,
|
|
1073
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1074
|
+
);
|
|
1075
|
+
|
|
1076
|
+
if (res_error) {
|
|
1077
|
+
Logger({
|
|
1078
|
+
level: "WARN",
|
|
1079
|
+
message: "Response Validation Warnnings for getSEOConfiguration",
|
|
1080
|
+
});
|
|
1081
|
+
Logger({ level: "WARN", message: res_error });
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
return response;
|
|
791
1085
|
}
|
|
792
1086
|
|
|
793
1087
|
/**
|
|
794
1088
|
* @param {Object} arg - Arg object.
|
|
795
|
-
* @
|
|
796
|
-
*
|
|
797
|
-
*
|
|
1089
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
1090
|
+
* identifier of a slideshow. You can get slug value from the endpoint
|
|
1091
|
+
* /service/application/content/v1.0/slideshow/.
|
|
1092
|
+
* @returns {Promise<SlideshowSchema>} - Success response
|
|
1093
|
+
* @summary: Get a slideshow
|
|
1094
|
+
* @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a slideshow using its `slug`.
|
|
798
1095
|
*/
|
|
799
|
-
|
|
800
|
-
const { error } = ContentValidator.
|
|
801
|
-
{},
|
|
1096
|
+
async getSlideshow({ slug } = {}) {
|
|
1097
|
+
const { error } = ContentValidator.getSlideshow().validate(
|
|
1098
|
+
{ slug },
|
|
802
1099
|
{ abortEarly: false, allowUnknown: true }
|
|
803
1100
|
);
|
|
804
1101
|
if (error) {
|
|
@@ -806,43 +1103,64 @@ class Content {
|
|
|
806
1103
|
}
|
|
807
1104
|
|
|
808
1105
|
// Showing warrnings if extra unknown parameters are found
|
|
809
|
-
const {
|
|
810
|
-
|
|
811
|
-
} = ContentValidator.getSupportInformation().validate(
|
|
812
|
-
{},
|
|
1106
|
+
const { error: warrning } = ContentValidator.getSlideshow().validate(
|
|
1107
|
+
{ slug },
|
|
813
1108
|
{ abortEarly: false, allowUnknown: false }
|
|
814
1109
|
);
|
|
815
1110
|
if (warrning) {
|
|
816
|
-
|
|
817
|
-
|
|
1111
|
+
Logger({
|
|
1112
|
+
level: "WARN",
|
|
1113
|
+
message: "Parameter Validation warrnings for getSlideshow",
|
|
1114
|
+
});
|
|
1115
|
+
Logger({ level: "WARN", message: warrning });
|
|
818
1116
|
}
|
|
819
1117
|
|
|
820
1118
|
const query_params = {};
|
|
821
1119
|
|
|
822
1120
|
const xHeaders = {};
|
|
823
1121
|
|
|
824
|
-
|
|
1122
|
+
const response = await APIClient.execute(
|
|
825
1123
|
this._conf,
|
|
826
1124
|
"get",
|
|
827
1125
|
constructUrl({
|
|
828
|
-
url: this._urls["
|
|
829
|
-
params: {},
|
|
1126
|
+
url: this._urls["getSlideshow"],
|
|
1127
|
+
params: { slug },
|
|
830
1128
|
}),
|
|
831
1129
|
query_params,
|
|
832
1130
|
undefined,
|
|
833
1131
|
xHeaders
|
|
834
1132
|
);
|
|
1133
|
+
|
|
1134
|
+
const {
|
|
1135
|
+
error: res_error,
|
|
1136
|
+
} = ContentModel.SlideshowSchema().validate(response, {
|
|
1137
|
+
abortEarly: false,
|
|
1138
|
+
allowUnknown: false,
|
|
1139
|
+
});
|
|
1140
|
+
|
|
1141
|
+
if (res_error) {
|
|
1142
|
+
Logger({
|
|
1143
|
+
level: "WARN",
|
|
1144
|
+
message: "Response Validation Warnnings for getSlideshow",
|
|
1145
|
+
});
|
|
1146
|
+
Logger({ level: "WARN", message: res_error });
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
return response;
|
|
835
1150
|
}
|
|
836
1151
|
|
|
837
1152
|
/**
|
|
838
1153
|
* @param {Object} arg - Arg object.
|
|
839
|
-
* @
|
|
840
|
-
*
|
|
841
|
-
* @
|
|
1154
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
1155
|
+
* given set of results. Default value is 1.
|
|
1156
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1157
|
+
* @returns {Promise<SlideshowGetResponse>} - Success response
|
|
1158
|
+
* @summary: Get the slideshows
|
|
1159
|
+
* @description: Use this API to get a list of slideshows along with their details.
|
|
842
1160
|
*/
|
|
843
|
-
|
|
844
|
-
const { error } = ContentValidator.
|
|
845
|
-
{},
|
|
1161
|
+
async getSlideshows({ pageNo, pageSize } = {}) {
|
|
1162
|
+
const { error } = ContentValidator.getSlideshows().validate(
|
|
1163
|
+
{ pageNo, pageSize },
|
|
846
1164
|
{ abortEarly: false, allowUnknown: true }
|
|
847
1165
|
);
|
|
848
1166
|
if (error) {
|
|
@@ -850,45 +1168,89 @@ class Content {
|
|
|
850
1168
|
}
|
|
851
1169
|
|
|
852
1170
|
// Showing warrnings if extra unknown parameters are found
|
|
853
|
-
const { error: warrning } = ContentValidator.
|
|
854
|
-
{},
|
|
1171
|
+
const { error: warrning } = ContentValidator.getSlideshows().validate(
|
|
1172
|
+
{ pageNo, pageSize },
|
|
855
1173
|
{ abortEarly: false, allowUnknown: false }
|
|
856
1174
|
);
|
|
857
1175
|
if (warrning) {
|
|
858
|
-
|
|
859
|
-
|
|
1176
|
+
Logger({
|
|
1177
|
+
level: "WARN",
|
|
1178
|
+
message: "Parameter Validation warrnings for getSlideshows",
|
|
1179
|
+
});
|
|
1180
|
+
Logger({ level: "WARN", message: warrning });
|
|
860
1181
|
}
|
|
861
1182
|
|
|
862
1183
|
const query_params = {};
|
|
1184
|
+
query_params["page_no"] = pageNo;
|
|
1185
|
+
query_params["page_size"] = pageSize;
|
|
863
1186
|
|
|
864
1187
|
const xHeaders = {};
|
|
865
1188
|
|
|
866
|
-
|
|
1189
|
+
const response = await APIClient.execute(
|
|
867
1190
|
this._conf,
|
|
868
1191
|
"get",
|
|
869
1192
|
constructUrl({
|
|
870
|
-
url: this._urls["
|
|
1193
|
+
url: this._urls["getSlideshows"],
|
|
871
1194
|
params: {},
|
|
872
1195
|
}),
|
|
873
1196
|
query_params,
|
|
874
1197
|
undefined,
|
|
875
1198
|
xHeaders
|
|
876
1199
|
);
|
|
1200
|
+
|
|
1201
|
+
const {
|
|
1202
|
+
error: res_error,
|
|
1203
|
+
} = ContentModel.SlideshowGetResponse().validate(response, {
|
|
1204
|
+
abortEarly: false,
|
|
1205
|
+
allowUnknown: false,
|
|
1206
|
+
});
|
|
1207
|
+
|
|
1208
|
+
if (res_error) {
|
|
1209
|
+
Logger({
|
|
1210
|
+
level: "WARN",
|
|
1211
|
+
message: "Response Validation Warnnings for getSlideshows",
|
|
1212
|
+
});
|
|
1213
|
+
Logger({ level: "WARN", message: res_error });
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
return response;
|
|
877
1217
|
}
|
|
878
1218
|
|
|
879
1219
|
/**
|
|
880
1220
|
* @param {Object} arg - Arg object.
|
|
881
|
-
* @param {
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
* @param {string} [arg.rootId] - ID given to the HTML element
|
|
885
|
-
* @returns {Promise<PageSchema>} - Success response
|
|
886
|
-
* @summary: Get a page
|
|
887
|
-
* @description: Use this API to get the details of a page using its slug. Details include the title, seo, publish status, feature image, tags, meta, etc.
|
|
1221
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1222
|
+
* @summary: Get the slideshows
|
|
1223
|
+
* @description: Use this API to get a list of slideshows along with their details.
|
|
888
1224
|
*/
|
|
889
|
-
|
|
890
|
-
const
|
|
891
|
-
|
|
1225
|
+
getSlideshowsPaginator({ pageSize } = {}) {
|
|
1226
|
+
const paginator = new Paginator();
|
|
1227
|
+
const callback = async () => {
|
|
1228
|
+
const pageId = paginator.nextId;
|
|
1229
|
+
const pageNo = paginator.pageNo;
|
|
1230
|
+
const pageType = "number";
|
|
1231
|
+
const data = await this.getSlideshows({
|
|
1232
|
+
pageNo: pageNo,
|
|
1233
|
+
pageSize: pageSize,
|
|
1234
|
+
});
|
|
1235
|
+
paginator.setPaginator({
|
|
1236
|
+
hasNext: data.page.has_next ? true : false,
|
|
1237
|
+
nextId: data.page.next_id,
|
|
1238
|
+
});
|
|
1239
|
+
return data;
|
|
1240
|
+
};
|
|
1241
|
+
paginator.setCallback(callback);
|
|
1242
|
+
return paginator;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* @param {Object} arg - Arg object.
|
|
1247
|
+
* @returns {Promise<Support>} - Success response
|
|
1248
|
+
* @summary: Get the support information
|
|
1249
|
+
* @description: Use this API to get contact details for customer support including emails and phone numbers.
|
|
1250
|
+
*/
|
|
1251
|
+
async getSupportInformation({} = {}) {
|
|
1252
|
+
const { error } = ContentValidator.getSupportInformation().validate(
|
|
1253
|
+
{},
|
|
892
1254
|
{ abortEarly: false, allowUnknown: true }
|
|
893
1255
|
);
|
|
894
1256
|
if (error) {
|
|
@@ -896,45 +1258,61 @@ class Content {
|
|
|
896
1258
|
}
|
|
897
1259
|
|
|
898
1260
|
// Showing warrnings if extra unknown parameters are found
|
|
899
|
-
const {
|
|
900
|
-
|
|
1261
|
+
const {
|
|
1262
|
+
error: warrning,
|
|
1263
|
+
} = ContentValidator.getSupportInformation().validate(
|
|
1264
|
+
{},
|
|
901
1265
|
{ abortEarly: false, allowUnknown: false }
|
|
902
1266
|
);
|
|
903
1267
|
if (warrning) {
|
|
904
|
-
|
|
905
|
-
|
|
1268
|
+
Logger({
|
|
1269
|
+
level: "WARN",
|
|
1270
|
+
message: "Parameter Validation warrnings for getSupportInformation",
|
|
1271
|
+
});
|
|
1272
|
+
Logger({ level: "WARN", message: warrning });
|
|
906
1273
|
}
|
|
907
1274
|
|
|
908
1275
|
const query_params = {};
|
|
909
|
-
query_params["root_id"] = rootId;
|
|
910
1276
|
|
|
911
1277
|
const xHeaders = {};
|
|
912
1278
|
|
|
913
|
-
|
|
1279
|
+
const response = await APIClient.execute(
|
|
914
1280
|
this._conf,
|
|
915
1281
|
"get",
|
|
916
1282
|
constructUrl({
|
|
917
|
-
url: this._urls["
|
|
918
|
-
params: {
|
|
1283
|
+
url: this._urls["getSupportInformation"],
|
|
1284
|
+
params: {},
|
|
919
1285
|
}),
|
|
920
1286
|
query_params,
|
|
921
1287
|
undefined,
|
|
922
1288
|
xHeaders
|
|
923
1289
|
);
|
|
1290
|
+
|
|
1291
|
+
const { error: res_error } = ContentModel.Support().validate(response, {
|
|
1292
|
+
abortEarly: false,
|
|
1293
|
+
allowUnknown: false,
|
|
1294
|
+
});
|
|
1295
|
+
|
|
1296
|
+
if (res_error) {
|
|
1297
|
+
Logger({
|
|
1298
|
+
level: "WARN",
|
|
1299
|
+
message: "Response Validation Warnnings for getSupportInformation",
|
|
1300
|
+
});
|
|
1301
|
+
Logger({ level: "WARN", message: res_error });
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
return response;
|
|
924
1305
|
}
|
|
925
1306
|
|
|
926
1307
|
/**
|
|
927
1308
|
* @param {Object} arg - Arg object.
|
|
928
|
-
* @
|
|
929
|
-
*
|
|
930
|
-
* @
|
|
931
|
-
* @returns {Promise<PageGetResponse>} - Success response
|
|
932
|
-
* @summary: Get all pages
|
|
933
|
-
* @description: Use this API to get a list of pages.
|
|
1309
|
+
* @returns {Promise<TagsSchema>} - Success response
|
|
1310
|
+
* @summary: Get the tags associated with an application
|
|
1311
|
+
* @description: Use this API to get all the CSS and JS injected in the application in the form of tags.
|
|
934
1312
|
*/
|
|
935
|
-
|
|
936
|
-
const { error } = ContentValidator.
|
|
937
|
-
{
|
|
1313
|
+
async getTags({} = {}) {
|
|
1314
|
+
const { error } = ContentValidator.getTags().validate(
|
|
1315
|
+
{},
|
|
938
1316
|
{ abortEarly: false, allowUnknown: true }
|
|
939
1317
|
);
|
|
940
1318
|
if (error) {
|
|
@@ -942,58 +1320,48 @@ class Content {
|
|
|
942
1320
|
}
|
|
943
1321
|
|
|
944
1322
|
// Showing warrnings if extra unknown parameters are found
|
|
945
|
-
const { error: warrning } = ContentValidator.
|
|
946
|
-
{
|
|
1323
|
+
const { error: warrning } = ContentValidator.getTags().validate(
|
|
1324
|
+
{},
|
|
947
1325
|
{ abortEarly: false, allowUnknown: false }
|
|
948
1326
|
);
|
|
949
1327
|
if (warrning) {
|
|
950
|
-
|
|
951
|
-
|
|
1328
|
+
Logger({
|
|
1329
|
+
level: "WARN",
|
|
1330
|
+
message: "Parameter Validation warrnings for getTags",
|
|
1331
|
+
});
|
|
1332
|
+
Logger({ level: "WARN", message: warrning });
|
|
952
1333
|
}
|
|
953
1334
|
|
|
954
1335
|
const query_params = {};
|
|
955
|
-
query_params["page_no"] = pageNo;
|
|
956
|
-
query_params["page_size"] = pageSize;
|
|
957
1336
|
|
|
958
1337
|
const xHeaders = {};
|
|
959
1338
|
|
|
960
|
-
|
|
1339
|
+
const response = await APIClient.execute(
|
|
961
1340
|
this._conf,
|
|
962
1341
|
"get",
|
|
963
1342
|
constructUrl({
|
|
964
|
-
url: this._urls["
|
|
1343
|
+
url: this._urls["getTags"],
|
|
965
1344
|
params: {},
|
|
966
1345
|
}),
|
|
967
1346
|
query_params,
|
|
968
1347
|
undefined,
|
|
969
1348
|
xHeaders
|
|
970
1349
|
);
|
|
971
|
-
}
|
|
972
1350
|
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
const pageId = paginator.nextId;
|
|
983
|
-
const pageNo = paginator.pageNo;
|
|
984
|
-
const pageType = "number";
|
|
985
|
-
const data = await this.getPages({
|
|
986
|
-
pageNo: pageNo,
|
|
987
|
-
pageSize: pageSize,
|
|
988
|
-
});
|
|
989
|
-
paginator.setPaginator({
|
|
990
|
-
hasNext: data.page.has_next ? true : false,
|
|
991
|
-
nextId: data.page.next_id,
|
|
1351
|
+
const { error: res_error } = ContentModel.TagsSchema().validate(response, {
|
|
1352
|
+
abortEarly: false,
|
|
1353
|
+
allowUnknown: false,
|
|
1354
|
+
});
|
|
1355
|
+
|
|
1356
|
+
if (res_error) {
|
|
1357
|
+
Logger({
|
|
1358
|
+
level: "WARN",
|
|
1359
|
+
message: "Response Validation Warnnings for getTags",
|
|
992
1360
|
});
|
|
993
|
-
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
return
|
|
1361
|
+
Logger({ level: "WARN", message: res_error });
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
return response;
|
|
997
1365
|
}
|
|
998
1366
|
}
|
|
999
1367
|
|