@gofynd/fdk-client-javascript 1.0.2 → 1.0.4
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 +31 -2
- package/index.d.ts +4 -4
- package/index.js +9 -10
- package/package.json +14 -14
- package/sdk/APIClient.d.ts +11 -0
- package/sdk/APIClient.js +35 -0
- package/sdk/Client.d.ts +6 -0
- package/sdk/Client.js +17 -0
- package/sdk/Config.d.ts +9 -0
- package/sdk/Config.js +17 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +243 -243
- package/sdk/application/Cart/CartApplicationClient.js +595 -594
- package/sdk/application/Cart/CartApplicationModel.d.ts +64 -63
- package/sdk/application/Cart/CartApplicationModel.js +490 -885
- 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 +1079 -1078
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +90 -90
- package/sdk/application/Catalog/CatalogApplicationModel.js +683 -1249
- 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 +43 -42
- 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 +32 -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 +350 -349
- 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 +216 -215
- package/sdk/application/Content/ContentApplicationModel.d.ts +76 -76
- package/sdk/application/Content/ContentApplicationModel.js +468 -884
- 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 +65 -64
- 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 +109 -108
- 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 +31 -22
- package/sdk/application/Logistic/LogisticApplicationClient.js +115 -49
- 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 -9
- package/sdk/application/Order/OrderApplicationClient.d.ts +85 -85
- package/sdk/application/Order/OrderApplicationClient.js +247 -246
- package/sdk/application/Order/OrderApplicationModel.d.ts +50 -50
- package/sdk/application/Order/OrderApplicationModel.js +361 -656
- 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 +781 -780
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +72 -72
- package/sdk/application/Payment/PaymentApplicationModel.js +570 -1038
- 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 +646 -645
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +64 -63
- package/sdk/application/PosCart/PosCartApplicationModel.js +476 -870
- 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 +122 -121
- 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 +94 -93
- 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 +38 -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 +619 -618
- 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 +18 -7
- package/sdk/constructUrl.d.ts +5 -0
- package/sdk/constructUrl.js +13 -0
- package/sdk/index.d.ts +3 -0
- package/sdk/index.js +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +51 -51
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +182 -180
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +21 -21
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +11 -11
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +95 -178
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +10 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +44 -43
- 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 +7 -6
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +60 -60
- package/sdk/platform/Billing/BillingPlatformClient.js +184 -183
- 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 +26 -25
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +192 -165
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +686 -510
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +14 -11
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +77 -61
- package/sdk/platform/Cart/CartPlatformModel.d.ts +84 -83
- package/sdk/platform/Cart/CartPlatformModel.js +676 -1206
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +632 -632
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1558 -1556
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +40 -40
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +175 -175
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +688 -688
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1556 -1559
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +291 -291
- package/sdk/platform/Catalog/CatalogPlatformModel.js +2133 -3910
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +66 -66
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +229 -228
- package/sdk/platform/Common/CommonPlatformClient.d.ts +12 -12
- package/sdk/platform/Common/CommonPlatformClient.js +40 -51
- 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 +7 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +326 -326
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +945 -943
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +30 -30
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +88 -88
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +67 -67
- package/sdk/platform/Communication/CommunicationPlatformModel.js +522 -974
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +55 -55
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +217 -216
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +27 -27
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +279 -542
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +7 -7
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +25 -24
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +163 -153
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +617 -552
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +22 -21
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +70 -64
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +125 -125
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +348 -347
- 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 +39 -38
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +524 -534
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1287 -1346
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +49 -50
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +153 -159
- package/sdk/platform/Content/ContentPlatformModel.d.ts +78 -78
- package/sdk/platform/Content/ContentPlatformModel.js +485 -907
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +65 -65
- package/sdk/platform/Discount/DiscountPlatformClient.js +219 -218
- 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 +30 -29
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +25 -25
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +83 -61
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +9 -9
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +53 -53
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +147 -125
- 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 +12 -11
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +63 -63
- package/sdk/platform/Inventory/InventoryPlatformClient.js +231 -230
- 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 +29 -28
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +73 -73
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +203 -201
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +7 -7
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +29 -29
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +80 -80
- package/sdk/platform/Lead/LeadPlatformClient.js +215 -214
- 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 +25 -24
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +68 -66
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +7 -7
- package/sdk/platform/Order/OrderPlatformClient.d.ts +357 -357
- package/sdk/platform/Order/OrderPlatformClient.js +1046 -1033
- package/sdk/platform/Order/OrderPlatformModel.d.ts +198 -196
- package/sdk/platform/Order/OrderPlatformModel.js +1575 -2861
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +32 -32
- package/sdk/platform/Order/OrderPlatformValidator.js +161 -160
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -1
- package/sdk/platform/Partner/PartnerPlatformModel.js +10 -26
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +58 -58
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +178 -178
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +6 -6
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +24 -24
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +42 -42
- package/sdk/platform/Payment/PaymentPlatformClient.js +156 -155
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +27 -27
- package/sdk/platform/Payment/PaymentPlatformModel.js +222 -410
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +4 -4
- package/sdk/platform/Payment/PaymentPlatformValidator.js +22 -21
- package/sdk/platform/PlatformApplicationClient.d.ts +1496 -10325
- package/sdk/platform/PlatformApplicationClient.js +1584 -13899
- package/sdk/platform/PlatformClient.d.ts +7972 -7888
- package/sdk/platform/PlatformClient.js +8678 -10107
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +85 -85
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +299 -280
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +35 -35
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +15 -15
- package/sdk/platform/Rewards/RewardsPlatformModel.js +92 -194
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.js +62 -60
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +1 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +7 -7
- package/sdk/platform/Share/SharePlatformModel.d.ts +8 -8
- package/sdk/platform/Share/SharePlatformModel.js +60 -118
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +132 -132
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +314 -312
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +15 -15
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +45 -45
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +34 -34
- package/sdk/platform/Theme/ThemePlatformModel.js +190 -336
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +136 -69
- package/sdk/platform/User/UserPlatformApplicationClient.js +507 -166
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +12 -7
- package/sdk/platform/User/UserPlatformApplicationValidator.js +62 -24
- package/sdk/platform/User/UserPlatformModel.d.ts +79 -72
- package/sdk/platform/User/UserPlatformModel.js +440 -689
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +31 -31
- package/sdk/platform/Webhook/WebhookPlatformClient.js +91 -90
- 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 +15 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +13 -13
- package/sdk/public/Configuration/ConfigurationPublicClient.js +40 -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 +115 -113
- 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 +2 -0
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +7 -7
- package/sdk/public/Webhook/WebhookPublicModel.js +68 -136
- package/.github/workflows/on_create_release.yml +0 -23
- package/.github/workflows/on_merge_main.yml +0 -38
- package/.github/workflows/on_pull_request.yml +0 -35
- package/.prettierrc +0 -5
- package/documentation/application/CART.md +0 -7339
- package/documentation/application/CATALOG.md +0 -9597
- package/documentation/application/COMMON.md +0 -452
- package/documentation/application/COMMUNICATION.md +0 -467
- package/documentation/application/CONFIGURATION.md +0 -2906
- package/documentation/application/CONTENT.md +0 -3351
- package/documentation/application/FILESTORAGE.md +0 -578
- package/documentation/application/LEAD.md +0 -1895
- package/documentation/application/LOGISTIC.md +0 -765
- package/documentation/application/ORDER.md +0 -3432
- package/documentation/application/PAYMENT.md +0 -5221
- package/documentation/application/POSCART.md +0 -7938
- package/documentation/application/README.md +0 -21
- package/documentation/application/REWARDS.md +0 -708
- package/documentation/application/SHARE.md +0 -733
- package/documentation/application/THEME.md +0 -5800
- package/documentation/application/USER.md +0 -4335
- package/documentation/platform/ANALYTICS.md +0 -1154
- package/documentation/platform/AUDITTRAIL.md +0 -576
- package/documentation/platform/BILLING.md +0 -2400
- package/documentation/platform/CART.md +0 -5559
- package/documentation/platform/CATALOG.md +0 -23261
- package/documentation/platform/COMMON.md +0 -452
- package/documentation/platform/COMMUNICATION.md +0 -5718
- package/documentation/platform/COMPANYPROFILE.md +0 -2031
- package/documentation/platform/CONFIGURATION.md +0 -7339
- package/documentation/platform/CONTENT.md +0 -9098
- package/documentation/platform/DISCOUNT.md +0 -863
- package/documentation/platform/FILESTORAGE.md +0 -1081
- package/documentation/platform/INVENTORY.md +0 -1779
- package/documentation/platform/LEAD.md +0 -4740
- package/documentation/platform/ORDER.md +0 -8486
- package/documentation/platform/PARTNER.md +0 -220
- package/documentation/platform/PAYMENT.md +0 -3448
- package/documentation/platform/README.md +0 -27
- package/documentation/platform/REWARDS.md +0 -1083
- package/documentation/platform/SHARE.md +0 -606
- package/documentation/platform/THEME.md +0 -35729
- package/documentation/platform/USER.md +0 -2319
- package/documentation/platform/WEBHOOK.md +0 -591
- package/documentation/public/CONFIGURATION.md +0 -452
- package/documentation/public/INVENTORY.md +0 -690
- package/documentation/public/WEBHOOK.md +0 -352
- package/jest.config.d.ts +0 -4
- package/jest.config.js +0 -6
- package/tests/application/catalog.spec.js +0 -47
- package/tests/common/action-url.spec.js +0 -35
- package/tests/common/schema/action-url.json +0 -178
- package/tests/common/schema/url-action.json +0 -683
- package/tests/common/url-action.spec.js +0 -48
- package/tests/helpers/cookie.helper.js +0 -31
- package/tests/helpers/oauth.helper.js +0 -43
- package/tests/platform/catalog.spec.js +0 -49
- package/tests/public/location.spec.js +0 -39
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
2
3
|
const constructUrl = require("../constructUrl");
|
|
3
4
|
const Paginator = require("../../common/Paginator");
|
|
4
|
-
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
5
5
|
const ContentValidator = require("./ContentApplicationValidator");
|
|
6
6
|
const ContentModel = require("./ContentApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Content {
|
|
10
11
|
constructor(_conf) {
|
|
@@ -14,23 +15,23 @@ class Content {
|
|
|
14
15
|
getBlog: "/service/application/content/v1.0/blogs/{slug}",
|
|
15
16
|
getBlogs: "/service/application/content/v1.0/blogs/",
|
|
16
17
|
getDataLoaders: "/service/application/content/v1.0/data-loader",
|
|
17
|
-
getFaqs: "/service/application/content/v1.0/faq",
|
|
18
|
-
getFaqCategories: "/service/application/content/v1.0/faq/categories",
|
|
19
18
|
getFaqBySlug: "/service/application/content/v1.0/faq/{slug}",
|
|
19
|
+
getFaqCategories: "/service/application/content/v1.0/faq/categories",
|
|
20
20
|
getFaqCategoryBySlug:
|
|
21
21
|
"/service/application/content/v1.0/faq/category/{slug}",
|
|
22
|
+
getFaqs: "/service/application/content/v1.0/faq",
|
|
22
23
|
getFaqsByCategorySlug:
|
|
23
24
|
"/service/application/content/v1.0/faq/category/{slug}/faqs",
|
|
24
25
|
getLandingPage: "/service/application/content/v1.0/landing-page",
|
|
25
26
|
getLegalInformation: "/service/application/content/v1.0/legal",
|
|
26
27
|
getNavigations: "/service/application/content/v1.0/navigations/",
|
|
28
|
+
getPage: "/service/application/content/v2.0/pages/{slug}",
|
|
29
|
+
getPages: "/service/application/content/v2.0/pages/",
|
|
27
30
|
getSEOConfiguration: "/service/application/content/v1.0/seo",
|
|
28
|
-
getSlideshows: "/service/application/content/v1.0/slideshow/",
|
|
29
31
|
getSlideshow: "/service/application/content/v1.0/slideshow/{slug}",
|
|
32
|
+
getSlideshows: "/service/application/content/v1.0/slideshow/",
|
|
30
33
|
getSupportInformation: "/service/application/content/v1.0/support",
|
|
31
34
|
getTags: "/service/application/content/v1.0/tags",
|
|
32
|
-
getPage: "/service/application/content/v2.0/pages/{slug}",
|
|
33
|
-
getPages: "/service/application/content/v2.0/pages/",
|
|
34
35
|
};
|
|
35
36
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
36
37
|
(urls, [method, relativeUrl]) => {
|
|
@@ -80,7 +81,7 @@ class Content {
|
|
|
80
81
|
|
|
81
82
|
const xHeaders = {};
|
|
82
83
|
|
|
83
|
-
const response = await
|
|
84
|
+
const response = await ApplicationAPIClient.execute(
|
|
84
85
|
this._conf,
|
|
85
86
|
"get",
|
|
86
87
|
constructUrl({
|
|
@@ -147,7 +148,7 @@ class Content {
|
|
|
147
148
|
|
|
148
149
|
const xHeaders = {};
|
|
149
150
|
|
|
150
|
-
const response = await
|
|
151
|
+
const response = await ApplicationAPIClient.execute(
|
|
151
152
|
this._conf,
|
|
152
153
|
"get",
|
|
153
154
|
constructUrl({
|
|
@@ -212,7 +213,7 @@ class Content {
|
|
|
212
213
|
|
|
213
214
|
const xHeaders = {};
|
|
214
215
|
|
|
215
|
-
const response = await
|
|
216
|
+
const response = await ApplicationAPIClient.execute(
|
|
216
217
|
this._conf,
|
|
217
218
|
"get",
|
|
218
219
|
constructUrl({
|
|
@@ -264,7 +265,7 @@ class Content {
|
|
|
264
265
|
});
|
|
265
266
|
return data;
|
|
266
267
|
};
|
|
267
|
-
paginator.setCallback(callback);
|
|
268
|
+
paginator.setCallback(callback.bind(this));
|
|
268
269
|
return paginator;
|
|
269
270
|
}
|
|
270
271
|
|
|
@@ -300,7 +301,7 @@ class Content {
|
|
|
300
301
|
|
|
301
302
|
const xHeaders = {};
|
|
302
303
|
|
|
303
|
-
const response = await
|
|
304
|
+
const response = await ApplicationAPIClient.execute(
|
|
304
305
|
this._conf,
|
|
305
306
|
"get",
|
|
306
307
|
constructUrl({
|
|
@@ -332,13 +333,16 @@ class Content {
|
|
|
332
333
|
|
|
333
334
|
/**
|
|
334
335
|
* @param {Object} arg - Arg object.
|
|
335
|
-
* @
|
|
336
|
-
*
|
|
337
|
-
*
|
|
336
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
337
|
+
* identifier of an FAQ. You can get slug value from the endpoint
|
|
338
|
+
* /service/application/content/v1.0/faq.
|
|
339
|
+
* @returns {Promise<FaqSchema>} - Success response
|
|
340
|
+
* @summary: Get an FAQ
|
|
341
|
+
* @description: Use this API to get a particular FAQ by its slug.
|
|
338
342
|
*/
|
|
339
|
-
async
|
|
340
|
-
const { error } = ContentValidator.
|
|
341
|
-
{},
|
|
343
|
+
async getFaqBySlug({ slug } = {}) {
|
|
344
|
+
const { error } = ContentValidator.getFaqBySlug().validate(
|
|
345
|
+
{ slug },
|
|
342
346
|
{ abortEarly: false, allowUnknown: true }
|
|
343
347
|
);
|
|
344
348
|
if (error) {
|
|
@@ -346,14 +350,14 @@ class Content {
|
|
|
346
350
|
}
|
|
347
351
|
|
|
348
352
|
// Showing warrnings if extra unknown parameters are found
|
|
349
|
-
const { error: warrning } = ContentValidator.
|
|
350
|
-
{},
|
|
353
|
+
const { error: warrning } = ContentValidator.getFaqBySlug().validate(
|
|
354
|
+
{ slug },
|
|
351
355
|
{ abortEarly: false, allowUnknown: false }
|
|
352
356
|
);
|
|
353
357
|
if (warrning) {
|
|
354
358
|
Logger({
|
|
355
359
|
level: "WARN",
|
|
356
|
-
message: "Parameter Validation warrnings for
|
|
360
|
+
message: "Parameter Validation warrnings for getFaqBySlug",
|
|
357
361
|
});
|
|
358
362
|
Logger({ level: "WARN", message: warrning });
|
|
359
363
|
}
|
|
@@ -362,21 +366,19 @@ class Content {
|
|
|
362
366
|
|
|
363
367
|
const xHeaders = {};
|
|
364
368
|
|
|
365
|
-
const response = await
|
|
369
|
+
const response = await ApplicationAPIClient.execute(
|
|
366
370
|
this._conf,
|
|
367
371
|
"get",
|
|
368
372
|
constructUrl({
|
|
369
|
-
url: this._urls["
|
|
370
|
-
params: {},
|
|
373
|
+
url: this._urls["getFaqBySlug"],
|
|
374
|
+
params: { slug },
|
|
371
375
|
}),
|
|
372
376
|
query_params,
|
|
373
377
|
undefined,
|
|
374
378
|
xHeaders
|
|
375
379
|
);
|
|
376
380
|
|
|
377
|
-
const {
|
|
378
|
-
error: res_error,
|
|
379
|
-
} = ContentModel.FaqResponseSchema().validate(response, {
|
|
381
|
+
const { error: res_error } = ContentModel.FaqSchema().validate(response, {
|
|
380
382
|
abortEarly: false,
|
|
381
383
|
allowUnknown: false,
|
|
382
384
|
});
|
|
@@ -384,7 +386,7 @@ class Content {
|
|
|
384
386
|
if (res_error) {
|
|
385
387
|
Logger({
|
|
386
388
|
level: "WARN",
|
|
387
|
-
message: "Response Validation Warnnings for
|
|
389
|
+
message: "Response Validation Warnnings for getFaqBySlug",
|
|
388
390
|
});
|
|
389
391
|
Logger({ level: "WARN", message: res_error });
|
|
390
392
|
}
|
|
@@ -424,7 +426,7 @@ class Content {
|
|
|
424
426
|
|
|
425
427
|
const xHeaders = {};
|
|
426
428
|
|
|
427
|
-
const response = await
|
|
429
|
+
const response = await ApplicationAPIClient.execute(
|
|
428
430
|
this._conf,
|
|
429
431
|
"get",
|
|
430
432
|
constructUrl({
|
|
@@ -457,14 +459,14 @@ class Content {
|
|
|
457
459
|
/**
|
|
458
460
|
* @param {Object} arg - Arg object.
|
|
459
461
|
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
460
|
-
* identifier of an FAQ. You can get slug value from the endpoint
|
|
461
|
-
* /service/application/content/v1.0/faq.
|
|
462
|
-
* @returns {Promise<
|
|
463
|
-
* @summary: Get
|
|
464
|
-
* @description: Use this API to get
|
|
462
|
+
* identifier of an FAQ category. You can get slug value from the endpoint
|
|
463
|
+
* /service/application/content/v1.0/faq/categories.
|
|
464
|
+
* @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
|
|
465
|
+
* @summary: Get the FAQ category
|
|
466
|
+
* @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
|
|
465
467
|
*/
|
|
466
|
-
async
|
|
467
|
-
const { error } = ContentValidator.
|
|
468
|
+
async getFaqCategoryBySlug({ slug } = {}) {
|
|
469
|
+
const { error } = ContentValidator.getFaqCategoryBySlug().validate(
|
|
468
470
|
{ slug },
|
|
469
471
|
{ abortEarly: false, allowUnknown: true }
|
|
470
472
|
);
|
|
@@ -473,14 +475,16 @@ class Content {
|
|
|
473
475
|
}
|
|
474
476
|
|
|
475
477
|
// Showing warrnings if extra unknown parameters are found
|
|
476
|
-
const {
|
|
478
|
+
const {
|
|
479
|
+
error: warrning,
|
|
480
|
+
} = ContentValidator.getFaqCategoryBySlug().validate(
|
|
477
481
|
{ slug },
|
|
478
482
|
{ abortEarly: false, allowUnknown: false }
|
|
479
483
|
);
|
|
480
484
|
if (warrning) {
|
|
481
485
|
Logger({
|
|
482
486
|
level: "WARN",
|
|
483
|
-
message: "Parameter Validation warrnings for
|
|
487
|
+
message: "Parameter Validation warrnings for getFaqCategoryBySlug",
|
|
484
488
|
});
|
|
485
489
|
Logger({ level: "WARN", message: warrning });
|
|
486
490
|
}
|
|
@@ -489,11 +493,11 @@ class Content {
|
|
|
489
493
|
|
|
490
494
|
const xHeaders = {};
|
|
491
495
|
|
|
492
|
-
const response = await
|
|
496
|
+
const response = await ApplicationAPIClient.execute(
|
|
493
497
|
this._conf,
|
|
494
498
|
"get",
|
|
495
499
|
constructUrl({
|
|
496
|
-
url: this._urls["
|
|
500
|
+
url: this._urls["getFaqCategoryBySlug"],
|
|
497
501
|
params: { slug },
|
|
498
502
|
}),
|
|
499
503
|
query_params,
|
|
@@ -501,7 +505,9 @@ class Content {
|
|
|
501
505
|
xHeaders
|
|
502
506
|
);
|
|
503
507
|
|
|
504
|
-
const {
|
|
508
|
+
const {
|
|
509
|
+
error: res_error,
|
|
510
|
+
} = ContentModel.GetFaqCategoryBySlugSchema().validate(response, {
|
|
505
511
|
abortEarly: false,
|
|
506
512
|
allowUnknown: false,
|
|
507
513
|
});
|
|
@@ -509,7 +515,7 @@ class Content {
|
|
|
509
515
|
if (res_error) {
|
|
510
516
|
Logger({
|
|
511
517
|
level: "WARN",
|
|
512
|
-
message: "Response Validation Warnnings for
|
|
518
|
+
message: "Response Validation Warnnings for getFaqCategoryBySlug",
|
|
513
519
|
});
|
|
514
520
|
Logger({ level: "WARN", message: res_error });
|
|
515
521
|
}
|
|
@@ -519,16 +525,13 @@ class Content {
|
|
|
519
525
|
|
|
520
526
|
/**
|
|
521
527
|
* @param {Object} arg - Arg object.
|
|
522
|
-
* @
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
* @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
|
|
526
|
-
* @summary: Get the FAQ category
|
|
527
|
-
* @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
|
|
528
|
+
* @returns {Promise<FaqResponseSchema>} - Success response
|
|
529
|
+
* @summary: Get a list of FAQs
|
|
530
|
+
* @description: Use this API to get a list of frequently asked questions. Users will benefit from it when facing any issue with the website.
|
|
528
531
|
*/
|
|
529
|
-
async
|
|
530
|
-
const { error } = ContentValidator.
|
|
531
|
-
{
|
|
532
|
+
async getFaqs({} = {}) {
|
|
533
|
+
const { error } = ContentValidator.getFaqs().validate(
|
|
534
|
+
{},
|
|
532
535
|
{ abortEarly: false, allowUnknown: true }
|
|
533
536
|
);
|
|
534
537
|
if (error) {
|
|
@@ -536,16 +539,14 @@ class Content {
|
|
|
536
539
|
}
|
|
537
540
|
|
|
538
541
|
// Showing warrnings if extra unknown parameters are found
|
|
539
|
-
const {
|
|
540
|
-
|
|
541
|
-
} = ContentValidator.getFaqCategoryBySlug().validate(
|
|
542
|
-
{ slug },
|
|
542
|
+
const { error: warrning } = ContentValidator.getFaqs().validate(
|
|
543
|
+
{},
|
|
543
544
|
{ abortEarly: false, allowUnknown: false }
|
|
544
545
|
);
|
|
545
546
|
if (warrning) {
|
|
546
547
|
Logger({
|
|
547
548
|
level: "WARN",
|
|
548
|
-
message: "Parameter Validation warrnings for
|
|
549
|
+
message: "Parameter Validation warrnings for getFaqs",
|
|
549
550
|
});
|
|
550
551
|
Logger({ level: "WARN", message: warrning });
|
|
551
552
|
}
|
|
@@ -554,12 +555,12 @@ class Content {
|
|
|
554
555
|
|
|
555
556
|
const xHeaders = {};
|
|
556
557
|
|
|
557
|
-
const response = await
|
|
558
|
+
const response = await ApplicationAPIClient.execute(
|
|
558
559
|
this._conf,
|
|
559
560
|
"get",
|
|
560
561
|
constructUrl({
|
|
561
|
-
url: this._urls["
|
|
562
|
-
params: {
|
|
562
|
+
url: this._urls["getFaqs"],
|
|
563
|
+
params: {},
|
|
563
564
|
}),
|
|
564
565
|
query_params,
|
|
565
566
|
undefined,
|
|
@@ -568,7 +569,7 @@ class Content {
|
|
|
568
569
|
|
|
569
570
|
const {
|
|
570
571
|
error: res_error,
|
|
571
|
-
} = ContentModel.
|
|
572
|
+
} = ContentModel.FaqResponseSchema().validate(response, {
|
|
572
573
|
abortEarly: false,
|
|
573
574
|
allowUnknown: false,
|
|
574
575
|
});
|
|
@@ -576,7 +577,7 @@ class Content {
|
|
|
576
577
|
if (res_error) {
|
|
577
578
|
Logger({
|
|
578
579
|
level: "WARN",
|
|
579
|
-
message: "Response Validation Warnnings for
|
|
580
|
+
message: "Response Validation Warnnings for getFaqs",
|
|
580
581
|
});
|
|
581
582
|
Logger({ level: "WARN", message: res_error });
|
|
582
583
|
}
|
|
@@ -621,7 +622,7 @@ class Content {
|
|
|
621
622
|
|
|
622
623
|
const xHeaders = {};
|
|
623
624
|
|
|
624
|
-
const response = await
|
|
625
|
+
const response = await ApplicationAPIClient.execute(
|
|
625
626
|
this._conf,
|
|
626
627
|
"get",
|
|
627
628
|
constructUrl({
|
|
@@ -681,7 +682,7 @@ class Content {
|
|
|
681
682
|
|
|
682
683
|
const xHeaders = {};
|
|
683
684
|
|
|
684
|
-
const response = await
|
|
685
|
+
const response = await ApplicationAPIClient.execute(
|
|
685
686
|
this._conf,
|
|
686
687
|
"get",
|
|
687
688
|
constructUrl({
|
|
@@ -743,7 +744,7 @@ class Content {
|
|
|
743
744
|
|
|
744
745
|
const xHeaders = {};
|
|
745
746
|
|
|
746
|
-
const response = await
|
|
747
|
+
const response = await ApplicationAPIClient.execute(
|
|
747
748
|
this._conf,
|
|
748
749
|
"get",
|
|
749
750
|
constructUrl({
|
|
@@ -810,7 +811,7 @@ class Content {
|
|
|
810
811
|
|
|
811
812
|
const xHeaders = {};
|
|
812
813
|
|
|
813
|
-
const response = await
|
|
814
|
+
const response = await ApplicationAPIClient.execute(
|
|
814
815
|
this._conf,
|
|
815
816
|
"get",
|
|
816
817
|
constructUrl({
|
|
@@ -862,19 +863,23 @@ class Content {
|
|
|
862
863
|
});
|
|
863
864
|
return data;
|
|
864
865
|
};
|
|
865
|
-
paginator.setCallback(callback);
|
|
866
|
+
paginator.setCallback(callback.bind(this));
|
|
866
867
|
return paginator;
|
|
867
868
|
}
|
|
868
869
|
|
|
869
870
|
/**
|
|
870
871
|
* @param {Object} arg - Arg object.
|
|
871
|
-
* @
|
|
872
|
-
*
|
|
873
|
-
*
|
|
872
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
873
|
+
* identifier of a page. You can get slug value from the endpoint
|
|
874
|
+
* /service/application/content/v2.0/pages/.
|
|
875
|
+
* @param {string} [arg.rootId] - ID given to the HTML element
|
|
876
|
+
* @returns {Promise<PageSchema>} - Success response
|
|
877
|
+
* @summary: Get a page
|
|
878
|
+
* @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.
|
|
874
879
|
*/
|
|
875
|
-
async
|
|
876
|
-
const { error } = ContentValidator.
|
|
877
|
-
{},
|
|
880
|
+
async getPage({ slug, rootId } = {}) {
|
|
881
|
+
const { error } = ContentValidator.getPage().validate(
|
|
882
|
+
{ slug, rootId },
|
|
878
883
|
{ abortEarly: false, allowUnknown: true }
|
|
879
884
|
);
|
|
880
885
|
if (error) {
|
|
@@ -882,43 +887,44 @@ class Content {
|
|
|
882
887
|
}
|
|
883
888
|
|
|
884
889
|
// Showing warrnings if extra unknown parameters are found
|
|
885
|
-
const { error: warrning } = ContentValidator.
|
|
886
|
-
{},
|
|
890
|
+
const { error: warrning } = ContentValidator.getPage().validate(
|
|
891
|
+
{ slug, rootId },
|
|
887
892
|
{ abortEarly: false, allowUnknown: false }
|
|
888
893
|
);
|
|
889
894
|
if (warrning) {
|
|
890
895
|
Logger({
|
|
891
896
|
level: "WARN",
|
|
892
|
-
message: "Parameter Validation warrnings for
|
|
897
|
+
message: "Parameter Validation warrnings for getPage",
|
|
893
898
|
});
|
|
894
899
|
Logger({ level: "WARN", message: warrning });
|
|
895
900
|
}
|
|
896
901
|
|
|
897
902
|
const query_params = {};
|
|
903
|
+
query_params["root_id"] = rootId;
|
|
898
904
|
|
|
899
905
|
const xHeaders = {};
|
|
900
906
|
|
|
901
|
-
const response = await
|
|
907
|
+
const response = await ApplicationAPIClient.execute(
|
|
902
908
|
this._conf,
|
|
903
909
|
"get",
|
|
904
910
|
constructUrl({
|
|
905
|
-
url: this._urls["
|
|
906
|
-
params: {},
|
|
911
|
+
url: this._urls["getPage"],
|
|
912
|
+
params: { slug },
|
|
907
913
|
}),
|
|
908
914
|
query_params,
|
|
909
915
|
undefined,
|
|
910
916
|
xHeaders
|
|
911
917
|
);
|
|
912
918
|
|
|
913
|
-
const { error: res_error } = ContentModel.
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
);
|
|
919
|
+
const { error: res_error } = ContentModel.PageSchema().validate(response, {
|
|
920
|
+
abortEarly: false,
|
|
921
|
+
allowUnknown: false,
|
|
922
|
+
});
|
|
917
923
|
|
|
918
924
|
if (res_error) {
|
|
919
925
|
Logger({
|
|
920
926
|
level: "WARN",
|
|
921
|
-
message: "Response Validation Warnnings for
|
|
927
|
+
message: "Response Validation Warnnings for getPage",
|
|
922
928
|
});
|
|
923
929
|
Logger({ level: "WARN", message: res_error });
|
|
924
930
|
}
|
|
@@ -931,12 +937,12 @@ class Content {
|
|
|
931
937
|
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
932
938
|
* given set of results. Default value is 1.
|
|
933
939
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
934
|
-
* @returns {Promise<
|
|
935
|
-
* @summary: Get
|
|
936
|
-
* @description: Use this API to get a list of
|
|
940
|
+
* @returns {Promise<PageGetResponse>} - Success response
|
|
941
|
+
* @summary: Get all pages
|
|
942
|
+
* @description: Use this API to get a list of pages.
|
|
937
943
|
*/
|
|
938
|
-
async
|
|
939
|
-
const { error } = ContentValidator.
|
|
944
|
+
async getPages({ pageNo, pageSize } = {}) {
|
|
945
|
+
const { error } = ContentValidator.getPages().validate(
|
|
940
946
|
{ pageNo, pageSize },
|
|
941
947
|
{ abortEarly: false, allowUnknown: true }
|
|
942
948
|
);
|
|
@@ -945,14 +951,14 @@ class Content {
|
|
|
945
951
|
}
|
|
946
952
|
|
|
947
953
|
// Showing warrnings if extra unknown parameters are found
|
|
948
|
-
const { error: warrning } = ContentValidator.
|
|
954
|
+
const { error: warrning } = ContentValidator.getPages().validate(
|
|
949
955
|
{ pageNo, pageSize },
|
|
950
956
|
{ abortEarly: false, allowUnknown: false }
|
|
951
957
|
);
|
|
952
958
|
if (warrning) {
|
|
953
959
|
Logger({
|
|
954
960
|
level: "WARN",
|
|
955
|
-
message: "Parameter Validation warrnings for
|
|
961
|
+
message: "Parameter Validation warrnings for getPages",
|
|
956
962
|
});
|
|
957
963
|
Logger({ level: "WARN", message: warrning });
|
|
958
964
|
}
|
|
@@ -963,11 +969,11 @@ class Content {
|
|
|
963
969
|
|
|
964
970
|
const xHeaders = {};
|
|
965
971
|
|
|
966
|
-
const response = await
|
|
972
|
+
const response = await ApplicationAPIClient.execute(
|
|
967
973
|
this._conf,
|
|
968
974
|
"get",
|
|
969
975
|
constructUrl({
|
|
970
|
-
url: this._urls["
|
|
976
|
+
url: this._urls["getPages"],
|
|
971
977
|
params: {},
|
|
972
978
|
}),
|
|
973
979
|
query_params,
|
|
@@ -977,7 +983,7 @@ class Content {
|
|
|
977
983
|
|
|
978
984
|
const {
|
|
979
985
|
error: res_error,
|
|
980
|
-
} = ContentModel.
|
|
986
|
+
} = ContentModel.PageGetResponse().validate(response, {
|
|
981
987
|
abortEarly: false,
|
|
982
988
|
allowUnknown: false,
|
|
983
989
|
});
|
|
@@ -985,7 +991,7 @@ class Content {
|
|
|
985
991
|
if (res_error) {
|
|
986
992
|
Logger({
|
|
987
993
|
level: "WARN",
|
|
988
|
-
message: "Response Validation Warnnings for
|
|
994
|
+
message: "Response Validation Warnnings for getPages",
|
|
989
995
|
});
|
|
990
996
|
Logger({ level: "WARN", message: res_error });
|
|
991
997
|
}
|
|
@@ -996,16 +1002,16 @@ class Content {
|
|
|
996
1002
|
/**
|
|
997
1003
|
* @param {Object} arg - Arg object.
|
|
998
1004
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
999
|
-
* @summary: Get
|
|
1000
|
-
* @description: Use this API to get a list of
|
|
1005
|
+
* @summary: Get all pages
|
|
1006
|
+
* @description: Use this API to get a list of pages.
|
|
1001
1007
|
*/
|
|
1002
|
-
|
|
1008
|
+
getPagesPaginator({ pageSize } = {}) {
|
|
1003
1009
|
const paginator = new Paginator();
|
|
1004
1010
|
const callback = async () => {
|
|
1005
1011
|
const pageId = paginator.nextId;
|
|
1006
1012
|
const pageNo = paginator.pageNo;
|
|
1007
1013
|
const pageType = "number";
|
|
1008
|
-
const data = await this.
|
|
1014
|
+
const data = await this.getPages({
|
|
1009
1015
|
pageNo: pageNo,
|
|
1010
1016
|
pageSize: pageSize,
|
|
1011
1017
|
});
|
|
@@ -1015,22 +1021,19 @@ class Content {
|
|
|
1015
1021
|
});
|
|
1016
1022
|
return data;
|
|
1017
1023
|
};
|
|
1018
|
-
paginator.setCallback(callback);
|
|
1024
|
+
paginator.setCallback(callback.bind(this));
|
|
1019
1025
|
return paginator;
|
|
1020
1026
|
}
|
|
1021
1027
|
|
|
1022
1028
|
/**
|
|
1023
1029
|
* @param {Object} arg - Arg object.
|
|
1024
|
-
* @
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1027
|
-
* @returns {Promise<SlideshowSchema>} - Success response
|
|
1028
|
-
* @summary: Get a slideshow
|
|
1029
|
-
* @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`.
|
|
1030
|
+
* @returns {Promise<SeoComponent>} - Success response
|
|
1031
|
+
* @summary: Get the SEO of an application
|
|
1032
|
+
* @description: Use this API to get the SEO details of an application, which includes a robot.txt, meta-tags and sitemap.
|
|
1030
1033
|
*/
|
|
1031
|
-
async
|
|
1032
|
-
const { error } = ContentValidator.
|
|
1033
|
-
{
|
|
1034
|
+
async getSEOConfiguration({} = {}) {
|
|
1035
|
+
const { error } = ContentValidator.getSEOConfiguration().validate(
|
|
1036
|
+
{},
|
|
1034
1037
|
{ abortEarly: false, allowUnknown: true }
|
|
1035
1038
|
);
|
|
1036
1039
|
if (error) {
|
|
@@ -1038,14 +1041,14 @@ class Content {
|
|
|
1038
1041
|
}
|
|
1039
1042
|
|
|
1040
1043
|
// Showing warrnings if extra unknown parameters are found
|
|
1041
|
-
const { error: warrning } = ContentValidator.
|
|
1042
|
-
{
|
|
1044
|
+
const { error: warrning } = ContentValidator.getSEOConfiguration().validate(
|
|
1045
|
+
{},
|
|
1043
1046
|
{ abortEarly: false, allowUnknown: false }
|
|
1044
1047
|
);
|
|
1045
1048
|
if (warrning) {
|
|
1046
1049
|
Logger({
|
|
1047
1050
|
level: "WARN",
|
|
1048
|
-
message: "Parameter Validation warrnings for
|
|
1051
|
+
message: "Parameter Validation warrnings for getSEOConfiguration",
|
|
1049
1052
|
});
|
|
1050
1053
|
Logger({ level: "WARN", message: warrning });
|
|
1051
1054
|
}
|
|
@@ -1054,29 +1057,27 @@ class Content {
|
|
|
1054
1057
|
|
|
1055
1058
|
const xHeaders = {};
|
|
1056
1059
|
|
|
1057
|
-
const response = await
|
|
1060
|
+
const response = await ApplicationAPIClient.execute(
|
|
1058
1061
|
this._conf,
|
|
1059
1062
|
"get",
|
|
1060
1063
|
constructUrl({
|
|
1061
|
-
url: this._urls["
|
|
1062
|
-
params: {
|
|
1064
|
+
url: this._urls["getSEOConfiguration"],
|
|
1065
|
+
params: {},
|
|
1063
1066
|
}),
|
|
1064
1067
|
query_params,
|
|
1065
1068
|
undefined,
|
|
1066
1069
|
xHeaders
|
|
1067
1070
|
);
|
|
1068
1071
|
|
|
1069
|
-
const {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
allowUnknown: false,
|
|
1074
|
-
});
|
|
1072
|
+
const { error: res_error } = ContentModel.SeoComponent().validate(
|
|
1073
|
+
response,
|
|
1074
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1075
|
+
);
|
|
1075
1076
|
|
|
1076
1077
|
if (res_error) {
|
|
1077
1078
|
Logger({
|
|
1078
1079
|
level: "WARN",
|
|
1079
|
-
message: "Response Validation Warnnings for
|
|
1080
|
+
message: "Response Validation Warnnings for getSEOConfiguration",
|
|
1080
1081
|
});
|
|
1081
1082
|
Logger({ level: "WARN", message: res_error });
|
|
1082
1083
|
}
|
|
@@ -1086,13 +1087,16 @@ class Content {
|
|
|
1086
1087
|
|
|
1087
1088
|
/**
|
|
1088
1089
|
* @param {Object} arg - Arg object.
|
|
1089
|
-
* @
|
|
1090
|
-
*
|
|
1091
|
-
*
|
|
1090
|
+
* @param {string} arg.slug - A short, human-readable, URL-friendly
|
|
1091
|
+
* identifier of a slideshow. You can get slug value from the endpoint
|
|
1092
|
+
* /service/application/content/v1.0/slideshow/.
|
|
1093
|
+
* @returns {Promise<SlideshowSchema>} - Success response
|
|
1094
|
+
* @summary: Get a slideshow
|
|
1095
|
+
* @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`.
|
|
1092
1096
|
*/
|
|
1093
|
-
async
|
|
1094
|
-
const { error } = ContentValidator.
|
|
1095
|
-
{},
|
|
1097
|
+
async getSlideshow({ slug } = {}) {
|
|
1098
|
+
const { error } = ContentValidator.getSlideshow().validate(
|
|
1099
|
+
{ slug },
|
|
1096
1100
|
{ abortEarly: false, allowUnknown: true }
|
|
1097
1101
|
);
|
|
1098
1102
|
if (error) {
|
|
@@ -1100,16 +1104,14 @@ class Content {
|
|
|
1100
1104
|
}
|
|
1101
1105
|
|
|
1102
1106
|
// Showing warrnings if extra unknown parameters are found
|
|
1103
|
-
const {
|
|
1104
|
-
|
|
1105
|
-
} = ContentValidator.getSupportInformation().validate(
|
|
1106
|
-
{},
|
|
1107
|
+
const { error: warrning } = ContentValidator.getSlideshow().validate(
|
|
1108
|
+
{ slug },
|
|
1107
1109
|
{ abortEarly: false, allowUnknown: false }
|
|
1108
1110
|
);
|
|
1109
1111
|
if (warrning) {
|
|
1110
1112
|
Logger({
|
|
1111
1113
|
level: "WARN",
|
|
1112
|
-
message: "Parameter Validation warrnings for
|
|
1114
|
+
message: "Parameter Validation warrnings for getSlideshow",
|
|
1113
1115
|
});
|
|
1114
1116
|
Logger({ level: "WARN", message: warrning });
|
|
1115
1117
|
}
|
|
@@ -1118,19 +1120,21 @@ class Content {
|
|
|
1118
1120
|
|
|
1119
1121
|
const xHeaders = {};
|
|
1120
1122
|
|
|
1121
|
-
const response = await
|
|
1123
|
+
const response = await ApplicationAPIClient.execute(
|
|
1122
1124
|
this._conf,
|
|
1123
1125
|
"get",
|
|
1124
1126
|
constructUrl({
|
|
1125
|
-
url: this._urls["
|
|
1126
|
-
params: {},
|
|
1127
|
+
url: this._urls["getSlideshow"],
|
|
1128
|
+
params: { slug },
|
|
1127
1129
|
}),
|
|
1128
1130
|
query_params,
|
|
1129
1131
|
undefined,
|
|
1130
1132
|
xHeaders
|
|
1131
1133
|
);
|
|
1132
1134
|
|
|
1133
|
-
const {
|
|
1135
|
+
const {
|
|
1136
|
+
error: res_error,
|
|
1137
|
+
} = ContentModel.SlideshowSchema().validate(response, {
|
|
1134
1138
|
abortEarly: false,
|
|
1135
1139
|
allowUnknown: false,
|
|
1136
1140
|
});
|
|
@@ -1138,7 +1142,7 @@ class Content {
|
|
|
1138
1142
|
if (res_error) {
|
|
1139
1143
|
Logger({
|
|
1140
1144
|
level: "WARN",
|
|
1141
|
-
message: "Response Validation Warnnings for
|
|
1145
|
+
message: "Response Validation Warnnings for getSlideshow",
|
|
1142
1146
|
});
|
|
1143
1147
|
Logger({ level: "WARN", message: res_error });
|
|
1144
1148
|
}
|
|
@@ -1148,13 +1152,16 @@ class Content {
|
|
|
1148
1152
|
|
|
1149
1153
|
/**
|
|
1150
1154
|
* @param {Object} arg - Arg object.
|
|
1151
|
-
* @
|
|
1152
|
-
*
|
|
1153
|
-
* @
|
|
1155
|
+
* @param {number} [arg.pageNo] - The page number to navigate through the
|
|
1156
|
+
* given set of results. Default value is 1.
|
|
1157
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1158
|
+
* @returns {Promise<SlideshowGetResponse>} - Success response
|
|
1159
|
+
* @summary: Get the slideshows
|
|
1160
|
+
* @description: Use this API to get a list of slideshows along with their details.
|
|
1154
1161
|
*/
|
|
1155
|
-
async
|
|
1156
|
-
const { error } = ContentValidator.
|
|
1157
|
-
{},
|
|
1162
|
+
async getSlideshows({ pageNo, pageSize } = {}) {
|
|
1163
|
+
const { error } = ContentValidator.getSlideshows().validate(
|
|
1164
|
+
{ pageNo, pageSize },
|
|
1158
1165
|
{ abortEarly: false, allowUnknown: true }
|
|
1159
1166
|
);
|
|
1160
1167
|
if (error) {
|
|
@@ -1162,27 +1169,29 @@ class Content {
|
|
|
1162
1169
|
}
|
|
1163
1170
|
|
|
1164
1171
|
// Showing warrnings if extra unknown parameters are found
|
|
1165
|
-
const { error: warrning } = ContentValidator.
|
|
1166
|
-
{},
|
|
1172
|
+
const { error: warrning } = ContentValidator.getSlideshows().validate(
|
|
1173
|
+
{ pageNo, pageSize },
|
|
1167
1174
|
{ abortEarly: false, allowUnknown: false }
|
|
1168
1175
|
);
|
|
1169
1176
|
if (warrning) {
|
|
1170
1177
|
Logger({
|
|
1171
1178
|
level: "WARN",
|
|
1172
|
-
message: "Parameter Validation warrnings for
|
|
1179
|
+
message: "Parameter Validation warrnings for getSlideshows",
|
|
1173
1180
|
});
|
|
1174
1181
|
Logger({ level: "WARN", message: warrning });
|
|
1175
1182
|
}
|
|
1176
1183
|
|
|
1177
1184
|
const query_params = {};
|
|
1185
|
+
query_params["page_no"] = pageNo;
|
|
1186
|
+
query_params["page_size"] = pageSize;
|
|
1178
1187
|
|
|
1179
1188
|
const xHeaders = {};
|
|
1180
1189
|
|
|
1181
|
-
const response = await
|
|
1190
|
+
const response = await ApplicationAPIClient.execute(
|
|
1182
1191
|
this._conf,
|
|
1183
1192
|
"get",
|
|
1184
1193
|
constructUrl({
|
|
1185
|
-
url: this._urls["
|
|
1194
|
+
url: this._urls["getSlideshows"],
|
|
1186
1195
|
params: {},
|
|
1187
1196
|
}),
|
|
1188
1197
|
query_params,
|
|
@@ -1190,7 +1199,9 @@ class Content {
|
|
|
1190
1199
|
xHeaders
|
|
1191
1200
|
);
|
|
1192
1201
|
|
|
1193
|
-
const {
|
|
1202
|
+
const {
|
|
1203
|
+
error: res_error,
|
|
1204
|
+
} = ContentModel.SlideshowGetResponse().validate(response, {
|
|
1194
1205
|
abortEarly: false,
|
|
1195
1206
|
allowUnknown: false,
|
|
1196
1207
|
});
|
|
@@ -1198,7 +1209,7 @@ class Content {
|
|
|
1198
1209
|
if (res_error) {
|
|
1199
1210
|
Logger({
|
|
1200
1211
|
level: "WARN",
|
|
1201
|
-
message: "Response Validation Warnnings for
|
|
1212
|
+
message: "Response Validation Warnnings for getSlideshows",
|
|
1202
1213
|
});
|
|
1203
1214
|
Logger({ level: "WARN", message: res_error });
|
|
1204
1215
|
}
|
|
@@ -1208,17 +1219,39 @@ class Content {
|
|
|
1208
1219
|
|
|
1209
1220
|
/**
|
|
1210
1221
|
* @param {Object} arg - Arg object.
|
|
1211
|
-
* @param {
|
|
1212
|
-
*
|
|
1213
|
-
*
|
|
1214
|
-
* @param {string} [arg.rootId] - ID given to the HTML element
|
|
1215
|
-
* @returns {Promise<PageSchema>} - Success response
|
|
1216
|
-
* @summary: Get a page
|
|
1217
|
-
* @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.
|
|
1222
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1223
|
+
* @summary: Get the slideshows
|
|
1224
|
+
* @description: Use this API to get a list of slideshows along with their details.
|
|
1218
1225
|
*/
|
|
1219
|
-
|
|
1220
|
-
const
|
|
1221
|
-
|
|
1226
|
+
getSlideshowsPaginator({ pageSize } = {}) {
|
|
1227
|
+
const paginator = new Paginator();
|
|
1228
|
+
const callback = async () => {
|
|
1229
|
+
const pageId = paginator.nextId;
|
|
1230
|
+
const pageNo = paginator.pageNo;
|
|
1231
|
+
const pageType = "number";
|
|
1232
|
+
const data = await this.getSlideshows({
|
|
1233
|
+
pageNo: pageNo,
|
|
1234
|
+
pageSize: pageSize,
|
|
1235
|
+
});
|
|
1236
|
+
paginator.setPaginator({
|
|
1237
|
+
hasNext: data.page.has_next ? true : false,
|
|
1238
|
+
nextId: data.page.next_id,
|
|
1239
|
+
});
|
|
1240
|
+
return data;
|
|
1241
|
+
};
|
|
1242
|
+
paginator.setCallback(callback.bind(this));
|
|
1243
|
+
return paginator;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
/**
|
|
1247
|
+
* @param {Object} arg - Arg object.
|
|
1248
|
+
* @returns {Promise<Support>} - Success response
|
|
1249
|
+
* @summary: Get the support information
|
|
1250
|
+
* @description: Use this API to get contact details for customer support including emails and phone numbers.
|
|
1251
|
+
*/
|
|
1252
|
+
async getSupportInformation({} = {}) {
|
|
1253
|
+
const { error } = ContentValidator.getSupportInformation().validate(
|
|
1254
|
+
{},
|
|
1222
1255
|
{ abortEarly: false, allowUnknown: true }
|
|
1223
1256
|
);
|
|
1224
1257
|
if (error) {
|
|
@@ -1226,36 +1259,37 @@ class Content {
|
|
|
1226
1259
|
}
|
|
1227
1260
|
|
|
1228
1261
|
// Showing warrnings if extra unknown parameters are found
|
|
1229
|
-
const {
|
|
1230
|
-
|
|
1262
|
+
const {
|
|
1263
|
+
error: warrning,
|
|
1264
|
+
} = ContentValidator.getSupportInformation().validate(
|
|
1265
|
+
{},
|
|
1231
1266
|
{ abortEarly: false, allowUnknown: false }
|
|
1232
1267
|
);
|
|
1233
1268
|
if (warrning) {
|
|
1234
1269
|
Logger({
|
|
1235
1270
|
level: "WARN",
|
|
1236
|
-
message: "Parameter Validation warrnings for
|
|
1271
|
+
message: "Parameter Validation warrnings for getSupportInformation",
|
|
1237
1272
|
});
|
|
1238
1273
|
Logger({ level: "WARN", message: warrning });
|
|
1239
1274
|
}
|
|
1240
1275
|
|
|
1241
1276
|
const query_params = {};
|
|
1242
|
-
query_params["root_id"] = rootId;
|
|
1243
1277
|
|
|
1244
1278
|
const xHeaders = {};
|
|
1245
1279
|
|
|
1246
|
-
const response = await
|
|
1280
|
+
const response = await ApplicationAPIClient.execute(
|
|
1247
1281
|
this._conf,
|
|
1248
1282
|
"get",
|
|
1249
1283
|
constructUrl({
|
|
1250
|
-
url: this._urls["
|
|
1251
|
-
params: {
|
|
1284
|
+
url: this._urls["getSupportInformation"],
|
|
1285
|
+
params: {},
|
|
1252
1286
|
}),
|
|
1253
1287
|
query_params,
|
|
1254
1288
|
undefined,
|
|
1255
1289
|
xHeaders
|
|
1256
1290
|
);
|
|
1257
1291
|
|
|
1258
|
-
const { error: res_error } = ContentModel.
|
|
1292
|
+
const { error: res_error } = ContentModel.Support().validate(response, {
|
|
1259
1293
|
abortEarly: false,
|
|
1260
1294
|
allowUnknown: false,
|
|
1261
1295
|
});
|
|
@@ -1263,7 +1297,7 @@ class Content {
|
|
|
1263
1297
|
if (res_error) {
|
|
1264
1298
|
Logger({
|
|
1265
1299
|
level: "WARN",
|
|
1266
|
-
message: "Response Validation Warnnings for
|
|
1300
|
+
message: "Response Validation Warnnings for getSupportInformation",
|
|
1267
1301
|
});
|
|
1268
1302
|
Logger({ level: "WARN", message: res_error });
|
|
1269
1303
|
}
|
|
@@ -1273,16 +1307,13 @@ class Content {
|
|
|
1273
1307
|
|
|
1274
1308
|
/**
|
|
1275
1309
|
* @param {Object} arg - Arg object.
|
|
1276
|
-
* @
|
|
1277
|
-
*
|
|
1278
|
-
* @
|
|
1279
|
-
* @returns {Promise<PageGetResponse>} - Success response
|
|
1280
|
-
* @summary: Get all pages
|
|
1281
|
-
* @description: Use this API to get a list of pages.
|
|
1310
|
+
* @returns {Promise<TagsSchema>} - Success response
|
|
1311
|
+
* @summary: Get the tags associated with an application
|
|
1312
|
+
* @description: Use this API to get all the CSS and JS injected in the application in the form of tags.
|
|
1282
1313
|
*/
|
|
1283
|
-
async
|
|
1284
|
-
const { error } = ContentValidator.
|
|
1285
|
-
{
|
|
1314
|
+
async getTags({} = {}) {
|
|
1315
|
+
const { error } = ContentValidator.getTags().validate(
|
|
1316
|
+
{},
|
|
1286
1317
|
{ abortEarly: false, allowUnknown: true }
|
|
1287
1318
|
);
|
|
1288
1319
|
if (error) {
|
|
@@ -1290,29 +1321,27 @@ class Content {
|
|
|
1290
1321
|
}
|
|
1291
1322
|
|
|
1292
1323
|
// Showing warrnings if extra unknown parameters are found
|
|
1293
|
-
const { error: warrning } = ContentValidator.
|
|
1294
|
-
{
|
|
1324
|
+
const { error: warrning } = ContentValidator.getTags().validate(
|
|
1325
|
+
{},
|
|
1295
1326
|
{ abortEarly: false, allowUnknown: false }
|
|
1296
1327
|
);
|
|
1297
1328
|
if (warrning) {
|
|
1298
1329
|
Logger({
|
|
1299
1330
|
level: "WARN",
|
|
1300
|
-
message: "Parameter Validation warrnings for
|
|
1331
|
+
message: "Parameter Validation warrnings for getTags",
|
|
1301
1332
|
});
|
|
1302
1333
|
Logger({ level: "WARN", message: warrning });
|
|
1303
1334
|
}
|
|
1304
1335
|
|
|
1305
1336
|
const query_params = {};
|
|
1306
|
-
query_params["page_no"] = pageNo;
|
|
1307
|
-
query_params["page_size"] = pageSize;
|
|
1308
1337
|
|
|
1309
1338
|
const xHeaders = {};
|
|
1310
1339
|
|
|
1311
|
-
const response = await
|
|
1340
|
+
const response = await ApplicationAPIClient.execute(
|
|
1312
1341
|
this._conf,
|
|
1313
1342
|
"get",
|
|
1314
1343
|
constructUrl({
|
|
1315
|
-
url: this._urls["
|
|
1344
|
+
url: this._urls["getTags"],
|
|
1316
1345
|
params: {},
|
|
1317
1346
|
}),
|
|
1318
1347
|
query_params,
|
|
@@ -1320,9 +1349,7 @@ class Content {
|
|
|
1320
1349
|
xHeaders
|
|
1321
1350
|
);
|
|
1322
1351
|
|
|
1323
|
-
const {
|
|
1324
|
-
error: res_error,
|
|
1325
|
-
} = ContentModel.PageGetResponse().validate(response, {
|
|
1352
|
+
const { error: res_error } = ContentModel.TagsSchema().validate(response, {
|
|
1326
1353
|
abortEarly: false,
|
|
1327
1354
|
allowUnknown: false,
|
|
1328
1355
|
});
|
|
@@ -1330,39 +1357,13 @@ class Content {
|
|
|
1330
1357
|
if (res_error) {
|
|
1331
1358
|
Logger({
|
|
1332
1359
|
level: "WARN",
|
|
1333
|
-
message: "Response Validation Warnnings for
|
|
1360
|
+
message: "Response Validation Warnnings for getTags",
|
|
1334
1361
|
});
|
|
1335
1362
|
Logger({ level: "WARN", message: res_error });
|
|
1336
1363
|
}
|
|
1337
1364
|
|
|
1338
1365
|
return response;
|
|
1339
1366
|
}
|
|
1340
|
-
|
|
1341
|
-
/**
|
|
1342
|
-
* @param {Object} arg - Arg object.
|
|
1343
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1344
|
-
* @summary: Get all pages
|
|
1345
|
-
* @description: Use this API to get a list of pages.
|
|
1346
|
-
*/
|
|
1347
|
-
getPagesPaginator({ pageSize } = {}) {
|
|
1348
|
-
const paginator = new Paginator();
|
|
1349
|
-
const callback = async () => {
|
|
1350
|
-
const pageId = paginator.nextId;
|
|
1351
|
-
const pageNo = paginator.pageNo;
|
|
1352
|
-
const pageType = "number";
|
|
1353
|
-
const data = await this.getPages({
|
|
1354
|
-
pageNo: pageNo,
|
|
1355
|
-
pageSize: pageSize,
|
|
1356
|
-
});
|
|
1357
|
-
paginator.setPaginator({
|
|
1358
|
-
hasNext: data.page.has_next ? true : false,
|
|
1359
|
-
nextId: data.page.next_id,
|
|
1360
|
-
});
|
|
1361
|
-
return data;
|
|
1362
|
-
};
|
|
1363
|
-
paginator.setCallback(callback);
|
|
1364
|
-
return paginator;
|
|
1365
|
-
}
|
|
1366
1367
|
}
|
|
1367
1368
|
|
|
1368
1369
|
module.exports = Content;
|