@gofynd/fdk-client-javascript 1.4.14 → 1.4.15-beta.10
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 +2 -2
- package/application.d.ts +1 -2
- package/application.js +2 -3
- package/index.d.ts +1 -2
- package/index.js +7 -1
- package/package.json +2 -3
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -20
- package/sdk/application/Cart/CartApplicationClient.d.ts +55 -97
- package/sdk/application/Cart/CartApplicationClient.js +60 -1262
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +80 -162
- package/sdk/application/Catalog/CatalogApplicationClient.js +148 -1313
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -9
- package/sdk/application/Common/CommonApplicationClient.js +5 -90
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -145
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -80
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +31 -725
- package/sdk/application/Content/ContentApplicationClient.d.ts +63 -85
- package/sdk/application/Content/ContentApplicationClient.js +126 -942
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -15
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +26 -130
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -17
- package/sdk/application/Lead/LeadApplicationClient.js +32 -201
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +22 -62
- package/sdk/application/Logistic/LogisticApplicationClient.js +51 -647
- package/sdk/application/Order/OrderApplicationClient.d.ts +22 -56
- package/sdk/application/Order/OrderApplicationClient.js +86 -555
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +92 -209
- package/sdk/application/Payment/PaymentApplicationClient.js +57 -2099
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -26
- package/sdk/application/Rewards/RewardsApplicationClient.js +17 -303
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +34 -294
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +30 -166
- package/sdk/application/User/UserApplicationClient.d.ts +87 -138
- package/sdk/application/User/UserApplicationClient.js +47 -1817
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
- package/sdk/application/Webhook/WebhookApplicationClient.js +6 -49
- package/sdk/application/index.d.ts +0 -19
- package/sdk/application/index.js +0 -35
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +21 -116
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +16 -121
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
- package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +85 -767
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +76 -429
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +6 -120
- package/sdk/partner/OAuthClient.js +1 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
- package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
- package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
- package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
- package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
- package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +112 -407
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -111
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -106
- package/sdk/platform/Cart/CartPlatformModel.d.ts +1328 -4975
- package/sdk/platform/Cart/CartPlatformModel.js +1229 -1922
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -208
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +358 -383
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +126 -122
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +68 -66
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +118 -141
- package/sdk/platform/Catalog/CatalogPlatformClient.js +170 -193
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1744 -1501
- package/sdk/platform/Catalog/CatalogPlatformModel.js +1211 -1383
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +18 -18
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +18 -18
- package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
- package/sdk/platform/Common/CommonPlatformClient.js +2 -3
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
- package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +138 -283
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +100 -219
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
- package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
- package/sdk/platform/Content/ContentPlatformClient.js +336 -523
- package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
- package/sdk/platform/Content/ContentPlatformModel.js +390 -521
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
- package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
- package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
- package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +39 -95
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +63 -462
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +22 -20
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +24 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +116 -370
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +104 -313
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
- package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
- package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +5 -175
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +4 -52
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +3 -34
- package/sdk/platform/Order/OrderPlatformClient.d.ts +103 -174
- package/sdk/platform/Order/OrderPlatformClient.js +275 -528
- package/sdk/platform/Order/OrderPlatformModel.d.ts +3078 -5449
- package/sdk/platform/Order/OrderPlatformModel.js +1659 -3501
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +219 -234
- package/sdk/platform/Order/OrderPlatformValidator.js +118 -146
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +106 -94
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +146 -131
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +93 -64
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +70 -62
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +507 -386
- package/sdk/platform/Payment/PaymentPlatformModel.js +376 -323
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +10 -10
- package/sdk/platform/Payment/PaymentPlatformValidator.js +10 -10
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +35 -45
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +38 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +13 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +12 -24
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +68 -62
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +396 -620
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +326 -501
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +11 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +10 -10
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
- package/sdk/platform/Share/SharePlatformModel.js +4 -27
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +13 -76
- package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
- package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
- package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
- package/sdk/platform/User/UserPlatformModel.js +23 -23
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
- package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -8
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
- package/sdk/public/Content/ContentPublicClient.js +19 -793
- package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
- package/sdk/public/Content/ContentPublicModel.js +3 -649
- package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
- package/sdk/public/Content/ContentPublicValidator.js +2 -88
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +14 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +13 -10
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
- package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/application/Cart/CartApplicationModel.d.ts +0 -4340
- package/sdk/application/Cart/CartApplicationModel.js +0 -2718
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -788
- package/sdk/application/Cart/CartApplicationValidator.js +0 -546
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3909
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2667
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +0 -791
- package/sdk/application/Catalog/CatalogApplicationValidator.js +0 -551
- package/sdk/application/Common/CommonApplicationModel.d.ts +0 -449
- package/sdk/application/Common/CommonApplicationModel.js +0 -308
- package/sdk/application/Common/CommonApplicationValidator.d.ts +0 -46
- package/sdk/application/Common/CommonApplicationValidator.js +0 -38
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +0 -293
- package/sdk/application/Communication/CommunicationApplicationModel.js +0 -201
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +0 -29
- package/sdk/application/Communication/CommunicationApplicationValidator.js +0 -38
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +0 -2544
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1875
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +0 -179
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +0 -176
- package/sdk/application/Content/ContentApplicationModel.d.ts +0 -2189
- package/sdk/application/Content/ContentApplicationModel.js +0 -1640
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -290
- package/sdk/application/Content/ContentApplicationValidator.js +0 -269
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -270
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -188
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -36
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -202
- package/sdk/application/Finance/FinanceApplicationModel.d.ts +0 -289
- package/sdk/application/Finance/FinanceApplicationModel.js +0 -208
- package/sdk/application/Finance/FinanceApplicationValidator.d.ts +0 -25
- package/sdk/application/Finance/FinanceApplicationValidator.js +0 -31
- package/sdk/application/Lead/LeadApplicationModel.d.ts +0 -590
- package/sdk/application/Lead/LeadApplicationModel.js +0 -480
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +0 -68
- package/sdk/application/Lead/LeadApplicationValidator.js +0 -71
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +0 -2034
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1391
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -299
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -224
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2612
- package/sdk/application/Order/OrderApplicationModel.js +0 -1669
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -279
- package/sdk/application/Order/OrderApplicationValidator.js +0 -210
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4062
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2632
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +0 -576
- package/sdk/application/Payment/PaymentApplicationValidator.js +0 -594
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +0 -365
- package/sdk/application/Rewards/RewardsApplicationModel.js +0 -396
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +0 -73
- package/sdk/application/Rewards/RewardsApplicationValidator.js +0 -84
- package/sdk/application/Share/ShareApplicationModel.d.ts +0 -339
- package/sdk/application/Share/ShareApplicationModel.js +0 -234
- package/sdk/application/Share/ShareApplicationValidator.d.ts +0 -90
- package/sdk/application/Share/ShareApplicationValidator.js +0 -91
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +0 -1744
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1446
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -79
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -65
- package/sdk/application/User/UserApplicationModel.d.ts +0 -1943
- package/sdk/application/User/UserApplicationModel.js +0 -1382
- package/sdk/application/User/UserApplicationValidator.d.ts +0 -560
- package/sdk/application/User/UserApplicationValidator.js +0 -573
- package/sdk/application/Webhook/WebhookApplicationModel.d.ts +0 -54
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -48
- package/sdk/application/Webhook/WebhookApplicationValidator.d.ts +0 -16
- package/sdk/application/Webhook/WebhookApplicationValidator.js +0 -19
- package/sdk/common/Clickstream.d.ts +0 -1
- package/sdk/common/Clickstream.js +0 -464
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
1
|
const {
|
|
3
2
|
FDKClientValidationError,
|
|
4
3
|
FDKResponseValidationError,
|
|
5
4
|
} = require("../../common/FDKError");
|
|
5
|
+
|
|
6
|
+
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
6
7
|
const constructUrl = require("../constructUrl");
|
|
7
8
|
const Paginator = require("../../common/Paginator");
|
|
8
|
-
const
|
|
9
|
-
const ContentApplicationModel = require("./ContentApplicationModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
12
10
|
|
|
13
11
|
class Content {
|
|
14
12
|
constructor(_conf) {
|
|
@@ -16,11 +14,11 @@ class Content {
|
|
|
16
14
|
this._relativeUrls = {
|
|
17
15
|
getAnnouncements: "/service/application/content/v1.0/announcements",
|
|
18
16
|
getBlog: "/service/application/content/v1.0/blogs/{slug}",
|
|
19
|
-
getBlogs: "/service/application/content/v1.0/blogs",
|
|
20
|
-
|
|
21
|
-
"/service/application/content/
|
|
22
|
-
|
|
23
|
-
"/service/application/content/
|
|
17
|
+
getBlogs: "/service/application/content/v1.0/blogs/",
|
|
18
|
+
getCustomFields:
|
|
19
|
+
"/service/application/content/v1.0/metafields/{resource}/{resource_id}",
|
|
20
|
+
getCustomObject:
|
|
21
|
+
"/service/application/content/v1.0/metaobjects/{metaobject_id}",
|
|
24
22
|
getDataLoaders: "/service/application/content/v1.0/data-loader",
|
|
25
23
|
getFaqBySlug: "/service/application/content/v1.0/faq/{slug}",
|
|
26
24
|
getFaqCategories: "/service/application/content/v1.0/faq/categories",
|
|
@@ -31,13 +29,13 @@ class Content {
|
|
|
31
29
|
"/service/application/content/v1.0/faq/category/{slug}/faqs",
|
|
32
30
|
getLandingPage: "/service/application/content/v1.0/landing-page",
|
|
33
31
|
getLegalInformation: "/service/application/content/v1.0/legal",
|
|
34
|
-
getNavigations: "/service/application/content/v1.0/navigations",
|
|
32
|
+
getNavigations: "/service/application/content/v1.0/navigations/",
|
|
35
33
|
getPage: "/service/application/content/v2.0/pages/{slug}",
|
|
36
|
-
getPages: "/service/application/content/v2.0/pages",
|
|
34
|
+
getPages: "/service/application/content/v2.0/pages/",
|
|
37
35
|
getSEOConfiguration: "/service/application/content/v1.0/seo",
|
|
38
36
|
getSEOMarkupSchemas: "/service/application/content/v1.0/seo/schema",
|
|
39
37
|
getSlideshow: "/service/application/content/v1.0/slideshow/{slug}",
|
|
40
|
-
getSlideshows: "/service/application/content/v1.0/slideshow",
|
|
38
|
+
getSlideshows: "/service/application/content/v1.0/slideshow/",
|
|
41
39
|
getSupportInformation: "/service/application/content/v1.0/support",
|
|
42
40
|
getTags: "/service/application/content/v1.0/tags",
|
|
43
41
|
};
|
|
@@ -58,12 +56,9 @@ class Content {
|
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
/**
|
|
61
|
-
* @param {ContentApplicationValidator.GetAnnouncementsParam} arg - Arg object.
|
|
62
59
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
63
60
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
64
|
-
* @returns {Promise<
|
|
65
|
-
* - Success response
|
|
66
|
-
*
|
|
61
|
+
* @returns {Promise<AnnouncementsResponseSchema>} - Success response
|
|
67
62
|
* @name getAnnouncements
|
|
68
63
|
* @summary: List announcements
|
|
69
64
|
* @description: List all current announcements in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getAnnouncements/).
|
|
@@ -72,28 +67,6 @@ class Content {
|
|
|
72
67
|
{ requestHeaders } = { requestHeaders: {} },
|
|
73
68
|
{ responseHeaders } = { responseHeaders: false }
|
|
74
69
|
) {
|
|
75
|
-
const { error } = ContentApplicationValidator.getAnnouncements().validate(
|
|
76
|
-
{},
|
|
77
|
-
{ abortEarly: false, allowUnknown: true }
|
|
78
|
-
);
|
|
79
|
-
if (error) {
|
|
80
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Showing warrnings if extra unknown parameters are found
|
|
84
|
-
const {
|
|
85
|
-
error: warrning,
|
|
86
|
-
} = ContentApplicationValidator.getAnnouncements().validate(
|
|
87
|
-
{},
|
|
88
|
-
{ abortEarly: false, allowUnknown: false }
|
|
89
|
-
);
|
|
90
|
-
if (warrning) {
|
|
91
|
-
Logger({
|
|
92
|
-
level: "WARN",
|
|
93
|
-
message: `Parameter Validation warrnings for application > Content > getAnnouncements \n ${warrning}`,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
70
|
const query_params = {};
|
|
98
71
|
|
|
99
72
|
const xHeaders = {};
|
|
@@ -116,63 +89,32 @@ class Content {
|
|
|
116
89
|
responseData = response[0];
|
|
117
90
|
}
|
|
118
91
|
|
|
119
|
-
const {
|
|
120
|
-
error: res_error,
|
|
121
|
-
} = ContentApplicationModel.AnnouncementsResponseSchema().validate(
|
|
122
|
-
responseData,
|
|
123
|
-
{ abortEarly: false, allowUnknown: true }
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
if (res_error) {
|
|
127
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
128
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
129
|
-
} else {
|
|
130
|
-
Logger({
|
|
131
|
-
level: "WARN",
|
|
132
|
-
message: `Response Validation Warnings for application > Content > getAnnouncements \n ${res_error}`,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
92
|
return response;
|
|
138
93
|
}
|
|
139
94
|
|
|
140
95
|
/**
|
|
141
|
-
* @param {ContentApplicationValidator.GetBlogParam} arg - Arg object.
|
|
142
96
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
143
97
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
144
|
-
* @returns {Promise<
|
|
98
|
+
* @returns {Promise<BlogSchema>} - Success response
|
|
145
99
|
* @name getBlog
|
|
146
100
|
* @summary: Get a blog
|
|
147
101
|
* @description: Get information related to a specific blog such as it's contents, author, publish date, SEO related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlog/).
|
|
148
102
|
*/
|
|
149
103
|
async getBlog(
|
|
150
|
-
{ slug, rootId,
|
|
104
|
+
{ slug, rootId, requestHeaders } = { requestHeaders: {} },
|
|
151
105
|
{ responseHeaders } = { responseHeaders: false }
|
|
152
106
|
) {
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// Showing warrnings if extra unknown parameters are found
|
|
162
|
-
const { error: warrning } = ContentApplicationValidator.getBlog().validate(
|
|
163
|
-
{ slug, rootId, preview },
|
|
164
|
-
{ abortEarly: false, allowUnknown: false }
|
|
165
|
-
);
|
|
166
|
-
if (warrning) {
|
|
167
|
-
Logger({
|
|
168
|
-
level: "WARN",
|
|
169
|
-
message: `Parameter Validation warrnings for application > Content > getBlog \n ${warrning}`,
|
|
107
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
108
|
+
if (errors.length > 0) {
|
|
109
|
+
const error = new FDKClientValidationError({
|
|
110
|
+
message: "Missing required field",
|
|
111
|
+
details: errors,
|
|
170
112
|
});
|
|
113
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
171
114
|
}
|
|
172
115
|
|
|
173
116
|
const query_params = {};
|
|
174
117
|
query_params["root_id"] = rootId;
|
|
175
|
-
query_params["preview"] = preview;
|
|
176
118
|
|
|
177
119
|
const xHeaders = {};
|
|
178
120
|
|
|
@@ -194,32 +136,13 @@ class Content {
|
|
|
194
136
|
responseData = response[0];
|
|
195
137
|
}
|
|
196
138
|
|
|
197
|
-
const {
|
|
198
|
-
error: res_error,
|
|
199
|
-
} = ContentApplicationModel.BlogSchema().validate(responseData, {
|
|
200
|
-
abortEarly: false,
|
|
201
|
-
allowUnknown: true,
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
if (res_error) {
|
|
205
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
206
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
207
|
-
} else {
|
|
208
|
-
Logger({
|
|
209
|
-
level: "WARN",
|
|
210
|
-
message: `Response Validation Warnings for application > Content > getBlog \n ${res_error}`,
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
139
|
return response;
|
|
216
140
|
}
|
|
217
141
|
|
|
218
142
|
/**
|
|
219
|
-
* @param {ContentApplicationValidator.GetBlogsParam} arg - Arg object.
|
|
220
143
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
221
144
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
222
|
-
* @returns {Promise<
|
|
145
|
+
* @returns {Promise<BlogGetResponse>} - Success response
|
|
223
146
|
* @name getBlogs
|
|
224
147
|
* @summary: List blogs
|
|
225
148
|
* @description: List all the blogs against an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlogs/).
|
|
@@ -228,26 +151,6 @@ class Content {
|
|
|
228
151
|
{ pageNo, pageSize, tags, search, requestHeaders } = { requestHeaders: {} },
|
|
229
152
|
{ responseHeaders } = { responseHeaders: false }
|
|
230
153
|
) {
|
|
231
|
-
const { error } = ContentApplicationValidator.getBlogs().validate(
|
|
232
|
-
{ pageNo, pageSize, tags, search },
|
|
233
|
-
{ abortEarly: false, allowUnknown: true }
|
|
234
|
-
);
|
|
235
|
-
if (error) {
|
|
236
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// Showing warrnings if extra unknown parameters are found
|
|
240
|
-
const { error: warrning } = ContentApplicationValidator.getBlogs().validate(
|
|
241
|
-
{ pageNo, pageSize, tags, search },
|
|
242
|
-
{ abortEarly: false, allowUnknown: false }
|
|
243
|
-
);
|
|
244
|
-
if (warrning) {
|
|
245
|
-
Logger({
|
|
246
|
-
level: "WARN",
|
|
247
|
-
message: `Parameter Validation warrnings for application > Content > getBlogs \n ${warrning}`,
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
|
|
251
154
|
const query_params = {};
|
|
252
155
|
query_params["page_no"] = pageNo;
|
|
253
156
|
query_params["page_size"] = pageSize;
|
|
@@ -274,66 +177,31 @@ class Content {
|
|
|
274
177
|
responseData = response[0];
|
|
275
178
|
}
|
|
276
179
|
|
|
277
|
-
const {
|
|
278
|
-
error: res_error,
|
|
279
|
-
} = ContentApplicationModel.BlogGetDetails().validate(responseData, {
|
|
280
|
-
abortEarly: false,
|
|
281
|
-
allowUnknown: true,
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
if (res_error) {
|
|
285
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
286
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
287
|
-
} else {
|
|
288
|
-
Logger({
|
|
289
|
-
level: "WARN",
|
|
290
|
-
message: `Response Validation Warnings for application > Content > getBlogs \n ${res_error}`,
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
180
|
return response;
|
|
296
181
|
}
|
|
297
182
|
|
|
298
183
|
/**
|
|
299
|
-
* @param {ContentApplicationValidator.GetCustomFieldsByResourceIdParam} arg
|
|
300
|
-
* - Arg object.
|
|
301
|
-
*
|
|
302
184
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
303
185
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
304
|
-
* @returns {Promise<
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
* @
|
|
308
|
-
* @summary: Get list of custom fields of given resource and resource slug
|
|
309
|
-
* @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomFieldsByResourceId/).
|
|
186
|
+
* @returns {Promise<CustomFieldsResponseByResourceIdSchema>} - Success response
|
|
187
|
+
* @name getCustomFields
|
|
188
|
+
* @summary: Get list of custom fields
|
|
189
|
+
* @description: List custom fields attached to a particular resource by using the resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomFields/).
|
|
310
190
|
*/
|
|
311
|
-
async
|
|
312
|
-
{ resource,
|
|
191
|
+
async getCustomFields(
|
|
192
|
+
{ resource, resourceId, requestHeaders } = { requestHeaders: {} },
|
|
313
193
|
{ responseHeaders } = { responseHeaders: false }
|
|
314
194
|
) {
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// Showing warrnings if extra unknown parameters are found
|
|
326
|
-
const {
|
|
327
|
-
error: warrning,
|
|
328
|
-
} = ContentApplicationValidator.getCustomFieldsByResourceId().validate(
|
|
329
|
-
{ resource, resourceSlug },
|
|
330
|
-
{ abortEarly: false, allowUnknown: false }
|
|
331
|
-
);
|
|
332
|
-
if (warrning) {
|
|
333
|
-
Logger({
|
|
334
|
-
level: "WARN",
|
|
335
|
-
message: `Parameter Validation warrnings for application > Content > getCustomFieldsByResourceId \n ${warrning}`,
|
|
195
|
+
const errors = validateRequiredParams(arguments[0], [
|
|
196
|
+
"resource",
|
|
197
|
+
"resourceId",
|
|
198
|
+
]);
|
|
199
|
+
if (errors.length > 0) {
|
|
200
|
+
const error = new FDKClientValidationError({
|
|
201
|
+
message: "Missing required field",
|
|
202
|
+
details: errors,
|
|
336
203
|
});
|
|
204
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
337
205
|
}
|
|
338
206
|
|
|
339
207
|
const query_params = {};
|
|
@@ -344,8 +212,8 @@ class Content {
|
|
|
344
212
|
this._conf,
|
|
345
213
|
"get",
|
|
346
214
|
constructUrl({
|
|
347
|
-
url: this._urls["
|
|
348
|
-
params: { resource,
|
|
215
|
+
url: this._urls["getCustomFields"],
|
|
216
|
+
params: { resource, resourceId },
|
|
349
217
|
}),
|
|
350
218
|
query_params,
|
|
351
219
|
undefined,
|
|
@@ -358,63 +226,28 @@ class Content {
|
|
|
358
226
|
responseData = response[0];
|
|
359
227
|
}
|
|
360
228
|
|
|
361
|
-
const {
|
|
362
|
-
error: res_error,
|
|
363
|
-
} = ContentApplicationModel.CustomFieldsResponseByResourceIdSchema().validate(
|
|
364
|
-
responseData,
|
|
365
|
-
{ abortEarly: false, allowUnknown: true }
|
|
366
|
-
);
|
|
367
|
-
|
|
368
|
-
if (res_error) {
|
|
369
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
370
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
371
|
-
} else {
|
|
372
|
-
Logger({
|
|
373
|
-
level: "WARN",
|
|
374
|
-
message: `Response Validation Warnings for application > Content > getCustomFieldsByResourceId \n ${res_error}`,
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
229
|
return response;
|
|
380
230
|
}
|
|
381
231
|
|
|
382
232
|
/**
|
|
383
|
-
* @param {ContentApplicationValidator.GetCustomObjectBySlugParam} arg - Arg object.
|
|
384
233
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
385
234
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
386
|
-
* @returns {Promise<
|
|
387
|
-
*
|
|
388
|
-
* @
|
|
389
|
-
* @
|
|
390
|
-
* @description: Details of a custom object entry can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomObjectBySlug/).
|
|
235
|
+
* @returns {Promise<CustomObjectByIdSchema>} - Success response
|
|
236
|
+
* @name getCustomObject
|
|
237
|
+
* @summary: Get custom object
|
|
238
|
+
* @description: Get details of custom objects, their field details, definitions, and references can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getCustomObject/).
|
|
391
239
|
*/
|
|
392
|
-
async
|
|
393
|
-
{
|
|
240
|
+
async getCustomObject(
|
|
241
|
+
{ metaobjectId, requestHeaders } = { requestHeaders: {} },
|
|
394
242
|
{ responseHeaders } = { responseHeaders: false }
|
|
395
243
|
) {
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
);
|
|
402
|
-
if (error) {
|
|
403
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
// Showing warrnings if extra unknown parameters are found
|
|
407
|
-
const {
|
|
408
|
-
error: warrning,
|
|
409
|
-
} = ContentApplicationValidator.getCustomObjectBySlug().validate(
|
|
410
|
-
{ definitionSlug, slug },
|
|
411
|
-
{ abortEarly: false, allowUnknown: false }
|
|
412
|
-
);
|
|
413
|
-
if (warrning) {
|
|
414
|
-
Logger({
|
|
415
|
-
level: "WARN",
|
|
416
|
-
message: `Parameter Validation warrnings for application > Content > getCustomObjectBySlug \n ${warrning}`,
|
|
244
|
+
const errors = validateRequiredParams(arguments[0], ["metaobjectId"]);
|
|
245
|
+
if (errors.length > 0) {
|
|
246
|
+
const error = new FDKClientValidationError({
|
|
247
|
+
message: "Missing required field",
|
|
248
|
+
details: errors,
|
|
417
249
|
});
|
|
250
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
418
251
|
}
|
|
419
252
|
|
|
420
253
|
const query_params = {};
|
|
@@ -425,8 +258,8 @@ class Content {
|
|
|
425
258
|
this._conf,
|
|
426
259
|
"get",
|
|
427
260
|
constructUrl({
|
|
428
|
-
url: this._urls["
|
|
429
|
-
params: {
|
|
261
|
+
url: this._urls["getCustomObject"],
|
|
262
|
+
params: { metaobjectId },
|
|
430
263
|
}),
|
|
431
264
|
query_params,
|
|
432
265
|
undefined,
|
|
@@ -439,32 +272,13 @@ class Content {
|
|
|
439
272
|
responseData = response[0];
|
|
440
273
|
}
|
|
441
274
|
|
|
442
|
-
const {
|
|
443
|
-
error: res_error,
|
|
444
|
-
} = ContentApplicationModel.CustomObjectByIdSchema().validate(
|
|
445
|
-
responseData,
|
|
446
|
-
{ abortEarly: false, allowUnknown: true }
|
|
447
|
-
);
|
|
448
|
-
|
|
449
|
-
if (res_error) {
|
|
450
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
451
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
452
|
-
} else {
|
|
453
|
-
Logger({
|
|
454
|
-
level: "WARN",
|
|
455
|
-
message: `Response Validation Warnings for application > Content > getCustomObjectBySlug \n ${res_error}`,
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
|
|
460
275
|
return response;
|
|
461
276
|
}
|
|
462
277
|
|
|
463
278
|
/**
|
|
464
|
-
* @param {ContentApplicationValidator.GetDataLoadersParam} arg - Arg object.
|
|
465
279
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
466
280
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
467
|
-
* @returns {Promise<
|
|
281
|
+
* @returns {Promise<DataLoadersSchema>} - Success response
|
|
468
282
|
* @name getDataLoaders
|
|
469
283
|
* @summary: List Dataloaders
|
|
470
284
|
* @description: List all the data loaders that are enabled for an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getDataLoaders/).
|
|
@@ -473,28 +287,6 @@ class Content {
|
|
|
473
287
|
{ requestHeaders } = { requestHeaders: {} },
|
|
474
288
|
{ responseHeaders } = { responseHeaders: false }
|
|
475
289
|
) {
|
|
476
|
-
const { error } = ContentApplicationValidator.getDataLoaders().validate(
|
|
477
|
-
{},
|
|
478
|
-
{ abortEarly: false, allowUnknown: true }
|
|
479
|
-
);
|
|
480
|
-
if (error) {
|
|
481
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// Showing warrnings if extra unknown parameters are found
|
|
485
|
-
const {
|
|
486
|
-
error: warrning,
|
|
487
|
-
} = ContentApplicationValidator.getDataLoaders().validate(
|
|
488
|
-
{},
|
|
489
|
-
{ abortEarly: false, allowUnknown: false }
|
|
490
|
-
);
|
|
491
|
-
if (warrning) {
|
|
492
|
-
Logger({
|
|
493
|
-
level: "WARN",
|
|
494
|
-
message: `Parameter Validation warrnings for application > Content > getDataLoaders \n ${warrning}`,
|
|
495
|
-
});
|
|
496
|
-
}
|
|
497
|
-
|
|
498
290
|
const query_params = {};
|
|
499
291
|
|
|
500
292
|
const xHeaders = {};
|
|
@@ -517,32 +309,13 @@ class Content {
|
|
|
517
309
|
responseData = response[0];
|
|
518
310
|
}
|
|
519
311
|
|
|
520
|
-
const {
|
|
521
|
-
error: res_error,
|
|
522
|
-
} = ContentApplicationModel.DataLoadersSchema().validate(responseData, {
|
|
523
|
-
abortEarly: false,
|
|
524
|
-
allowUnknown: true,
|
|
525
|
-
});
|
|
526
|
-
|
|
527
|
-
if (res_error) {
|
|
528
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
529
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
530
|
-
} else {
|
|
531
|
-
Logger({
|
|
532
|
-
level: "WARN",
|
|
533
|
-
message: `Response Validation Warnings for application > Content > getDataLoaders \n ${res_error}`,
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
312
|
return response;
|
|
539
313
|
}
|
|
540
314
|
|
|
541
315
|
/**
|
|
542
|
-
* @param {ContentApplicationValidator.GetFaqBySlugParam} arg - Arg object.
|
|
543
316
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
544
317
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
545
|
-
* @returns {Promise<
|
|
318
|
+
* @returns {Promise<FaqSchema>} - Success response
|
|
546
319
|
* @name getFaqBySlug
|
|
547
320
|
* @summary: Get FAQ
|
|
548
321
|
* @description: Get a specific FAQ using its slug identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqBySlug/).
|
|
@@ -551,26 +324,13 @@ class Content {
|
|
|
551
324
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
552
325
|
{ responseHeaders } = { responseHeaders: false }
|
|
553
326
|
) {
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
// Showing warrnings if extra unknown parameters are found
|
|
563
|
-
const {
|
|
564
|
-
error: warrning,
|
|
565
|
-
} = ContentApplicationValidator.getFaqBySlug().validate(
|
|
566
|
-
{ slug },
|
|
567
|
-
{ abortEarly: false, allowUnknown: false }
|
|
568
|
-
);
|
|
569
|
-
if (warrning) {
|
|
570
|
-
Logger({
|
|
571
|
-
level: "WARN",
|
|
572
|
-
message: `Parameter Validation warrnings for application > Content > getFaqBySlug \n ${warrning}`,
|
|
327
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
328
|
+
if (errors.length > 0) {
|
|
329
|
+
const error = new FDKClientValidationError({
|
|
330
|
+
message: "Missing required field",
|
|
331
|
+
details: errors,
|
|
573
332
|
});
|
|
333
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
574
334
|
}
|
|
575
335
|
|
|
576
336
|
const query_params = {};
|
|
@@ -595,33 +355,13 @@ class Content {
|
|
|
595
355
|
responseData = response[0];
|
|
596
356
|
}
|
|
597
357
|
|
|
598
|
-
const {
|
|
599
|
-
error: res_error,
|
|
600
|
-
} = ContentApplicationModel.FaqSchema().validate(responseData, {
|
|
601
|
-
abortEarly: false,
|
|
602
|
-
allowUnknown: true,
|
|
603
|
-
});
|
|
604
|
-
|
|
605
|
-
if (res_error) {
|
|
606
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
607
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
608
|
-
} else {
|
|
609
|
-
Logger({
|
|
610
|
-
level: "WARN",
|
|
611
|
-
message: `Response Validation Warnings for application > Content > getFaqBySlug \n ${res_error}`,
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
|
|
616
358
|
return response;
|
|
617
359
|
}
|
|
618
360
|
|
|
619
361
|
/**
|
|
620
|
-
* @param {ContentApplicationValidator.GetFaqCategoriesParam} arg - Arg object.
|
|
621
362
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
622
363
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
623
|
-
* @returns {Promise<
|
|
624
|
-
* Success response
|
|
364
|
+
* @returns {Promise<GetFaqCategoriesSchema>} - Success response
|
|
625
365
|
* @name getFaqCategories
|
|
626
366
|
* @summary: List FAQ Categories
|
|
627
367
|
* @description: List categories for organizing FAQs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqCategories/).
|
|
@@ -630,28 +370,6 @@ class Content {
|
|
|
630
370
|
{ requestHeaders } = { requestHeaders: {} },
|
|
631
371
|
{ responseHeaders } = { responseHeaders: false }
|
|
632
372
|
) {
|
|
633
|
-
const { error } = ContentApplicationValidator.getFaqCategories().validate(
|
|
634
|
-
{},
|
|
635
|
-
{ abortEarly: false, allowUnknown: true }
|
|
636
|
-
);
|
|
637
|
-
if (error) {
|
|
638
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
// Showing warrnings if extra unknown parameters are found
|
|
642
|
-
const {
|
|
643
|
-
error: warrning,
|
|
644
|
-
} = ContentApplicationValidator.getFaqCategories().validate(
|
|
645
|
-
{},
|
|
646
|
-
{ abortEarly: false, allowUnknown: false }
|
|
647
|
-
);
|
|
648
|
-
if (warrning) {
|
|
649
|
-
Logger({
|
|
650
|
-
level: "WARN",
|
|
651
|
-
message: `Parameter Validation warrnings for application > Content > getFaqCategories \n ${warrning}`,
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
|
|
655
373
|
const query_params = {};
|
|
656
374
|
|
|
657
375
|
const xHeaders = {};
|
|
@@ -674,33 +392,13 @@ class Content {
|
|
|
674
392
|
responseData = response[0];
|
|
675
393
|
}
|
|
676
394
|
|
|
677
|
-
const {
|
|
678
|
-
error: res_error,
|
|
679
|
-
} = ContentApplicationModel.GetFaqCategoriesSchema().validate(
|
|
680
|
-
responseData,
|
|
681
|
-
{ abortEarly: false, allowUnknown: true }
|
|
682
|
-
);
|
|
683
|
-
|
|
684
|
-
if (res_error) {
|
|
685
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
686
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
687
|
-
} else {
|
|
688
|
-
Logger({
|
|
689
|
-
level: "WARN",
|
|
690
|
-
message: `Response Validation Warnings for application > Content > getFaqCategories \n ${res_error}`,
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
|
|
695
395
|
return response;
|
|
696
396
|
}
|
|
697
397
|
|
|
698
398
|
/**
|
|
699
|
-
* @param {ContentApplicationValidator.GetFaqCategoryBySlugParam} arg - Arg object.
|
|
700
399
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
701
400
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
702
|
-
* @returns {Promise<
|
|
703
|
-
* Success response
|
|
401
|
+
* @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
|
|
704
402
|
* @name getFaqCategoryBySlug
|
|
705
403
|
* @summary: Get a FAQ category
|
|
706
404
|
* @description: Get a specific FAQ category using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqCategoryBySlug/).
|
|
@@ -709,28 +407,13 @@ class Content {
|
|
|
709
407
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
710
408
|
{ responseHeaders } = { responseHeaders: false }
|
|
711
409
|
) {
|
|
712
|
-
const
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
);
|
|
718
|
-
if (error) {
|
|
719
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
// Showing warrnings if extra unknown parameters are found
|
|
723
|
-
const {
|
|
724
|
-
error: warrning,
|
|
725
|
-
} = ContentApplicationValidator.getFaqCategoryBySlug().validate(
|
|
726
|
-
{ slug },
|
|
727
|
-
{ abortEarly: false, allowUnknown: false }
|
|
728
|
-
);
|
|
729
|
-
if (warrning) {
|
|
730
|
-
Logger({
|
|
731
|
-
level: "WARN",
|
|
732
|
-
message: `Parameter Validation warrnings for application > Content > getFaqCategoryBySlug \n ${warrning}`,
|
|
410
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
411
|
+
if (errors.length > 0) {
|
|
412
|
+
const error = new FDKClientValidationError({
|
|
413
|
+
message: "Missing required field",
|
|
414
|
+
details: errors,
|
|
733
415
|
});
|
|
416
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
734
417
|
}
|
|
735
418
|
|
|
736
419
|
const query_params = {};
|
|
@@ -755,32 +438,13 @@ class Content {
|
|
|
755
438
|
responseData = response[0];
|
|
756
439
|
}
|
|
757
440
|
|
|
758
|
-
const {
|
|
759
|
-
error: res_error,
|
|
760
|
-
} = ContentApplicationModel.GetFaqCategoryBySlugSchema().validate(
|
|
761
|
-
responseData,
|
|
762
|
-
{ abortEarly: false, allowUnknown: true }
|
|
763
|
-
);
|
|
764
|
-
|
|
765
|
-
if (res_error) {
|
|
766
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
767
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
768
|
-
} else {
|
|
769
|
-
Logger({
|
|
770
|
-
level: "WARN",
|
|
771
|
-
message: `Response Validation Warnings for application > Content > getFaqCategoryBySlug \n ${res_error}`,
|
|
772
|
-
});
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
|
|
776
441
|
return response;
|
|
777
442
|
}
|
|
778
443
|
|
|
779
444
|
/**
|
|
780
|
-
* @param {ContentApplicationValidator.GetFaqsParam} arg - Arg object.
|
|
781
445
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
782
446
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
783
|
-
* @returns {Promise<
|
|
447
|
+
* @returns {Promise<FaqResponseSchema>} - Success response
|
|
784
448
|
* @name getFaqs
|
|
785
449
|
* @summary: List FAQs
|
|
786
450
|
* @description: List frequently asked questions and answers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqs/).
|
|
@@ -789,26 +453,6 @@ class Content {
|
|
|
789
453
|
{ requestHeaders } = { requestHeaders: {} },
|
|
790
454
|
{ responseHeaders } = { responseHeaders: false }
|
|
791
455
|
) {
|
|
792
|
-
const { error } = ContentApplicationValidator.getFaqs().validate(
|
|
793
|
-
{},
|
|
794
|
-
{ abortEarly: false, allowUnknown: true }
|
|
795
|
-
);
|
|
796
|
-
if (error) {
|
|
797
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
// Showing warrnings if extra unknown parameters are found
|
|
801
|
-
const { error: warrning } = ContentApplicationValidator.getFaqs().validate(
|
|
802
|
-
{},
|
|
803
|
-
{ abortEarly: false, allowUnknown: false }
|
|
804
|
-
);
|
|
805
|
-
if (warrning) {
|
|
806
|
-
Logger({
|
|
807
|
-
level: "WARN",
|
|
808
|
-
message: `Parameter Validation warrnings for application > Content > getFaqs \n ${warrning}`,
|
|
809
|
-
});
|
|
810
|
-
}
|
|
811
|
-
|
|
812
456
|
const query_params = {};
|
|
813
457
|
|
|
814
458
|
const xHeaders = {};
|
|
@@ -831,32 +475,13 @@ class Content {
|
|
|
831
475
|
responseData = response[0];
|
|
832
476
|
}
|
|
833
477
|
|
|
834
|
-
const {
|
|
835
|
-
error: res_error,
|
|
836
|
-
} = ContentApplicationModel.FaqResponseSchema().validate(responseData, {
|
|
837
|
-
abortEarly: false,
|
|
838
|
-
allowUnknown: true,
|
|
839
|
-
});
|
|
840
|
-
|
|
841
|
-
if (res_error) {
|
|
842
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
843
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
844
|
-
} else {
|
|
845
|
-
Logger({
|
|
846
|
-
level: "WARN",
|
|
847
|
-
message: `Response Validation Warnings for application > Content > getFaqs \n ${res_error}`,
|
|
848
|
-
});
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
|
|
852
478
|
return response;
|
|
853
479
|
}
|
|
854
480
|
|
|
855
481
|
/**
|
|
856
|
-
* @param {ContentApplicationValidator.GetFaqsByCategorySlugParam} arg - Arg object.
|
|
857
482
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
858
483
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
859
|
-
* @returns {Promise<
|
|
484
|
+
* @returns {Promise<GetFaqSchema>} - Success response
|
|
860
485
|
* @name getFaqsByCategorySlug
|
|
861
486
|
* @summary: List FAQs by category
|
|
862
487
|
* @description: Get FAQs belonging to a specific category slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqsByCategorySlug/).
|
|
@@ -865,28 +490,13 @@ class Content {
|
|
|
865
490
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
866
491
|
{ responseHeaders } = { responseHeaders: false }
|
|
867
492
|
) {
|
|
868
|
-
const
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
);
|
|
874
|
-
if (error) {
|
|
875
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
// Showing warrnings if extra unknown parameters are found
|
|
879
|
-
const {
|
|
880
|
-
error: warrning,
|
|
881
|
-
} = ContentApplicationValidator.getFaqsByCategorySlug().validate(
|
|
882
|
-
{ slug },
|
|
883
|
-
{ abortEarly: false, allowUnknown: false }
|
|
884
|
-
);
|
|
885
|
-
if (warrning) {
|
|
886
|
-
Logger({
|
|
887
|
-
level: "WARN",
|
|
888
|
-
message: `Parameter Validation warrnings for application > Content > getFaqsByCategorySlug \n ${warrning}`,
|
|
493
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
494
|
+
if (errors.length > 0) {
|
|
495
|
+
const error = new FDKClientValidationError({
|
|
496
|
+
message: "Missing required field",
|
|
497
|
+
details: errors,
|
|
889
498
|
});
|
|
499
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
890
500
|
}
|
|
891
501
|
|
|
892
502
|
const query_params = {};
|
|
@@ -911,32 +521,13 @@ class Content {
|
|
|
911
521
|
responseData = response[0];
|
|
912
522
|
}
|
|
913
523
|
|
|
914
|
-
const {
|
|
915
|
-
error: res_error,
|
|
916
|
-
} = ContentApplicationModel.GetFaqSchema().validate(responseData, {
|
|
917
|
-
abortEarly: false,
|
|
918
|
-
allowUnknown: true,
|
|
919
|
-
});
|
|
920
|
-
|
|
921
|
-
if (res_error) {
|
|
922
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
923
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
924
|
-
} else {
|
|
925
|
-
Logger({
|
|
926
|
-
level: "WARN",
|
|
927
|
-
message: `Response Validation Warnings for application > Content > getFaqsByCategorySlug \n ${res_error}`,
|
|
928
|
-
});
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
|
|
932
524
|
return response;
|
|
933
525
|
}
|
|
934
526
|
|
|
935
527
|
/**
|
|
936
|
-
* @param {ContentApplicationValidator.GetLandingPageParam} arg - Arg object.
|
|
937
528
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
938
529
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
939
|
-
* @returns {Promise<
|
|
530
|
+
* @returns {Promise<LandingPageSchema>} - Success response
|
|
940
531
|
* @name getLandingPage
|
|
941
532
|
* @summary: Get a landing page
|
|
942
533
|
* @description: Get content of the application's landing page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getLandingPage/).
|
|
@@ -945,28 +536,6 @@ class Content {
|
|
|
945
536
|
{ requestHeaders } = { requestHeaders: {} },
|
|
946
537
|
{ responseHeaders } = { responseHeaders: false }
|
|
947
538
|
) {
|
|
948
|
-
const { error } = ContentApplicationValidator.getLandingPage().validate(
|
|
949
|
-
{},
|
|
950
|
-
{ abortEarly: false, allowUnknown: true }
|
|
951
|
-
);
|
|
952
|
-
if (error) {
|
|
953
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
// Showing warrnings if extra unknown parameters are found
|
|
957
|
-
const {
|
|
958
|
-
error: warrning,
|
|
959
|
-
} = ContentApplicationValidator.getLandingPage().validate(
|
|
960
|
-
{},
|
|
961
|
-
{ abortEarly: false, allowUnknown: false }
|
|
962
|
-
);
|
|
963
|
-
if (warrning) {
|
|
964
|
-
Logger({
|
|
965
|
-
level: "WARN",
|
|
966
|
-
message: `Parameter Validation warrnings for application > Content > getLandingPage \n ${warrning}`,
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
|
|
970
539
|
const query_params = {};
|
|
971
540
|
|
|
972
541
|
const xHeaders = {};
|
|
@@ -989,32 +558,13 @@ class Content {
|
|
|
989
558
|
responseData = response[0];
|
|
990
559
|
}
|
|
991
560
|
|
|
992
|
-
const {
|
|
993
|
-
error: res_error,
|
|
994
|
-
} = ContentApplicationModel.LandingPageSchema().validate(responseData, {
|
|
995
|
-
abortEarly: false,
|
|
996
|
-
allowUnknown: true,
|
|
997
|
-
});
|
|
998
|
-
|
|
999
|
-
if (res_error) {
|
|
1000
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1001
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1002
|
-
} else {
|
|
1003
|
-
Logger({
|
|
1004
|
-
level: "WARN",
|
|
1005
|
-
message: `Response Validation Warnings for application > Content > getLandingPage \n ${res_error}`,
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
561
|
return response;
|
|
1011
562
|
}
|
|
1012
563
|
|
|
1013
564
|
/**
|
|
1014
|
-
* @param {ContentApplicationValidator.GetLegalInformationParam} arg - Arg object.
|
|
1015
565
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1016
566
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1017
|
-
* @returns {Promise<
|
|
567
|
+
* @returns {Promise<ApplicationLegal>} - Success response
|
|
1018
568
|
* @name getLegalInformation
|
|
1019
569
|
* @summary: Get legal information
|
|
1020
570
|
* @description: Get legal policies for an application which includes Terms and conditions, return policy, shipping policy and privacy policy. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getLegalInformation/).
|
|
@@ -1023,30 +573,6 @@ class Content {
|
|
|
1023
573
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1024
574
|
{ responseHeaders } = { responseHeaders: false }
|
|
1025
575
|
) {
|
|
1026
|
-
const {
|
|
1027
|
-
error,
|
|
1028
|
-
} = ContentApplicationValidator.getLegalInformation().validate(
|
|
1029
|
-
{},
|
|
1030
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1031
|
-
);
|
|
1032
|
-
if (error) {
|
|
1033
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1037
|
-
const {
|
|
1038
|
-
error: warrning,
|
|
1039
|
-
} = ContentApplicationValidator.getLegalInformation().validate(
|
|
1040
|
-
{},
|
|
1041
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1042
|
-
);
|
|
1043
|
-
if (warrning) {
|
|
1044
|
-
Logger({
|
|
1045
|
-
level: "WARN",
|
|
1046
|
-
message: `Parameter Validation warrnings for application > Content > getLegalInformation \n ${warrning}`,
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
576
|
const query_params = {};
|
|
1051
577
|
|
|
1052
578
|
const xHeaders = {};
|
|
@@ -1069,32 +595,13 @@ class Content {
|
|
|
1069
595
|
responseData = response[0];
|
|
1070
596
|
}
|
|
1071
597
|
|
|
1072
|
-
const {
|
|
1073
|
-
error: res_error,
|
|
1074
|
-
} = ContentApplicationModel.ApplicationLegal().validate(responseData, {
|
|
1075
|
-
abortEarly: false,
|
|
1076
|
-
allowUnknown: true,
|
|
1077
|
-
});
|
|
1078
|
-
|
|
1079
|
-
if (res_error) {
|
|
1080
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1081
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1082
|
-
} else {
|
|
1083
|
-
Logger({
|
|
1084
|
-
level: "WARN",
|
|
1085
|
-
message: `Response Validation Warnings for application > Content > getLegalInformation \n ${res_error}`,
|
|
1086
|
-
});
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
598
|
return response;
|
|
1091
599
|
}
|
|
1092
600
|
|
|
1093
601
|
/**
|
|
1094
|
-
* @param {ContentApplicationValidator.GetNavigationsParam} arg - Arg object.
|
|
1095
602
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1096
603
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1097
|
-
* @returns {Promise<
|
|
604
|
+
* @returns {Promise<NavigationGetResponse>} - Success response
|
|
1098
605
|
* @name getNavigations
|
|
1099
606
|
* @summary: List navigation items
|
|
1100
607
|
* @description: Get the navigation link items which can be powered to generate menus on application's website or equivalent mobile apps. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getNavigations/).
|
|
@@ -1103,28 +610,6 @@ class Content {
|
|
|
1103
610
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1104
611
|
{ responseHeaders } = { responseHeaders: false }
|
|
1105
612
|
) {
|
|
1106
|
-
const { error } = ContentApplicationValidator.getNavigations().validate(
|
|
1107
|
-
{ pageNo, pageSize },
|
|
1108
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1109
|
-
);
|
|
1110
|
-
if (error) {
|
|
1111
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1115
|
-
const {
|
|
1116
|
-
error: warrning,
|
|
1117
|
-
} = ContentApplicationValidator.getNavigations().validate(
|
|
1118
|
-
{ pageNo, pageSize },
|
|
1119
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1120
|
-
);
|
|
1121
|
-
if (warrning) {
|
|
1122
|
-
Logger({
|
|
1123
|
-
level: "WARN",
|
|
1124
|
-
message: `Parameter Validation warrnings for application > Content > getNavigations \n ${warrning}`,
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
613
|
const query_params = {};
|
|
1129
614
|
query_params["page_no"] = pageNo;
|
|
1130
615
|
query_params["page_size"] = pageSize;
|
|
@@ -1149,32 +634,13 @@ class Content {
|
|
|
1149
634
|
responseData = response[0];
|
|
1150
635
|
}
|
|
1151
636
|
|
|
1152
|
-
const {
|
|
1153
|
-
error: res_error,
|
|
1154
|
-
} = ContentApplicationModel.NavigationGetDetails().validate(responseData, {
|
|
1155
|
-
abortEarly: false,
|
|
1156
|
-
allowUnknown: true,
|
|
1157
|
-
});
|
|
1158
|
-
|
|
1159
|
-
if (res_error) {
|
|
1160
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1161
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1162
|
-
} else {
|
|
1163
|
-
Logger({
|
|
1164
|
-
level: "WARN",
|
|
1165
|
-
message: `Response Validation Warnings for application > Content > getNavigations \n ${res_error}`,
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
637
|
return response;
|
|
1171
638
|
}
|
|
1172
639
|
|
|
1173
640
|
/**
|
|
1174
|
-
* @param {ContentApplicationValidator.GetPageParam} arg - Arg object.
|
|
1175
641
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1176
642
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1177
|
-
* @returns {Promise<
|
|
643
|
+
* @returns {Promise<PageSchema>} - Success response
|
|
1178
644
|
* @name getPage
|
|
1179
645
|
* @summary: Get a page
|
|
1180
646
|
* @description: Get detailed information for a specific page within the theme. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getPage/).
|
|
@@ -1183,24 +649,13 @@ class Content {
|
|
|
1183
649
|
{ slug, rootId, requestHeaders } = { requestHeaders: {} },
|
|
1184
650
|
{ responseHeaders } = { responseHeaders: false }
|
|
1185
651
|
) {
|
|
1186
|
-
const
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1195
|
-
const { error: warrning } = ContentApplicationValidator.getPage().validate(
|
|
1196
|
-
{ slug, rootId },
|
|
1197
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1198
|
-
);
|
|
1199
|
-
if (warrning) {
|
|
1200
|
-
Logger({
|
|
1201
|
-
level: "WARN",
|
|
1202
|
-
message: `Parameter Validation warrnings for application > Content > getPage \n ${warrning}`,
|
|
652
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
653
|
+
if (errors.length > 0) {
|
|
654
|
+
const error = new FDKClientValidationError({
|
|
655
|
+
message: "Missing required field",
|
|
656
|
+
details: errors,
|
|
1203
657
|
});
|
|
658
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1204
659
|
}
|
|
1205
660
|
|
|
1206
661
|
const query_params = {};
|
|
@@ -1226,32 +681,13 @@ class Content {
|
|
|
1226
681
|
responseData = response[0];
|
|
1227
682
|
}
|
|
1228
683
|
|
|
1229
|
-
const {
|
|
1230
|
-
error: res_error,
|
|
1231
|
-
} = ContentApplicationModel.PageSchema().validate(responseData, {
|
|
1232
|
-
abortEarly: false,
|
|
1233
|
-
allowUnknown: true,
|
|
1234
|
-
});
|
|
1235
|
-
|
|
1236
|
-
if (res_error) {
|
|
1237
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1238
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1239
|
-
} else {
|
|
1240
|
-
Logger({
|
|
1241
|
-
level: "WARN",
|
|
1242
|
-
message: `Response Validation Warnings for application > Content > getPage \n ${res_error}`,
|
|
1243
|
-
});
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
684
|
return response;
|
|
1248
685
|
}
|
|
1249
686
|
|
|
1250
687
|
/**
|
|
1251
|
-
* @param {ContentApplicationValidator.GetPagesParam} arg - Arg object.
|
|
1252
688
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1253
689
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1254
|
-
* @returns {Promise<
|
|
690
|
+
* @returns {Promise<PageGetResponse>} - Success response
|
|
1255
691
|
* @name getPages
|
|
1256
692
|
* @summary: Lists pages
|
|
1257
693
|
* @description: Lists all Custom Pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getPages/).
|
|
@@ -1260,26 +696,6 @@ class Content {
|
|
|
1260
696
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1261
697
|
{ responseHeaders } = { responseHeaders: false }
|
|
1262
698
|
) {
|
|
1263
|
-
const { error } = ContentApplicationValidator.getPages().validate(
|
|
1264
|
-
{ pageNo, pageSize },
|
|
1265
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1266
|
-
);
|
|
1267
|
-
if (error) {
|
|
1268
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1272
|
-
const { error: warrning } = ContentApplicationValidator.getPages().validate(
|
|
1273
|
-
{ pageNo, pageSize },
|
|
1274
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1275
|
-
);
|
|
1276
|
-
if (warrning) {
|
|
1277
|
-
Logger({
|
|
1278
|
-
level: "WARN",
|
|
1279
|
-
message: `Parameter Validation warrnings for application > Content > getPages \n ${warrning}`,
|
|
1280
|
-
});
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
699
|
const query_params = {};
|
|
1284
700
|
query_params["page_no"] = pageNo;
|
|
1285
701
|
query_params["page_size"] = pageSize;
|
|
@@ -1304,32 +720,13 @@ class Content {
|
|
|
1304
720
|
responseData = response[0];
|
|
1305
721
|
}
|
|
1306
722
|
|
|
1307
|
-
const {
|
|
1308
|
-
error: res_error,
|
|
1309
|
-
} = ContentApplicationModel.PageGetDetails().validate(responseData, {
|
|
1310
|
-
abortEarly: false,
|
|
1311
|
-
allowUnknown: true,
|
|
1312
|
-
});
|
|
1313
|
-
|
|
1314
|
-
if (res_error) {
|
|
1315
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1316
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1317
|
-
} else {
|
|
1318
|
-
Logger({
|
|
1319
|
-
level: "WARN",
|
|
1320
|
-
message: `Response Validation Warnings for application > Content > getPages \n ${res_error}`,
|
|
1321
|
-
});
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
723
|
return response;
|
|
1326
724
|
}
|
|
1327
725
|
|
|
1328
726
|
/**
|
|
1329
|
-
* @param {ContentApplicationValidator.GetSEOConfigurationParam} arg - Arg object.
|
|
1330
727
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1331
728
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1332
|
-
* @returns {Promise<
|
|
729
|
+
* @returns {Promise<SeoComponent>} - Success response
|
|
1333
730
|
* @name getSEOConfiguration
|
|
1334
731
|
* @summary: Get SEO settings
|
|
1335
732
|
* @description: Get search engine optimization configurations of an application. Details include the title, description and an image. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSEOConfiguration/).
|
|
@@ -1338,30 +735,6 @@ class Content {
|
|
|
1338
735
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1339
736
|
{ responseHeaders } = { responseHeaders: false }
|
|
1340
737
|
) {
|
|
1341
|
-
const {
|
|
1342
|
-
error,
|
|
1343
|
-
} = ContentApplicationValidator.getSEOConfiguration().validate(
|
|
1344
|
-
{},
|
|
1345
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1346
|
-
);
|
|
1347
|
-
if (error) {
|
|
1348
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1352
|
-
const {
|
|
1353
|
-
error: warrning,
|
|
1354
|
-
} = ContentApplicationValidator.getSEOConfiguration().validate(
|
|
1355
|
-
{},
|
|
1356
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1357
|
-
);
|
|
1358
|
-
if (warrning) {
|
|
1359
|
-
Logger({
|
|
1360
|
-
level: "WARN",
|
|
1361
|
-
message: `Parameter Validation warrnings for application > Content > getSEOConfiguration \n ${warrning}`,
|
|
1362
|
-
});
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
738
|
const query_params = {};
|
|
1366
739
|
|
|
1367
740
|
const xHeaders = {};
|
|
@@ -1384,32 +757,13 @@ class Content {
|
|
|
1384
757
|
responseData = response[0];
|
|
1385
758
|
}
|
|
1386
759
|
|
|
1387
|
-
const {
|
|
1388
|
-
error: res_error,
|
|
1389
|
-
} = ContentApplicationModel.SeoComponent().validate(responseData, {
|
|
1390
|
-
abortEarly: false,
|
|
1391
|
-
allowUnknown: true,
|
|
1392
|
-
});
|
|
1393
|
-
|
|
1394
|
-
if (res_error) {
|
|
1395
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1396
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1397
|
-
} else {
|
|
1398
|
-
Logger({
|
|
1399
|
-
level: "WARN",
|
|
1400
|
-
message: `Response Validation Warnings for application > Content > getSEOConfiguration \n ${res_error}`,
|
|
1401
|
-
});
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
760
|
return response;
|
|
1406
761
|
}
|
|
1407
762
|
|
|
1408
763
|
/**
|
|
1409
|
-
* @param {ContentApplicationValidator.GetSEOMarkupSchemasParam} arg - Arg object.
|
|
1410
764
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1411
765
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1412
|
-
* @returns {Promise<
|
|
766
|
+
* @returns {Promise<SeoSchemaComponent>} - Success response
|
|
1413
767
|
* @name getSEOMarkupSchemas
|
|
1414
768
|
* @summary: List SEO Markup schemas
|
|
1415
769
|
* @description: Get all SEO Markup schema Templates setup for an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSEOMarkupSchemas/).
|
|
@@ -1418,30 +772,6 @@ class Content {
|
|
|
1418
772
|
{ pageType, active, requestHeaders } = { requestHeaders: {} },
|
|
1419
773
|
{ responseHeaders } = { responseHeaders: false }
|
|
1420
774
|
) {
|
|
1421
|
-
const {
|
|
1422
|
-
error,
|
|
1423
|
-
} = ContentApplicationValidator.getSEOMarkupSchemas().validate(
|
|
1424
|
-
{ pageType, active },
|
|
1425
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1426
|
-
);
|
|
1427
|
-
if (error) {
|
|
1428
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1432
|
-
const {
|
|
1433
|
-
error: warrning,
|
|
1434
|
-
} = ContentApplicationValidator.getSEOMarkupSchemas().validate(
|
|
1435
|
-
{ pageType, active },
|
|
1436
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1437
|
-
);
|
|
1438
|
-
if (warrning) {
|
|
1439
|
-
Logger({
|
|
1440
|
-
level: "WARN",
|
|
1441
|
-
message: `Parameter Validation warrnings for application > Content > getSEOMarkupSchemas \n ${warrning}`,
|
|
1442
|
-
});
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
775
|
const query_params = {};
|
|
1446
776
|
query_params["page_type"] = pageType;
|
|
1447
777
|
query_params["active"] = active;
|
|
@@ -1466,32 +796,13 @@ class Content {
|
|
|
1466
796
|
responseData = response[0];
|
|
1467
797
|
}
|
|
1468
798
|
|
|
1469
|
-
const {
|
|
1470
|
-
error: res_error,
|
|
1471
|
-
} = ContentApplicationModel.SeoSchemaComponent().validate(responseData, {
|
|
1472
|
-
abortEarly: false,
|
|
1473
|
-
allowUnknown: true,
|
|
1474
|
-
});
|
|
1475
|
-
|
|
1476
|
-
if (res_error) {
|
|
1477
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1478
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1479
|
-
} else {
|
|
1480
|
-
Logger({
|
|
1481
|
-
level: "WARN",
|
|
1482
|
-
message: `Response Validation Warnings for application > Content > getSEOMarkupSchemas \n ${res_error}`,
|
|
1483
|
-
});
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
799
|
return response;
|
|
1488
800
|
}
|
|
1489
801
|
|
|
1490
802
|
/**
|
|
1491
|
-
* @param {ContentApplicationValidator.GetSlideshowParam} arg - Arg object.
|
|
1492
803
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1493
804
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1494
|
-
* @returns {Promise<
|
|
805
|
+
* @returns {Promise<SlideshowSchema>} - Success response
|
|
1495
806
|
* @name getSlideshow
|
|
1496
807
|
* @summary: Get a Slideshow
|
|
1497
808
|
* @description: Get a slideshow using its `slug`. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshow/).
|
|
@@ -1500,26 +811,13 @@ class Content {
|
|
|
1500
811
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1501
812
|
{ responseHeaders } = { responseHeaders: false }
|
|
1502
813
|
) {
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1512
|
-
const {
|
|
1513
|
-
error: warrning,
|
|
1514
|
-
} = ContentApplicationValidator.getSlideshow().validate(
|
|
1515
|
-
{ slug },
|
|
1516
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1517
|
-
);
|
|
1518
|
-
if (warrning) {
|
|
1519
|
-
Logger({
|
|
1520
|
-
level: "WARN",
|
|
1521
|
-
message: `Parameter Validation warrnings for application > Content > getSlideshow \n ${warrning}`,
|
|
814
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
815
|
+
if (errors.length > 0) {
|
|
816
|
+
const error = new FDKClientValidationError({
|
|
817
|
+
message: "Missing required field",
|
|
818
|
+
details: errors,
|
|
1522
819
|
});
|
|
820
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1523
821
|
}
|
|
1524
822
|
|
|
1525
823
|
const query_params = {};
|
|
@@ -1544,32 +842,13 @@ class Content {
|
|
|
1544
842
|
responseData = response[0];
|
|
1545
843
|
}
|
|
1546
844
|
|
|
1547
|
-
const {
|
|
1548
|
-
error: res_error,
|
|
1549
|
-
} = ContentApplicationModel.SlideshowSchema().validate(responseData, {
|
|
1550
|
-
abortEarly: false,
|
|
1551
|
-
allowUnknown: true,
|
|
1552
|
-
});
|
|
1553
|
-
|
|
1554
|
-
if (res_error) {
|
|
1555
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1556
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1557
|
-
} else {
|
|
1558
|
-
Logger({
|
|
1559
|
-
level: "WARN",
|
|
1560
|
-
message: `Response Validation Warnings for application > Content > getSlideshow \n ${res_error}`,
|
|
1561
|
-
});
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
845
|
return response;
|
|
1566
846
|
}
|
|
1567
847
|
|
|
1568
848
|
/**
|
|
1569
|
-
* @param {ContentApplicationValidator.GetSlideshowsParam} arg - Arg object.
|
|
1570
849
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1571
850
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1572
|
-
* @returns {Promise<
|
|
851
|
+
* @returns {Promise<SlideshowGetResponse>} - Success response
|
|
1573
852
|
* @name getSlideshows
|
|
1574
853
|
* @summary: List Slideshows
|
|
1575
854
|
* @description: List slideshows along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshows/).
|
|
@@ -1578,28 +857,6 @@ class Content {
|
|
|
1578
857
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1579
858
|
{ responseHeaders } = { responseHeaders: false }
|
|
1580
859
|
) {
|
|
1581
|
-
const { error } = ContentApplicationValidator.getSlideshows().validate(
|
|
1582
|
-
{ pageNo, pageSize },
|
|
1583
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1584
|
-
);
|
|
1585
|
-
if (error) {
|
|
1586
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1587
|
-
}
|
|
1588
|
-
|
|
1589
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1590
|
-
const {
|
|
1591
|
-
error: warrning,
|
|
1592
|
-
} = ContentApplicationValidator.getSlideshows().validate(
|
|
1593
|
-
{ pageNo, pageSize },
|
|
1594
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1595
|
-
);
|
|
1596
|
-
if (warrning) {
|
|
1597
|
-
Logger({
|
|
1598
|
-
level: "WARN",
|
|
1599
|
-
message: `Parameter Validation warrnings for application > Content > getSlideshows \n ${warrning}`,
|
|
1600
|
-
});
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
860
|
const query_params = {};
|
|
1604
861
|
query_params["page_no"] = pageNo;
|
|
1605
862
|
query_params["page_size"] = pageSize;
|
|
@@ -1624,32 +881,40 @@ class Content {
|
|
|
1624
881
|
responseData = response[0];
|
|
1625
882
|
}
|
|
1626
883
|
|
|
1627
|
-
const {
|
|
1628
|
-
error: res_error,
|
|
1629
|
-
} = ContentApplicationModel.SlideshowGetDetails().validate(responseData, {
|
|
1630
|
-
abortEarly: false,
|
|
1631
|
-
allowUnknown: true,
|
|
1632
|
-
});
|
|
1633
|
-
|
|
1634
|
-
if (res_error) {
|
|
1635
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1636
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1637
|
-
} else {
|
|
1638
|
-
Logger({
|
|
1639
|
-
level: "WARN",
|
|
1640
|
-
message: `Response Validation Warnings for application > Content > getSlideshows \n ${res_error}`,
|
|
1641
|
-
});
|
|
1642
|
-
}
|
|
1643
|
-
}
|
|
1644
|
-
|
|
1645
884
|
return response;
|
|
1646
885
|
}
|
|
1647
886
|
|
|
1648
887
|
/**
|
|
1649
|
-
* @param {
|
|
888
|
+
* @param {Object} arg - Arg object.
|
|
889
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
890
|
+
* @returns {Paginator<SlideshowGetResponse>}
|
|
891
|
+
* @summary: List Slideshows
|
|
892
|
+
* @description: List slideshows along with their details.
|
|
893
|
+
*/
|
|
894
|
+
getSlideshowsPaginator({ pageSize } = {}) {
|
|
895
|
+
const paginator = new Paginator();
|
|
896
|
+
const callback = async () => {
|
|
897
|
+
const pageId = paginator.nextId;
|
|
898
|
+
const pageNo = paginator.pageNo;
|
|
899
|
+
const pageType = "number";
|
|
900
|
+
const data = await this.getSlideshows({
|
|
901
|
+
pageNo: pageNo,
|
|
902
|
+
pageSize: pageSize,
|
|
903
|
+
});
|
|
904
|
+
paginator.setPaginator({
|
|
905
|
+
hasNext: data.page.has_next ? true : false,
|
|
906
|
+
nextId: data.page.next_id,
|
|
907
|
+
});
|
|
908
|
+
return data;
|
|
909
|
+
};
|
|
910
|
+
paginator.setCallback(callback.bind(this));
|
|
911
|
+
return paginator;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
/**
|
|
1650
915
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1651
916
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1652
|
-
* @returns {Promise<
|
|
917
|
+
* @returns {Promise<Support>} - Success response
|
|
1653
918
|
* @name getSupportInformation
|
|
1654
919
|
* @summary: Get customer support information
|
|
1655
920
|
* @description: Get customer support contact details. Contact Details can be either a phone number or an email-id or both. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSupportInformation/).
|
|
@@ -1658,30 +923,6 @@ class Content {
|
|
|
1658
923
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1659
924
|
{ responseHeaders } = { responseHeaders: false }
|
|
1660
925
|
) {
|
|
1661
|
-
const {
|
|
1662
|
-
error,
|
|
1663
|
-
} = ContentApplicationValidator.getSupportInformation().validate(
|
|
1664
|
-
{},
|
|
1665
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1666
|
-
);
|
|
1667
|
-
if (error) {
|
|
1668
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1672
|
-
const {
|
|
1673
|
-
error: warrning,
|
|
1674
|
-
} = ContentApplicationValidator.getSupportInformation().validate(
|
|
1675
|
-
{},
|
|
1676
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1677
|
-
);
|
|
1678
|
-
if (warrning) {
|
|
1679
|
-
Logger({
|
|
1680
|
-
level: "WARN",
|
|
1681
|
-
message: `Parameter Validation warrnings for application > Content > getSupportInformation \n ${warrning}`,
|
|
1682
|
-
});
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
926
|
const query_params = {};
|
|
1686
927
|
|
|
1687
928
|
const xHeaders = {};
|
|
@@ -1704,32 +945,13 @@ class Content {
|
|
|
1704
945
|
responseData = response[0];
|
|
1705
946
|
}
|
|
1706
947
|
|
|
1707
|
-
const {
|
|
1708
|
-
error: res_error,
|
|
1709
|
-
} = ContentApplicationModel.Support().validate(responseData, {
|
|
1710
|
-
abortEarly: false,
|
|
1711
|
-
allowUnknown: true,
|
|
1712
|
-
});
|
|
1713
|
-
|
|
1714
|
-
if (res_error) {
|
|
1715
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1716
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1717
|
-
} else {
|
|
1718
|
-
Logger({
|
|
1719
|
-
level: "WARN",
|
|
1720
|
-
message: `Response Validation Warnings for application > Content > getSupportInformation \n ${res_error}`,
|
|
1721
|
-
});
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
948
|
return response;
|
|
1726
949
|
}
|
|
1727
950
|
|
|
1728
951
|
/**
|
|
1729
|
-
* @param {ContentApplicationValidator.GetTagsParam} arg - Arg object.
|
|
1730
952
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1731
953
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1732
|
-
* @returns {Promise<
|
|
954
|
+
* @returns {Promise<TagsSchema>} - Success response
|
|
1733
955
|
* @name getTags
|
|
1734
956
|
* @summary: Get HTML tags
|
|
1735
957
|
* @description: Lists HTML tags to power additional functionalities within an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getTags/).
|
|
@@ -1738,26 +960,6 @@ class Content {
|
|
|
1738
960
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1739
961
|
{ responseHeaders } = { responseHeaders: false }
|
|
1740
962
|
) {
|
|
1741
|
-
const { error } = ContentApplicationValidator.getTags().validate(
|
|
1742
|
-
{},
|
|
1743
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1744
|
-
);
|
|
1745
|
-
if (error) {
|
|
1746
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1747
|
-
}
|
|
1748
|
-
|
|
1749
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1750
|
-
const { error: warrning } = ContentApplicationValidator.getTags().validate(
|
|
1751
|
-
{},
|
|
1752
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1753
|
-
);
|
|
1754
|
-
if (warrning) {
|
|
1755
|
-
Logger({
|
|
1756
|
-
level: "WARN",
|
|
1757
|
-
message: `Parameter Validation warrnings for application > Content > getTags \n ${warrning}`,
|
|
1758
|
-
});
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
963
|
const query_params = {};
|
|
1762
964
|
|
|
1763
965
|
const xHeaders = {};
|
|
@@ -1780,24 +982,6 @@ class Content {
|
|
|
1780
982
|
responseData = response[0];
|
|
1781
983
|
}
|
|
1782
984
|
|
|
1783
|
-
const {
|
|
1784
|
-
error: res_error,
|
|
1785
|
-
} = ContentApplicationModel.TagsSchema().validate(responseData, {
|
|
1786
|
-
abortEarly: false,
|
|
1787
|
-
allowUnknown: true,
|
|
1788
|
-
});
|
|
1789
|
-
|
|
1790
|
-
if (res_error) {
|
|
1791
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1792
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1793
|
-
} else {
|
|
1794
|
-
Logger({
|
|
1795
|
-
level: "WARN",
|
|
1796
|
-
message: `Response Validation Warnings for application > Content > getTags \n ${res_error}`,
|
|
1797
|
-
});
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
985
|
return response;
|
|
1802
986
|
}
|
|
1803
987
|
}
|