@gofynd/fdk-client-javascript 1.1.6 → 1.3.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 +52 -3
- package/index.js +0 -3
- package/package.json +1 -2
- package/sdk/application/ApplicationAPIClient.d.ts +15 -1
- package/sdk/application/ApplicationAPIClient.js +12 -3
- package/sdk/application/ApplicationClient.d.ts +36 -6
- package/sdk/application/ApplicationClient.js +30 -43
- package/sdk/application/ApplicationConfig.d.ts +92 -12
- package/sdk/application/ApplicationConfig.js +48 -14
- package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
- package/sdk/application/Cart/CartApplicationClient.js +711 -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 +274 -422
- package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
- package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
- package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
- package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
- package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
- package/sdk/application/Common/CommonApplicationClient.js +52 -33
- package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
- package/sdk/application/Common/CommonApplicationModel.js +192 -40
- package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
- package/sdk/application/Common/CommonApplicationValidator.js +21 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
- package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
- package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
- package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
- package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
- package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
- package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
- package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
- package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
- package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
- package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
- package/sdk/application/Content/ContentApplicationClient.js +489 -278
- package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
- package/sdk/application/Content/ContentApplicationModel.js +737 -396
- package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
- package/sdk/application/Content/ContentApplicationValidator.js +113 -3
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
- package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
- package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
- package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
- package/sdk/application/Lead/LeadApplicationClient.js +188 -103
- package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
- package/sdk/application/Lead/LeadApplicationModel.js +330 -244
- package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
- package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
- package/sdk/application/Logistic/LogisticApplicationClient.js +131 -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 +93 -133
- package/sdk/application/Order/OrderApplicationClient.js +329 -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 +400 -366
- package/sdk/application/Payment/PaymentApplicationClient.js +1176 -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 +205 -350
- package/sdk/application/PosCart/PosCartApplicationClient.js +720 -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 +58 -47
- package/sdk/application/Rewards/RewardsApplicationClient.js +187 -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 +52 -50
- package/sdk/application/Share/ShareApplicationClient.js +185 -97
- package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
- package/sdk/application/Share/ShareApplicationModel.js +131 -31
- package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
- package/sdk/application/Share/ShareApplicationValidator.js +48 -4
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
- package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
- package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
- package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
- package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
- package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
- package/sdk/application/User/UserApplicationClient.d.ts +260 -305
- package/sdk/application/User/UserApplicationClient.js +910 -522
- package/sdk/application/User/UserApplicationModel.d.ts +992 -101
- package/sdk/application/User/UserApplicationModel.js +699 -248
- package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
- package/sdk/application/User/UserApplicationValidator.js +265 -31
- package/sdk/common/AxiosHelper.js +7 -2
- package/sdk/common/FDKError.d.ts +3 -0
- package/sdk/common/FDKError.js +8 -0
- package/sdk/common/Paginator.d.ts +27 -12
- package/sdk/common/Paginator.js +15 -0
- package/sdk/common/RequestSigner.js +0 -1
- package/sdk/common/utils.d.ts +3 -0
- package/sdk/common/utils.js +29 -0
- package/sdk/partner/PartnerAPIClient.d.ts +16 -1
- package/sdk/partner/PartnerAPIClient.js +12 -2
- package/sdk/partner/PartnerClient.d.ts +22 -3
- package/sdk/partner/PartnerClient.js +20 -0
- package/sdk/partner/PartnerConfig.d.ts +40 -14
- package/sdk/partner/PartnerConfig.js +31 -6
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
- package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
- package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
- package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
- package/sdk/partner/index.d.ts +3 -1
- package/sdk/partner/index.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
- package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
- package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
- package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -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 +3839 -175
- package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -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 +652 -826
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
- package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
- package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
- package/sdk/platform/Common/CommonPlatformClient.js +50 -33
- package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
- package/sdk/platform/Common/CommonPlatformModel.js +214 -40
- package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
- package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
- package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
- package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -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 +1472 -108
- package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
- package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
- package/sdk/platform/Discount/DiscountPlatformModel.js +189 -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 +109 -52
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
- package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
- package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
- package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
- package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
- package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -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 +100 -106
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -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 +89 -104
- package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
- package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
- package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
- package/sdk/platform/OAuthClient.js +6 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -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 +437 -556
- package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
- package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
- package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
- package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
- package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
- package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
- package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -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 +31 -12581
- package/sdk/platform/PlatformClient.js +30 -15089
- package/sdk/platform/PlatformConfig.d.ts +37 -11
- package/sdk/platform/PlatformConfig.js +32 -6
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -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 +360 -23
- package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -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 +41 -66
- package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
- 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 +167 -19
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
- package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
- package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
- package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
- package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
- package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
- package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
- package/sdk/platform/User/UserPlatformModel.js +467 -424
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
- package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
- package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
- package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
- package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
- package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
- package/sdk/public/Inventory/InventoryPublicClient.js +161 -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/Partner/PartnerPublicClient.d.ts +22 -0
- package/sdk/public/Partner/PartnerPublicClient.js +110 -0
- package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
- package/sdk/public/Partner/PartnerPublicModel.js +280 -0
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
- package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
- package/sdk/public/PublicAPIClient.d.ts +14 -1
- package/sdk/public/PublicAPIClient.js +7 -1
- package/sdk/public/PublicClient.d.ts +21 -3
- package/sdk/public/PublicClient.js +20 -0
- package/sdk/public/PublicConfig.d.ts +27 -6
- package/sdk/public/PublicConfig.js +17 -1
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
- package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
- package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
- package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/application/ApplicationModels.d.ts +0 -3
- package/sdk/application/ApplicationModels.js +0 -20
- package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
- package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
- package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
- package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
|
@@ -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,21 @@ class Content {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* @param {
|
|
54
|
-
* @
|
|
53
|
+
* @param {ContentApplicationValidator.GetAnnouncementsParam} arg - Arg object.
|
|
54
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
55
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
56
|
+
* @returns {Promise<ContentApplicationModel.AnnouncementsResponseSchema>}
|
|
57
|
+
* - Success response
|
|
58
|
+
*
|
|
59
|
+
* @name getAnnouncements
|
|
55
60
|
* @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.
|
|
61
|
+
* @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
62
|
*/
|
|
58
|
-
async getAnnouncements(
|
|
59
|
-
|
|
63
|
+
async getAnnouncements(
|
|
64
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
65
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
66
|
+
) {
|
|
67
|
+
const { error } = ContentApplicationValidator.getAnnouncements().validate(
|
|
60
68
|
{},
|
|
61
69
|
{ abortEarly: false, allowUnknown: true }
|
|
62
70
|
);
|
|
@@ -65,16 +73,17 @@ class Content {
|
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
// Showing warrnings if extra unknown parameters are found
|
|
68
|
-
const {
|
|
76
|
+
const {
|
|
77
|
+
error: warrning,
|
|
78
|
+
} = ContentApplicationValidator.getAnnouncements().validate(
|
|
69
79
|
{},
|
|
70
80
|
{ abortEarly: false, allowUnknown: false }
|
|
71
81
|
);
|
|
72
82
|
if (warrning) {
|
|
73
83
|
Logger({
|
|
74
84
|
level: "WARN",
|
|
75
|
-
message:
|
|
85
|
+
message: `Parameter Validation warrnings for application > Content > getAnnouncements \n ${warrning}`,
|
|
76
86
|
});
|
|
77
|
-
Logger({ level: "WARN", message: warrning });
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
const query_params = {};
|
|
@@ -90,39 +99,46 @@ class Content {
|
|
|
90
99
|
}),
|
|
91
100
|
query_params,
|
|
92
101
|
undefined,
|
|
93
|
-
xHeaders
|
|
102
|
+
{ ...xHeaders, ...requestHeaders },
|
|
103
|
+
{ responseHeaders }
|
|
94
104
|
);
|
|
95
105
|
|
|
106
|
+
let responseData = response;
|
|
107
|
+
if (responseHeaders) {
|
|
108
|
+
responseData = response[0];
|
|
109
|
+
}
|
|
110
|
+
|
|
96
111
|
const {
|
|
97
112
|
error: res_error,
|
|
98
|
-
} =
|
|
99
|
-
|
|
100
|
-
allowUnknown: false
|
|
101
|
-
|
|
113
|
+
} = ContentApplicationModel.AnnouncementsResponseSchema().validate(
|
|
114
|
+
responseData,
|
|
115
|
+
{ abortEarly: false, allowUnknown: false }
|
|
116
|
+
);
|
|
102
117
|
|
|
103
118
|
if (res_error) {
|
|
104
119
|
Logger({
|
|
105
120
|
level: "WARN",
|
|
106
|
-
message:
|
|
121
|
+
message: `Response Validation Warnnings for application > Content > getAnnouncements \n ${res_error}`,
|
|
107
122
|
});
|
|
108
|
-
Logger({ level: "WARN", message: res_error });
|
|
109
123
|
}
|
|
110
124
|
|
|
111
125
|
return response;
|
|
112
126
|
}
|
|
113
127
|
|
|
114
128
|
/**
|
|
115
|
-
* @param {
|
|
116
|
-
* @param {
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* @
|
|
120
|
-
* @returns {Promise<BlogSchema>} - Success response
|
|
129
|
+
* @param {ContentApplicationValidator.GetBlogParam} arg - Arg object.
|
|
130
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
131
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
132
|
+
* @returns {Promise<ContentApplicationModel.BlogSchema>} - Success response
|
|
133
|
+
* @name getBlog
|
|
121
134
|
* @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.
|
|
135
|
+
* @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
136
|
*/
|
|
124
|
-
async getBlog(
|
|
125
|
-
|
|
137
|
+
async getBlog(
|
|
138
|
+
{ slug, rootId, requestHeaders } = { requestHeaders: {} },
|
|
139
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
140
|
+
) {
|
|
141
|
+
const { error } = ContentApplicationValidator.getBlog().validate(
|
|
126
142
|
{ slug, rootId },
|
|
127
143
|
{ abortEarly: false, allowUnknown: true }
|
|
128
144
|
);
|
|
@@ -131,16 +147,15 @@ class Content {
|
|
|
131
147
|
}
|
|
132
148
|
|
|
133
149
|
// Showing warrnings if extra unknown parameters are found
|
|
134
|
-
const { error: warrning } =
|
|
150
|
+
const { error: warrning } = ContentApplicationValidator.getBlog().validate(
|
|
135
151
|
{ slug, rootId },
|
|
136
152
|
{ abortEarly: false, allowUnknown: false }
|
|
137
153
|
);
|
|
138
154
|
if (warrning) {
|
|
139
155
|
Logger({
|
|
140
156
|
level: "WARN",
|
|
141
|
-
message:
|
|
157
|
+
message: `Parameter Validation warrnings for application > Content > getBlog \n ${warrning}`,
|
|
142
158
|
});
|
|
143
|
-
Logger({ level: "WARN", message: warrning });
|
|
144
159
|
}
|
|
145
160
|
|
|
146
161
|
const query_params = {};
|
|
@@ -157,10 +172,18 @@ class Content {
|
|
|
157
172
|
}),
|
|
158
173
|
query_params,
|
|
159
174
|
undefined,
|
|
160
|
-
xHeaders
|
|
175
|
+
{ ...xHeaders, ...requestHeaders },
|
|
176
|
+
{ responseHeaders }
|
|
161
177
|
);
|
|
162
178
|
|
|
163
|
-
|
|
179
|
+
let responseData = response;
|
|
180
|
+
if (responseHeaders) {
|
|
181
|
+
responseData = response[0];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const {
|
|
185
|
+
error: res_error,
|
|
186
|
+
} = ContentApplicationModel.BlogSchema().validate(responseData, {
|
|
164
187
|
abortEarly: false,
|
|
165
188
|
allowUnknown: false,
|
|
166
189
|
});
|
|
@@ -168,25 +191,27 @@ class Content {
|
|
|
168
191
|
if (res_error) {
|
|
169
192
|
Logger({
|
|
170
193
|
level: "WARN",
|
|
171
|
-
message:
|
|
194
|
+
message: `Response Validation Warnnings for application > Content > getBlog \n ${res_error}`,
|
|
172
195
|
});
|
|
173
|
-
Logger({ level: "WARN", message: res_error });
|
|
174
196
|
}
|
|
175
197
|
|
|
176
198
|
return response;
|
|
177
199
|
}
|
|
178
200
|
|
|
179
201
|
/**
|
|
180
|
-
* @param {
|
|
181
|
-
* @param {
|
|
182
|
-
*
|
|
183
|
-
* @
|
|
184
|
-
* @
|
|
202
|
+
* @param {ContentApplicationValidator.GetBlogsParam} arg - Arg object.
|
|
203
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
204
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
205
|
+
* @returns {Promise<ContentApplicationModel.BlogGetResponse>} - Success response
|
|
206
|
+
* @name getBlogs
|
|
185
207
|
* @summary: Get a list of blogs
|
|
186
|
-
* @description: Use this API to get all the blogs.
|
|
208
|
+
* @description: Use this API to get all the blogs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getBlogs/).
|
|
187
209
|
*/
|
|
188
|
-
async getBlogs(
|
|
189
|
-
|
|
210
|
+
async getBlogs(
|
|
211
|
+
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
212
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
213
|
+
) {
|
|
214
|
+
const { error } = ContentApplicationValidator.getBlogs().validate(
|
|
190
215
|
{ pageNo, pageSize },
|
|
191
216
|
{ abortEarly: false, allowUnknown: true }
|
|
192
217
|
);
|
|
@@ -195,16 +220,15 @@ class Content {
|
|
|
195
220
|
}
|
|
196
221
|
|
|
197
222
|
// Showing warrnings if extra unknown parameters are found
|
|
198
|
-
const { error: warrning } =
|
|
223
|
+
const { error: warrning } = ContentApplicationValidator.getBlogs().validate(
|
|
199
224
|
{ pageNo, pageSize },
|
|
200
225
|
{ abortEarly: false, allowUnknown: false }
|
|
201
226
|
);
|
|
202
227
|
if (warrning) {
|
|
203
228
|
Logger({
|
|
204
229
|
level: "WARN",
|
|
205
|
-
message:
|
|
230
|
+
message: `Parameter Validation warrnings for application > Content > getBlogs \n ${warrning}`,
|
|
206
231
|
});
|
|
207
|
-
Logger({ level: "WARN", message: warrning });
|
|
208
232
|
}
|
|
209
233
|
|
|
210
234
|
const query_params = {};
|
|
@@ -222,12 +246,18 @@ class Content {
|
|
|
222
246
|
}),
|
|
223
247
|
query_params,
|
|
224
248
|
undefined,
|
|
225
|
-
xHeaders
|
|
249
|
+
{ ...xHeaders, ...requestHeaders },
|
|
250
|
+
{ responseHeaders }
|
|
226
251
|
);
|
|
227
252
|
|
|
253
|
+
let responseData = response;
|
|
254
|
+
if (responseHeaders) {
|
|
255
|
+
responseData = response[0];
|
|
256
|
+
}
|
|
257
|
+
|
|
228
258
|
const {
|
|
229
259
|
error: res_error,
|
|
230
|
-
} =
|
|
260
|
+
} = ContentApplicationModel.BlogGetResponse().validate(responseData, {
|
|
231
261
|
abortEarly: false,
|
|
232
262
|
allowUnknown: false,
|
|
233
263
|
});
|
|
@@ -235,9 +265,8 @@ class Content {
|
|
|
235
265
|
if (res_error) {
|
|
236
266
|
Logger({
|
|
237
267
|
level: "WARN",
|
|
238
|
-
message:
|
|
268
|
+
message: `Response Validation Warnnings for application > Content > getBlogs \n ${res_error}`,
|
|
239
269
|
});
|
|
240
|
-
Logger({ level: "WARN", message: res_error });
|
|
241
270
|
}
|
|
242
271
|
|
|
243
272
|
return response;
|
|
@@ -246,6 +275,7 @@ class Content {
|
|
|
246
275
|
/**
|
|
247
276
|
* @param {Object} arg - Arg object.
|
|
248
277
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
278
|
+
* @returns {Paginator<ContentApplicationModel.BlogGetResponse>}
|
|
249
279
|
* @summary: Get a list of blogs
|
|
250
280
|
* @description: Use this API to get all the blogs.
|
|
251
281
|
*/
|
|
@@ -270,13 +300,19 @@ class Content {
|
|
|
270
300
|
}
|
|
271
301
|
|
|
272
302
|
/**
|
|
273
|
-
* @param {
|
|
274
|
-
* @
|
|
303
|
+
* @param {ContentApplicationValidator.GetDataLoadersParam} arg - Arg object.
|
|
304
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
305
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
306
|
+
* @returns {Promise<ContentApplicationModel.DataLoadersSchema>} - Success response
|
|
307
|
+
* @name getDataLoaders
|
|
275
308
|
* @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.
|
|
309
|
+
* @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
310
|
*/
|
|
278
|
-
async getDataLoaders(
|
|
279
|
-
|
|
311
|
+
async getDataLoaders(
|
|
312
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
313
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
314
|
+
) {
|
|
315
|
+
const { error } = ContentApplicationValidator.getDataLoaders().validate(
|
|
280
316
|
{},
|
|
281
317
|
{ abortEarly: false, allowUnknown: true }
|
|
282
318
|
);
|
|
@@ -285,16 +321,17 @@ class Content {
|
|
|
285
321
|
}
|
|
286
322
|
|
|
287
323
|
// Showing warrnings if extra unknown parameters are found
|
|
288
|
-
const {
|
|
324
|
+
const {
|
|
325
|
+
error: warrning,
|
|
326
|
+
} = ContentApplicationValidator.getDataLoaders().validate(
|
|
289
327
|
{},
|
|
290
328
|
{ abortEarly: false, allowUnknown: false }
|
|
291
329
|
);
|
|
292
330
|
if (warrning) {
|
|
293
331
|
Logger({
|
|
294
332
|
level: "WARN",
|
|
295
|
-
message:
|
|
333
|
+
message: `Parameter Validation warrnings for application > Content > getDataLoaders \n ${warrning}`,
|
|
296
334
|
});
|
|
297
|
-
Logger({ level: "WARN", message: warrning });
|
|
298
335
|
}
|
|
299
336
|
|
|
300
337
|
const query_params = {};
|
|
@@ -310,12 +347,18 @@ class Content {
|
|
|
310
347
|
}),
|
|
311
348
|
query_params,
|
|
312
349
|
undefined,
|
|
313
|
-
xHeaders
|
|
350
|
+
{ ...xHeaders, ...requestHeaders },
|
|
351
|
+
{ responseHeaders }
|
|
314
352
|
);
|
|
315
353
|
|
|
354
|
+
let responseData = response;
|
|
355
|
+
if (responseHeaders) {
|
|
356
|
+
responseData = response[0];
|
|
357
|
+
}
|
|
358
|
+
|
|
316
359
|
const {
|
|
317
360
|
error: res_error,
|
|
318
|
-
} =
|
|
361
|
+
} = ContentApplicationModel.DataLoadersSchema().validate(responseData, {
|
|
319
362
|
abortEarly: false,
|
|
320
363
|
allowUnknown: false,
|
|
321
364
|
});
|
|
@@ -323,25 +366,27 @@ class Content {
|
|
|
323
366
|
if (res_error) {
|
|
324
367
|
Logger({
|
|
325
368
|
level: "WARN",
|
|
326
|
-
message:
|
|
369
|
+
message: `Response Validation Warnnings for application > Content > getDataLoaders \n ${res_error}`,
|
|
327
370
|
});
|
|
328
|
-
Logger({ level: "WARN", message: res_error });
|
|
329
371
|
}
|
|
330
372
|
|
|
331
373
|
return response;
|
|
332
374
|
}
|
|
333
375
|
|
|
334
376
|
/**
|
|
335
|
-
* @param {
|
|
336
|
-
* @param {
|
|
337
|
-
*
|
|
338
|
-
*
|
|
339
|
-
* @
|
|
377
|
+
* @param {ContentApplicationValidator.GetFaqBySlugParam} arg - Arg object.
|
|
378
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
379
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
380
|
+
* @returns {Promise<ContentApplicationModel.FaqSchema>} - Success response
|
|
381
|
+
* @name getFaqBySlug
|
|
340
382
|
* @summary: Get an FAQ
|
|
341
|
-
* @description: Use this API to get a particular FAQ by its slug.
|
|
383
|
+
* @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
384
|
*/
|
|
343
|
-
async getFaqBySlug(
|
|
344
|
-
|
|
385
|
+
async getFaqBySlug(
|
|
386
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
387
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
388
|
+
) {
|
|
389
|
+
const { error } = ContentApplicationValidator.getFaqBySlug().validate(
|
|
345
390
|
{ slug },
|
|
346
391
|
{ abortEarly: false, allowUnknown: true }
|
|
347
392
|
);
|
|
@@ -350,16 +395,17 @@ class Content {
|
|
|
350
395
|
}
|
|
351
396
|
|
|
352
397
|
// Showing warrnings if extra unknown parameters are found
|
|
353
|
-
const {
|
|
398
|
+
const {
|
|
399
|
+
error: warrning,
|
|
400
|
+
} = ContentApplicationValidator.getFaqBySlug().validate(
|
|
354
401
|
{ slug },
|
|
355
402
|
{ abortEarly: false, allowUnknown: false }
|
|
356
403
|
);
|
|
357
404
|
if (warrning) {
|
|
358
405
|
Logger({
|
|
359
406
|
level: "WARN",
|
|
360
|
-
message:
|
|
407
|
+
message: `Parameter Validation warrnings for application > Content > getFaqBySlug \n ${warrning}`,
|
|
361
408
|
});
|
|
362
|
-
Logger({ level: "WARN", message: warrning });
|
|
363
409
|
}
|
|
364
410
|
|
|
365
411
|
const query_params = {};
|
|
@@ -375,10 +421,18 @@ class Content {
|
|
|
375
421
|
}),
|
|
376
422
|
query_params,
|
|
377
423
|
undefined,
|
|
378
|
-
xHeaders
|
|
424
|
+
{ ...xHeaders, ...requestHeaders },
|
|
425
|
+
{ responseHeaders }
|
|
379
426
|
);
|
|
380
427
|
|
|
381
|
-
|
|
428
|
+
let responseData = response;
|
|
429
|
+
if (responseHeaders) {
|
|
430
|
+
responseData = response[0];
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
const {
|
|
434
|
+
error: res_error,
|
|
435
|
+
} = ContentApplicationModel.FaqSchema().validate(responseData, {
|
|
382
436
|
abortEarly: false,
|
|
383
437
|
allowUnknown: false,
|
|
384
438
|
});
|
|
@@ -386,22 +440,28 @@ class Content {
|
|
|
386
440
|
if (res_error) {
|
|
387
441
|
Logger({
|
|
388
442
|
level: "WARN",
|
|
389
|
-
message:
|
|
443
|
+
message: `Response Validation Warnnings for application > Content > getFaqBySlug \n ${res_error}`,
|
|
390
444
|
});
|
|
391
|
-
Logger({ level: "WARN", message: res_error });
|
|
392
445
|
}
|
|
393
446
|
|
|
394
447
|
return response;
|
|
395
448
|
}
|
|
396
449
|
|
|
397
450
|
/**
|
|
398
|
-
* @param {
|
|
399
|
-
* @
|
|
451
|
+
* @param {ContentApplicationValidator.GetFaqCategoriesParam} arg - Arg object.
|
|
452
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
453
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
454
|
+
* @returns {Promise<ContentApplicationModel.GetFaqCategoriesSchema>} -
|
|
455
|
+
* Success response
|
|
456
|
+
* @name getFaqCategories
|
|
400
457
|
* @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.
|
|
458
|
+
* @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
459
|
*/
|
|
403
|
-
async getFaqCategories(
|
|
404
|
-
|
|
460
|
+
async getFaqCategories(
|
|
461
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
462
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
463
|
+
) {
|
|
464
|
+
const { error } = ContentApplicationValidator.getFaqCategories().validate(
|
|
405
465
|
{},
|
|
406
466
|
{ abortEarly: false, allowUnknown: true }
|
|
407
467
|
);
|
|
@@ -410,16 +470,17 @@ class Content {
|
|
|
410
470
|
}
|
|
411
471
|
|
|
412
472
|
// Showing warrnings if extra unknown parameters are found
|
|
413
|
-
const {
|
|
473
|
+
const {
|
|
474
|
+
error: warrning,
|
|
475
|
+
} = ContentApplicationValidator.getFaqCategories().validate(
|
|
414
476
|
{},
|
|
415
477
|
{ abortEarly: false, allowUnknown: false }
|
|
416
478
|
);
|
|
417
479
|
if (warrning) {
|
|
418
480
|
Logger({
|
|
419
481
|
level: "WARN",
|
|
420
|
-
message:
|
|
482
|
+
message: `Parameter Validation warrnings for application > Content > getFaqCategories \n ${warrning}`,
|
|
421
483
|
});
|
|
422
|
-
Logger({ level: "WARN", message: warrning });
|
|
423
484
|
}
|
|
424
485
|
|
|
425
486
|
const query_params = {};
|
|
@@ -435,38 +496,49 @@ class Content {
|
|
|
435
496
|
}),
|
|
436
497
|
query_params,
|
|
437
498
|
undefined,
|
|
438
|
-
xHeaders
|
|
499
|
+
{ ...xHeaders, ...requestHeaders },
|
|
500
|
+
{ responseHeaders }
|
|
439
501
|
);
|
|
440
502
|
|
|
503
|
+
let responseData = response;
|
|
504
|
+
if (responseHeaders) {
|
|
505
|
+
responseData = response[0];
|
|
506
|
+
}
|
|
507
|
+
|
|
441
508
|
const {
|
|
442
509
|
error: res_error,
|
|
443
|
-
} =
|
|
444
|
-
|
|
445
|
-
allowUnknown: false
|
|
446
|
-
|
|
510
|
+
} = ContentApplicationModel.GetFaqCategoriesSchema().validate(
|
|
511
|
+
responseData,
|
|
512
|
+
{ abortEarly: false, allowUnknown: false }
|
|
513
|
+
);
|
|
447
514
|
|
|
448
515
|
if (res_error) {
|
|
449
516
|
Logger({
|
|
450
517
|
level: "WARN",
|
|
451
|
-
message:
|
|
518
|
+
message: `Response Validation Warnnings for application > Content > getFaqCategories \n ${res_error}`,
|
|
452
519
|
});
|
|
453
|
-
Logger({ level: "WARN", message: res_error });
|
|
454
520
|
}
|
|
455
521
|
|
|
456
522
|
return response;
|
|
457
523
|
}
|
|
458
524
|
|
|
459
525
|
/**
|
|
460
|
-
* @param {
|
|
461
|
-
* @param {
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
526
|
+
* @param {ContentApplicationValidator.GetFaqCategoryBySlugParam} arg - Arg object.
|
|
527
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
528
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
529
|
+
* @returns {Promise<ContentApplicationModel.GetFaqCategoryBySlugSchema>} -
|
|
530
|
+
* Success response
|
|
531
|
+
* @name getFaqCategoryBySlug
|
|
465
532
|
* @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.
|
|
533
|
+
* @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
534
|
*/
|
|
468
|
-
async getFaqCategoryBySlug(
|
|
469
|
-
|
|
535
|
+
async getFaqCategoryBySlug(
|
|
536
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
537
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
538
|
+
) {
|
|
539
|
+
const {
|
|
540
|
+
error,
|
|
541
|
+
} = ContentApplicationValidator.getFaqCategoryBySlug().validate(
|
|
470
542
|
{ slug },
|
|
471
543
|
{ abortEarly: false, allowUnknown: true }
|
|
472
544
|
);
|
|
@@ -477,16 +549,15 @@ class Content {
|
|
|
477
549
|
// Showing warrnings if extra unknown parameters are found
|
|
478
550
|
const {
|
|
479
551
|
error: warrning,
|
|
480
|
-
} =
|
|
552
|
+
} = ContentApplicationValidator.getFaqCategoryBySlug().validate(
|
|
481
553
|
{ slug },
|
|
482
554
|
{ abortEarly: false, allowUnknown: false }
|
|
483
555
|
);
|
|
484
556
|
if (warrning) {
|
|
485
557
|
Logger({
|
|
486
558
|
level: "WARN",
|
|
487
|
-
message:
|
|
559
|
+
message: `Parameter Validation warrnings for application > Content > getFaqCategoryBySlug \n ${warrning}`,
|
|
488
560
|
});
|
|
489
|
-
Logger({ level: "WARN", message: warrning });
|
|
490
561
|
}
|
|
491
562
|
|
|
492
563
|
const query_params = {};
|
|
@@ -502,35 +573,46 @@ class Content {
|
|
|
502
573
|
}),
|
|
503
574
|
query_params,
|
|
504
575
|
undefined,
|
|
505
|
-
xHeaders
|
|
576
|
+
{ ...xHeaders, ...requestHeaders },
|
|
577
|
+
{ responseHeaders }
|
|
506
578
|
);
|
|
507
579
|
|
|
580
|
+
let responseData = response;
|
|
581
|
+
if (responseHeaders) {
|
|
582
|
+
responseData = response[0];
|
|
583
|
+
}
|
|
584
|
+
|
|
508
585
|
const {
|
|
509
586
|
error: res_error,
|
|
510
|
-
} =
|
|
511
|
-
|
|
512
|
-
allowUnknown: false
|
|
513
|
-
|
|
587
|
+
} = ContentApplicationModel.GetFaqCategoryBySlugSchema().validate(
|
|
588
|
+
responseData,
|
|
589
|
+
{ abortEarly: false, allowUnknown: false }
|
|
590
|
+
);
|
|
514
591
|
|
|
515
592
|
if (res_error) {
|
|
516
593
|
Logger({
|
|
517
594
|
level: "WARN",
|
|
518
|
-
message:
|
|
595
|
+
message: `Response Validation Warnnings for application > Content > getFaqCategoryBySlug \n ${res_error}`,
|
|
519
596
|
});
|
|
520
|
-
Logger({ level: "WARN", message: res_error });
|
|
521
597
|
}
|
|
522
598
|
|
|
523
599
|
return response;
|
|
524
600
|
}
|
|
525
601
|
|
|
526
602
|
/**
|
|
527
|
-
* @param {
|
|
528
|
-
* @
|
|
603
|
+
* @param {ContentApplicationValidator.GetFaqsParam} arg - Arg object.
|
|
604
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
605
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
606
|
+
* @returns {Promise<ContentApplicationModel.FaqResponseSchema>} - Success response
|
|
607
|
+
* @name getFaqs
|
|
529
608
|
* @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.
|
|
609
|
+
* @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
610
|
*/
|
|
532
|
-
async getFaqs(
|
|
533
|
-
|
|
611
|
+
async getFaqs(
|
|
612
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
613
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
614
|
+
) {
|
|
615
|
+
const { error } = ContentApplicationValidator.getFaqs().validate(
|
|
534
616
|
{},
|
|
535
617
|
{ abortEarly: false, allowUnknown: true }
|
|
536
618
|
);
|
|
@@ -539,16 +621,15 @@ class Content {
|
|
|
539
621
|
}
|
|
540
622
|
|
|
541
623
|
// Showing warrnings if extra unknown parameters are found
|
|
542
|
-
const { error: warrning } =
|
|
624
|
+
const { error: warrning } = ContentApplicationValidator.getFaqs().validate(
|
|
543
625
|
{},
|
|
544
626
|
{ abortEarly: false, allowUnknown: false }
|
|
545
627
|
);
|
|
546
628
|
if (warrning) {
|
|
547
629
|
Logger({
|
|
548
630
|
level: "WARN",
|
|
549
|
-
message:
|
|
631
|
+
message: `Parameter Validation warrnings for application > Content > getFaqs \n ${warrning}`,
|
|
550
632
|
});
|
|
551
|
-
Logger({ level: "WARN", message: warrning });
|
|
552
633
|
}
|
|
553
634
|
|
|
554
635
|
const query_params = {};
|
|
@@ -564,12 +645,18 @@ class Content {
|
|
|
564
645
|
}),
|
|
565
646
|
query_params,
|
|
566
647
|
undefined,
|
|
567
|
-
xHeaders
|
|
648
|
+
{ ...xHeaders, ...requestHeaders },
|
|
649
|
+
{ responseHeaders }
|
|
568
650
|
);
|
|
569
651
|
|
|
652
|
+
let responseData = response;
|
|
653
|
+
if (responseHeaders) {
|
|
654
|
+
responseData = response[0];
|
|
655
|
+
}
|
|
656
|
+
|
|
570
657
|
const {
|
|
571
658
|
error: res_error,
|
|
572
|
-
} =
|
|
659
|
+
} = ContentApplicationModel.FaqResponseSchema().validate(responseData, {
|
|
573
660
|
abortEarly: false,
|
|
574
661
|
allowUnknown: false,
|
|
575
662
|
});
|
|
@@ -577,25 +664,29 @@ class Content {
|
|
|
577
664
|
if (res_error) {
|
|
578
665
|
Logger({
|
|
579
666
|
level: "WARN",
|
|
580
|
-
message:
|
|
667
|
+
message: `Response Validation Warnnings for application > Content > getFaqs \n ${res_error}`,
|
|
581
668
|
});
|
|
582
|
-
Logger({ level: "WARN", message: res_error });
|
|
583
669
|
}
|
|
584
670
|
|
|
585
671
|
return response;
|
|
586
672
|
}
|
|
587
673
|
|
|
588
674
|
/**
|
|
589
|
-
* @param {
|
|
590
|
-
* @param {
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
* @
|
|
675
|
+
* @param {ContentApplicationValidator.GetFaqsByCategorySlugParam} arg - Arg object.
|
|
676
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
677
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
678
|
+
* @returns {Promise<ContentApplicationModel.GetFaqSchema>} - Success response
|
|
679
|
+
* @name getFaqsByCategorySlug
|
|
594
680
|
* @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.
|
|
681
|
+
* @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
682
|
*/
|
|
597
|
-
async getFaqsByCategorySlug(
|
|
598
|
-
|
|
683
|
+
async getFaqsByCategorySlug(
|
|
684
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
685
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
686
|
+
) {
|
|
687
|
+
const {
|
|
688
|
+
error,
|
|
689
|
+
} = ContentApplicationValidator.getFaqsByCategorySlug().validate(
|
|
599
690
|
{ slug },
|
|
600
691
|
{ abortEarly: false, allowUnknown: true }
|
|
601
692
|
);
|
|
@@ -606,16 +697,15 @@ class Content {
|
|
|
606
697
|
// Showing warrnings if extra unknown parameters are found
|
|
607
698
|
const {
|
|
608
699
|
error: warrning,
|
|
609
|
-
} =
|
|
700
|
+
} = ContentApplicationValidator.getFaqsByCategorySlug().validate(
|
|
610
701
|
{ slug },
|
|
611
702
|
{ abortEarly: false, allowUnknown: false }
|
|
612
703
|
);
|
|
613
704
|
if (warrning) {
|
|
614
705
|
Logger({
|
|
615
706
|
level: "WARN",
|
|
616
|
-
message:
|
|
707
|
+
message: `Parameter Validation warrnings for application > Content > getFaqsByCategorySlug \n ${warrning}`,
|
|
617
708
|
});
|
|
618
|
-
Logger({ level: "WARN", message: warrning });
|
|
619
709
|
}
|
|
620
710
|
|
|
621
711
|
const query_params = {};
|
|
@@ -631,33 +721,46 @@ class Content {
|
|
|
631
721
|
}),
|
|
632
722
|
query_params,
|
|
633
723
|
undefined,
|
|
634
|
-
xHeaders
|
|
724
|
+
{ ...xHeaders, ...requestHeaders },
|
|
725
|
+
{ responseHeaders }
|
|
635
726
|
);
|
|
636
727
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
728
|
+
let responseData = response;
|
|
729
|
+
if (responseHeaders) {
|
|
730
|
+
responseData = response[0];
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
const {
|
|
734
|
+
error: res_error,
|
|
735
|
+
} = ContentApplicationModel.GetFaqSchema().validate(responseData, {
|
|
736
|
+
abortEarly: false,
|
|
737
|
+
allowUnknown: false,
|
|
738
|
+
});
|
|
641
739
|
|
|
642
740
|
if (res_error) {
|
|
643
741
|
Logger({
|
|
644
742
|
level: "WARN",
|
|
645
|
-
message:
|
|
743
|
+
message: `Response Validation Warnnings for application > Content > getFaqsByCategorySlug \n ${res_error}`,
|
|
646
744
|
});
|
|
647
|
-
Logger({ level: "WARN", message: res_error });
|
|
648
745
|
}
|
|
649
746
|
|
|
650
747
|
return response;
|
|
651
748
|
}
|
|
652
749
|
|
|
653
750
|
/**
|
|
654
|
-
* @param {
|
|
655
|
-
* @
|
|
751
|
+
* @param {ContentApplicationValidator.GetLandingPageParam} arg - Arg object.
|
|
752
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
753
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
754
|
+
* @returns {Promise<ContentApplicationModel.LandingPageSchema>} - Success response
|
|
755
|
+
* @name getLandingPage
|
|
656
756
|
* @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.
|
|
757
|
+
* @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
758
|
*/
|
|
659
|
-
async getLandingPage(
|
|
660
|
-
|
|
759
|
+
async getLandingPage(
|
|
760
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
761
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
762
|
+
) {
|
|
763
|
+
const { error } = ContentApplicationValidator.getLandingPage().validate(
|
|
661
764
|
{},
|
|
662
765
|
{ abortEarly: false, allowUnknown: true }
|
|
663
766
|
);
|
|
@@ -666,16 +769,17 @@ class Content {
|
|
|
666
769
|
}
|
|
667
770
|
|
|
668
771
|
// Showing warrnings if extra unknown parameters are found
|
|
669
|
-
const {
|
|
772
|
+
const {
|
|
773
|
+
error: warrning,
|
|
774
|
+
} = ContentApplicationValidator.getLandingPage().validate(
|
|
670
775
|
{},
|
|
671
776
|
{ abortEarly: false, allowUnknown: false }
|
|
672
777
|
);
|
|
673
778
|
if (warrning) {
|
|
674
779
|
Logger({
|
|
675
780
|
level: "WARN",
|
|
676
|
-
message:
|
|
781
|
+
message: `Parameter Validation warrnings for application > Content > getLandingPage \n ${warrning}`,
|
|
677
782
|
});
|
|
678
|
-
Logger({ level: "WARN", message: warrning });
|
|
679
783
|
}
|
|
680
784
|
|
|
681
785
|
const query_params = {};
|
|
@@ -691,12 +795,18 @@ class Content {
|
|
|
691
795
|
}),
|
|
692
796
|
query_params,
|
|
693
797
|
undefined,
|
|
694
|
-
xHeaders
|
|
798
|
+
{ ...xHeaders, ...requestHeaders },
|
|
799
|
+
{ responseHeaders }
|
|
695
800
|
);
|
|
696
801
|
|
|
802
|
+
let responseData = response;
|
|
803
|
+
if (responseHeaders) {
|
|
804
|
+
responseData = response[0];
|
|
805
|
+
}
|
|
806
|
+
|
|
697
807
|
const {
|
|
698
808
|
error: res_error,
|
|
699
|
-
} =
|
|
809
|
+
} = ContentApplicationModel.LandingPageSchema().validate(responseData, {
|
|
700
810
|
abortEarly: false,
|
|
701
811
|
allowUnknown: false,
|
|
702
812
|
});
|
|
@@ -704,22 +814,29 @@ class Content {
|
|
|
704
814
|
if (res_error) {
|
|
705
815
|
Logger({
|
|
706
816
|
level: "WARN",
|
|
707
|
-
message:
|
|
817
|
+
message: `Response Validation Warnnings for application > Content > getLandingPage \n ${res_error}`,
|
|
708
818
|
});
|
|
709
|
-
Logger({ level: "WARN", message: res_error });
|
|
710
819
|
}
|
|
711
820
|
|
|
712
821
|
return response;
|
|
713
822
|
}
|
|
714
823
|
|
|
715
824
|
/**
|
|
716
|
-
* @param {
|
|
717
|
-
* @
|
|
825
|
+
* @param {ContentApplicationValidator.GetLegalInformationParam} arg - Arg object.
|
|
826
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
827
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
828
|
+
* @returns {Promise<ContentApplicationModel.ApplicationLegal>} - Success response
|
|
829
|
+
* @name getLegalInformation
|
|
718
830
|
* @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.
|
|
831
|
+
* @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
832
|
*/
|
|
721
|
-
async getLegalInformation(
|
|
722
|
-
|
|
833
|
+
async getLegalInformation(
|
|
834
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
835
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
836
|
+
) {
|
|
837
|
+
const {
|
|
838
|
+
error,
|
|
839
|
+
} = ContentApplicationValidator.getLegalInformation().validate(
|
|
723
840
|
{},
|
|
724
841
|
{ abortEarly: false, allowUnknown: true }
|
|
725
842
|
);
|
|
@@ -728,16 +845,17 @@ class Content {
|
|
|
728
845
|
}
|
|
729
846
|
|
|
730
847
|
// Showing warrnings if extra unknown parameters are found
|
|
731
|
-
const {
|
|
848
|
+
const {
|
|
849
|
+
error: warrning,
|
|
850
|
+
} = ContentApplicationValidator.getLegalInformation().validate(
|
|
732
851
|
{},
|
|
733
852
|
{ abortEarly: false, allowUnknown: false }
|
|
734
853
|
);
|
|
735
854
|
if (warrning) {
|
|
736
855
|
Logger({
|
|
737
856
|
level: "WARN",
|
|
738
|
-
message:
|
|
857
|
+
message: `Parameter Validation warrnings for application > Content > getLegalInformation \n ${warrning}`,
|
|
739
858
|
});
|
|
740
|
-
Logger({ level: "WARN", message: warrning });
|
|
741
859
|
}
|
|
742
860
|
|
|
743
861
|
const query_params = {};
|
|
@@ -753,12 +871,18 @@ class Content {
|
|
|
753
871
|
}),
|
|
754
872
|
query_params,
|
|
755
873
|
undefined,
|
|
756
|
-
xHeaders
|
|
874
|
+
{ ...xHeaders, ...requestHeaders },
|
|
875
|
+
{ responseHeaders }
|
|
757
876
|
);
|
|
758
877
|
|
|
878
|
+
let responseData = response;
|
|
879
|
+
if (responseHeaders) {
|
|
880
|
+
responseData = response[0];
|
|
881
|
+
}
|
|
882
|
+
|
|
759
883
|
const {
|
|
760
884
|
error: res_error,
|
|
761
|
-
} =
|
|
885
|
+
} = ContentApplicationModel.ApplicationLegal().validate(responseData, {
|
|
762
886
|
abortEarly: false,
|
|
763
887
|
allowUnknown: false,
|
|
764
888
|
});
|
|
@@ -766,25 +890,28 @@ class Content {
|
|
|
766
890
|
if (res_error) {
|
|
767
891
|
Logger({
|
|
768
892
|
level: "WARN",
|
|
769
|
-
message:
|
|
893
|
+
message: `Response Validation Warnnings for application > Content > getLegalInformation \n ${res_error}`,
|
|
770
894
|
});
|
|
771
|
-
Logger({ level: "WARN", message: res_error });
|
|
772
895
|
}
|
|
773
896
|
|
|
774
897
|
return response;
|
|
775
898
|
}
|
|
776
899
|
|
|
777
900
|
/**
|
|
778
|
-
* @param {
|
|
779
|
-
* @param {
|
|
780
|
-
*
|
|
781
|
-
* @
|
|
782
|
-
*
|
|
901
|
+
* @param {ContentApplicationValidator.GetNavigationsParam} arg - Arg object.
|
|
902
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
903
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
904
|
+
* @returns {Promise<ContentApplicationModel.NavigationGetResponse>} -
|
|
905
|
+
* Success response
|
|
906
|
+
* @name getNavigations
|
|
783
907
|
* @summary: Get the navigation
|
|
784
|
-
* @description: Use this API to fetch the navigations details which includes the items of the navigation
|
|
908
|
+
* @description: Use this API to fetch the navigations details which includes the items of the navigation panel. It also shows the links and sub-navigations. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/content/getNavigations/).
|
|
785
909
|
*/
|
|
786
|
-
async getNavigations(
|
|
787
|
-
|
|
910
|
+
async getNavigations(
|
|
911
|
+
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
912
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
913
|
+
) {
|
|
914
|
+
const { error } = ContentApplicationValidator.getNavigations().validate(
|
|
788
915
|
{ pageNo, pageSize },
|
|
789
916
|
{ abortEarly: false, allowUnknown: true }
|
|
790
917
|
);
|
|
@@ -793,16 +920,17 @@ class Content {
|
|
|
793
920
|
}
|
|
794
921
|
|
|
795
922
|
// Showing warrnings if extra unknown parameters are found
|
|
796
|
-
const {
|
|
923
|
+
const {
|
|
924
|
+
error: warrning,
|
|
925
|
+
} = ContentApplicationValidator.getNavigations().validate(
|
|
797
926
|
{ pageNo, pageSize },
|
|
798
927
|
{ abortEarly: false, allowUnknown: false }
|
|
799
928
|
);
|
|
800
929
|
if (warrning) {
|
|
801
930
|
Logger({
|
|
802
931
|
level: "WARN",
|
|
803
|
-
message:
|
|
932
|
+
message: `Parameter Validation warrnings for application > Content > getNavigations \n ${warrning}`,
|
|
804
933
|
});
|
|
805
|
-
Logger({ level: "WARN", message: warrning });
|
|
806
934
|
}
|
|
807
935
|
|
|
808
936
|
const query_params = {};
|
|
@@ -820,12 +948,18 @@ class Content {
|
|
|
820
948
|
}),
|
|
821
949
|
query_params,
|
|
822
950
|
undefined,
|
|
823
|
-
xHeaders
|
|
951
|
+
{ ...xHeaders, ...requestHeaders },
|
|
952
|
+
{ responseHeaders }
|
|
824
953
|
);
|
|
825
954
|
|
|
955
|
+
let responseData = response;
|
|
956
|
+
if (responseHeaders) {
|
|
957
|
+
responseData = response[0];
|
|
958
|
+
}
|
|
959
|
+
|
|
826
960
|
const {
|
|
827
961
|
error: res_error,
|
|
828
|
-
} =
|
|
962
|
+
} = ContentApplicationModel.NavigationGetResponse().validate(responseData, {
|
|
829
963
|
abortEarly: false,
|
|
830
964
|
allowUnknown: false,
|
|
831
965
|
});
|
|
@@ -833,9 +967,8 @@ class Content {
|
|
|
833
967
|
if (res_error) {
|
|
834
968
|
Logger({
|
|
835
969
|
level: "WARN",
|
|
836
|
-
message:
|
|
970
|
+
message: `Response Validation Warnnings for application > Content > getNavigations \n ${res_error}`,
|
|
837
971
|
});
|
|
838
|
-
Logger({ level: "WARN", message: res_error });
|
|
839
972
|
}
|
|
840
973
|
|
|
841
974
|
return response;
|
|
@@ -844,8 +977,9 @@ class Content {
|
|
|
844
977
|
/**
|
|
845
978
|
* @param {Object} arg - Arg object.
|
|
846
979
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
980
|
+
* @returns {Paginator<ContentApplicationModel.NavigationGetResponse>}
|
|
847
981
|
* @summary: Get the navigation
|
|
848
|
-
* @description: Use this API to fetch the navigations details which includes the items of the navigation
|
|
982
|
+
* @description: Use this API to fetch the navigations details which includes the items of the navigation panel. It also shows the links and sub-navigations.
|
|
849
983
|
*/
|
|
850
984
|
getNavigationsPaginator({ pageSize } = {}) {
|
|
851
985
|
const paginator = new Paginator();
|
|
@@ -868,17 +1002,19 @@ class Content {
|
|
|
868
1002
|
}
|
|
869
1003
|
|
|
870
1004
|
/**
|
|
871
|
-
* @param {
|
|
872
|
-
* @param {
|
|
873
|
-
*
|
|
874
|
-
*
|
|
875
|
-
* @
|
|
876
|
-
* @returns {Promise<PageSchema>} - Success response
|
|
1005
|
+
* @param {ContentApplicationValidator.GetPageParam} arg - Arg object.
|
|
1006
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1007
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1008
|
+
* @returns {Promise<ContentApplicationModel.PageSchema>} - Success response
|
|
1009
|
+
* @name getPage
|
|
877
1010
|
* @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.
|
|
1011
|
+
* @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
1012
|
*/
|
|
880
|
-
async getPage(
|
|
881
|
-
|
|
1013
|
+
async getPage(
|
|
1014
|
+
{ slug, rootId, requestHeaders } = { requestHeaders: {} },
|
|
1015
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1016
|
+
) {
|
|
1017
|
+
const { error } = ContentApplicationValidator.getPage().validate(
|
|
882
1018
|
{ slug, rootId },
|
|
883
1019
|
{ abortEarly: false, allowUnknown: true }
|
|
884
1020
|
);
|
|
@@ -887,16 +1023,15 @@ class Content {
|
|
|
887
1023
|
}
|
|
888
1024
|
|
|
889
1025
|
// Showing warrnings if extra unknown parameters are found
|
|
890
|
-
const { error: warrning } =
|
|
1026
|
+
const { error: warrning } = ContentApplicationValidator.getPage().validate(
|
|
891
1027
|
{ slug, rootId },
|
|
892
1028
|
{ abortEarly: false, allowUnknown: false }
|
|
893
1029
|
);
|
|
894
1030
|
if (warrning) {
|
|
895
1031
|
Logger({
|
|
896
1032
|
level: "WARN",
|
|
897
|
-
message:
|
|
1033
|
+
message: `Parameter Validation warrnings for application > Content > getPage \n ${warrning}`,
|
|
898
1034
|
});
|
|
899
|
-
Logger({ level: "WARN", message: warrning });
|
|
900
1035
|
}
|
|
901
1036
|
|
|
902
1037
|
const query_params = {};
|
|
@@ -913,10 +1048,18 @@ class Content {
|
|
|
913
1048
|
}),
|
|
914
1049
|
query_params,
|
|
915
1050
|
undefined,
|
|
916
|
-
xHeaders
|
|
1051
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1052
|
+
{ responseHeaders }
|
|
917
1053
|
);
|
|
918
1054
|
|
|
919
|
-
|
|
1055
|
+
let responseData = response;
|
|
1056
|
+
if (responseHeaders) {
|
|
1057
|
+
responseData = response[0];
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
const {
|
|
1061
|
+
error: res_error,
|
|
1062
|
+
} = ContentApplicationModel.PageSchema().validate(responseData, {
|
|
920
1063
|
abortEarly: false,
|
|
921
1064
|
allowUnknown: false,
|
|
922
1065
|
});
|
|
@@ -924,25 +1067,27 @@ class Content {
|
|
|
924
1067
|
if (res_error) {
|
|
925
1068
|
Logger({
|
|
926
1069
|
level: "WARN",
|
|
927
|
-
message:
|
|
1070
|
+
message: `Response Validation Warnnings for application > Content > getPage \n ${res_error}`,
|
|
928
1071
|
});
|
|
929
|
-
Logger({ level: "WARN", message: res_error });
|
|
930
1072
|
}
|
|
931
1073
|
|
|
932
1074
|
return response;
|
|
933
1075
|
}
|
|
934
1076
|
|
|
935
1077
|
/**
|
|
936
|
-
* @param {
|
|
937
|
-
* @param {
|
|
938
|
-
*
|
|
939
|
-
* @
|
|
940
|
-
* @
|
|
1078
|
+
* @param {ContentApplicationValidator.GetPagesParam} arg - Arg object.
|
|
1079
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1080
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1081
|
+
* @returns {Promise<ContentApplicationModel.PageGetResponse>} - Success response
|
|
1082
|
+
* @name getPages
|
|
941
1083
|
* @summary: Get all pages
|
|
942
|
-
* @description: Use this API to get a list of pages.
|
|
1084
|
+
* @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
1085
|
*/
|
|
944
|
-
async getPages(
|
|
945
|
-
|
|
1086
|
+
async getPages(
|
|
1087
|
+
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1088
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1089
|
+
) {
|
|
1090
|
+
const { error } = ContentApplicationValidator.getPages().validate(
|
|
946
1091
|
{ pageNo, pageSize },
|
|
947
1092
|
{ abortEarly: false, allowUnknown: true }
|
|
948
1093
|
);
|
|
@@ -951,16 +1096,15 @@ class Content {
|
|
|
951
1096
|
}
|
|
952
1097
|
|
|
953
1098
|
// Showing warrnings if extra unknown parameters are found
|
|
954
|
-
const { error: warrning } =
|
|
1099
|
+
const { error: warrning } = ContentApplicationValidator.getPages().validate(
|
|
955
1100
|
{ pageNo, pageSize },
|
|
956
1101
|
{ abortEarly: false, allowUnknown: false }
|
|
957
1102
|
);
|
|
958
1103
|
if (warrning) {
|
|
959
1104
|
Logger({
|
|
960
1105
|
level: "WARN",
|
|
961
|
-
message:
|
|
1106
|
+
message: `Parameter Validation warrnings for application > Content > getPages \n ${warrning}`,
|
|
962
1107
|
});
|
|
963
|
-
Logger({ level: "WARN", message: warrning });
|
|
964
1108
|
}
|
|
965
1109
|
|
|
966
1110
|
const query_params = {};
|
|
@@ -978,12 +1122,18 @@ class Content {
|
|
|
978
1122
|
}),
|
|
979
1123
|
query_params,
|
|
980
1124
|
undefined,
|
|
981
|
-
xHeaders
|
|
1125
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1126
|
+
{ responseHeaders }
|
|
982
1127
|
);
|
|
983
1128
|
|
|
1129
|
+
let responseData = response;
|
|
1130
|
+
if (responseHeaders) {
|
|
1131
|
+
responseData = response[0];
|
|
1132
|
+
}
|
|
1133
|
+
|
|
984
1134
|
const {
|
|
985
1135
|
error: res_error,
|
|
986
|
-
} =
|
|
1136
|
+
} = ContentApplicationModel.PageGetResponse().validate(responseData, {
|
|
987
1137
|
abortEarly: false,
|
|
988
1138
|
allowUnknown: false,
|
|
989
1139
|
});
|
|
@@ -991,9 +1141,8 @@ class Content {
|
|
|
991
1141
|
if (res_error) {
|
|
992
1142
|
Logger({
|
|
993
1143
|
level: "WARN",
|
|
994
|
-
message:
|
|
1144
|
+
message: `Response Validation Warnnings for application > Content > getPages \n ${res_error}`,
|
|
995
1145
|
});
|
|
996
|
-
Logger({ level: "WARN", message: res_error });
|
|
997
1146
|
}
|
|
998
1147
|
|
|
999
1148
|
return response;
|
|
@@ -1002,6 +1151,7 @@ class Content {
|
|
|
1002
1151
|
/**
|
|
1003
1152
|
* @param {Object} arg - Arg object.
|
|
1004
1153
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1154
|
+
* @returns {Paginator<ContentApplicationModel.PageGetResponse>}
|
|
1005
1155
|
* @summary: Get all pages
|
|
1006
1156
|
* @description: Use this API to get a list of pages.
|
|
1007
1157
|
*/
|
|
@@ -1026,13 +1176,21 @@ class Content {
|
|
|
1026
1176
|
}
|
|
1027
1177
|
|
|
1028
1178
|
/**
|
|
1029
|
-
* @param {
|
|
1030
|
-
* @
|
|
1179
|
+
* @param {ContentApplicationValidator.GetSEOConfigurationParam} arg - Arg object.
|
|
1180
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1181
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1182
|
+
* @returns {Promise<ContentApplicationModel.SeoComponent>} - Success response
|
|
1183
|
+
* @name getSEOConfiguration
|
|
1031
1184
|
* @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.
|
|
1185
|
+
* @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
1186
|
*/
|
|
1034
|
-
async getSEOConfiguration(
|
|
1035
|
-
|
|
1187
|
+
async getSEOConfiguration(
|
|
1188
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1189
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1190
|
+
) {
|
|
1191
|
+
const {
|
|
1192
|
+
error,
|
|
1193
|
+
} = ContentApplicationValidator.getSEOConfiguration().validate(
|
|
1036
1194
|
{},
|
|
1037
1195
|
{ abortEarly: false, allowUnknown: true }
|
|
1038
1196
|
);
|
|
@@ -1041,16 +1199,17 @@ class Content {
|
|
|
1041
1199
|
}
|
|
1042
1200
|
|
|
1043
1201
|
// Showing warrnings if extra unknown parameters are found
|
|
1044
|
-
const {
|
|
1202
|
+
const {
|
|
1203
|
+
error: warrning,
|
|
1204
|
+
} = ContentApplicationValidator.getSEOConfiguration().validate(
|
|
1045
1205
|
{},
|
|
1046
1206
|
{ abortEarly: false, allowUnknown: false }
|
|
1047
1207
|
);
|
|
1048
1208
|
if (warrning) {
|
|
1049
1209
|
Logger({
|
|
1050
1210
|
level: "WARN",
|
|
1051
|
-
message:
|
|
1211
|
+
message: `Parameter Validation warrnings for application > Content > getSEOConfiguration \n ${warrning}`,
|
|
1052
1212
|
});
|
|
1053
|
-
Logger({ level: "WARN", message: warrning });
|
|
1054
1213
|
}
|
|
1055
1214
|
|
|
1056
1215
|
const query_params = {};
|
|
@@ -1066,36 +1225,46 @@ class Content {
|
|
|
1066
1225
|
}),
|
|
1067
1226
|
query_params,
|
|
1068
1227
|
undefined,
|
|
1069
|
-
xHeaders
|
|
1228
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1229
|
+
{ responseHeaders }
|
|
1070
1230
|
);
|
|
1071
1231
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1232
|
+
let responseData = response;
|
|
1233
|
+
if (responseHeaders) {
|
|
1234
|
+
responseData = response[0];
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
const {
|
|
1238
|
+
error: res_error,
|
|
1239
|
+
} = ContentApplicationModel.SeoComponent().validate(responseData, {
|
|
1240
|
+
abortEarly: false,
|
|
1241
|
+
allowUnknown: false,
|
|
1242
|
+
});
|
|
1076
1243
|
|
|
1077
1244
|
if (res_error) {
|
|
1078
1245
|
Logger({
|
|
1079
1246
|
level: "WARN",
|
|
1080
|
-
message:
|
|
1247
|
+
message: `Response Validation Warnnings for application > Content > getSEOConfiguration \n ${res_error}`,
|
|
1081
1248
|
});
|
|
1082
|
-
Logger({ level: "WARN", message: res_error });
|
|
1083
1249
|
}
|
|
1084
1250
|
|
|
1085
1251
|
return response;
|
|
1086
1252
|
}
|
|
1087
1253
|
|
|
1088
1254
|
/**
|
|
1089
|
-
* @param {
|
|
1090
|
-
* @param {
|
|
1091
|
-
*
|
|
1092
|
-
*
|
|
1093
|
-
* @
|
|
1255
|
+
* @param {ContentApplicationValidator.GetSlideshowParam} arg - Arg object.
|
|
1256
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1257
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1258
|
+
* @returns {Promise<ContentApplicationModel.SlideshowSchema>} - Success response
|
|
1259
|
+
* @name getSlideshow
|
|
1094
1260
|
* @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`.
|
|
1261
|
+
* @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
1262
|
*/
|
|
1097
|
-
async getSlideshow(
|
|
1098
|
-
|
|
1263
|
+
async getSlideshow(
|
|
1264
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
1265
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1266
|
+
) {
|
|
1267
|
+
const { error } = ContentApplicationValidator.getSlideshow().validate(
|
|
1099
1268
|
{ slug },
|
|
1100
1269
|
{ abortEarly: false, allowUnknown: true }
|
|
1101
1270
|
);
|
|
@@ -1104,16 +1273,17 @@ class Content {
|
|
|
1104
1273
|
}
|
|
1105
1274
|
|
|
1106
1275
|
// Showing warrnings if extra unknown parameters are found
|
|
1107
|
-
const {
|
|
1276
|
+
const {
|
|
1277
|
+
error: warrning,
|
|
1278
|
+
} = ContentApplicationValidator.getSlideshow().validate(
|
|
1108
1279
|
{ slug },
|
|
1109
1280
|
{ abortEarly: false, allowUnknown: false }
|
|
1110
1281
|
);
|
|
1111
1282
|
if (warrning) {
|
|
1112
1283
|
Logger({
|
|
1113
1284
|
level: "WARN",
|
|
1114
|
-
message:
|
|
1285
|
+
message: `Parameter Validation warrnings for application > Content > getSlideshow \n ${warrning}`,
|
|
1115
1286
|
});
|
|
1116
|
-
Logger({ level: "WARN", message: warrning });
|
|
1117
1287
|
}
|
|
1118
1288
|
|
|
1119
1289
|
const query_params = {};
|
|
@@ -1129,12 +1299,18 @@ class Content {
|
|
|
1129
1299
|
}),
|
|
1130
1300
|
query_params,
|
|
1131
1301
|
undefined,
|
|
1132
|
-
xHeaders
|
|
1302
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1303
|
+
{ responseHeaders }
|
|
1133
1304
|
);
|
|
1134
1305
|
|
|
1306
|
+
let responseData = response;
|
|
1307
|
+
if (responseHeaders) {
|
|
1308
|
+
responseData = response[0];
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1135
1311
|
const {
|
|
1136
1312
|
error: res_error,
|
|
1137
|
-
} =
|
|
1313
|
+
} = ContentApplicationModel.SlideshowSchema().validate(responseData, {
|
|
1138
1314
|
abortEarly: false,
|
|
1139
1315
|
allowUnknown: false,
|
|
1140
1316
|
});
|
|
@@ -1142,25 +1318,27 @@ class Content {
|
|
|
1142
1318
|
if (res_error) {
|
|
1143
1319
|
Logger({
|
|
1144
1320
|
level: "WARN",
|
|
1145
|
-
message:
|
|
1321
|
+
message: `Response Validation Warnnings for application > Content > getSlideshow \n ${res_error}`,
|
|
1146
1322
|
});
|
|
1147
|
-
Logger({ level: "WARN", message: res_error });
|
|
1148
1323
|
}
|
|
1149
1324
|
|
|
1150
1325
|
return response;
|
|
1151
1326
|
}
|
|
1152
1327
|
|
|
1153
1328
|
/**
|
|
1154
|
-
* @param {
|
|
1155
|
-
* @param {
|
|
1156
|
-
*
|
|
1157
|
-
* @
|
|
1158
|
-
* @
|
|
1329
|
+
* @param {ContentApplicationValidator.GetSlideshowsParam} arg - Arg object.
|
|
1330
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1331
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1332
|
+
* @returns {Promise<ContentApplicationModel.SlideshowGetResponse>} - Success response
|
|
1333
|
+
* @name getSlideshows
|
|
1159
1334
|
* @summary: Get the slideshows
|
|
1160
|
-
* @description: Use this API to get a list of slideshows along with their details.
|
|
1335
|
+
* @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
1336
|
*/
|
|
1162
|
-
async getSlideshows(
|
|
1163
|
-
|
|
1337
|
+
async getSlideshows(
|
|
1338
|
+
{ pageNo, pageSize, requestHeaders } = { requestHeaders: {} },
|
|
1339
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1340
|
+
) {
|
|
1341
|
+
const { error } = ContentApplicationValidator.getSlideshows().validate(
|
|
1164
1342
|
{ pageNo, pageSize },
|
|
1165
1343
|
{ abortEarly: false, allowUnknown: true }
|
|
1166
1344
|
);
|
|
@@ -1169,16 +1347,17 @@ class Content {
|
|
|
1169
1347
|
}
|
|
1170
1348
|
|
|
1171
1349
|
// Showing warrnings if extra unknown parameters are found
|
|
1172
|
-
const {
|
|
1350
|
+
const {
|
|
1351
|
+
error: warrning,
|
|
1352
|
+
} = ContentApplicationValidator.getSlideshows().validate(
|
|
1173
1353
|
{ pageNo, pageSize },
|
|
1174
1354
|
{ abortEarly: false, allowUnknown: false }
|
|
1175
1355
|
);
|
|
1176
1356
|
if (warrning) {
|
|
1177
1357
|
Logger({
|
|
1178
1358
|
level: "WARN",
|
|
1179
|
-
message:
|
|
1359
|
+
message: `Parameter Validation warrnings for application > Content > getSlideshows \n ${warrning}`,
|
|
1180
1360
|
});
|
|
1181
|
-
Logger({ level: "WARN", message: warrning });
|
|
1182
1361
|
}
|
|
1183
1362
|
|
|
1184
1363
|
const query_params = {};
|
|
@@ -1196,12 +1375,18 @@ class Content {
|
|
|
1196
1375
|
}),
|
|
1197
1376
|
query_params,
|
|
1198
1377
|
undefined,
|
|
1199
|
-
xHeaders
|
|
1378
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1379
|
+
{ responseHeaders }
|
|
1200
1380
|
);
|
|
1201
1381
|
|
|
1382
|
+
let responseData = response;
|
|
1383
|
+
if (responseHeaders) {
|
|
1384
|
+
responseData = response[0];
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1202
1387
|
const {
|
|
1203
1388
|
error: res_error,
|
|
1204
|
-
} =
|
|
1389
|
+
} = ContentApplicationModel.SlideshowGetResponse().validate(responseData, {
|
|
1205
1390
|
abortEarly: false,
|
|
1206
1391
|
allowUnknown: false,
|
|
1207
1392
|
});
|
|
@@ -1209,9 +1394,8 @@ class Content {
|
|
|
1209
1394
|
if (res_error) {
|
|
1210
1395
|
Logger({
|
|
1211
1396
|
level: "WARN",
|
|
1212
|
-
message:
|
|
1397
|
+
message: `Response Validation Warnnings for application > Content > getSlideshows \n ${res_error}`,
|
|
1213
1398
|
});
|
|
1214
|
-
Logger({ level: "WARN", message: res_error });
|
|
1215
1399
|
}
|
|
1216
1400
|
|
|
1217
1401
|
return response;
|
|
@@ -1220,6 +1404,7 @@ class Content {
|
|
|
1220
1404
|
/**
|
|
1221
1405
|
* @param {Object} arg - Arg object.
|
|
1222
1406
|
* @param {number} [arg.pageSize] - The number of items to retrieve in each page.
|
|
1407
|
+
* @returns {Paginator<ContentApplicationModel.SlideshowGetResponse>}
|
|
1223
1408
|
* @summary: Get the slideshows
|
|
1224
1409
|
* @description: Use this API to get a list of slideshows along with their details.
|
|
1225
1410
|
*/
|
|
@@ -1244,13 +1429,21 @@ class Content {
|
|
|
1244
1429
|
}
|
|
1245
1430
|
|
|
1246
1431
|
/**
|
|
1247
|
-
* @param {
|
|
1248
|
-
* @
|
|
1432
|
+
* @param {ContentApplicationValidator.GetSupportInformationParam} arg - Arg object.
|
|
1433
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1434
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1435
|
+
* @returns {Promise<ContentApplicationModel.Support>} - Success response
|
|
1436
|
+
* @name getSupportInformation
|
|
1249
1437
|
* @summary: Get the support information
|
|
1250
|
-
* @description: Use this API to get contact details for customer support including emails and phone numbers.
|
|
1438
|
+
* @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
1439
|
*/
|
|
1252
|
-
async getSupportInformation(
|
|
1253
|
-
|
|
1440
|
+
async getSupportInformation(
|
|
1441
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1442
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1443
|
+
) {
|
|
1444
|
+
const {
|
|
1445
|
+
error,
|
|
1446
|
+
} = ContentApplicationValidator.getSupportInformation().validate(
|
|
1254
1447
|
{},
|
|
1255
1448
|
{ abortEarly: false, allowUnknown: true }
|
|
1256
1449
|
);
|
|
@@ -1261,16 +1454,15 @@ class Content {
|
|
|
1261
1454
|
// Showing warrnings if extra unknown parameters are found
|
|
1262
1455
|
const {
|
|
1263
1456
|
error: warrning,
|
|
1264
|
-
} =
|
|
1457
|
+
} = ContentApplicationValidator.getSupportInformation().validate(
|
|
1265
1458
|
{},
|
|
1266
1459
|
{ abortEarly: false, allowUnknown: false }
|
|
1267
1460
|
);
|
|
1268
1461
|
if (warrning) {
|
|
1269
1462
|
Logger({
|
|
1270
1463
|
level: "WARN",
|
|
1271
|
-
message:
|
|
1464
|
+
message: `Parameter Validation warrnings for application > Content > getSupportInformation \n ${warrning}`,
|
|
1272
1465
|
});
|
|
1273
|
-
Logger({ level: "WARN", message: warrning });
|
|
1274
1466
|
}
|
|
1275
1467
|
|
|
1276
1468
|
const query_params = {};
|
|
@@ -1286,10 +1478,18 @@ class Content {
|
|
|
1286
1478
|
}),
|
|
1287
1479
|
query_params,
|
|
1288
1480
|
undefined,
|
|
1289
|
-
xHeaders
|
|
1481
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1482
|
+
{ responseHeaders }
|
|
1290
1483
|
);
|
|
1291
1484
|
|
|
1292
|
-
|
|
1485
|
+
let responseData = response;
|
|
1486
|
+
if (responseHeaders) {
|
|
1487
|
+
responseData = response[0];
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
const {
|
|
1491
|
+
error: res_error,
|
|
1492
|
+
} = ContentApplicationModel.Support().validate(responseData, {
|
|
1293
1493
|
abortEarly: false,
|
|
1294
1494
|
allowUnknown: false,
|
|
1295
1495
|
});
|
|
@@ -1297,22 +1497,27 @@ class Content {
|
|
|
1297
1497
|
if (res_error) {
|
|
1298
1498
|
Logger({
|
|
1299
1499
|
level: "WARN",
|
|
1300
|
-
message:
|
|
1500
|
+
message: `Response Validation Warnnings for application > Content > getSupportInformation \n ${res_error}`,
|
|
1301
1501
|
});
|
|
1302
|
-
Logger({ level: "WARN", message: res_error });
|
|
1303
1502
|
}
|
|
1304
1503
|
|
|
1305
1504
|
return response;
|
|
1306
1505
|
}
|
|
1307
1506
|
|
|
1308
1507
|
/**
|
|
1309
|
-
* @param {
|
|
1310
|
-
* @
|
|
1508
|
+
* @param {ContentApplicationValidator.GetTagsParam} arg - Arg object.
|
|
1509
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1510
|
+
* @param {import("../ApplicationAPIClient").Options} - Options
|
|
1511
|
+
* @returns {Promise<ContentApplicationModel.TagsSchema>} - Success response
|
|
1512
|
+
* @name getTags
|
|
1311
1513
|
* @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.
|
|
1514
|
+
* @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
1515
|
*/
|
|
1314
|
-
async getTags(
|
|
1315
|
-
|
|
1516
|
+
async getTags(
|
|
1517
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1518
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1519
|
+
) {
|
|
1520
|
+
const { error } = ContentApplicationValidator.getTags().validate(
|
|
1316
1521
|
{},
|
|
1317
1522
|
{ abortEarly: false, allowUnknown: true }
|
|
1318
1523
|
);
|
|
@@ -1321,16 +1526,15 @@ class Content {
|
|
|
1321
1526
|
}
|
|
1322
1527
|
|
|
1323
1528
|
// Showing warrnings if extra unknown parameters are found
|
|
1324
|
-
const { error: warrning } =
|
|
1529
|
+
const { error: warrning } = ContentApplicationValidator.getTags().validate(
|
|
1325
1530
|
{},
|
|
1326
1531
|
{ abortEarly: false, allowUnknown: false }
|
|
1327
1532
|
);
|
|
1328
1533
|
if (warrning) {
|
|
1329
1534
|
Logger({
|
|
1330
1535
|
level: "WARN",
|
|
1331
|
-
message:
|
|
1536
|
+
message: `Parameter Validation warrnings for application > Content > getTags \n ${warrning}`,
|
|
1332
1537
|
});
|
|
1333
|
-
Logger({ level: "WARN", message: warrning });
|
|
1334
1538
|
}
|
|
1335
1539
|
|
|
1336
1540
|
const query_params = {};
|
|
@@ -1346,10 +1550,18 @@ class Content {
|
|
|
1346
1550
|
}),
|
|
1347
1551
|
query_params,
|
|
1348
1552
|
undefined,
|
|
1349
|
-
xHeaders
|
|
1553
|
+
{ ...xHeaders, ...requestHeaders },
|
|
1554
|
+
{ responseHeaders }
|
|
1350
1555
|
);
|
|
1351
1556
|
|
|
1352
|
-
|
|
1557
|
+
let responseData = response;
|
|
1558
|
+
if (responseHeaders) {
|
|
1559
|
+
responseData = response[0];
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
const {
|
|
1563
|
+
error: res_error,
|
|
1564
|
+
} = ContentApplicationModel.TagsSchema().validate(responseData, {
|
|
1353
1565
|
abortEarly: false,
|
|
1354
1566
|
allowUnknown: false,
|
|
1355
1567
|
});
|
|
@@ -1357,9 +1569,8 @@ class Content {
|
|
|
1357
1569
|
if (res_error) {
|
|
1358
1570
|
Logger({
|
|
1359
1571
|
level: "WARN",
|
|
1360
|
-
message:
|
|
1572
|
+
message: `Response Validation Warnnings for application > Content > getTags \n ${res_error}`,
|
|
1361
1573
|
});
|
|
1362
|
-
Logger({ level: "WARN", message: res_error });
|
|
1363
1574
|
}
|
|
1364
1575
|
|
|
1365
1576
|
return response;
|