@gofynd/fdk-client-javascript 1.4.15-beta.2 → 1.4.15
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 +2 -0
- package/sdk/application/ApplicationClient.js +2 -18
- package/sdk/application/Cart/CartApplicationClient.d.ts +75 -90
- package/sdk/application/Cart/CartApplicationClient.js +108 -1199
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +81 -142
- package/sdk/application/Catalog/CatalogApplicationClient.js +41 -1344
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -8
- package/sdk/application/Common/CommonApplicationClient.js +2 -92
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +6 -19
- package/sdk/application/Communication/CommunicationApplicationClient.js +3 -148
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +32 -73
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +16 -727
- package/sdk/application/Content/ContentApplicationClient.d.ts +48 -111
- package/sdk/application/Content/ContentApplicationClient.js +43 -1065
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -13
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +8 -138
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +105 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +10 -18
- package/sdk/application/Lead/LeadApplicationClient.js +5 -217
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +42 -39
- package/sdk/application/Logistic/LogisticApplicationClient.js +91 -493
- package/sdk/application/Order/OrderApplicationClient.d.ts +36 -46
- package/sdk/application/Order/OrderApplicationClient.js +52 -507
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +103 -213
- package/sdk/application/Payment/PaymentApplicationClient.js +84 -2105
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +15 -29
- package/sdk/application/Rewards/RewardsApplicationClient.js +8 -312
- package/sdk/application/Share/ShareApplicationClient.d.ts +14 -24
- package/sdk/application/Share/ShareApplicationClient.js +7 -309
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +8 -14
- package/sdk/application/Theme/ThemeApplicationClient.js +8 -176
- package/sdk/application/User/UserApplicationClient.d.ts +87 -138
- package/sdk/application/User/UserApplicationClient.js +44 -1820
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -7
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -52
- package/sdk/application/index.d.ts +0 -18
- package/sdk/application/index.js +0 -33
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +86 -12
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +582 -24
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +116 -19
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +121 -14
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +8 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +51 -4
- 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 +157 -30
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1177 -56
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1662 -249
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +774 -162
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +141 -12
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +8 -10
- package/sdk/partner/Theme/ThemePartnerClient.js +14 -16
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +96 -37
- package/sdk/partner/Theme/ThemePartnerModel.js +90 -36
- package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +28 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +103 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +612 -179
- package/sdk/partner/Webhook/WebhookPartnerModel.js +253 -150
- package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +1 -0
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +11 -3
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +14 -8
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +59 -9
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +40 -4
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +11 -130
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +12 -152
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +134 -103
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +407 -112
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +111 -65
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +106 -44
- package/sdk/platform/Cart/CartPlatformModel.d.ts +5060 -1300
- package/sdk/platform/Cart/CartPlatformModel.js +1985 -1217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +209 -183
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +452 -395
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +185 -142
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +96 -78
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +178 -117
- package/sdk/platform/Catalog/CatalogPlatformClient.js +468 -172
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6554 -1772
- package/sdk/platform/Catalog/CatalogPlatformModel.js +3264 -1690
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +116 -31
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +85 -24
- package/sdk/platform/Common/CommonPlatformClient.d.ts +3 -2
- package/sdk/platform/Common/CommonPlatformClient.js +3 -2
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +16 -17
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +43 -33
- package/sdk/platform/Communication/CommunicationPlatformModel.js +38 -34
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +46 -42
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +47 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +210 -212
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +46 -33
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +67 -54
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +45 -24
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +134 -30
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +283 -124
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +219 -94
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +122 -191
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +447 -831
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +174 -220
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +164 -199
- package/sdk/platform/Content/ContentPlatformClient.d.ts +142 -106
- package/sdk/platform/Content/ContentPlatformClient.js +523 -336
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1233 -476
- package/sdk/platform/Content/ContentPlatformModel.js +514 -487
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +168 -117
- package/sdk/platform/Content/ContentPlatformValidator.js +162 -108
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +14 -12
- package/sdk/platform/Discount/DiscountPlatformClient.js +14 -12
- 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 +94 -36
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +462 -60
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +62 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +75 -13
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +370 -101
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +313 -84
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- 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 +17 -6
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +85 -7
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +95 -24
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +39 -19
- package/sdk/platform/Order/OrderPlatformClient.d.ts +153 -96
- package/sdk/platform/Order/OrderPlatformClient.js +424 -198
- package/sdk/platform/Order/OrderPlatformModel.d.ts +7747 -1342
- package/sdk/platform/Order/OrderPlatformModel.js +3960 -1262
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +292 -109
- package/sdk/platform/Order/OrderPlatformValidator.js +145 -77
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +93 -105
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +129 -141
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
- package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +333 -319
- package/sdk/platform/Payment/PaymentPlatformModel.js +288 -278
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
- package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- 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 +46 -36
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +132 -41
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +46 -17
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +34 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +132 -44
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +681 -64
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +2458 -650
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1266 -572
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +176 -47
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -28
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
- package/sdk/platform/Share/SharePlatformModel.d.ts +36 -5
- package/sdk/platform/Share/SharePlatformModel.js +27 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +8 -4
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +5 -0
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +2 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +37 -11
- package/sdk/platform/Theme/ThemePlatformModel.js +33 -15
- 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 +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +720 -427
- package/sdk/platform/Webhook/WebhookPlatformModel.js +410 -386
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +3 -2
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -7
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
- package/sdk/public/Content/ContentPublicClient.d.ts +112 -2
- package/sdk/public/Content/ContentPublicClient.js +795 -7
- package/sdk/public/Content/ContentPublicModel.d.ts +549 -3
- package/sdk/public/Content/ContentPublicModel.js +649 -3
- package/sdk/public/Content/ContentPublicValidator.d.ts +69 -3
- package/sdk/public/Content/ContentPublicValidator.js +88 -2
- package/sdk/public/Partner/PartnerPublicClient.js +4 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +12 -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 -3994
- package/sdk/application/Cart/CartApplicationModel.js +0 -2497
- package/sdk/application/Cart/CartApplicationValidator.d.ts +0 -769
- package/sdk/application/Cart/CartApplicationValidator.js +0 -530
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +0 -3857
- package/sdk/application/Catalog/CatalogApplicationModel.js +0 -2629
- 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 -2556
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -1887
- 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 -2133
- package/sdk/application/Content/ContentApplicationModel.js +0 -1589
- package/sdk/application/Content/ContentApplicationValidator.d.ts +0 -284
- package/sdk/application/Content/ContentApplicationValidator.js +0 -264
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +0 -272
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -190
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +0 -56
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +0 -53
- 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 -1675
- package/sdk/application/Logistic/LogisticApplicationModel.js +0 -1121
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +0 -254
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -190
- package/sdk/application/Order/OrderApplicationModel.d.ts +0 -2296
- package/sdk/application/Order/OrderApplicationModel.js +0 -1471
- package/sdk/application/Order/OrderApplicationValidator.d.ts +0 -265
- package/sdk/application/Order/OrderApplicationValidator.js +0 -197
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +0 -4058
- package/sdk/application/Payment/PaymentApplicationModel.js +0 -2630
- 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 -1713
- package/sdk/application/Theme/ThemeApplicationModel.js +0 -1426
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +0 -66
- package/sdk/application/Theme/ThemeApplicationValidator.js +0 -58
- 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 -52
- package/sdk/application/Webhook/WebhookApplicationModel.js +0 -46
- 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
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
2
|
-
const {
|
|
3
|
-
FDKClientValidationError,
|
|
4
|
-
FDKResponseValidationError,
|
|
5
|
-
} = require("../../common/FDKError");
|
|
6
2
|
const constructUrl = require("../constructUrl");
|
|
7
3
|
const Paginator = require("../../common/Paginator");
|
|
8
|
-
const ContentApplicationValidator = require("./ContentApplicationValidator");
|
|
9
|
-
const ContentApplicationModel = require("./ContentApplicationModel");
|
|
10
|
-
const { Logger } = require("./../../common/Logger");
|
|
11
|
-
const Joi = require("joi");
|
|
12
4
|
|
|
13
5
|
class Content {
|
|
14
6
|
constructor(_conf) {
|
|
@@ -16,11 +8,11 @@ class Content {
|
|
|
16
8
|
this._relativeUrls = {
|
|
17
9
|
getAnnouncements: "/service/application/content/v1.0/announcements",
|
|
18
10
|
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/
|
|
11
|
+
getBlogs: "/service/application/content/v1.0/blogs",
|
|
12
|
+
getCustomFieldsByResourceId:
|
|
13
|
+
"/service/application/content/v2.0/customfields/resource/{resource}/{resource_slug}",
|
|
14
|
+
getCustomObjectBySlug:
|
|
15
|
+
"/service/application/content/v2.0/customobjects/definition/{definition_slug}/entries/{slug}",
|
|
24
16
|
getDataLoaders: "/service/application/content/v1.0/data-loader",
|
|
25
17
|
getFaqBySlug: "/service/application/content/v1.0/faq/{slug}",
|
|
26
18
|
getFaqCategories: "/service/application/content/v1.0/faq/categories",
|
|
@@ -31,13 +23,11 @@ class Content {
|
|
|
31
23
|
"/service/application/content/v1.0/faq/category/{slug}/faqs",
|
|
32
24
|
getLandingPage: "/service/application/content/v1.0/landing-page",
|
|
33
25
|
getLegalInformation: "/service/application/content/v1.0/legal",
|
|
34
|
-
getNavigations: "/service/application/content/v1.0/navigations
|
|
26
|
+
getNavigations: "/service/application/content/v1.0/navigations",
|
|
35
27
|
getPage: "/service/application/content/v2.0/pages/{slug}",
|
|
36
|
-
getPages: "/service/application/content/v2.0/pages
|
|
28
|
+
getPages: "/service/application/content/v2.0/pages",
|
|
37
29
|
getSEOConfiguration: "/service/application/content/v1.0/seo",
|
|
38
30
|
getSEOMarkupSchemas: "/service/application/content/v1.0/seo/schema",
|
|
39
|
-
getSlideshow: "/service/application/content/v1.0/slideshow/{slug}",
|
|
40
|
-
getSlideshows: "/service/application/content/v1.0/slideshow/",
|
|
41
31
|
getSupportInformation: "/service/application/content/v1.0/support",
|
|
42
32
|
getTags: "/service/application/content/v1.0/tags",
|
|
43
33
|
};
|
|
@@ -58,12 +48,9 @@ class Content {
|
|
|
58
48
|
}
|
|
59
49
|
|
|
60
50
|
/**
|
|
61
|
-
* @param {ContentApplicationValidator.GetAnnouncementsParam} arg - Arg object.
|
|
62
51
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
63
52
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
64
|
-
* @returns {Promise<
|
|
65
|
-
* - Success response
|
|
66
|
-
*
|
|
53
|
+
* @returns {Promise<AnnouncementsResponseSchema>} - Success response
|
|
67
54
|
* @name getAnnouncements
|
|
68
55
|
* @summary: List announcements
|
|
69
56
|
* @description: List all current announcements in the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getAnnouncements/).
|
|
@@ -72,28 +59,6 @@ class Content {
|
|
|
72
59
|
{ requestHeaders } = { requestHeaders: {} },
|
|
73
60
|
{ responseHeaders } = { responseHeaders: false }
|
|
74
61
|
) {
|
|
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
62
|
const query_params = {};
|
|
98
63
|
|
|
99
64
|
const xHeaders = {};
|
|
@@ -116,62 +81,24 @@ class Content {
|
|
|
116
81
|
responseData = response[0];
|
|
117
82
|
}
|
|
118
83
|
|
|
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
84
|
return response;
|
|
138
85
|
}
|
|
139
86
|
|
|
140
87
|
/**
|
|
141
|
-
* @param {ContentApplicationValidator.GetBlogParam} arg - Arg object.
|
|
142
88
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
143
89
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
144
|
-
* @returns {Promise<
|
|
90
|
+
* @returns {Promise<BlogSchema>} - Success response
|
|
145
91
|
* @name getBlog
|
|
146
92
|
* @summary: Get a blog
|
|
147
93
|
* @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
94
|
*/
|
|
149
95
|
async getBlog(
|
|
150
|
-
{ slug, rootId, requestHeaders } = { requestHeaders: {} },
|
|
96
|
+
{ slug, rootId, preview, requestHeaders } = { requestHeaders: {} },
|
|
151
97
|
{ responseHeaders } = { responseHeaders: false }
|
|
152
98
|
) {
|
|
153
|
-
const { error } = ContentApplicationValidator.getBlog().validate(
|
|
154
|
-
{ slug, rootId },
|
|
155
|
-
{ abortEarly: false, allowUnknown: true }
|
|
156
|
-
);
|
|
157
|
-
if (error) {
|
|
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 },
|
|
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}`,
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
99
|
const query_params = {};
|
|
174
100
|
query_params["root_id"] = rootId;
|
|
101
|
+
query_params["preview"] = preview;
|
|
175
102
|
|
|
176
103
|
const xHeaders = {};
|
|
177
104
|
|
|
@@ -193,32 +120,13 @@ class Content {
|
|
|
193
120
|
responseData = response[0];
|
|
194
121
|
}
|
|
195
122
|
|
|
196
|
-
const {
|
|
197
|
-
error: res_error,
|
|
198
|
-
} = ContentApplicationModel.BlogSchema().validate(responseData, {
|
|
199
|
-
abortEarly: false,
|
|
200
|
-
allowUnknown: true,
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
if (res_error) {
|
|
204
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
205
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
206
|
-
} else {
|
|
207
|
-
Logger({
|
|
208
|
-
level: "WARN",
|
|
209
|
-
message: `Response Validation Warnings for application > Content > getBlog \n ${res_error}`,
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
123
|
return response;
|
|
215
124
|
}
|
|
216
125
|
|
|
217
126
|
/**
|
|
218
|
-
* @param {ContentApplicationValidator.GetBlogsParam} arg - Arg object.
|
|
219
127
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
220
128
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
221
|
-
* @returns {Promise<
|
|
129
|
+
* @returns {Promise<BlogGetDetails>} - Success response
|
|
222
130
|
* @name getBlogs
|
|
223
131
|
* @summary: List blogs
|
|
224
132
|
* @description: List all the blogs against an application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlogs/).
|
|
@@ -227,26 +135,6 @@ class Content {
|
|
|
227
135
|
{ pageNo, pageSize, tags, search, requestHeaders } = { requestHeaders: {} },
|
|
228
136
|
{ responseHeaders } = { responseHeaders: false }
|
|
229
137
|
) {
|
|
230
|
-
const { error } = ContentApplicationValidator.getBlogs().validate(
|
|
231
|
-
{ pageNo, pageSize, tags, search },
|
|
232
|
-
{ abortEarly: false, allowUnknown: true }
|
|
233
|
-
);
|
|
234
|
-
if (error) {
|
|
235
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Showing warrnings if extra unknown parameters are found
|
|
239
|
-
const { error: warrning } = ContentApplicationValidator.getBlogs().validate(
|
|
240
|
-
{ pageNo, pageSize, tags, search },
|
|
241
|
-
{ abortEarly: false, allowUnknown: false }
|
|
242
|
-
);
|
|
243
|
-
if (warrning) {
|
|
244
|
-
Logger({
|
|
245
|
-
level: "WARN",
|
|
246
|
-
message: `Parameter Validation warrnings for application > Content > getBlogs \n ${warrning}`,
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
|
|
250
138
|
const query_params = {};
|
|
251
139
|
query_params["page_no"] = pageNo;
|
|
252
140
|
query_params["page_size"] = pageSize;
|
|
@@ -273,64 +161,21 @@ class Content {
|
|
|
273
161
|
responseData = response[0];
|
|
274
162
|
}
|
|
275
163
|
|
|
276
|
-
const {
|
|
277
|
-
error: res_error,
|
|
278
|
-
} = ContentApplicationModel.BlogGetResponse().validate(responseData, {
|
|
279
|
-
abortEarly: false,
|
|
280
|
-
allowUnknown: true,
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
if (res_error) {
|
|
284
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
285
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
286
|
-
} else {
|
|
287
|
-
Logger({
|
|
288
|
-
level: "WARN",
|
|
289
|
-
message: `Response Validation Warnings for application > Content > getBlogs \n ${res_error}`,
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
164
|
return response;
|
|
295
165
|
}
|
|
296
166
|
|
|
297
167
|
/**
|
|
298
|
-
* @param {ContentApplicationValidator.GetCustomFieldsParam} arg - Arg object.
|
|
299
168
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
300
169
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
301
|
-
* @returns {Promise<
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* @
|
|
305
|
-
* @summary: Get list of custom fields
|
|
306
|
-
* @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/).
|
|
170
|
+
* @returns {Promise<CustomFieldsResponseByResourceIdSchema>} - Success response
|
|
171
|
+
* @name getCustomFieldsByResourceId
|
|
172
|
+
* @summary: Get list of custom fields of given resource and resource slug
|
|
173
|
+
* @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/).
|
|
307
174
|
*/
|
|
308
|
-
async
|
|
309
|
-
{ resource,
|
|
175
|
+
async getCustomFieldsByResourceId(
|
|
176
|
+
{ resource, resourceSlug, requestHeaders } = { requestHeaders: {} },
|
|
310
177
|
{ responseHeaders } = { responseHeaders: false }
|
|
311
178
|
) {
|
|
312
|
-
const { error } = ContentApplicationValidator.getCustomFields().validate(
|
|
313
|
-
{ resource, resourceId },
|
|
314
|
-
{ abortEarly: false, allowUnknown: true }
|
|
315
|
-
);
|
|
316
|
-
if (error) {
|
|
317
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
// Showing warrnings if extra unknown parameters are found
|
|
321
|
-
const {
|
|
322
|
-
error: warrning,
|
|
323
|
-
} = ContentApplicationValidator.getCustomFields().validate(
|
|
324
|
-
{ resource, resourceId },
|
|
325
|
-
{ abortEarly: false, allowUnknown: false }
|
|
326
|
-
);
|
|
327
|
-
if (warrning) {
|
|
328
|
-
Logger({
|
|
329
|
-
level: "WARN",
|
|
330
|
-
message: `Parameter Validation warrnings for application > Content > getCustomFields \n ${warrning}`,
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
|
|
334
179
|
const query_params = {};
|
|
335
180
|
|
|
336
181
|
const xHeaders = {};
|
|
@@ -339,8 +184,8 @@ class Content {
|
|
|
339
184
|
this._conf,
|
|
340
185
|
"get",
|
|
341
186
|
constructUrl({
|
|
342
|
-
url: this._urls["
|
|
343
|
-
params: { resource,
|
|
187
|
+
url: this._urls["getCustomFieldsByResourceId"],
|
|
188
|
+
params: { resource, resourceSlug },
|
|
344
189
|
}),
|
|
345
190
|
query_params,
|
|
346
191
|
undefined,
|
|
@@ -353,63 +198,21 @@ class Content {
|
|
|
353
198
|
responseData = response[0];
|
|
354
199
|
}
|
|
355
200
|
|
|
356
|
-
const {
|
|
357
|
-
error: res_error,
|
|
358
|
-
} = ContentApplicationModel.CustomFieldsResponseByResourceIdSchema().validate(
|
|
359
|
-
responseData,
|
|
360
|
-
{ abortEarly: false, allowUnknown: true }
|
|
361
|
-
);
|
|
362
|
-
|
|
363
|
-
if (res_error) {
|
|
364
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
365
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
366
|
-
} else {
|
|
367
|
-
Logger({
|
|
368
|
-
level: "WARN",
|
|
369
|
-
message: `Response Validation Warnings for application > Content > getCustomFields \n ${res_error}`,
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
201
|
return response;
|
|
375
202
|
}
|
|
376
203
|
|
|
377
204
|
/**
|
|
378
|
-
* @param {ContentApplicationValidator.GetCustomObjectParam} arg - Arg object.
|
|
379
205
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
380
206
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
381
|
-
* @returns {Promise<
|
|
382
|
-
*
|
|
383
|
-
* @
|
|
384
|
-
* @
|
|
385
|
-
* @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/).
|
|
207
|
+
* @returns {Promise<CustomObjectByIdSchema>} - Success response
|
|
208
|
+
* @name getCustomObjectBySlug
|
|
209
|
+
* @summary: Get custom object details
|
|
210
|
+
* @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/).
|
|
386
211
|
*/
|
|
387
|
-
async
|
|
388
|
-
{
|
|
212
|
+
async getCustomObjectBySlug(
|
|
213
|
+
{ definitionSlug, slug, requestHeaders } = { requestHeaders: {} },
|
|
389
214
|
{ responseHeaders } = { responseHeaders: false }
|
|
390
215
|
) {
|
|
391
|
-
const { error } = ContentApplicationValidator.getCustomObject().validate(
|
|
392
|
-
{ metaobjectId },
|
|
393
|
-
{ abortEarly: false, allowUnknown: true }
|
|
394
|
-
);
|
|
395
|
-
if (error) {
|
|
396
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
// Showing warrnings if extra unknown parameters are found
|
|
400
|
-
const {
|
|
401
|
-
error: warrning,
|
|
402
|
-
} = ContentApplicationValidator.getCustomObject().validate(
|
|
403
|
-
{ metaobjectId },
|
|
404
|
-
{ abortEarly: false, allowUnknown: false }
|
|
405
|
-
);
|
|
406
|
-
if (warrning) {
|
|
407
|
-
Logger({
|
|
408
|
-
level: "WARN",
|
|
409
|
-
message: `Parameter Validation warrnings for application > Content > getCustomObject \n ${warrning}`,
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
|
|
413
216
|
const query_params = {};
|
|
414
217
|
|
|
415
218
|
const xHeaders = {};
|
|
@@ -418,8 +221,8 @@ class Content {
|
|
|
418
221
|
this._conf,
|
|
419
222
|
"get",
|
|
420
223
|
constructUrl({
|
|
421
|
-
url: this._urls["
|
|
422
|
-
params: {
|
|
224
|
+
url: this._urls["getCustomObjectBySlug"],
|
|
225
|
+
params: { definitionSlug, slug },
|
|
423
226
|
}),
|
|
424
227
|
query_params,
|
|
425
228
|
undefined,
|
|
@@ -432,32 +235,13 @@ class Content {
|
|
|
432
235
|
responseData = response[0];
|
|
433
236
|
}
|
|
434
237
|
|
|
435
|
-
const {
|
|
436
|
-
error: res_error,
|
|
437
|
-
} = ContentApplicationModel.CustomObjectByIdSchema().validate(
|
|
438
|
-
responseData,
|
|
439
|
-
{ abortEarly: false, allowUnknown: true }
|
|
440
|
-
);
|
|
441
|
-
|
|
442
|
-
if (res_error) {
|
|
443
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
444
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
445
|
-
} else {
|
|
446
|
-
Logger({
|
|
447
|
-
level: "WARN",
|
|
448
|
-
message: `Response Validation Warnings for application > Content > getCustomObject \n ${res_error}`,
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
238
|
return response;
|
|
454
239
|
}
|
|
455
240
|
|
|
456
241
|
/**
|
|
457
|
-
* @param {ContentApplicationValidator.GetDataLoadersParam} arg - Arg object.
|
|
458
242
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
459
243
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
460
|
-
* @returns {Promise<
|
|
244
|
+
* @returns {Promise<DataLoadersSchema>} - Success response
|
|
461
245
|
* @name getDataLoaders
|
|
462
246
|
* @summary: List Dataloaders
|
|
463
247
|
* @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/).
|
|
@@ -466,28 +250,6 @@ class Content {
|
|
|
466
250
|
{ requestHeaders } = { requestHeaders: {} },
|
|
467
251
|
{ responseHeaders } = { responseHeaders: false }
|
|
468
252
|
) {
|
|
469
|
-
const { error } = ContentApplicationValidator.getDataLoaders().validate(
|
|
470
|
-
{},
|
|
471
|
-
{ abortEarly: false, allowUnknown: true }
|
|
472
|
-
);
|
|
473
|
-
if (error) {
|
|
474
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
// Showing warrnings if extra unknown parameters are found
|
|
478
|
-
const {
|
|
479
|
-
error: warrning,
|
|
480
|
-
} = ContentApplicationValidator.getDataLoaders().validate(
|
|
481
|
-
{},
|
|
482
|
-
{ abortEarly: false, allowUnknown: false }
|
|
483
|
-
);
|
|
484
|
-
if (warrning) {
|
|
485
|
-
Logger({
|
|
486
|
-
level: "WARN",
|
|
487
|
-
message: `Parameter Validation warrnings for application > Content > getDataLoaders \n ${warrning}`,
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
|
|
491
253
|
const query_params = {};
|
|
492
254
|
|
|
493
255
|
const xHeaders = {};
|
|
@@ -510,32 +272,13 @@ class Content {
|
|
|
510
272
|
responseData = response[0];
|
|
511
273
|
}
|
|
512
274
|
|
|
513
|
-
const {
|
|
514
|
-
error: res_error,
|
|
515
|
-
} = ContentApplicationModel.DataLoadersSchema().validate(responseData, {
|
|
516
|
-
abortEarly: false,
|
|
517
|
-
allowUnknown: true,
|
|
518
|
-
});
|
|
519
|
-
|
|
520
|
-
if (res_error) {
|
|
521
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
522
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
523
|
-
} else {
|
|
524
|
-
Logger({
|
|
525
|
-
level: "WARN",
|
|
526
|
-
message: `Response Validation Warnings for application > Content > getDataLoaders \n ${res_error}`,
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
|
|
531
275
|
return response;
|
|
532
276
|
}
|
|
533
277
|
|
|
534
278
|
/**
|
|
535
|
-
* @param {ContentApplicationValidator.GetFaqBySlugParam} arg - Arg object.
|
|
536
279
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
537
280
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
538
|
-
* @returns {Promise<
|
|
281
|
+
* @returns {Promise<FaqSchema>} - Success response
|
|
539
282
|
* @name getFaqBySlug
|
|
540
283
|
* @summary: Get FAQ
|
|
541
284
|
* @description: Get a specific FAQ using its slug identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqBySlug/).
|
|
@@ -544,28 +287,6 @@ class Content {
|
|
|
544
287
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
545
288
|
{ responseHeaders } = { responseHeaders: false }
|
|
546
289
|
) {
|
|
547
|
-
const { error } = ContentApplicationValidator.getFaqBySlug().validate(
|
|
548
|
-
{ slug },
|
|
549
|
-
{ abortEarly: false, allowUnknown: true }
|
|
550
|
-
);
|
|
551
|
-
if (error) {
|
|
552
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
// Showing warrnings if extra unknown parameters are found
|
|
556
|
-
const {
|
|
557
|
-
error: warrning,
|
|
558
|
-
} = ContentApplicationValidator.getFaqBySlug().validate(
|
|
559
|
-
{ slug },
|
|
560
|
-
{ abortEarly: false, allowUnknown: false }
|
|
561
|
-
);
|
|
562
|
-
if (warrning) {
|
|
563
|
-
Logger({
|
|
564
|
-
level: "WARN",
|
|
565
|
-
message: `Parameter Validation warrnings for application > Content > getFaqBySlug \n ${warrning}`,
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
|
|
569
290
|
const query_params = {};
|
|
570
291
|
|
|
571
292
|
const xHeaders = {};
|
|
@@ -588,33 +309,13 @@ class Content {
|
|
|
588
309
|
responseData = response[0];
|
|
589
310
|
}
|
|
590
311
|
|
|
591
|
-
const {
|
|
592
|
-
error: res_error,
|
|
593
|
-
} = ContentApplicationModel.FaqSchema().validate(responseData, {
|
|
594
|
-
abortEarly: false,
|
|
595
|
-
allowUnknown: true,
|
|
596
|
-
});
|
|
597
|
-
|
|
598
|
-
if (res_error) {
|
|
599
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
600
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
601
|
-
} else {
|
|
602
|
-
Logger({
|
|
603
|
-
level: "WARN",
|
|
604
|
-
message: `Response Validation Warnings for application > Content > getFaqBySlug \n ${res_error}`,
|
|
605
|
-
});
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
|
|
609
312
|
return response;
|
|
610
313
|
}
|
|
611
314
|
|
|
612
315
|
/**
|
|
613
|
-
* @param {ContentApplicationValidator.GetFaqCategoriesParam} arg - Arg object.
|
|
614
316
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
615
317
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
616
|
-
* @returns {Promise<
|
|
617
|
-
* Success response
|
|
318
|
+
* @returns {Promise<GetFaqCategoriesSchema>} - Success response
|
|
618
319
|
* @name getFaqCategories
|
|
619
320
|
* @summary: List FAQ Categories
|
|
620
321
|
* @description: List categories for organizing FAQs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqCategories/).
|
|
@@ -623,28 +324,6 @@ class Content {
|
|
|
623
324
|
{ requestHeaders } = { requestHeaders: {} },
|
|
624
325
|
{ responseHeaders } = { responseHeaders: false }
|
|
625
326
|
) {
|
|
626
|
-
const { error } = ContentApplicationValidator.getFaqCategories().validate(
|
|
627
|
-
{},
|
|
628
|
-
{ abortEarly: false, allowUnknown: true }
|
|
629
|
-
);
|
|
630
|
-
if (error) {
|
|
631
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
// Showing warrnings if extra unknown parameters are found
|
|
635
|
-
const {
|
|
636
|
-
error: warrning,
|
|
637
|
-
} = ContentApplicationValidator.getFaqCategories().validate(
|
|
638
|
-
{},
|
|
639
|
-
{ abortEarly: false, allowUnknown: false }
|
|
640
|
-
);
|
|
641
|
-
if (warrning) {
|
|
642
|
-
Logger({
|
|
643
|
-
level: "WARN",
|
|
644
|
-
message: `Parameter Validation warrnings for application > Content > getFaqCategories \n ${warrning}`,
|
|
645
|
-
});
|
|
646
|
-
}
|
|
647
|
-
|
|
648
327
|
const query_params = {};
|
|
649
328
|
|
|
650
329
|
const xHeaders = {};
|
|
@@ -667,33 +346,13 @@ class Content {
|
|
|
667
346
|
responseData = response[0];
|
|
668
347
|
}
|
|
669
348
|
|
|
670
|
-
const {
|
|
671
|
-
error: res_error,
|
|
672
|
-
} = ContentApplicationModel.GetFaqCategoriesSchema().validate(
|
|
673
|
-
responseData,
|
|
674
|
-
{ abortEarly: false, allowUnknown: true }
|
|
675
|
-
);
|
|
676
|
-
|
|
677
|
-
if (res_error) {
|
|
678
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
679
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
680
|
-
} else {
|
|
681
|
-
Logger({
|
|
682
|
-
level: "WARN",
|
|
683
|
-
message: `Response Validation Warnings for application > Content > getFaqCategories \n ${res_error}`,
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
|
|
688
349
|
return response;
|
|
689
350
|
}
|
|
690
351
|
|
|
691
352
|
/**
|
|
692
|
-
* @param {ContentApplicationValidator.GetFaqCategoryBySlugParam} arg - Arg object.
|
|
693
353
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
694
354
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
695
|
-
* @returns {Promise<
|
|
696
|
-
* Success response
|
|
355
|
+
* @returns {Promise<GetFaqCategoryBySlugSchema>} - Success response
|
|
697
356
|
* @name getFaqCategoryBySlug
|
|
698
357
|
* @summary: Get a FAQ category
|
|
699
358
|
* @description: Get a specific FAQ category using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqCategoryBySlug/).
|
|
@@ -702,30 +361,6 @@ class Content {
|
|
|
702
361
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
703
362
|
{ responseHeaders } = { responseHeaders: false }
|
|
704
363
|
) {
|
|
705
|
-
const {
|
|
706
|
-
error,
|
|
707
|
-
} = ContentApplicationValidator.getFaqCategoryBySlug().validate(
|
|
708
|
-
{ slug },
|
|
709
|
-
{ abortEarly: false, allowUnknown: true }
|
|
710
|
-
);
|
|
711
|
-
if (error) {
|
|
712
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
// Showing warrnings if extra unknown parameters are found
|
|
716
|
-
const {
|
|
717
|
-
error: warrning,
|
|
718
|
-
} = ContentApplicationValidator.getFaqCategoryBySlug().validate(
|
|
719
|
-
{ slug },
|
|
720
|
-
{ abortEarly: false, allowUnknown: false }
|
|
721
|
-
);
|
|
722
|
-
if (warrning) {
|
|
723
|
-
Logger({
|
|
724
|
-
level: "WARN",
|
|
725
|
-
message: `Parameter Validation warrnings for application > Content > getFaqCategoryBySlug \n ${warrning}`,
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
|
|
729
364
|
const query_params = {};
|
|
730
365
|
|
|
731
366
|
const xHeaders = {};
|
|
@@ -748,32 +383,13 @@ class Content {
|
|
|
748
383
|
responseData = response[0];
|
|
749
384
|
}
|
|
750
385
|
|
|
751
|
-
const {
|
|
752
|
-
error: res_error,
|
|
753
|
-
} = ContentApplicationModel.GetFaqCategoryBySlugSchema().validate(
|
|
754
|
-
responseData,
|
|
755
|
-
{ abortEarly: false, allowUnknown: true }
|
|
756
|
-
);
|
|
757
|
-
|
|
758
|
-
if (res_error) {
|
|
759
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
760
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
761
|
-
} else {
|
|
762
|
-
Logger({
|
|
763
|
-
level: "WARN",
|
|
764
|
-
message: `Response Validation Warnings for application > Content > getFaqCategoryBySlug \n ${res_error}`,
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
|
|
769
386
|
return response;
|
|
770
387
|
}
|
|
771
388
|
|
|
772
389
|
/**
|
|
773
|
-
* @param {ContentApplicationValidator.GetFaqsParam} arg - Arg object.
|
|
774
390
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
775
391
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
776
|
-
* @returns {Promise<
|
|
392
|
+
* @returns {Promise<FaqResponseSchema>} - Success response
|
|
777
393
|
* @name getFaqs
|
|
778
394
|
* @summary: List FAQs
|
|
779
395
|
* @description: List frequently asked questions and answers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqs/).
|
|
@@ -782,26 +398,6 @@ class Content {
|
|
|
782
398
|
{ requestHeaders } = { requestHeaders: {} },
|
|
783
399
|
{ responseHeaders } = { responseHeaders: false }
|
|
784
400
|
) {
|
|
785
|
-
const { error } = ContentApplicationValidator.getFaqs().validate(
|
|
786
|
-
{},
|
|
787
|
-
{ abortEarly: false, allowUnknown: true }
|
|
788
|
-
);
|
|
789
|
-
if (error) {
|
|
790
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
// Showing warrnings if extra unknown parameters are found
|
|
794
|
-
const { error: warrning } = ContentApplicationValidator.getFaqs().validate(
|
|
795
|
-
{},
|
|
796
|
-
{ abortEarly: false, allowUnknown: false }
|
|
797
|
-
);
|
|
798
|
-
if (warrning) {
|
|
799
|
-
Logger({
|
|
800
|
-
level: "WARN",
|
|
801
|
-
message: `Parameter Validation warrnings for application > Content > getFaqs \n ${warrning}`,
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
|
|
805
401
|
const query_params = {};
|
|
806
402
|
|
|
807
403
|
const xHeaders = {};
|
|
@@ -824,32 +420,13 @@ class Content {
|
|
|
824
420
|
responseData = response[0];
|
|
825
421
|
}
|
|
826
422
|
|
|
827
|
-
const {
|
|
828
|
-
error: res_error,
|
|
829
|
-
} = ContentApplicationModel.FaqResponseSchema().validate(responseData, {
|
|
830
|
-
abortEarly: false,
|
|
831
|
-
allowUnknown: true,
|
|
832
|
-
});
|
|
833
|
-
|
|
834
|
-
if (res_error) {
|
|
835
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
836
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
837
|
-
} else {
|
|
838
|
-
Logger({
|
|
839
|
-
level: "WARN",
|
|
840
|
-
message: `Response Validation Warnings for application > Content > getFaqs \n ${res_error}`,
|
|
841
|
-
});
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
|
|
845
423
|
return response;
|
|
846
424
|
}
|
|
847
425
|
|
|
848
426
|
/**
|
|
849
|
-
* @param {ContentApplicationValidator.GetFaqsByCategorySlugParam} arg - Arg object.
|
|
850
427
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
851
428
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
852
|
-
* @returns {Promise<
|
|
429
|
+
* @returns {Promise<GetFaqSchema>} - Success response
|
|
853
430
|
* @name getFaqsByCategorySlug
|
|
854
431
|
* @summary: List FAQs by category
|
|
855
432
|
* @description: Get FAQs belonging to a specific category slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqsByCategorySlug/).
|
|
@@ -858,30 +435,6 @@ class Content {
|
|
|
858
435
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
859
436
|
{ responseHeaders } = { responseHeaders: false }
|
|
860
437
|
) {
|
|
861
|
-
const {
|
|
862
|
-
error,
|
|
863
|
-
} = ContentApplicationValidator.getFaqsByCategorySlug().validate(
|
|
864
|
-
{ slug },
|
|
865
|
-
{ abortEarly: false, allowUnknown: true }
|
|
866
|
-
);
|
|
867
|
-
if (error) {
|
|
868
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
// Showing warrnings if extra unknown parameters are found
|
|
872
|
-
const {
|
|
873
|
-
error: warrning,
|
|
874
|
-
} = ContentApplicationValidator.getFaqsByCategorySlug().validate(
|
|
875
|
-
{ slug },
|
|
876
|
-
{ abortEarly: false, allowUnknown: false }
|
|
877
|
-
);
|
|
878
|
-
if (warrning) {
|
|
879
|
-
Logger({
|
|
880
|
-
level: "WARN",
|
|
881
|
-
message: `Parameter Validation warrnings for application > Content > getFaqsByCategorySlug \n ${warrning}`,
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
|
|
885
438
|
const query_params = {};
|
|
886
439
|
|
|
887
440
|
const xHeaders = {};
|
|
@@ -904,32 +457,13 @@ class Content {
|
|
|
904
457
|
responseData = response[0];
|
|
905
458
|
}
|
|
906
459
|
|
|
907
|
-
const {
|
|
908
|
-
error: res_error,
|
|
909
|
-
} = ContentApplicationModel.GetFaqSchema().validate(responseData, {
|
|
910
|
-
abortEarly: false,
|
|
911
|
-
allowUnknown: true,
|
|
912
|
-
});
|
|
913
|
-
|
|
914
|
-
if (res_error) {
|
|
915
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
916
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
917
|
-
} else {
|
|
918
|
-
Logger({
|
|
919
|
-
level: "WARN",
|
|
920
|
-
message: `Response Validation Warnings for application > Content > getFaqsByCategorySlug \n ${res_error}`,
|
|
921
|
-
});
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
|
|
925
460
|
return response;
|
|
926
461
|
}
|
|
927
462
|
|
|
928
463
|
/**
|
|
929
|
-
* @param {ContentApplicationValidator.GetLandingPageParam} arg - Arg object.
|
|
930
464
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
931
465
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
932
|
-
* @returns {Promise<
|
|
466
|
+
* @returns {Promise<LandingPageSchema>} - Success response
|
|
933
467
|
* @name getLandingPage
|
|
934
468
|
* @summary: Get a landing page
|
|
935
469
|
* @description: Get content of the application's landing page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getLandingPage/).
|
|
@@ -938,28 +472,6 @@ class Content {
|
|
|
938
472
|
{ requestHeaders } = { requestHeaders: {} },
|
|
939
473
|
{ responseHeaders } = { responseHeaders: false }
|
|
940
474
|
) {
|
|
941
|
-
const { error } = ContentApplicationValidator.getLandingPage().validate(
|
|
942
|
-
{},
|
|
943
|
-
{ abortEarly: false, allowUnknown: true }
|
|
944
|
-
);
|
|
945
|
-
if (error) {
|
|
946
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
// Showing warrnings if extra unknown parameters are found
|
|
950
|
-
const {
|
|
951
|
-
error: warrning,
|
|
952
|
-
} = ContentApplicationValidator.getLandingPage().validate(
|
|
953
|
-
{},
|
|
954
|
-
{ abortEarly: false, allowUnknown: false }
|
|
955
|
-
);
|
|
956
|
-
if (warrning) {
|
|
957
|
-
Logger({
|
|
958
|
-
level: "WARN",
|
|
959
|
-
message: `Parameter Validation warrnings for application > Content > getLandingPage \n ${warrning}`,
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
|
|
963
475
|
const query_params = {};
|
|
964
476
|
|
|
965
477
|
const xHeaders = {};
|
|
@@ -982,32 +494,13 @@ class Content {
|
|
|
982
494
|
responseData = response[0];
|
|
983
495
|
}
|
|
984
496
|
|
|
985
|
-
const {
|
|
986
|
-
error: res_error,
|
|
987
|
-
} = ContentApplicationModel.LandingPageSchema().validate(responseData, {
|
|
988
|
-
abortEarly: false,
|
|
989
|
-
allowUnknown: true,
|
|
990
|
-
});
|
|
991
|
-
|
|
992
|
-
if (res_error) {
|
|
993
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
994
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
995
|
-
} else {
|
|
996
|
-
Logger({
|
|
997
|
-
level: "WARN",
|
|
998
|
-
message: `Response Validation Warnings for application > Content > getLandingPage \n ${res_error}`,
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
497
|
return response;
|
|
1004
498
|
}
|
|
1005
499
|
|
|
1006
500
|
/**
|
|
1007
|
-
* @param {ContentApplicationValidator.GetLegalInformationParam} arg - Arg object.
|
|
1008
501
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1009
502
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1010
|
-
* @returns {Promise<
|
|
503
|
+
* @returns {Promise<ApplicationLegal>} - Success response
|
|
1011
504
|
* @name getLegalInformation
|
|
1012
505
|
* @summary: Get legal information
|
|
1013
506
|
* @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/).
|
|
@@ -1016,30 +509,6 @@ class Content {
|
|
|
1016
509
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1017
510
|
{ responseHeaders } = { responseHeaders: false }
|
|
1018
511
|
) {
|
|
1019
|
-
const {
|
|
1020
|
-
error,
|
|
1021
|
-
} = ContentApplicationValidator.getLegalInformation().validate(
|
|
1022
|
-
{},
|
|
1023
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1024
|
-
);
|
|
1025
|
-
if (error) {
|
|
1026
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1030
|
-
const {
|
|
1031
|
-
error: warrning,
|
|
1032
|
-
} = ContentApplicationValidator.getLegalInformation().validate(
|
|
1033
|
-
{},
|
|
1034
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1035
|
-
);
|
|
1036
|
-
if (warrning) {
|
|
1037
|
-
Logger({
|
|
1038
|
-
level: "WARN",
|
|
1039
|
-
message: `Parameter Validation warrnings for application > Content > getLegalInformation \n ${warrning}`,
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
512
|
const query_params = {};
|
|
1044
513
|
|
|
1045
514
|
const xHeaders = {};
|
|
@@ -1062,33 +531,13 @@ class Content {
|
|
|
1062
531
|
responseData = response[0];
|
|
1063
532
|
}
|
|
1064
533
|
|
|
1065
|
-
const {
|
|
1066
|
-
error: res_error,
|
|
1067
|
-
} = ContentApplicationModel.ApplicationLegal().validate(responseData, {
|
|
1068
|
-
abortEarly: false,
|
|
1069
|
-
allowUnknown: true,
|
|
1070
|
-
});
|
|
1071
|
-
|
|
1072
|
-
if (res_error) {
|
|
1073
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1074
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1075
|
-
} else {
|
|
1076
|
-
Logger({
|
|
1077
|
-
level: "WARN",
|
|
1078
|
-
message: `Response Validation Warnings for application > Content > getLegalInformation \n ${res_error}`,
|
|
1079
|
-
});
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
534
|
return response;
|
|
1084
535
|
}
|
|
1085
536
|
|
|
1086
537
|
/**
|
|
1087
|
-
* @param {ContentApplicationValidator.GetNavigationsParam} arg - Arg object.
|
|
1088
538
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1089
539
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1090
|
-
* @returns {Promise<
|
|
1091
|
-
* Success response
|
|
540
|
+
* @returns {Promise<NavigationGetDetails>} - Success response
|
|
1092
541
|
* @name getNavigations
|
|
1093
542
|
* @summary: List navigation items
|
|
1094
543
|
* @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/).
|
|
@@ -1097,28 +546,6 @@ class Content {
|
|
|
1097
546
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1098
547
|
{ responseHeaders } = { responseHeaders: false }
|
|
1099
548
|
) {
|
|
1100
|
-
const { error } = ContentApplicationValidator.getNavigations().validate(
|
|
1101
|
-
{ pageNo, pageSize },
|
|
1102
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1103
|
-
);
|
|
1104
|
-
if (error) {
|
|
1105
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1109
|
-
const {
|
|
1110
|
-
error: warrning,
|
|
1111
|
-
} = ContentApplicationValidator.getNavigations().validate(
|
|
1112
|
-
{ pageNo, pageSize },
|
|
1113
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1114
|
-
);
|
|
1115
|
-
if (warrning) {
|
|
1116
|
-
Logger({
|
|
1117
|
-
level: "WARN",
|
|
1118
|
-
message: `Parameter Validation warrnings for application > Content > getNavigations \n ${warrning}`,
|
|
1119
|
-
});
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
549
|
const query_params = {};
|
|
1123
550
|
query_params["page_no"] = pageNo;
|
|
1124
551
|
query_params["page_size"] = pageSize;
|
|
@@ -1143,32 +570,13 @@ class Content {
|
|
|
1143
570
|
responseData = response[0];
|
|
1144
571
|
}
|
|
1145
572
|
|
|
1146
|
-
const {
|
|
1147
|
-
error: res_error,
|
|
1148
|
-
} = ContentApplicationModel.NavigationGetResponse().validate(responseData, {
|
|
1149
|
-
abortEarly: false,
|
|
1150
|
-
allowUnknown: true,
|
|
1151
|
-
});
|
|
1152
|
-
|
|
1153
|
-
if (res_error) {
|
|
1154
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1155
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1156
|
-
} else {
|
|
1157
|
-
Logger({
|
|
1158
|
-
level: "WARN",
|
|
1159
|
-
message: `Response Validation Warnings for application > Content > getNavigations \n ${res_error}`,
|
|
1160
|
-
});
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
573
|
return response;
|
|
1165
574
|
}
|
|
1166
575
|
|
|
1167
576
|
/**
|
|
1168
|
-
* @param {ContentApplicationValidator.GetPageParam} arg - Arg object.
|
|
1169
577
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1170
578
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1171
|
-
* @returns {Promise<
|
|
579
|
+
* @returns {Promise<PageSchema>} - Success response
|
|
1172
580
|
* @name getPage
|
|
1173
581
|
* @summary: Get a page
|
|
1174
582
|
* @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/).
|
|
@@ -1177,26 +585,6 @@ class Content {
|
|
|
1177
585
|
{ slug, rootId, requestHeaders } = { requestHeaders: {} },
|
|
1178
586
|
{ responseHeaders } = { responseHeaders: false }
|
|
1179
587
|
) {
|
|
1180
|
-
const { error } = ContentApplicationValidator.getPage().validate(
|
|
1181
|
-
{ slug, rootId },
|
|
1182
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1183
|
-
);
|
|
1184
|
-
if (error) {
|
|
1185
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1189
|
-
const { error: warrning } = ContentApplicationValidator.getPage().validate(
|
|
1190
|
-
{ slug, rootId },
|
|
1191
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1192
|
-
);
|
|
1193
|
-
if (warrning) {
|
|
1194
|
-
Logger({
|
|
1195
|
-
level: "WARN",
|
|
1196
|
-
message: `Parameter Validation warrnings for application > Content > getPage \n ${warrning}`,
|
|
1197
|
-
});
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
588
|
const query_params = {};
|
|
1201
589
|
query_params["root_id"] = rootId;
|
|
1202
590
|
|
|
@@ -1220,32 +608,13 @@ class Content {
|
|
|
1220
608
|
responseData = response[0];
|
|
1221
609
|
}
|
|
1222
610
|
|
|
1223
|
-
const {
|
|
1224
|
-
error: res_error,
|
|
1225
|
-
} = ContentApplicationModel.PageSchema().validate(responseData, {
|
|
1226
|
-
abortEarly: false,
|
|
1227
|
-
allowUnknown: true,
|
|
1228
|
-
});
|
|
1229
|
-
|
|
1230
|
-
if (res_error) {
|
|
1231
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1232
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1233
|
-
} else {
|
|
1234
|
-
Logger({
|
|
1235
|
-
level: "WARN",
|
|
1236
|
-
message: `Response Validation Warnings for application > Content > getPage \n ${res_error}`,
|
|
1237
|
-
});
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
611
|
return response;
|
|
1242
612
|
}
|
|
1243
613
|
|
|
1244
614
|
/**
|
|
1245
|
-
* @param {ContentApplicationValidator.GetPagesParam} arg - Arg object.
|
|
1246
615
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1247
616
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1248
|
-
* @returns {Promise<
|
|
617
|
+
* @returns {Promise<PageGetDetails>} - Success response
|
|
1249
618
|
* @name getPages
|
|
1250
619
|
* @summary: Lists pages
|
|
1251
620
|
* @description: Lists all Custom Pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getPages/).
|
|
@@ -1254,26 +623,6 @@ class Content {
|
|
|
1254
623
|
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1255
624
|
{ responseHeaders } = { responseHeaders: false }
|
|
1256
625
|
) {
|
|
1257
|
-
const { error } = ContentApplicationValidator.getPages().validate(
|
|
1258
|
-
{ pageNo, pageSize },
|
|
1259
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1260
|
-
);
|
|
1261
|
-
if (error) {
|
|
1262
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1266
|
-
const { error: warrning } = ContentApplicationValidator.getPages().validate(
|
|
1267
|
-
{ pageNo, pageSize },
|
|
1268
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1269
|
-
);
|
|
1270
|
-
if (warrning) {
|
|
1271
|
-
Logger({
|
|
1272
|
-
level: "WARN",
|
|
1273
|
-
message: `Parameter Validation warrnings for application > Content > getPages \n ${warrning}`,
|
|
1274
|
-
});
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
626
|
const query_params = {};
|
|
1278
627
|
query_params["page_no"] = pageNo;
|
|
1279
628
|
query_params["page_size"] = pageSize;
|
|
@@ -1298,32 +647,13 @@ class Content {
|
|
|
1298
647
|
responseData = response[0];
|
|
1299
648
|
}
|
|
1300
649
|
|
|
1301
|
-
const {
|
|
1302
|
-
error: res_error,
|
|
1303
|
-
} = ContentApplicationModel.PageGetResponse().validate(responseData, {
|
|
1304
|
-
abortEarly: false,
|
|
1305
|
-
allowUnknown: true,
|
|
1306
|
-
});
|
|
1307
|
-
|
|
1308
|
-
if (res_error) {
|
|
1309
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1310
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1311
|
-
} else {
|
|
1312
|
-
Logger({
|
|
1313
|
-
level: "WARN",
|
|
1314
|
-
message: `Response Validation Warnings for application > Content > getPages \n ${res_error}`,
|
|
1315
|
-
});
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
650
|
return response;
|
|
1320
651
|
}
|
|
1321
652
|
|
|
1322
653
|
/**
|
|
1323
|
-
* @param {ContentApplicationValidator.GetSEOConfigurationParam} arg - Arg object.
|
|
1324
654
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1325
655
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1326
|
-
* @returns {Promise<
|
|
656
|
+
* @returns {Promise<SeoComponent>} - Success response
|
|
1327
657
|
* @name getSEOConfiguration
|
|
1328
658
|
* @summary: Get SEO settings
|
|
1329
659
|
* @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/).
|
|
@@ -1332,30 +662,6 @@ class Content {
|
|
|
1332
662
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1333
663
|
{ responseHeaders } = { responseHeaders: false }
|
|
1334
664
|
) {
|
|
1335
|
-
const {
|
|
1336
|
-
error,
|
|
1337
|
-
} = ContentApplicationValidator.getSEOConfiguration().validate(
|
|
1338
|
-
{},
|
|
1339
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1340
|
-
);
|
|
1341
|
-
if (error) {
|
|
1342
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1346
|
-
const {
|
|
1347
|
-
error: warrning,
|
|
1348
|
-
} = ContentApplicationValidator.getSEOConfiguration().validate(
|
|
1349
|
-
{},
|
|
1350
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1351
|
-
);
|
|
1352
|
-
if (warrning) {
|
|
1353
|
-
Logger({
|
|
1354
|
-
level: "WARN",
|
|
1355
|
-
message: `Parameter Validation warrnings for application > Content > getSEOConfiguration \n ${warrning}`,
|
|
1356
|
-
});
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
665
|
const query_params = {};
|
|
1360
666
|
|
|
1361
667
|
const xHeaders = {};
|
|
@@ -1378,32 +684,13 @@ class Content {
|
|
|
1378
684
|
responseData = response[0];
|
|
1379
685
|
}
|
|
1380
686
|
|
|
1381
|
-
const {
|
|
1382
|
-
error: res_error,
|
|
1383
|
-
} = ContentApplicationModel.SeoComponent().validate(responseData, {
|
|
1384
|
-
abortEarly: false,
|
|
1385
|
-
allowUnknown: true,
|
|
1386
|
-
});
|
|
1387
|
-
|
|
1388
|
-
if (res_error) {
|
|
1389
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1390
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1391
|
-
} else {
|
|
1392
|
-
Logger({
|
|
1393
|
-
level: "WARN",
|
|
1394
|
-
message: `Response Validation Warnings for application > Content > getSEOConfiguration \n ${res_error}`,
|
|
1395
|
-
});
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
687
|
return response;
|
|
1400
688
|
}
|
|
1401
689
|
|
|
1402
690
|
/**
|
|
1403
|
-
* @param {ContentApplicationValidator.GetSEOMarkupSchemasParam} arg - Arg object.
|
|
1404
691
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1405
692
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1406
|
-
* @returns {Promise<
|
|
693
|
+
* @returns {Promise<SeoSchemaComponent>} - Success response
|
|
1407
694
|
* @name getSEOMarkupSchemas
|
|
1408
695
|
* @summary: List SEO Markup schemas
|
|
1409
696
|
* @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/).
|
|
@@ -1412,30 +699,6 @@ class Content {
|
|
|
1412
699
|
{ pageType, active, requestHeaders } = { requestHeaders: {} },
|
|
1413
700
|
{ responseHeaders } = { responseHeaders: false }
|
|
1414
701
|
) {
|
|
1415
|
-
const {
|
|
1416
|
-
error,
|
|
1417
|
-
} = ContentApplicationValidator.getSEOMarkupSchemas().validate(
|
|
1418
|
-
{ pageType, active },
|
|
1419
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1420
|
-
);
|
|
1421
|
-
if (error) {
|
|
1422
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1426
|
-
const {
|
|
1427
|
-
error: warrning,
|
|
1428
|
-
} = ContentApplicationValidator.getSEOMarkupSchemas().validate(
|
|
1429
|
-
{ pageType, active },
|
|
1430
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1431
|
-
);
|
|
1432
|
-
if (warrning) {
|
|
1433
|
-
Logger({
|
|
1434
|
-
level: "WARN",
|
|
1435
|
-
message: `Parameter Validation warrnings for application > Content > getSEOMarkupSchemas \n ${warrning}`,
|
|
1436
|
-
});
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
702
|
const query_params = {};
|
|
1440
703
|
query_params["page_type"] = pageType;
|
|
1441
704
|
query_params["active"] = active;
|
|
@@ -1460,217 +723,13 @@ class Content {
|
|
|
1460
723
|
responseData = response[0];
|
|
1461
724
|
}
|
|
1462
725
|
|
|
1463
|
-
const {
|
|
1464
|
-
error: res_error,
|
|
1465
|
-
} = ContentApplicationModel.SeoSchemaComponent().validate(responseData, {
|
|
1466
|
-
abortEarly: false,
|
|
1467
|
-
allowUnknown: true,
|
|
1468
|
-
});
|
|
1469
|
-
|
|
1470
|
-
if (res_error) {
|
|
1471
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1472
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1473
|
-
} else {
|
|
1474
|
-
Logger({
|
|
1475
|
-
level: "WARN",
|
|
1476
|
-
message: `Response Validation Warnings for application > Content > getSEOMarkupSchemas \n ${res_error}`,
|
|
1477
|
-
});
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
return response;
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
/**
|
|
1485
|
-
* @param {ContentApplicationValidator.GetSlideshowParam} arg - Arg object.
|
|
1486
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1487
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1488
|
-
* @returns {Promise<ContentApplicationModel.SlideshowSchema>} - Success response
|
|
1489
|
-
* @name getSlideshow
|
|
1490
|
-
* @summary: Get a Slideshow
|
|
1491
|
-
* @description: Get a slideshow using its `slug`. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshow/).
|
|
1492
|
-
*/
|
|
1493
|
-
async getSlideshow(
|
|
1494
|
-
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1495
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1496
|
-
) {
|
|
1497
|
-
const { error } = ContentApplicationValidator.getSlideshow().validate(
|
|
1498
|
-
{ slug },
|
|
1499
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1500
|
-
);
|
|
1501
|
-
if (error) {
|
|
1502
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1506
|
-
const {
|
|
1507
|
-
error: warrning,
|
|
1508
|
-
} = ContentApplicationValidator.getSlideshow().validate(
|
|
1509
|
-
{ slug },
|
|
1510
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1511
|
-
);
|
|
1512
|
-
if (warrning) {
|
|
1513
|
-
Logger({
|
|
1514
|
-
level: "WARN",
|
|
1515
|
-
message: `Parameter Validation warrnings for application > Content > getSlideshow \n ${warrning}`,
|
|
1516
|
-
});
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
const query_params = {};
|
|
1520
|
-
|
|
1521
|
-
const xHeaders = {};
|
|
1522
|
-
|
|
1523
|
-
const response = await ApplicationAPIClient.execute(
|
|
1524
|
-
this._conf,
|
|
1525
|
-
"get",
|
|
1526
|
-
constructUrl({
|
|
1527
|
-
url: this._urls["getSlideshow"],
|
|
1528
|
-
params: { slug },
|
|
1529
|
-
}),
|
|
1530
|
-
query_params,
|
|
1531
|
-
undefined,
|
|
1532
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1533
|
-
{ responseHeaders }
|
|
1534
|
-
);
|
|
1535
|
-
|
|
1536
|
-
let responseData = response;
|
|
1537
|
-
if (responseHeaders) {
|
|
1538
|
-
responseData = response[0];
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
const {
|
|
1542
|
-
error: res_error,
|
|
1543
|
-
} = ContentApplicationModel.SlideshowSchema().validate(responseData, {
|
|
1544
|
-
abortEarly: false,
|
|
1545
|
-
allowUnknown: true,
|
|
1546
|
-
});
|
|
1547
|
-
|
|
1548
|
-
if (res_error) {
|
|
1549
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1550
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1551
|
-
} else {
|
|
1552
|
-
Logger({
|
|
1553
|
-
level: "WARN",
|
|
1554
|
-
message: `Response Validation Warnings for application > Content > getSlideshow \n ${res_error}`,
|
|
1555
|
-
});
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
return response;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
/**
|
|
1563
|
-
* @param {ContentApplicationValidator.GetSlideshowsParam} arg - Arg object.
|
|
1564
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1565
|
-
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1566
|
-
* @returns {Promise<ContentApplicationModel.SlideshowGetResponse>} - Success response
|
|
1567
|
-
* @name getSlideshows
|
|
1568
|
-
* @summary: List Slideshows
|
|
1569
|
-
* @description: List slideshows along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshows/).
|
|
1570
|
-
*/
|
|
1571
|
-
async getSlideshows(
|
|
1572
|
-
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1573
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
1574
|
-
) {
|
|
1575
|
-
const { error } = ContentApplicationValidator.getSlideshows().validate(
|
|
1576
|
-
{ pageNo, pageSize },
|
|
1577
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1578
|
-
);
|
|
1579
|
-
if (error) {
|
|
1580
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1584
|
-
const {
|
|
1585
|
-
error: warrning,
|
|
1586
|
-
} = ContentApplicationValidator.getSlideshows().validate(
|
|
1587
|
-
{ pageNo, pageSize },
|
|
1588
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1589
|
-
);
|
|
1590
|
-
if (warrning) {
|
|
1591
|
-
Logger({
|
|
1592
|
-
level: "WARN",
|
|
1593
|
-
message: `Parameter Validation warrnings for application > Content > getSlideshows \n ${warrning}`,
|
|
1594
|
-
});
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
const query_params = {};
|
|
1598
|
-
query_params["page_no"] = pageNo;
|
|
1599
|
-
query_params["page_size"] = pageSize;
|
|
1600
|
-
|
|
1601
|
-
const xHeaders = {};
|
|
1602
|
-
|
|
1603
|
-
const response = await ApplicationAPIClient.execute(
|
|
1604
|
-
this._conf,
|
|
1605
|
-
"get",
|
|
1606
|
-
constructUrl({
|
|
1607
|
-
url: this._urls["getSlideshows"],
|
|
1608
|
-
params: {},
|
|
1609
|
-
}),
|
|
1610
|
-
query_params,
|
|
1611
|
-
undefined,
|
|
1612
|
-
{ ...xHeaders, ...requestHeaders },
|
|
1613
|
-
{ responseHeaders }
|
|
1614
|
-
);
|
|
1615
|
-
|
|
1616
|
-
let responseData = response;
|
|
1617
|
-
if (responseHeaders) {
|
|
1618
|
-
responseData = response[0];
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
const {
|
|
1622
|
-
error: res_error,
|
|
1623
|
-
} = ContentApplicationModel.SlideshowGetResponse().validate(responseData, {
|
|
1624
|
-
abortEarly: false,
|
|
1625
|
-
allowUnknown: true,
|
|
1626
|
-
});
|
|
1627
|
-
|
|
1628
|
-
if (res_error) {
|
|
1629
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1630
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1631
|
-
} else {
|
|
1632
|
-
Logger({
|
|
1633
|
-
level: "WARN",
|
|
1634
|
-
message: `Response Validation Warnings for application > Content > getSlideshows \n ${res_error}`,
|
|
1635
|
-
});
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
726
|
return response;
|
|
1640
727
|
}
|
|
1641
728
|
|
|
1642
729
|
/**
|
|
1643
|
-
* @param {Object} arg - Arg object.
|
|
1644
|
-
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1645
|
-
* @returns {Paginator<ContentApplicationModel.SlideshowGetResponse>}
|
|
1646
|
-
* @summary: List Slideshows
|
|
1647
|
-
* @description: List slideshows along with their details.
|
|
1648
|
-
*/
|
|
1649
|
-
getSlideshowsPaginator({ pageSize } = {}) {
|
|
1650
|
-
const paginator = new Paginator();
|
|
1651
|
-
const callback = async () => {
|
|
1652
|
-
const pageId = paginator.nextId;
|
|
1653
|
-
const pageNo = paginator.pageNo;
|
|
1654
|
-
const pageType = "number";
|
|
1655
|
-
const data = await this.getSlideshows({
|
|
1656
|
-
pageNo: pageNo,
|
|
1657
|
-
pageSize: pageSize,
|
|
1658
|
-
});
|
|
1659
|
-
paginator.setPaginator({
|
|
1660
|
-
hasNext: data.page.has_next ? true : false,
|
|
1661
|
-
nextId: data.page.next_id,
|
|
1662
|
-
});
|
|
1663
|
-
return data;
|
|
1664
|
-
};
|
|
1665
|
-
paginator.setCallback(callback.bind(this));
|
|
1666
|
-
return paginator;
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
/**
|
|
1670
|
-
* @param {ContentApplicationValidator.GetSupportInformationParam} arg - Arg object.
|
|
1671
730
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1672
731
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1673
|
-
* @returns {Promise<
|
|
732
|
+
* @returns {Promise<Support>} - Success response
|
|
1674
733
|
* @name getSupportInformation
|
|
1675
734
|
* @summary: Get customer support information
|
|
1676
735
|
* @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/).
|
|
@@ -1679,30 +738,6 @@ class Content {
|
|
|
1679
738
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1680
739
|
{ responseHeaders } = { responseHeaders: false }
|
|
1681
740
|
) {
|
|
1682
|
-
const {
|
|
1683
|
-
error,
|
|
1684
|
-
} = ContentApplicationValidator.getSupportInformation().validate(
|
|
1685
|
-
{},
|
|
1686
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1687
|
-
);
|
|
1688
|
-
if (error) {
|
|
1689
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1690
|
-
}
|
|
1691
|
-
|
|
1692
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1693
|
-
const {
|
|
1694
|
-
error: warrning,
|
|
1695
|
-
} = ContentApplicationValidator.getSupportInformation().validate(
|
|
1696
|
-
{},
|
|
1697
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1698
|
-
);
|
|
1699
|
-
if (warrning) {
|
|
1700
|
-
Logger({
|
|
1701
|
-
level: "WARN",
|
|
1702
|
-
message: `Parameter Validation warrnings for application > Content > getSupportInformation \n ${warrning}`,
|
|
1703
|
-
});
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
741
|
const query_params = {};
|
|
1707
742
|
|
|
1708
743
|
const xHeaders = {};
|
|
@@ -1725,32 +760,13 @@ class Content {
|
|
|
1725
760
|
responseData = response[0];
|
|
1726
761
|
}
|
|
1727
762
|
|
|
1728
|
-
const {
|
|
1729
|
-
error: res_error,
|
|
1730
|
-
} = ContentApplicationModel.Support().validate(responseData, {
|
|
1731
|
-
abortEarly: false,
|
|
1732
|
-
allowUnknown: true,
|
|
1733
|
-
});
|
|
1734
|
-
|
|
1735
|
-
if (res_error) {
|
|
1736
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1737
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1738
|
-
} else {
|
|
1739
|
-
Logger({
|
|
1740
|
-
level: "WARN",
|
|
1741
|
-
message: `Response Validation Warnings for application > Content > getSupportInformation \n ${res_error}`,
|
|
1742
|
-
});
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
763
|
return response;
|
|
1747
764
|
}
|
|
1748
765
|
|
|
1749
766
|
/**
|
|
1750
|
-
* @param {ContentApplicationValidator.GetTagsParam} arg - Arg object.
|
|
1751
767
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1752
768
|
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1753
|
-
* @returns {Promise<
|
|
769
|
+
* @returns {Promise<TagsSchema>} - Success response
|
|
1754
770
|
* @name getTags
|
|
1755
771
|
* @summary: Get HTML tags
|
|
1756
772
|
* @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/).
|
|
@@ -1759,26 +775,6 @@ class Content {
|
|
|
1759
775
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1760
776
|
{ responseHeaders } = { responseHeaders: false }
|
|
1761
777
|
) {
|
|
1762
|
-
const { error } = ContentApplicationValidator.getTags().validate(
|
|
1763
|
-
{},
|
|
1764
|
-
{ abortEarly: false, allowUnknown: true }
|
|
1765
|
-
);
|
|
1766
|
-
if (error) {
|
|
1767
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
// Showing warrnings if extra unknown parameters are found
|
|
1771
|
-
const { error: warrning } = ContentApplicationValidator.getTags().validate(
|
|
1772
|
-
{},
|
|
1773
|
-
{ abortEarly: false, allowUnknown: false }
|
|
1774
|
-
);
|
|
1775
|
-
if (warrning) {
|
|
1776
|
-
Logger({
|
|
1777
|
-
level: "WARN",
|
|
1778
|
-
message: `Parameter Validation warrnings for application > Content > getTags \n ${warrning}`,
|
|
1779
|
-
});
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
778
|
const query_params = {};
|
|
1783
779
|
|
|
1784
780
|
const xHeaders = {};
|
|
@@ -1801,24 +797,6 @@ class Content {
|
|
|
1801
797
|
responseData = response[0];
|
|
1802
798
|
}
|
|
1803
799
|
|
|
1804
|
-
const {
|
|
1805
|
-
error: res_error,
|
|
1806
|
-
} = ContentApplicationModel.TagsSchema().validate(responseData, {
|
|
1807
|
-
abortEarly: false,
|
|
1808
|
-
allowUnknown: true,
|
|
1809
|
-
});
|
|
1810
|
-
|
|
1811
|
-
if (res_error) {
|
|
1812
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
1813
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1814
|
-
} else {
|
|
1815
|
-
Logger({
|
|
1816
|
-
level: "WARN",
|
|
1817
|
-
message: `Response Validation Warnings for application > Content > getTags \n ${res_error}`,
|
|
1818
|
-
});
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
800
|
return response;
|
|
1823
801
|
}
|
|
1824
802
|
}
|