@gofynd/fdk-client-javascript 1.1.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/index.js +0 -3
- package/package.json +1 -1
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +8 -1
- package/sdk/application/ApplicationClient.d.ts +37 -6
- package/sdk/application/ApplicationClient.js +31 -0
- package/sdk/application/ApplicationConfig.d.ts +52 -12
- package/sdk/application/ApplicationConfig.js +37 -2
- package/sdk/application/ApplicationModels.d.ts +46 -1
- package/sdk/application/ApplicationModels.js +18 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +172 -357
- package/sdk/application/Cart/CartApplicationClient.js +620 -483
- package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
- package/sdk/application/Cart/CartApplicationModel.js +1224 -93
- package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
- package/sdk/application/Cart/CartApplicationValidator.js +270 -15
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +234 -413
- package/sdk/application/Catalog/CatalogApplicationClient.js +777 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2218 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1499 -170
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +14 -21
- package/sdk/application/Common/CommonApplicationClient.js +50 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +448 -19
- package/sdk/application/Common/CommonApplicationModel.js +224 -16
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +25 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +74 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +190 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +124 -7
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +113 -112
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +381 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2453 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1254 -108
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +120 -138
- package/sdk/application/Content/ContentApplicationClient.js +409 -277
- package/sdk/application/Content/ContentApplicationModel.d.ts +1627 -105
- package/sdk/application/Content/ContentApplicationModel.js +1202 -109
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +20 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +68 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +299 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +209 -16
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +50 -53
- package/sdk/application/Lead/LeadApplicationClient.js +169 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +1405 -54
- package/sdk/application/Lead/LeadApplicationModel.js +619 -73
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +34 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +110 -73
- package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
- package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
- package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
- package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
- package/sdk/application/Order/OrderApplicationClient.d.ts +81 -133
- package/sdk/application/Order/OrderApplicationClient.js +297 -217
- package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
- package/sdk/application/Order/OrderApplicationModel.js +776 -57
- package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
- package/sdk/application/Order/OrderApplicationValidator.js +114 -5
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +341 -356
- package/sdk/application/Payment/PaymentApplicationClient.js +1077 -703
- package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
- package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
- package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
- package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
- package/sdk/application/PosCart/PosCartApplicationClient.d.ts +178 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +636 -491
- package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
- package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
- package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
- package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +49 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +160 -102
- package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
- package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
- package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
- package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
- package/sdk/application/Share/ShareApplicationClient.d.ts +44 -50
- package/sdk/application/Share/ShareApplicationClient.js +165 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +230 -15
- package/sdk/application/Share/ShareApplicationModel.js +154 -16
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +25 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +83 -54
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +621 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +464 -40
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +219 -303
- package/sdk/application/User/UserApplicationClient.js +819 -522
- package/sdk/application/User/UserApplicationModel.d.ts +1390 -101
- package/sdk/application/User/UserApplicationModel.js +983 -44
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +8 -2
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/partner/PartnerAPIClient.d.ts +15 -1
- package/sdk/partner/PartnerAPIClient.js +8 -1
- package/sdk/partner/PartnerClient.d.ts +20 -3
- package/sdk/partner/PartnerClient.js +17 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +26 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +82 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +202 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +139 -10
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +42 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +26 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +88 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +310 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1211 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +824 -59
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +153 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +87 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +392 -634
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1480 -957
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3639 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2368 -212
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +438 -615
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1449 -984
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +573 -824
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1773 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6871 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -349
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1331 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +611 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +14 -21
- package/sdk/platform/Common/CommonPlatformClient.js +48 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +448 -19
- package/sdk/platform/Common/CommonPlatformModel.js +224 -16
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +42 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +21 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +457 -279
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +1423 -553
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +581 -42
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +294 -22
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +18 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +58 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1630 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1150 -85
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +102 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +321 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +830 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +612 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +180 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +98 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +232 -212
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +737 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +293 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +184 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +166 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +519 -310
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4504 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2242 -204
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +495 -560
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1777 -987
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
- package/sdk/platform/Content/ContentPlatformModel.d.ts +1661 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1217 -113
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +67 -101
- package/sdk/platform/Discount/DiscountPlatformClient.js +240 -176
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +242 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +162 -10
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
- package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +32 -41
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +106 -74
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +77 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +41 -6
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +39 -54
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +124 -99
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +299 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +207 -16
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +98 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +54 -7
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +85 -91
- package/sdk/platform/Finance/FinancePlatformClient.js +272 -180
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +619 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +458 -30
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +123 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +95 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +99 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +288 -199
- package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
- package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
- package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +86 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +326 -186
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +75 -101
- package/sdk/platform/Lead/LeadPlatformClient.js +240 -174
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1403 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +618 -73
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +85 -8
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +18 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +56 -29
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
- package/sdk/platform/Order/OrderPlatformClient.d.ts +343 -556
- package/sdk/platform/Order/OrderPlatformClient.js +969 -762
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4967 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3249 -259
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +758 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +351 -22
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +28 -36
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +103 -59
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +66 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +32 -4
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +68 -107
- package/sdk/platform/Partner/PartnerPlatformClient.js +253 -174
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +767 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +524 -41
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +207 -13
- package/sdk/platform/Partner/PartnerPlatformValidator.js +87 -5
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +255 -260
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +860 -504
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +348 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +221 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +73 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +238 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +2658 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1035 -36
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
- package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
- package/sdk/platform/PlatformAPIClient.d.ts +16 -1
- package/sdk/platform/PlatformAPIClient.js +9 -1
- package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
- package/sdk/platform/PlatformApplicationClient.js +17 -1899
- package/sdk/platform/PlatformClient.d.ts +29 -12579
- package/sdk/platform/PlatformClient.js +26 -15085
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +80 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +307 -177
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +371 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +246 -16
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +120 -89
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +349 -201
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +128 -12
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +85 -11
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +148 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +454 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1399 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1022 -71
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +38 -47
- package/sdk/platform/Share/SharePlatformApplicationClient.js +137 -73
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
- package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
- package/sdk/platform/Share/SharePlatformModel.js +165 -17
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +149 -183
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +579 -330
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +308 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +162 -10
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +621 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +464 -40
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +119 -151
- package/sdk/platform/User/UserPlatformApplicationClient.js +411 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +235 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +126 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +1390 -101
- package/sdk/platform/User/UserPlatformModel.js +983 -44
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +38 -47
- package/sdk/platform/Webhook/WebhookPlatformClient.js +137 -87
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +242 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +167 -18
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +83 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +43 -5
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +46 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +473 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +224 -16
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +48 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +146 -98
- package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
- package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
- package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
- package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
- package/sdk/public/PublicClient.d.ts +19 -3
- package/sdk/public/PublicClient.js +16 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +42 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +242 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +167 -18
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
|
@@ -2,8 +2,8 @@ const ApplicationAPIClient = require("../ApplicationAPIClient");
|
|
|
2
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
3
|
const constructUrl = require("../constructUrl");
|
|
4
4
|
const Paginator = require("../../common/Paginator");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const ContentApplicationValidator = require("./ContentApplicationValidator");
|
|
6
|
+
const ContentApplicationModel = require("./ContentApplicationModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
8
|
const Joi = require("joi");
|
|
9
9
|
|
|
@@ -50,13 +50,16 @@ class Content {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* @param {
|
|
54
|
-
* @returns {Promise<AnnouncementsResponseSchema>}
|
|
53
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
54
|
+
* @returns {Promise<ContentApplicationModel.AnnouncementsResponseSchema>}
|
|
55
|
+
* - Success response
|
|
56
|
+
*
|
|
57
|
+
* @name getAnnouncements
|
|
55
58
|
* @summary: Get live announcements
|
|
56
|
-
* @description: Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve live announcements. Get announcements on individual pages or for all pages.
|
|
59
|
+
* @description: Announcements are useful to highlight a message or information on top of a webpage. Use this API to retrieve live announcements. Get announcements on individual pages or for all pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getAnnouncements/).
|
|
57
60
|
*/
|
|
58
|
-
async getAnnouncements({} = {}) {
|
|
59
|
-
const { error } =
|
|
61
|
+
async getAnnouncements({ headers } = { headers: false }) {
|
|
62
|
+
const { error } = ContentApplicationValidator.getAnnouncements().validate(
|
|
60
63
|
{},
|
|
61
64
|
{ abortEarly: false, allowUnknown: true }
|
|
62
65
|
);
|
|
@@ -65,16 +68,17 @@ class Content {
|
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
// Showing warrnings if extra unknown parameters are found
|
|
68
|
-
const {
|
|
71
|
+
const {
|
|
72
|
+
error: warrning,
|
|
73
|
+
} = ContentApplicationValidator.getAnnouncements().validate(
|
|
69
74
|
{},
|
|
70
75
|
{ abortEarly: false, allowUnknown: false }
|
|
71
76
|
);
|
|
72
77
|
if (warrning) {
|
|
73
78
|
Logger({
|
|
74
79
|
level: "WARN",
|
|
75
|
-
message:
|
|
80
|
+
message: `Parameter Validation warrnings for application > Content > getAnnouncements \n ${warrning}`,
|
|
76
81
|
});
|
|
77
|
-
Logger({ level: "WARN", message: warrning });
|
|
78
82
|
}
|
|
79
83
|
|
|
80
84
|
const query_params = {};
|
|
@@ -90,39 +94,42 @@ class Content {
|
|
|
90
94
|
}),
|
|
91
95
|
query_params,
|
|
92
96
|
undefined,
|
|
93
|
-
xHeaders
|
|
97
|
+
xHeaders,
|
|
98
|
+
{ headers }
|
|
94
99
|
);
|
|
95
100
|
|
|
101
|
+
let responseData = response;
|
|
102
|
+
if (headers) {
|
|
103
|
+
responseData = response[0];
|
|
104
|
+
}
|
|
105
|
+
|
|
96
106
|
const {
|
|
97
107
|
error: res_error,
|
|
98
|
-
} =
|
|
99
|
-
|
|
100
|
-
allowUnknown: false
|
|
101
|
-
|
|
108
|
+
} = ContentApplicationModel.AnnouncementsResponseSchema().validate(
|
|
109
|
+
responseData,
|
|
110
|
+
{ abortEarly: false, allowUnknown: false }
|
|
111
|
+
);
|
|
102
112
|
|
|
103
113
|
if (res_error) {
|
|
104
114
|
Logger({
|
|
105
115
|
level: "WARN",
|
|
106
|
-
message:
|
|
116
|
+
message: `Response Validation Warnnings for application > Content > getAnnouncements \n ${res_error}`,
|
|
107
117
|
});
|
|
108
|
-
Logger({ level: "WARN", message: res_error });
|
|
109
118
|
}
|
|
110
119
|
|
|
111
120
|
return response;
|
|
112
121
|
}
|
|
113
122
|
|
|
114
123
|
/**
|
|
115
|
-
* @param {
|
|
116
|
-
* @param {
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* @param {string} [arg.rootId] - ID given to the HTML element
|
|
120
|
-
* @returns {Promise<BlogSchema>} - Success response
|
|
124
|
+
* @param {ContentApplicationValidator.GetBlogParam} arg - Arg object.
|
|
125
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
126
|
+
* @returns {Promise<ContentApplicationModel.BlogSchema>} - Success response
|
|
127
|
+
* @name getBlog
|
|
121
128
|
* @summary: Get a blog
|
|
122
|
-
* @description: Use this API to get the details of a blog using its slug. Details include the title, reading time, publish status, feature image, tags, author, etc.
|
|
129
|
+
* @description: Use this API to get the details of a blog using its slug. Details include the title, reading time, publish status, feature image, tags, author, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlog/).
|
|
123
130
|
*/
|
|
124
|
-
async getBlog({ slug, rootId } = {}) {
|
|
125
|
-
const { error } =
|
|
131
|
+
async getBlog({ slug, rootId } = {}, { headers } = { headers: false }) {
|
|
132
|
+
const { error } = ContentApplicationValidator.getBlog().validate(
|
|
126
133
|
{ slug, rootId },
|
|
127
134
|
{ abortEarly: false, allowUnknown: true }
|
|
128
135
|
);
|
|
@@ -131,16 +138,15 @@ class Content {
|
|
|
131
138
|
}
|
|
132
139
|
|
|
133
140
|
// Showing warrnings if extra unknown parameters are found
|
|
134
|
-
const { error: warrning } =
|
|
141
|
+
const { error: warrning } = ContentApplicationValidator.getBlog().validate(
|
|
135
142
|
{ slug, rootId },
|
|
136
143
|
{ abortEarly: false, allowUnknown: false }
|
|
137
144
|
);
|
|
138
145
|
if (warrning) {
|
|
139
146
|
Logger({
|
|
140
147
|
level: "WARN",
|
|
141
|
-
message:
|
|
148
|
+
message: `Parameter Validation warrnings for application > Content > getBlog \n ${warrning}`,
|
|
142
149
|
});
|
|
143
|
-
Logger({ level: "WARN", message: warrning });
|
|
144
150
|
}
|
|
145
151
|
|
|
146
152
|
const query_params = {};
|
|
@@ -157,10 +163,18 @@ class Content {
|
|
|
157
163
|
}),
|
|
158
164
|
query_params,
|
|
159
165
|
undefined,
|
|
160
|
-
xHeaders
|
|
166
|
+
xHeaders,
|
|
167
|
+
{ headers }
|
|
161
168
|
);
|
|
162
169
|
|
|
163
|
-
|
|
170
|
+
let responseData = response;
|
|
171
|
+
if (headers) {
|
|
172
|
+
responseData = response[0];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const {
|
|
176
|
+
error: res_error,
|
|
177
|
+
} = ContentApplicationModel.BlogSchema().validate(responseData, {
|
|
164
178
|
abortEarly: false,
|
|
165
179
|
allowUnknown: false,
|
|
166
180
|
});
|
|
@@ -168,25 +182,23 @@ class Content {
|
|
|
168
182
|
if (res_error) {
|
|
169
183
|
Logger({
|
|
170
184
|
level: "WARN",
|
|
171
|
-
message:
|
|
185
|
+
message: `Response Validation Warnnings for application > Content > getBlog \n ${res_error}`,
|
|
172
186
|
});
|
|
173
|
-
Logger({ level: "WARN", message: res_error });
|
|
174
187
|
}
|
|
175
188
|
|
|
176
189
|
return response;
|
|
177
190
|
}
|
|
178
191
|
|
|
179
192
|
/**
|
|
180
|
-
* @param {
|
|
181
|
-
* @param {
|
|
182
|
-
*
|
|
183
|
-
* @
|
|
184
|
-
* @returns {Promise<BlogGetResponse>} - Success response
|
|
193
|
+
* @param {ContentApplicationValidator.GetBlogsParam} arg - Arg object.
|
|
194
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
195
|
+
* @returns {Promise<ContentApplicationModel.BlogGetResponse>} - Success response
|
|
196
|
+
* @name getBlogs
|
|
185
197
|
* @summary: Get a list of blogs
|
|
186
|
-
* @description: Use this API to get all the blogs.
|
|
198
|
+
* @description: Use this API to get all the blogs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlogs/).
|
|
187
199
|
*/
|
|
188
|
-
async getBlogs({ pageNo, pageSize } = {}) {
|
|
189
|
-
const { error } =
|
|
200
|
+
async getBlogs({ pageNo, pageSize } = {}, { headers } = { headers: false }) {
|
|
201
|
+
const { error } = ContentApplicationValidator.getBlogs().validate(
|
|
190
202
|
{ pageNo, pageSize },
|
|
191
203
|
{ abortEarly: false, allowUnknown: true }
|
|
192
204
|
);
|
|
@@ -195,16 +207,15 @@ class Content {
|
|
|
195
207
|
}
|
|
196
208
|
|
|
197
209
|
// Showing warrnings if extra unknown parameters are found
|
|
198
|
-
const { error: warrning } =
|
|
210
|
+
const { error: warrning } = ContentApplicationValidator.getBlogs().validate(
|
|
199
211
|
{ pageNo, pageSize },
|
|
200
212
|
{ abortEarly: false, allowUnknown: false }
|
|
201
213
|
);
|
|
202
214
|
if (warrning) {
|
|
203
215
|
Logger({
|
|
204
216
|
level: "WARN",
|
|
205
|
-
message:
|
|
217
|
+
message: `Parameter Validation warrnings for application > Content > getBlogs \n ${warrning}`,
|
|
206
218
|
});
|
|
207
|
-
Logger({ level: "WARN", message: warrning });
|
|
208
219
|
}
|
|
209
220
|
|
|
210
221
|
const query_params = {};
|
|
@@ -222,12 +233,18 @@ class Content {
|
|
|
222
233
|
}),
|
|
223
234
|
query_params,
|
|
224
235
|
undefined,
|
|
225
|
-
xHeaders
|
|
236
|
+
xHeaders,
|
|
237
|
+
{ headers }
|
|
226
238
|
);
|
|
227
239
|
|
|
240
|
+
let responseData = response;
|
|
241
|
+
if (headers) {
|
|
242
|
+
responseData = response[0];
|
|
243
|
+
}
|
|
244
|
+
|
|
228
245
|
const {
|
|
229
246
|
error: res_error,
|
|
230
|
-
} =
|
|
247
|
+
} = ContentApplicationModel.BlogGetResponse().validate(responseData, {
|
|
231
248
|
abortEarly: false,
|
|
232
249
|
allowUnknown: false,
|
|
233
250
|
});
|
|
@@ -235,9 +252,8 @@ class Content {
|
|
|
235
252
|
if (res_error) {
|
|
236
253
|
Logger({
|
|
237
254
|
level: "WARN",
|
|
238
|
-
message:
|
|
255
|
+
message: `Response Validation Warnnings for application > Content > getBlogs \n ${res_error}`,
|
|
239
256
|
});
|
|
240
|
-
Logger({ level: "WARN", message: res_error });
|
|
241
257
|
}
|
|
242
258
|
|
|
243
259
|
return response;
|
|
@@ -246,6 +262,7 @@ class Content {
|
|
|
246
262
|
/**
|
|
247
263
|
* @param {Object} arg - Arg object.
|
|
248
264
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
265
|
+
* @returns {Paginator<ContentApplicationModel.BlogGetResponse>}
|
|
249
266
|
* @summary: Get a list of blogs
|
|
250
267
|
* @description: Use this API to get all the blogs.
|
|
251
268
|
*/
|
|
@@ -270,13 +287,14 @@ class Content {
|
|
|
270
287
|
}
|
|
271
288
|
|
|
272
289
|
/**
|
|
273
|
-
* @param {
|
|
274
|
-
* @returns {Promise<DataLoadersSchema>} - Success response
|
|
290
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
291
|
+
* @returns {Promise<ContentApplicationModel.DataLoadersSchema>} - Success response
|
|
292
|
+
* @name getDataLoaders
|
|
275
293
|
* @summary: Get the data loaders associated with an application
|
|
276
|
-
* @description: Use this API to get all selected data loaders of the application in the form of tags.
|
|
294
|
+
* @description: Use this API to get all selected data loaders of the application in the form of tags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getDataLoaders/).
|
|
277
295
|
*/
|
|
278
|
-
async getDataLoaders({} = {}) {
|
|
279
|
-
const { error } =
|
|
296
|
+
async getDataLoaders({ headers } = { headers: false }) {
|
|
297
|
+
const { error } = ContentApplicationValidator.getDataLoaders().validate(
|
|
280
298
|
{},
|
|
281
299
|
{ abortEarly: false, allowUnknown: true }
|
|
282
300
|
);
|
|
@@ -285,16 +303,17 @@ class Content {
|
|
|
285
303
|
}
|
|
286
304
|
|
|
287
305
|
// Showing warrnings if extra unknown parameters are found
|
|
288
|
-
const {
|
|
306
|
+
const {
|
|
307
|
+
error: warrning,
|
|
308
|
+
} = ContentApplicationValidator.getDataLoaders().validate(
|
|
289
309
|
{},
|
|
290
310
|
{ abortEarly: false, allowUnknown: false }
|
|
291
311
|
);
|
|
292
312
|
if (warrning) {
|
|
293
313
|
Logger({
|
|
294
314
|
level: "WARN",
|
|
295
|
-
message:
|
|
315
|
+
message: `Parameter Validation warrnings for application > Content > getDataLoaders \n ${warrning}`,
|
|
296
316
|
});
|
|
297
|
-
Logger({ level: "WARN", message: warrning });
|
|
298
317
|
}
|
|
299
318
|
|
|
300
319
|
const query_params = {};
|
|
@@ -310,12 +329,18 @@ class Content {
|
|
|
310
329
|
}),
|
|
311
330
|
query_params,
|
|
312
331
|
undefined,
|
|
313
|
-
xHeaders
|
|
332
|
+
xHeaders,
|
|
333
|
+
{ headers }
|
|
314
334
|
);
|
|
315
335
|
|
|
336
|
+
let responseData = response;
|
|
337
|
+
if (headers) {
|
|
338
|
+
responseData = response[0];
|
|
339
|
+
}
|
|
340
|
+
|
|
316
341
|
const {
|
|
317
342
|
error: res_error,
|
|
318
|
-
} =
|
|
343
|
+
} = ContentApplicationModel.DataLoadersSchema().validate(responseData, {
|
|
319
344
|
abortEarly: false,
|
|
320
345
|
allowUnknown: false,
|
|
321
346
|
});
|
|
@@ -323,25 +348,23 @@ class Content {
|
|
|
323
348
|
if (res_error) {
|
|
324
349
|
Logger({
|
|
325
350
|
level: "WARN",
|
|
326
|
-
message:
|
|
351
|
+
message: `Response Validation Warnnings for application > Content > getDataLoaders \n ${res_error}`,
|
|
327
352
|
});
|
|
328
|
-
Logger({ level: "WARN", message: res_error });
|
|
329
353
|
}
|
|
330
354
|
|
|
331
355
|
return response;
|
|
332
356
|
}
|
|
333
357
|
|
|
334
358
|
/**
|
|
335
|
-
* @param {
|
|
336
|
-
* @param {
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
* @returns {Promise<FaqSchema>} - Success response
|
|
359
|
+
* @param {ContentApplicationValidator.GetFaqBySlugParam} arg - Arg object.
|
|
360
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
361
|
+
* @returns {Promise<ContentApplicationModel.FaqSchema>} - Success response
|
|
362
|
+
* @name getFaqBySlug
|
|
340
363
|
* @summary: Get an FAQ
|
|
341
|
-
* @description: Use this API to get a particular FAQ by its slug.
|
|
364
|
+
* @description: Use this API to get a particular FAQ by its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqBySlug/).
|
|
342
365
|
*/
|
|
343
|
-
async getFaqBySlug({ slug } = {}) {
|
|
344
|
-
const { error } =
|
|
366
|
+
async getFaqBySlug({ slug } = {}, { headers } = { headers: false }) {
|
|
367
|
+
const { error } = ContentApplicationValidator.getFaqBySlug().validate(
|
|
345
368
|
{ slug },
|
|
346
369
|
{ abortEarly: false, allowUnknown: true }
|
|
347
370
|
);
|
|
@@ -350,16 +373,17 @@ class Content {
|
|
|
350
373
|
}
|
|
351
374
|
|
|
352
375
|
// Showing warrnings if extra unknown parameters are found
|
|
353
|
-
const {
|
|
376
|
+
const {
|
|
377
|
+
error: warrning,
|
|
378
|
+
} = ContentApplicationValidator.getFaqBySlug().validate(
|
|
354
379
|
{ slug },
|
|
355
380
|
{ abortEarly: false, allowUnknown: false }
|
|
356
381
|
);
|
|
357
382
|
if (warrning) {
|
|
358
383
|
Logger({
|
|
359
384
|
level: "WARN",
|
|
360
|
-
message:
|
|
385
|
+
message: `Parameter Validation warrnings for application > Content > getFaqBySlug \n ${warrning}`,
|
|
361
386
|
});
|
|
362
|
-
Logger({ level: "WARN", message: warrning });
|
|
363
387
|
}
|
|
364
388
|
|
|
365
389
|
const query_params = {};
|
|
@@ -375,10 +399,18 @@ class Content {
|
|
|
375
399
|
}),
|
|
376
400
|
query_params,
|
|
377
401
|
undefined,
|
|
378
|
-
xHeaders
|
|
402
|
+
xHeaders,
|
|
403
|
+
{ headers }
|
|
379
404
|
);
|
|
380
405
|
|
|
381
|
-
|
|
406
|
+
let responseData = response;
|
|
407
|
+
if (headers) {
|
|
408
|
+
responseData = response[0];
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const {
|
|
412
|
+
error: res_error,
|
|
413
|
+
} = ContentApplicationModel.FaqSchema().validate(responseData, {
|
|
382
414
|
abortEarly: false,
|
|
383
415
|
allowUnknown: false,
|
|
384
416
|
});
|
|
@@ -386,22 +418,23 @@ class Content {
|
|
|
386
418
|
if (res_error) {
|
|
387
419
|
Logger({
|
|
388
420
|
level: "WARN",
|
|
389
|
-
message:
|
|
421
|
+
message: `Response Validation Warnnings for application > Content > getFaqBySlug \n ${res_error}`,
|
|
390
422
|
});
|
|
391
|
-
Logger({ level: "WARN", message: res_error });
|
|
392
423
|
}
|
|
393
424
|
|
|
394
425
|
return response;
|
|
395
426
|
}
|
|
396
427
|
|
|
397
428
|
/**
|
|
398
|
-
* @param {
|
|
399
|
-
* @returns {Promise<GetFaqCategoriesSchema>} -
|
|
429
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
430
|
+
* @returns {Promise<ContentApplicationModel.GetFaqCategoriesSchema>} -
|
|
431
|
+
* Success response
|
|
432
|
+
* @name getFaqCategories
|
|
400
433
|
* @summary: Get a list of FAQ categories
|
|
401
|
-
* @description: FAQs can be divided into categories. Use this API to get a list of FAQ categories.
|
|
434
|
+
* @description: FAQs can be divided into categories. Use this API to get a list of FAQ categories. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqCategories/).
|
|
402
435
|
*/
|
|
403
|
-
async getFaqCategories({} = {}) {
|
|
404
|
-
const { error } =
|
|
436
|
+
async getFaqCategories({ headers } = { headers: false }) {
|
|
437
|
+
const { error } = ContentApplicationValidator.getFaqCategories().validate(
|
|
405
438
|
{},
|
|
406
439
|
{ abortEarly: false, allowUnknown: true }
|
|
407
440
|
);
|
|
@@ -410,16 +443,17 @@ class Content {
|
|
|
410
443
|
}
|
|
411
444
|
|
|
412
445
|
// Showing warrnings if extra unknown parameters are found
|
|
413
|
-
const {
|
|
446
|
+
const {
|
|
447
|
+
error: warrning,
|
|
448
|
+
} = ContentApplicationValidator.getFaqCategories().validate(
|
|
414
449
|
{},
|
|
415
450
|
{ abortEarly: false, allowUnknown: false }
|
|
416
451
|
);
|
|
417
452
|
if (warrning) {
|
|
418
453
|
Logger({
|
|
419
454
|
level: "WARN",
|
|
420
|
-
message:
|
|
455
|
+
message: `Parameter Validation warrnings for application > Content > getFaqCategories \n ${warrning}`,
|
|
421
456
|
});
|
|
422
|
-
Logger({ level: "WARN", message: warrning });
|
|
423
457
|
}
|
|
424
458
|
|
|
425
459
|
const query_params = {};
|
|
@@ -435,38 +469,45 @@ class Content {
|
|
|
435
469
|
}),
|
|
436
470
|
query_params,
|
|
437
471
|
undefined,
|
|
438
|
-
xHeaders
|
|
472
|
+
xHeaders,
|
|
473
|
+
{ headers }
|
|
439
474
|
);
|
|
440
475
|
|
|
476
|
+
let responseData = response;
|
|
477
|
+
if (headers) {
|
|
478
|
+
responseData = response[0];
|
|
479
|
+
}
|
|
480
|
+
|
|
441
481
|
const {
|
|
442
482
|
error: res_error,
|
|
443
|
-
} =
|
|
444
|
-
|
|
445
|
-
allowUnknown: false
|
|
446
|
-
|
|
483
|
+
} = ContentApplicationModel.GetFaqCategoriesSchema().validate(
|
|
484
|
+
responseData,
|
|
485
|
+
{ abortEarly: false, allowUnknown: false }
|
|
486
|
+
);
|
|
447
487
|
|
|
448
488
|
if (res_error) {
|
|
449
489
|
Logger({
|
|
450
490
|
level: "WARN",
|
|
451
|
-
message:
|
|
491
|
+
message: `Response Validation Warnnings for application > Content > getFaqCategories \n ${res_error}`,
|
|
452
492
|
});
|
|
453
|
-
Logger({ level: "WARN", message: res_error });
|
|
454
493
|
}
|
|
455
494
|
|
|
456
495
|
return response;
|
|
457
496
|
}
|
|
458
497
|
|
|
459
498
|
/**
|
|
460
|
-
* @param {
|
|
461
|
-
* @param {
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
* @
|
|
499
|
+
* @param {ContentApplicationValidator.GetFaqCategoryBySlugParam} arg - Arg object.
|
|
500
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
501
|
+
* @returns {Promise<ContentApplicationModel.GetFaqCategoryBySlugSchema>} -
|
|
502
|
+
* Success response
|
|
503
|
+
* @name getFaqCategoryBySlug
|
|
465
504
|
* @summary: Get the FAQ category
|
|
466
|
-
* @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
|
|
505
|
+
* @description: FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqCategoryBySlug/).
|
|
467
506
|
*/
|
|
468
|
-
async getFaqCategoryBySlug({ slug } = {}) {
|
|
469
|
-
const {
|
|
507
|
+
async getFaqCategoryBySlug({ slug } = {}, { headers } = { headers: false }) {
|
|
508
|
+
const {
|
|
509
|
+
error,
|
|
510
|
+
} = ContentApplicationValidator.getFaqCategoryBySlug().validate(
|
|
470
511
|
{ slug },
|
|
471
512
|
{ abortEarly: false, allowUnknown: true }
|
|
472
513
|
);
|
|
@@ -477,16 +518,15 @@ class Content {
|
|
|
477
518
|
// Showing warrnings if extra unknown parameters are found
|
|
478
519
|
const {
|
|
479
520
|
error: warrning,
|
|
480
|
-
} =
|
|
521
|
+
} = ContentApplicationValidator.getFaqCategoryBySlug().validate(
|
|
481
522
|
{ slug },
|
|
482
523
|
{ abortEarly: false, allowUnknown: false }
|
|
483
524
|
);
|
|
484
525
|
if (warrning) {
|
|
485
526
|
Logger({
|
|
486
527
|
level: "WARN",
|
|
487
|
-
message:
|
|
528
|
+
message: `Parameter Validation warrnings for application > Content > getFaqCategoryBySlug \n ${warrning}`,
|
|
488
529
|
});
|
|
489
|
-
Logger({ level: "WARN", message: warrning });
|
|
490
530
|
}
|
|
491
531
|
|
|
492
532
|
const query_params = {};
|
|
@@ -502,35 +542,41 @@ class Content {
|
|
|
502
542
|
}),
|
|
503
543
|
query_params,
|
|
504
544
|
undefined,
|
|
505
|
-
xHeaders
|
|
545
|
+
xHeaders,
|
|
546
|
+
{ headers }
|
|
506
547
|
);
|
|
507
548
|
|
|
549
|
+
let responseData = response;
|
|
550
|
+
if (headers) {
|
|
551
|
+
responseData = response[0];
|
|
552
|
+
}
|
|
553
|
+
|
|
508
554
|
const {
|
|
509
555
|
error: res_error,
|
|
510
|
-
} =
|
|
511
|
-
|
|
512
|
-
allowUnknown: false
|
|
513
|
-
|
|
556
|
+
} = ContentApplicationModel.GetFaqCategoryBySlugSchema().validate(
|
|
557
|
+
responseData,
|
|
558
|
+
{ abortEarly: false, allowUnknown: false }
|
|
559
|
+
);
|
|
514
560
|
|
|
515
561
|
if (res_error) {
|
|
516
562
|
Logger({
|
|
517
563
|
level: "WARN",
|
|
518
|
-
message:
|
|
564
|
+
message: `Response Validation Warnnings for application > Content > getFaqCategoryBySlug \n ${res_error}`,
|
|
519
565
|
});
|
|
520
|
-
Logger({ level: "WARN", message: res_error });
|
|
521
566
|
}
|
|
522
567
|
|
|
523
568
|
return response;
|
|
524
569
|
}
|
|
525
570
|
|
|
526
571
|
/**
|
|
527
|
-
* @param {
|
|
528
|
-
* @returns {Promise<FaqResponseSchema>} - Success response
|
|
572
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
573
|
+
* @returns {Promise<ContentApplicationModel.FaqResponseSchema>} - Success response
|
|
574
|
+
* @name getFaqs
|
|
529
575
|
* @summary: Get a list of FAQs
|
|
530
|
-
* @description: Use this API to get a list of frequently asked questions. Users will benefit from it when facing any issue with the website.
|
|
576
|
+
* @description: Use this API to get a list of frequently asked questions. Users will benefit from it when facing any issue with the website. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqs/).
|
|
531
577
|
*/
|
|
532
|
-
async getFaqs({} = {}) {
|
|
533
|
-
const { error } =
|
|
578
|
+
async getFaqs({ headers } = { headers: false }) {
|
|
579
|
+
const { error } = ContentApplicationValidator.getFaqs().validate(
|
|
534
580
|
{},
|
|
535
581
|
{ abortEarly: false, allowUnknown: true }
|
|
536
582
|
);
|
|
@@ -539,16 +585,15 @@ class Content {
|
|
|
539
585
|
}
|
|
540
586
|
|
|
541
587
|
// Showing warrnings if extra unknown parameters are found
|
|
542
|
-
const { error: warrning } =
|
|
588
|
+
const { error: warrning } = ContentApplicationValidator.getFaqs().validate(
|
|
543
589
|
{},
|
|
544
590
|
{ abortEarly: false, allowUnknown: false }
|
|
545
591
|
);
|
|
546
592
|
if (warrning) {
|
|
547
593
|
Logger({
|
|
548
594
|
level: "WARN",
|
|
549
|
-
message:
|
|
595
|
+
message: `Parameter Validation warrnings for application > Content > getFaqs \n ${warrning}`,
|
|
550
596
|
});
|
|
551
|
-
Logger({ level: "WARN", message: warrning });
|
|
552
597
|
}
|
|
553
598
|
|
|
554
599
|
const query_params = {};
|
|
@@ -564,12 +609,18 @@ class Content {
|
|
|
564
609
|
}),
|
|
565
610
|
query_params,
|
|
566
611
|
undefined,
|
|
567
|
-
xHeaders
|
|
612
|
+
xHeaders,
|
|
613
|
+
{ headers }
|
|
568
614
|
);
|
|
569
615
|
|
|
616
|
+
let responseData = response;
|
|
617
|
+
if (headers) {
|
|
618
|
+
responseData = response[0];
|
|
619
|
+
}
|
|
620
|
+
|
|
570
621
|
const {
|
|
571
622
|
error: res_error,
|
|
572
|
-
} =
|
|
623
|
+
} = ContentApplicationModel.FaqResponseSchema().validate(responseData, {
|
|
573
624
|
abortEarly: false,
|
|
574
625
|
allowUnknown: false,
|
|
575
626
|
});
|
|
@@ -577,25 +628,25 @@ class Content {
|
|
|
577
628
|
if (res_error) {
|
|
578
629
|
Logger({
|
|
579
630
|
level: "WARN",
|
|
580
|
-
message:
|
|
631
|
+
message: `Response Validation Warnnings for application > Content > getFaqs \n ${res_error}`,
|
|
581
632
|
});
|
|
582
|
-
Logger({ level: "WARN", message: res_error });
|
|
583
633
|
}
|
|
584
634
|
|
|
585
635
|
return response;
|
|
586
636
|
}
|
|
587
637
|
|
|
588
638
|
/**
|
|
589
|
-
* @param {
|
|
590
|
-
* @param {
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
* @returns {Promise<GetFaqSchema>} - Success response
|
|
639
|
+
* @param {ContentApplicationValidator.GetFaqsByCategorySlugParam} arg - Arg object.
|
|
640
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
641
|
+
* @returns {Promise<ContentApplicationModel.GetFaqSchema>} - Success response
|
|
642
|
+
* @name getFaqsByCategorySlug
|
|
594
643
|
* @summary: Get FAQs using the slug of FAQ category
|
|
595
|
-
* @description: FAQs can be divided into categories. Use this API to get all the FAQs belonging to a category by using the category slug.
|
|
644
|
+
* @description: FAQs can be divided into categories. Use this API to get all the FAQs belonging to a category by using the category slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getFaqsByCategorySlug/).
|
|
596
645
|
*/
|
|
597
|
-
async getFaqsByCategorySlug({ slug } = {}) {
|
|
598
|
-
const {
|
|
646
|
+
async getFaqsByCategorySlug({ slug } = {}, { headers } = { headers: false }) {
|
|
647
|
+
const {
|
|
648
|
+
error,
|
|
649
|
+
} = ContentApplicationValidator.getFaqsByCategorySlug().validate(
|
|
599
650
|
{ slug },
|
|
600
651
|
{ abortEarly: false, allowUnknown: true }
|
|
601
652
|
);
|
|
@@ -606,16 +657,15 @@ class Content {
|
|
|
606
657
|
// Showing warrnings if extra unknown parameters are found
|
|
607
658
|
const {
|
|
608
659
|
error: warrning,
|
|
609
|
-
} =
|
|
660
|
+
} = ContentApplicationValidator.getFaqsByCategorySlug().validate(
|
|
610
661
|
{ slug },
|
|
611
662
|
{ abortEarly: false, allowUnknown: false }
|
|
612
663
|
);
|
|
613
664
|
if (warrning) {
|
|
614
665
|
Logger({
|
|
615
666
|
level: "WARN",
|
|
616
|
-
message:
|
|
667
|
+
message: `Parameter Validation warrnings for application > Content > getFaqsByCategorySlug \n ${warrning}`,
|
|
617
668
|
});
|
|
618
|
-
Logger({ level: "WARN", message: warrning });
|
|
619
669
|
}
|
|
620
670
|
|
|
621
671
|
const query_params = {};
|
|
@@ -631,33 +681,41 @@ class Content {
|
|
|
631
681
|
}),
|
|
632
682
|
query_params,
|
|
633
683
|
undefined,
|
|
634
|
-
xHeaders
|
|
684
|
+
xHeaders,
|
|
685
|
+
{ headers }
|
|
635
686
|
);
|
|
636
687
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
688
|
+
let responseData = response;
|
|
689
|
+
if (headers) {
|
|
690
|
+
responseData = response[0];
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
const {
|
|
694
|
+
error: res_error,
|
|
695
|
+
} = ContentApplicationModel.GetFaqSchema().validate(responseData, {
|
|
696
|
+
abortEarly: false,
|
|
697
|
+
allowUnknown: false,
|
|
698
|
+
});
|
|
641
699
|
|
|
642
700
|
if (res_error) {
|
|
643
701
|
Logger({
|
|
644
702
|
level: "WARN",
|
|
645
|
-
message:
|
|
703
|
+
message: `Response Validation Warnnings for application > Content > getFaqsByCategorySlug \n ${res_error}`,
|
|
646
704
|
});
|
|
647
|
-
Logger({ level: "WARN", message: res_error });
|
|
648
705
|
}
|
|
649
706
|
|
|
650
707
|
return response;
|
|
651
708
|
}
|
|
652
709
|
|
|
653
710
|
/**
|
|
654
|
-
* @param {
|
|
655
|
-
* @returns {Promise<LandingPageSchema>} - Success response
|
|
711
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
712
|
+
* @returns {Promise<ContentApplicationModel.LandingPageSchema>} - Success response
|
|
713
|
+
* @name getLandingPage
|
|
656
714
|
* @summary: Get the landing page
|
|
657
|
-
* @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch the details of a landing page.
|
|
715
|
+
* @description: Landing page is the first page that a prospect lands upon while visiting a website. Use this API to fetch the details of a landing page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getLandingPage/).
|
|
658
716
|
*/
|
|
659
|
-
async getLandingPage({} = {}) {
|
|
660
|
-
const { error } =
|
|
717
|
+
async getLandingPage({ headers } = { headers: false }) {
|
|
718
|
+
const { error } = ContentApplicationValidator.getLandingPage().validate(
|
|
661
719
|
{},
|
|
662
720
|
{ abortEarly: false, allowUnknown: true }
|
|
663
721
|
);
|
|
@@ -666,16 +724,17 @@ class Content {
|
|
|
666
724
|
}
|
|
667
725
|
|
|
668
726
|
// Showing warrnings if extra unknown parameters are found
|
|
669
|
-
const {
|
|
727
|
+
const {
|
|
728
|
+
error: warrning,
|
|
729
|
+
} = ContentApplicationValidator.getLandingPage().validate(
|
|
670
730
|
{},
|
|
671
731
|
{ abortEarly: false, allowUnknown: false }
|
|
672
732
|
);
|
|
673
733
|
if (warrning) {
|
|
674
734
|
Logger({
|
|
675
735
|
level: "WARN",
|
|
676
|
-
message:
|
|
736
|
+
message: `Parameter Validation warrnings for application > Content > getLandingPage \n ${warrning}`,
|
|
677
737
|
});
|
|
678
|
-
Logger({ level: "WARN", message: warrning });
|
|
679
738
|
}
|
|
680
739
|
|
|
681
740
|
const query_params = {};
|
|
@@ -691,12 +750,18 @@ class Content {
|
|
|
691
750
|
}),
|
|
692
751
|
query_params,
|
|
693
752
|
undefined,
|
|
694
|
-
xHeaders
|
|
753
|
+
xHeaders,
|
|
754
|
+
{ headers }
|
|
695
755
|
);
|
|
696
756
|
|
|
757
|
+
let responseData = response;
|
|
758
|
+
if (headers) {
|
|
759
|
+
responseData = response[0];
|
|
760
|
+
}
|
|
761
|
+
|
|
697
762
|
const {
|
|
698
763
|
error: res_error,
|
|
699
|
-
} =
|
|
764
|
+
} = ContentApplicationModel.LandingPageSchema().validate(responseData, {
|
|
700
765
|
abortEarly: false,
|
|
701
766
|
allowUnknown: false,
|
|
702
767
|
});
|
|
@@ -704,22 +769,24 @@ class Content {
|
|
|
704
769
|
if (res_error) {
|
|
705
770
|
Logger({
|
|
706
771
|
level: "WARN",
|
|
707
|
-
message:
|
|
772
|
+
message: `Response Validation Warnnings for application > Content > getLandingPage \n ${res_error}`,
|
|
708
773
|
});
|
|
709
|
-
Logger({ level: "WARN", message: res_error });
|
|
710
774
|
}
|
|
711
775
|
|
|
712
776
|
return response;
|
|
713
777
|
}
|
|
714
778
|
|
|
715
779
|
/**
|
|
716
|
-
* @param {
|
|
717
|
-
* @returns {Promise<ApplicationLegal>} - Success response
|
|
780
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
781
|
+
* @returns {Promise<ContentApplicationModel.ApplicationLegal>} - Success response
|
|
782
|
+
* @name getLegalInformation
|
|
718
783
|
* @summary: Get legal information
|
|
719
|
-
* @description: Use this API to get the legal information of an application, which includes Privacy Policy, Terms and Conditions, Shipping Policy and FAQs regarding the usage of the application.
|
|
784
|
+
* @description: Use this API to get the legal information of an application, which includes Privacy Policy, Terms and Conditions, Shipping Policy and FAQs regarding the usage of the application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getLegalInformation/).
|
|
720
785
|
*/
|
|
721
|
-
async getLegalInformation({} = {}) {
|
|
722
|
-
const {
|
|
786
|
+
async getLegalInformation({ headers } = { headers: false }) {
|
|
787
|
+
const {
|
|
788
|
+
error,
|
|
789
|
+
} = ContentApplicationValidator.getLegalInformation().validate(
|
|
723
790
|
{},
|
|
724
791
|
{ abortEarly: false, allowUnknown: true }
|
|
725
792
|
);
|
|
@@ -728,16 +795,17 @@ class Content {
|
|
|
728
795
|
}
|
|
729
796
|
|
|
730
797
|
// Showing warrnings if extra unknown parameters are found
|
|
731
|
-
const {
|
|
798
|
+
const {
|
|
799
|
+
error: warrning,
|
|
800
|
+
} = ContentApplicationValidator.getLegalInformation().validate(
|
|
732
801
|
{},
|
|
733
802
|
{ abortEarly: false, allowUnknown: false }
|
|
734
803
|
);
|
|
735
804
|
if (warrning) {
|
|
736
805
|
Logger({
|
|
737
806
|
level: "WARN",
|
|
738
|
-
message:
|
|
807
|
+
message: `Parameter Validation warrnings for application > Content > getLegalInformation \n ${warrning}`,
|
|
739
808
|
});
|
|
740
|
-
Logger({ level: "WARN", message: warrning });
|
|
741
809
|
}
|
|
742
810
|
|
|
743
811
|
const query_params = {};
|
|
@@ -753,12 +821,18 @@ class Content {
|
|
|
753
821
|
}),
|
|
754
822
|
query_params,
|
|
755
823
|
undefined,
|
|
756
|
-
xHeaders
|
|
824
|
+
xHeaders,
|
|
825
|
+
{ headers }
|
|
757
826
|
);
|
|
758
827
|
|
|
828
|
+
let responseData = response;
|
|
829
|
+
if (headers) {
|
|
830
|
+
responseData = response[0];
|
|
831
|
+
}
|
|
832
|
+
|
|
759
833
|
const {
|
|
760
834
|
error: res_error,
|
|
761
|
-
} =
|
|
835
|
+
} = ContentApplicationModel.ApplicationLegal().validate(responseData, {
|
|
762
836
|
abortEarly: false,
|
|
763
837
|
allowUnknown: false,
|
|
764
838
|
});
|
|
@@ -766,25 +840,27 @@ class Content {
|
|
|
766
840
|
if (res_error) {
|
|
767
841
|
Logger({
|
|
768
842
|
level: "WARN",
|
|
769
|
-
message:
|
|
843
|
+
message: `Response Validation Warnnings for application > Content > getLegalInformation \n ${res_error}`,
|
|
770
844
|
});
|
|
771
|
-
Logger({ level: "WARN", message: res_error });
|
|
772
845
|
}
|
|
773
846
|
|
|
774
847
|
return response;
|
|
775
848
|
}
|
|
776
849
|
|
|
777
850
|
/**
|
|
778
|
-
* @param {
|
|
779
|
-
* @param {
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
* @
|
|
851
|
+
* @param {ContentApplicationValidator.GetNavigationsParam} arg - Arg object.
|
|
852
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
853
|
+
* @returns {Promise<ContentApplicationModel.NavigationGetResponse>} -
|
|
854
|
+
* Success response
|
|
855
|
+
* @name getNavigations
|
|
783
856
|
* @summary: Get the navigation
|
|
784
|
-
* @description: Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the links and sub-navigations.
|
|
857
|
+
* @description: Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the links and sub-navigations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getNavigations/).
|
|
785
858
|
*/
|
|
786
|
-
async getNavigations(
|
|
787
|
-
|
|
859
|
+
async getNavigations(
|
|
860
|
+
{ pageNo, pageSize } = {},
|
|
861
|
+
{ headers } = { headers: false }
|
|
862
|
+
) {
|
|
863
|
+
const { error } = ContentApplicationValidator.getNavigations().validate(
|
|
788
864
|
{ pageNo, pageSize },
|
|
789
865
|
{ abortEarly: false, allowUnknown: true }
|
|
790
866
|
);
|
|
@@ -793,16 +869,17 @@ class Content {
|
|
|
793
869
|
}
|
|
794
870
|
|
|
795
871
|
// Showing warrnings if extra unknown parameters are found
|
|
796
|
-
const {
|
|
872
|
+
const {
|
|
873
|
+
error: warrning,
|
|
874
|
+
} = ContentApplicationValidator.getNavigations().validate(
|
|
797
875
|
{ pageNo, pageSize },
|
|
798
876
|
{ abortEarly: false, allowUnknown: false }
|
|
799
877
|
);
|
|
800
878
|
if (warrning) {
|
|
801
879
|
Logger({
|
|
802
880
|
level: "WARN",
|
|
803
|
-
message:
|
|
881
|
+
message: `Parameter Validation warrnings for application > Content > getNavigations \n ${warrning}`,
|
|
804
882
|
});
|
|
805
|
-
Logger({ level: "WARN", message: warrning });
|
|
806
883
|
}
|
|
807
884
|
|
|
808
885
|
const query_params = {};
|
|
@@ -820,12 +897,18 @@ class Content {
|
|
|
820
897
|
}),
|
|
821
898
|
query_params,
|
|
822
899
|
undefined,
|
|
823
|
-
xHeaders
|
|
900
|
+
xHeaders,
|
|
901
|
+
{ headers }
|
|
824
902
|
);
|
|
825
903
|
|
|
904
|
+
let responseData = response;
|
|
905
|
+
if (headers) {
|
|
906
|
+
responseData = response[0];
|
|
907
|
+
}
|
|
908
|
+
|
|
826
909
|
const {
|
|
827
910
|
error: res_error,
|
|
828
|
-
} =
|
|
911
|
+
} = ContentApplicationModel.NavigationGetResponse().validate(responseData, {
|
|
829
912
|
abortEarly: false,
|
|
830
913
|
allowUnknown: false,
|
|
831
914
|
});
|
|
@@ -833,9 +916,8 @@ class Content {
|
|
|
833
916
|
if (res_error) {
|
|
834
917
|
Logger({
|
|
835
918
|
level: "WARN",
|
|
836
|
-
message:
|
|
919
|
+
message: `Response Validation Warnnings for application > Content > getNavigations \n ${res_error}`,
|
|
837
920
|
});
|
|
838
|
-
Logger({ level: "WARN", message: res_error });
|
|
839
921
|
}
|
|
840
922
|
|
|
841
923
|
return response;
|
|
@@ -844,6 +926,7 @@ class Content {
|
|
|
844
926
|
/**
|
|
845
927
|
* @param {Object} arg - Arg object.
|
|
846
928
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
929
|
+
* @returns {Paginator<ContentApplicationModel.NavigationGetResponse>}
|
|
847
930
|
* @summary: Get the navigation
|
|
848
931
|
* @description: Use this API to fetch the navigations details which includes the items of the navigation pane. It also shows the links and sub-navigations.
|
|
849
932
|
*/
|
|
@@ -868,17 +951,15 @@ class Content {
|
|
|
868
951
|
}
|
|
869
952
|
|
|
870
953
|
/**
|
|
871
|
-
* @param {
|
|
872
|
-
* @param {
|
|
873
|
-
*
|
|
874
|
-
*
|
|
875
|
-
* @param {string} [arg.rootId] - ID given to the HTML element
|
|
876
|
-
* @returns {Promise<PageSchema>} - Success response
|
|
954
|
+
* @param {ContentApplicationValidator.GetPageParam} arg - Arg object.
|
|
955
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
956
|
+
* @returns {Promise<ContentApplicationModel.PageSchema>} - Success response
|
|
957
|
+
* @name getPage
|
|
877
958
|
* @summary: Get a page
|
|
878
|
-
* @description: Use this API to get the details of a page using its slug. Details include the title, seo, publish status, feature image, tags, meta, etc.
|
|
959
|
+
* @description: Use this API to get the details of a page using its slug. Details include the title, seo, publish status, feature image, tags, meta, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getPage/).
|
|
879
960
|
*/
|
|
880
|
-
async getPage({ slug, rootId } = {}) {
|
|
881
|
-
const { error } =
|
|
961
|
+
async getPage({ slug, rootId } = {}, { headers } = { headers: false }) {
|
|
962
|
+
const { error } = ContentApplicationValidator.getPage().validate(
|
|
882
963
|
{ slug, rootId },
|
|
883
964
|
{ abortEarly: false, allowUnknown: true }
|
|
884
965
|
);
|
|
@@ -887,16 +968,15 @@ class Content {
|
|
|
887
968
|
}
|
|
888
969
|
|
|
889
970
|
// Showing warrnings if extra unknown parameters are found
|
|
890
|
-
const { error: warrning } =
|
|
971
|
+
const { error: warrning } = ContentApplicationValidator.getPage().validate(
|
|
891
972
|
{ slug, rootId },
|
|
892
973
|
{ abortEarly: false, allowUnknown: false }
|
|
893
974
|
);
|
|
894
975
|
if (warrning) {
|
|
895
976
|
Logger({
|
|
896
977
|
level: "WARN",
|
|
897
|
-
message:
|
|
978
|
+
message: `Parameter Validation warrnings for application > Content > getPage \n ${warrning}`,
|
|
898
979
|
});
|
|
899
|
-
Logger({ level: "WARN", message: warrning });
|
|
900
980
|
}
|
|
901
981
|
|
|
902
982
|
const query_params = {};
|
|
@@ -913,10 +993,18 @@ class Content {
|
|
|
913
993
|
}),
|
|
914
994
|
query_params,
|
|
915
995
|
undefined,
|
|
916
|
-
xHeaders
|
|
996
|
+
xHeaders,
|
|
997
|
+
{ headers }
|
|
917
998
|
);
|
|
918
999
|
|
|
919
|
-
|
|
1000
|
+
let responseData = response;
|
|
1001
|
+
if (headers) {
|
|
1002
|
+
responseData = response[0];
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
const {
|
|
1006
|
+
error: res_error,
|
|
1007
|
+
} = ContentApplicationModel.PageSchema().validate(responseData, {
|
|
920
1008
|
abortEarly: false,
|
|
921
1009
|
allowUnknown: false,
|
|
922
1010
|
});
|
|
@@ -924,25 +1012,23 @@ class Content {
|
|
|
924
1012
|
if (res_error) {
|
|
925
1013
|
Logger({
|
|
926
1014
|
level: "WARN",
|
|
927
|
-
message:
|
|
1015
|
+
message: `Response Validation Warnnings for application > Content > getPage \n ${res_error}`,
|
|
928
1016
|
});
|
|
929
|
-
Logger({ level: "WARN", message: res_error });
|
|
930
1017
|
}
|
|
931
1018
|
|
|
932
1019
|
return response;
|
|
933
1020
|
}
|
|
934
1021
|
|
|
935
1022
|
/**
|
|
936
|
-
* @param {
|
|
937
|
-
* @param {
|
|
938
|
-
*
|
|
939
|
-
* @
|
|
940
|
-
* @returns {Promise<PageGetResponse>} - Success response
|
|
1023
|
+
* @param {ContentApplicationValidator.GetPagesParam} arg - Arg object.
|
|
1024
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1025
|
+
* @returns {Promise<ContentApplicationModel.PageGetResponse>} - Success response
|
|
1026
|
+
* @name getPages
|
|
941
1027
|
* @summary: Get all pages
|
|
942
|
-
* @description: Use this API to get a list of pages.
|
|
1028
|
+
* @description: Use this API to get a list of pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getPages/).
|
|
943
1029
|
*/
|
|
944
|
-
async getPages({ pageNo, pageSize } = {}) {
|
|
945
|
-
const { error } =
|
|
1030
|
+
async getPages({ pageNo, pageSize } = {}, { headers } = { headers: false }) {
|
|
1031
|
+
const { error } = ContentApplicationValidator.getPages().validate(
|
|
946
1032
|
{ pageNo, pageSize },
|
|
947
1033
|
{ abortEarly: false, allowUnknown: true }
|
|
948
1034
|
);
|
|
@@ -951,16 +1037,15 @@ class Content {
|
|
|
951
1037
|
}
|
|
952
1038
|
|
|
953
1039
|
// Showing warrnings if extra unknown parameters are found
|
|
954
|
-
const { error: warrning } =
|
|
1040
|
+
const { error: warrning } = ContentApplicationValidator.getPages().validate(
|
|
955
1041
|
{ pageNo, pageSize },
|
|
956
1042
|
{ abortEarly: false, allowUnknown: false }
|
|
957
1043
|
);
|
|
958
1044
|
if (warrning) {
|
|
959
1045
|
Logger({
|
|
960
1046
|
level: "WARN",
|
|
961
|
-
message:
|
|
1047
|
+
message: `Parameter Validation warrnings for application > Content > getPages \n ${warrning}`,
|
|
962
1048
|
});
|
|
963
|
-
Logger({ level: "WARN", message: warrning });
|
|
964
1049
|
}
|
|
965
1050
|
|
|
966
1051
|
const query_params = {};
|
|
@@ -978,12 +1063,18 @@ class Content {
|
|
|
978
1063
|
}),
|
|
979
1064
|
query_params,
|
|
980
1065
|
undefined,
|
|
981
|
-
xHeaders
|
|
1066
|
+
xHeaders,
|
|
1067
|
+
{ headers }
|
|
982
1068
|
);
|
|
983
1069
|
|
|
1070
|
+
let responseData = response;
|
|
1071
|
+
if (headers) {
|
|
1072
|
+
responseData = response[0];
|
|
1073
|
+
}
|
|
1074
|
+
|
|
984
1075
|
const {
|
|
985
1076
|
error: res_error,
|
|
986
|
-
} =
|
|
1077
|
+
} = ContentApplicationModel.PageGetResponse().validate(responseData, {
|
|
987
1078
|
abortEarly: false,
|
|
988
1079
|
allowUnknown: false,
|
|
989
1080
|
});
|
|
@@ -991,9 +1082,8 @@ class Content {
|
|
|
991
1082
|
if (res_error) {
|
|
992
1083
|
Logger({
|
|
993
1084
|
level: "WARN",
|
|
994
|
-
message:
|
|
1085
|
+
message: `Response Validation Warnnings for application > Content > getPages \n ${res_error}`,
|
|
995
1086
|
});
|
|
996
|
-
Logger({ level: "WARN", message: res_error });
|
|
997
1087
|
}
|
|
998
1088
|
|
|
999
1089
|
return response;
|
|
@@ -1002,6 +1092,7 @@ class Content {
|
|
|
1002
1092
|
/**
|
|
1003
1093
|
* @param {Object} arg - Arg object.
|
|
1004
1094
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1095
|
+
* @returns {Paginator<ContentApplicationModel.PageGetResponse>}
|
|
1005
1096
|
* @summary: Get all pages
|
|
1006
1097
|
* @description: Use this API to get a list of pages.
|
|
1007
1098
|
*/
|
|
@@ -1026,13 +1117,16 @@ class Content {
|
|
|
1026
1117
|
}
|
|
1027
1118
|
|
|
1028
1119
|
/**
|
|
1029
|
-
* @param {
|
|
1030
|
-
* @returns {Promise<SeoComponent>} - Success response
|
|
1120
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1121
|
+
* @returns {Promise<ContentApplicationModel.SeoComponent>} - Success response
|
|
1122
|
+
* @name getSEOConfiguration
|
|
1031
1123
|
* @summary: Get the SEO of an application
|
|
1032
|
-
* @description: Use this API to get the SEO details of an application, which includes a robot.txt, meta-tags and sitemap.
|
|
1124
|
+
* @description: Use this API to get the SEO details of an application, which includes a robot.txt, meta-tags and sitemap. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSEOConfiguration/).
|
|
1033
1125
|
*/
|
|
1034
|
-
async getSEOConfiguration({} = {}) {
|
|
1035
|
-
const {
|
|
1126
|
+
async getSEOConfiguration({ headers } = { headers: false }) {
|
|
1127
|
+
const {
|
|
1128
|
+
error,
|
|
1129
|
+
} = ContentApplicationValidator.getSEOConfiguration().validate(
|
|
1036
1130
|
{},
|
|
1037
1131
|
{ abortEarly: false, allowUnknown: true }
|
|
1038
1132
|
);
|
|
@@ -1041,16 +1135,17 @@ class Content {
|
|
|
1041
1135
|
}
|
|
1042
1136
|
|
|
1043
1137
|
// Showing warrnings if extra unknown parameters are found
|
|
1044
|
-
const {
|
|
1138
|
+
const {
|
|
1139
|
+
error: warrning,
|
|
1140
|
+
} = ContentApplicationValidator.getSEOConfiguration().validate(
|
|
1045
1141
|
{},
|
|
1046
1142
|
{ abortEarly: false, allowUnknown: false }
|
|
1047
1143
|
);
|
|
1048
1144
|
if (warrning) {
|
|
1049
1145
|
Logger({
|
|
1050
1146
|
level: "WARN",
|
|
1051
|
-
message:
|
|
1147
|
+
message: `Parameter Validation warrnings for application > Content > getSEOConfiguration \n ${warrning}`,
|
|
1052
1148
|
});
|
|
1053
|
-
Logger({ level: "WARN", message: warrning });
|
|
1054
1149
|
}
|
|
1055
1150
|
|
|
1056
1151
|
const query_params = {};
|
|
@@ -1066,36 +1161,42 @@ class Content {
|
|
|
1066
1161
|
}),
|
|
1067
1162
|
query_params,
|
|
1068
1163
|
undefined,
|
|
1069
|
-
xHeaders
|
|
1164
|
+
xHeaders,
|
|
1165
|
+
{ headers }
|
|
1070
1166
|
);
|
|
1071
1167
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1168
|
+
let responseData = response;
|
|
1169
|
+
if (headers) {
|
|
1170
|
+
responseData = response[0];
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
const {
|
|
1174
|
+
error: res_error,
|
|
1175
|
+
} = ContentApplicationModel.SeoComponent().validate(responseData, {
|
|
1176
|
+
abortEarly: false,
|
|
1177
|
+
allowUnknown: false,
|
|
1178
|
+
});
|
|
1076
1179
|
|
|
1077
1180
|
if (res_error) {
|
|
1078
1181
|
Logger({
|
|
1079
1182
|
level: "WARN",
|
|
1080
|
-
message:
|
|
1183
|
+
message: `Response Validation Warnnings for application > Content > getSEOConfiguration \n ${res_error}`,
|
|
1081
1184
|
});
|
|
1082
|
-
Logger({ level: "WARN", message: res_error });
|
|
1083
1185
|
}
|
|
1084
1186
|
|
|
1085
1187
|
return response;
|
|
1086
1188
|
}
|
|
1087
1189
|
|
|
1088
1190
|
/**
|
|
1089
|
-
* @param {
|
|
1090
|
-
* @param {
|
|
1091
|
-
*
|
|
1092
|
-
*
|
|
1093
|
-
* @returns {Promise<SlideshowSchema>} - Success response
|
|
1191
|
+
* @param {ContentApplicationValidator.GetSlideshowParam} arg - Arg object.
|
|
1192
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1193
|
+
* @returns {Promise<ContentApplicationModel.SlideshowSchema>} - Success response
|
|
1194
|
+
* @name getSlideshow
|
|
1094
1195
|
* @summary: Get a slideshow
|
|
1095
|
-
* @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a slideshow using its `slug`.
|
|
1196
|
+
* @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to fetch a slideshow using its `slug`. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshow/).
|
|
1096
1197
|
*/
|
|
1097
|
-
async getSlideshow({ slug } = {}) {
|
|
1098
|
-
const { error } =
|
|
1198
|
+
async getSlideshow({ slug } = {}, { headers } = { headers: false }) {
|
|
1199
|
+
const { error } = ContentApplicationValidator.getSlideshow().validate(
|
|
1099
1200
|
{ slug },
|
|
1100
1201
|
{ abortEarly: false, allowUnknown: true }
|
|
1101
1202
|
);
|
|
@@ -1104,16 +1205,17 @@ class Content {
|
|
|
1104
1205
|
}
|
|
1105
1206
|
|
|
1106
1207
|
// Showing warrnings if extra unknown parameters are found
|
|
1107
|
-
const {
|
|
1208
|
+
const {
|
|
1209
|
+
error: warrning,
|
|
1210
|
+
} = ContentApplicationValidator.getSlideshow().validate(
|
|
1108
1211
|
{ slug },
|
|
1109
1212
|
{ abortEarly: false, allowUnknown: false }
|
|
1110
1213
|
);
|
|
1111
1214
|
if (warrning) {
|
|
1112
1215
|
Logger({
|
|
1113
1216
|
level: "WARN",
|
|
1114
|
-
message:
|
|
1217
|
+
message: `Parameter Validation warrnings for application > Content > getSlideshow \n ${warrning}`,
|
|
1115
1218
|
});
|
|
1116
|
-
Logger({ level: "WARN", message: warrning });
|
|
1117
1219
|
}
|
|
1118
1220
|
|
|
1119
1221
|
const query_params = {};
|
|
@@ -1129,12 +1231,18 @@ class Content {
|
|
|
1129
1231
|
}),
|
|
1130
1232
|
query_params,
|
|
1131
1233
|
undefined,
|
|
1132
|
-
xHeaders
|
|
1234
|
+
xHeaders,
|
|
1235
|
+
{ headers }
|
|
1133
1236
|
);
|
|
1134
1237
|
|
|
1238
|
+
let responseData = response;
|
|
1239
|
+
if (headers) {
|
|
1240
|
+
responseData = response[0];
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1135
1243
|
const {
|
|
1136
1244
|
error: res_error,
|
|
1137
|
-
} =
|
|
1245
|
+
} = ContentApplicationModel.SlideshowSchema().validate(responseData, {
|
|
1138
1246
|
abortEarly: false,
|
|
1139
1247
|
allowUnknown: false,
|
|
1140
1248
|
});
|
|
@@ -1142,25 +1250,26 @@ class Content {
|
|
|
1142
1250
|
if (res_error) {
|
|
1143
1251
|
Logger({
|
|
1144
1252
|
level: "WARN",
|
|
1145
|
-
message:
|
|
1253
|
+
message: `Response Validation Warnnings for application > Content > getSlideshow \n ${res_error}`,
|
|
1146
1254
|
});
|
|
1147
|
-
Logger({ level: "WARN", message: res_error });
|
|
1148
1255
|
}
|
|
1149
1256
|
|
|
1150
1257
|
return response;
|
|
1151
1258
|
}
|
|
1152
1259
|
|
|
1153
1260
|
/**
|
|
1154
|
-
* @param {
|
|
1155
|
-
* @param {
|
|
1156
|
-
*
|
|
1157
|
-
* @
|
|
1158
|
-
* @returns {Promise<SlideshowGetResponse>} - Success response
|
|
1261
|
+
* @param {ContentApplicationValidator.GetSlideshowsParam} arg - Arg object.
|
|
1262
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1263
|
+
* @returns {Promise<ContentApplicationModel.SlideshowGetResponse>} - Success response
|
|
1264
|
+
* @name getSlideshows
|
|
1159
1265
|
* @summary: Get the slideshows
|
|
1160
|
-
* @description: Use this API to get a list of slideshows along with their details.
|
|
1266
|
+
* @description: Use this API to get a list of slideshows along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSlideshows/).
|
|
1161
1267
|
*/
|
|
1162
|
-
async getSlideshows(
|
|
1163
|
-
|
|
1268
|
+
async getSlideshows(
|
|
1269
|
+
{ pageNo, pageSize } = {},
|
|
1270
|
+
{ headers } = { headers: false }
|
|
1271
|
+
) {
|
|
1272
|
+
const { error } = ContentApplicationValidator.getSlideshows().validate(
|
|
1164
1273
|
{ pageNo, pageSize },
|
|
1165
1274
|
{ abortEarly: false, allowUnknown: true }
|
|
1166
1275
|
);
|
|
@@ -1169,16 +1278,17 @@ class Content {
|
|
|
1169
1278
|
}
|
|
1170
1279
|
|
|
1171
1280
|
// Showing warrnings if extra unknown parameters are found
|
|
1172
|
-
const {
|
|
1281
|
+
const {
|
|
1282
|
+
error: warrning,
|
|
1283
|
+
} = ContentApplicationValidator.getSlideshows().validate(
|
|
1173
1284
|
{ pageNo, pageSize },
|
|
1174
1285
|
{ abortEarly: false, allowUnknown: false }
|
|
1175
1286
|
);
|
|
1176
1287
|
if (warrning) {
|
|
1177
1288
|
Logger({
|
|
1178
1289
|
level: "WARN",
|
|
1179
|
-
message:
|
|
1290
|
+
message: `Parameter Validation warrnings for application > Content > getSlideshows \n ${warrning}`,
|
|
1180
1291
|
});
|
|
1181
|
-
Logger({ level: "WARN", message: warrning });
|
|
1182
1292
|
}
|
|
1183
1293
|
|
|
1184
1294
|
const query_params = {};
|
|
@@ -1196,12 +1306,18 @@ class Content {
|
|
|
1196
1306
|
}),
|
|
1197
1307
|
query_params,
|
|
1198
1308
|
undefined,
|
|
1199
|
-
xHeaders
|
|
1309
|
+
xHeaders,
|
|
1310
|
+
{ headers }
|
|
1200
1311
|
);
|
|
1201
1312
|
|
|
1313
|
+
let responseData = response;
|
|
1314
|
+
if (headers) {
|
|
1315
|
+
responseData = response[0];
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1202
1318
|
const {
|
|
1203
1319
|
error: res_error,
|
|
1204
|
-
} =
|
|
1320
|
+
} = ContentApplicationModel.SlideshowGetResponse().validate(responseData, {
|
|
1205
1321
|
abortEarly: false,
|
|
1206
1322
|
allowUnknown: false,
|
|
1207
1323
|
});
|
|
@@ -1209,9 +1325,8 @@ class Content {
|
|
|
1209
1325
|
if (res_error) {
|
|
1210
1326
|
Logger({
|
|
1211
1327
|
level: "WARN",
|
|
1212
|
-
message:
|
|
1328
|
+
message: `Response Validation Warnnings for application > Content > getSlideshows \n ${res_error}`,
|
|
1213
1329
|
});
|
|
1214
|
-
Logger({ level: "WARN", message: res_error });
|
|
1215
1330
|
}
|
|
1216
1331
|
|
|
1217
1332
|
return response;
|
|
@@ -1220,6 +1335,7 @@ class Content {
|
|
|
1220
1335
|
/**
|
|
1221
1336
|
* @param {Object} arg - Arg object.
|
|
1222
1337
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1338
|
+
* @returns {Paginator<ContentApplicationModel.SlideshowGetResponse>}
|
|
1223
1339
|
* @summary: Get the slideshows
|
|
1224
1340
|
* @description: Use this API to get a list of slideshows along with their details.
|
|
1225
1341
|
*/
|
|
@@ -1244,13 +1360,16 @@ class Content {
|
|
|
1244
1360
|
}
|
|
1245
1361
|
|
|
1246
1362
|
/**
|
|
1247
|
-
* @param {
|
|
1248
|
-
* @returns {Promise<Support>} - Success response
|
|
1363
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1364
|
+
* @returns {Promise<ContentApplicationModel.Support>} - Success response
|
|
1365
|
+
* @name getSupportInformation
|
|
1249
1366
|
* @summary: Get the support information
|
|
1250
|
-
* @description: Use this API to get contact details for customer support including emails and phone numbers.
|
|
1367
|
+
* @description: Use this API to get contact details for customer support including emails and phone numbers. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getSupportInformation/).
|
|
1251
1368
|
*/
|
|
1252
|
-
async getSupportInformation({} = {}) {
|
|
1253
|
-
const {
|
|
1369
|
+
async getSupportInformation({ headers } = { headers: false }) {
|
|
1370
|
+
const {
|
|
1371
|
+
error,
|
|
1372
|
+
} = ContentApplicationValidator.getSupportInformation().validate(
|
|
1254
1373
|
{},
|
|
1255
1374
|
{ abortEarly: false, allowUnknown: true }
|
|
1256
1375
|
);
|
|
@@ -1261,16 +1380,15 @@ class Content {
|
|
|
1261
1380
|
// Showing warrnings if extra unknown parameters are found
|
|
1262
1381
|
const {
|
|
1263
1382
|
error: warrning,
|
|
1264
|
-
} =
|
|
1383
|
+
} = ContentApplicationValidator.getSupportInformation().validate(
|
|
1265
1384
|
{},
|
|
1266
1385
|
{ abortEarly: false, allowUnknown: false }
|
|
1267
1386
|
);
|
|
1268
1387
|
if (warrning) {
|
|
1269
1388
|
Logger({
|
|
1270
1389
|
level: "WARN",
|
|
1271
|
-
message:
|
|
1390
|
+
message: `Parameter Validation warrnings for application > Content > getSupportInformation \n ${warrning}`,
|
|
1272
1391
|
});
|
|
1273
|
-
Logger({ level: "WARN", message: warrning });
|
|
1274
1392
|
}
|
|
1275
1393
|
|
|
1276
1394
|
const query_params = {};
|
|
@@ -1286,10 +1404,18 @@ class Content {
|
|
|
1286
1404
|
}),
|
|
1287
1405
|
query_params,
|
|
1288
1406
|
undefined,
|
|
1289
|
-
xHeaders
|
|
1407
|
+
xHeaders,
|
|
1408
|
+
{ headers }
|
|
1290
1409
|
);
|
|
1291
1410
|
|
|
1292
|
-
|
|
1411
|
+
let responseData = response;
|
|
1412
|
+
if (headers) {
|
|
1413
|
+
responseData = response[0];
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
const {
|
|
1417
|
+
error: res_error,
|
|
1418
|
+
} = ContentApplicationModel.Support().validate(responseData, {
|
|
1293
1419
|
abortEarly: false,
|
|
1294
1420
|
allowUnknown: false,
|
|
1295
1421
|
});
|
|
@@ -1297,22 +1423,22 @@ class Content {
|
|
|
1297
1423
|
if (res_error) {
|
|
1298
1424
|
Logger({
|
|
1299
1425
|
level: "WARN",
|
|
1300
|
-
message:
|
|
1426
|
+
message: `Response Validation Warnnings for application > Content > getSupportInformation \n ${res_error}`,
|
|
1301
1427
|
});
|
|
1302
|
-
Logger({ level: "WARN", message: res_error });
|
|
1303
1428
|
}
|
|
1304
1429
|
|
|
1305
1430
|
return response;
|
|
1306
1431
|
}
|
|
1307
1432
|
|
|
1308
1433
|
/**
|
|
1309
|
-
* @param {
|
|
1310
|
-
* @returns {Promise<TagsSchema>} - Success response
|
|
1434
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1435
|
+
* @returns {Promise<ContentApplicationModel.TagsSchema>} - Success response
|
|
1436
|
+
* @name getTags
|
|
1311
1437
|
* @summary: Get the tags associated with an application
|
|
1312
|
-
* @description: Use this API to get all the CSS and JS injected in the application in the form of tags.
|
|
1438
|
+
* @description: Use this API to get all the CSS and JS injected in the application in the form of tags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getTags/).
|
|
1313
1439
|
*/
|
|
1314
|
-
async getTags({} = {}) {
|
|
1315
|
-
const { error } =
|
|
1440
|
+
async getTags({ headers } = { headers: false }) {
|
|
1441
|
+
const { error } = ContentApplicationValidator.getTags().validate(
|
|
1316
1442
|
{},
|
|
1317
1443
|
{ abortEarly: false, allowUnknown: true }
|
|
1318
1444
|
);
|
|
@@ -1321,16 +1447,15 @@ class Content {
|
|
|
1321
1447
|
}
|
|
1322
1448
|
|
|
1323
1449
|
// Showing warrnings if extra unknown parameters are found
|
|
1324
|
-
const { error: warrning } =
|
|
1450
|
+
const { error: warrning } = ContentApplicationValidator.getTags().validate(
|
|
1325
1451
|
{},
|
|
1326
1452
|
{ abortEarly: false, allowUnknown: false }
|
|
1327
1453
|
);
|
|
1328
1454
|
if (warrning) {
|
|
1329
1455
|
Logger({
|
|
1330
1456
|
level: "WARN",
|
|
1331
|
-
message:
|
|
1457
|
+
message: `Parameter Validation warrnings for application > Content > getTags \n ${warrning}`,
|
|
1332
1458
|
});
|
|
1333
|
-
Logger({ level: "WARN", message: warrning });
|
|
1334
1459
|
}
|
|
1335
1460
|
|
|
1336
1461
|
const query_params = {};
|
|
@@ -1346,10 +1471,18 @@ class Content {
|
|
|
1346
1471
|
}),
|
|
1347
1472
|
query_params,
|
|
1348
1473
|
undefined,
|
|
1349
|
-
xHeaders
|
|
1474
|
+
xHeaders,
|
|
1475
|
+
{ headers }
|
|
1350
1476
|
);
|
|
1351
1477
|
|
|
1352
|
-
|
|
1478
|
+
let responseData = response;
|
|
1479
|
+
if (headers) {
|
|
1480
|
+
responseData = response[0];
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
const {
|
|
1484
|
+
error: res_error,
|
|
1485
|
+
} = ContentApplicationModel.TagsSchema().validate(responseData, {
|
|
1353
1486
|
abortEarly: false,
|
|
1354
1487
|
allowUnknown: false,
|
|
1355
1488
|
});
|
|
@@ -1357,9 +1490,8 @@ class Content {
|
|
|
1357
1490
|
if (res_error) {
|
|
1358
1491
|
Logger({
|
|
1359
1492
|
level: "WARN",
|
|
1360
|
-
message:
|
|
1493
|
+
message: `Response Validation Warnnings for application > Content > getTags \n ${res_error}`,
|
|
1361
1494
|
});
|
|
1362
|
-
Logger({ level: "WARN", message: res_error });
|
|
1363
1495
|
}
|
|
1364
1496
|
|
|
1365
1497
|
return response;
|