@gofynd/fdk-client-javascript 3.1.0-beta.1 → 3.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 +1 -1
- package/package.json +2 -2
- package/sdk/application/ApplicationClient.d.ts +2 -0
- package/sdk/application/ApplicationClient.js +2 -0
- package/sdk/application/Cart/CartApplicationClient.d.ts +81 -101
- package/sdk/application/Cart/CartApplicationClient.js +173 -511
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +214 -447
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +4 -19
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -43
- package/sdk/application/Communication/CommunicationApplicationClient.js +4 -214
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +41 -54
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +39 -192
- package/sdk/application/Content/ContentApplicationClient.d.ts +61 -61
- package/sdk/application/Content/ContentApplicationClient.js +183 -366
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
- package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
- package/sdk/application/Lead/LeadApplicationClient.d.ts +6 -6
- package/sdk/application/Lead/LeadApplicationClient.js +24 -55
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +28 -117
- package/sdk/application/Logistic/LogisticApplicationClient.js +99 -492
- package/sdk/application/Order/OrderApplicationClient.d.ts +31 -51
- package/sdk/application/Order/OrderApplicationClient.js +89 -293
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +108 -218
- package/sdk/application/Payment/PaymentApplicationClient.js +100 -1081
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +14 -14
- package/sdk/application/Rewards/RewardsApplicationClient.js +13 -66
- package/sdk/application/Share/ShareApplicationClient.d.ts +11 -11
- package/sdk/application/Share/ShareApplicationClient.js +35 -89
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +5 -25
- package/sdk/application/Theme/ThemeApplicationClient.js +24 -150
- package/sdk/application/User/UserApplicationClient.d.ts +23 -13
- package/sdk/application/User/UserApplicationClient.js +49 -407
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +4 -11
- package/sdk/common/Utility.d.ts +1 -1
- package/sdk/common/Utility.js +10 -7
- package/sdk/common/Validator.d.ts +1 -0
- package/sdk/common/Validator.js +20 -0
- package/sdk/common/utils.d.ts +0 -1
- package/sdk/common/utils.js +0 -14
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +10 -54
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +32 -364
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +54 -1
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +43 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -5
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -35
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +52 -98
- package/sdk/partner/Lead/LeadPartnerModel.js +76 -100
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +172 -41
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +1222 -85
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1921 -297
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +973 -258
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +13 -1
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +148 -16
- package/sdk/partner/PartnerClient.d.ts +0 -6
- package/sdk/partner/PartnerClient.js +0 -9
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +21 -63
- package/sdk/partner/Theme/ThemePartnerClient.js +67 -392
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +72 -104
- package/sdk/partner/Theme/ThemePartnerModel.js +75 -101
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +1 -5
- package/sdk/partner/Theme/ThemePartnerValidator.js +12 -42
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +673 -189
- package/sdk/partner/Webhook/WebhookPartnerModel.js +270 -159
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +0 -3
- package/sdk/partner/index.js +0 -6
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +3 -3
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +2 -32
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -243
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
- package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
- package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
- package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +172 -251
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +577 -648
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +270 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +192 -108
- package/sdk/platform/Cart/CartPlatformModel.d.ts +4554 -3154
- package/sdk/platform/Cart/CartPlatformModel.js +1935 -2854
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +380 -976
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +2004 -6464
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +161 -1082
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +80 -884
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +568 -325
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1560 -1162
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9772 -7871
- package/sdk/platform/Catalog/CatalogPlatformModel.js +6978 -9516
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +231 -240
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +180 -188
- package/sdk/platform/Common/CommonPlatformClient.d.ts +6 -5
- package/sdk/platform/Common/CommonPlatformClient.js +6 -5
- package/sdk/platform/Common/CommonPlatformModel.d.ts +19 -25
- package/sdk/platform/Common/CommonPlatformModel.js +11 -14
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +240 -376
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +589 -874
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +139 -170
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +126 -145
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +3 -56
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -307
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +330 -502
- package/sdk/platform/Communication/CommunicationPlatformModel.js +376 -610
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +3 -62
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +2 -48
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +72 -100
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +88 -146
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +270 -241
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +248 -226
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -31
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -25
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +117 -332
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +409 -1470
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +55 -158
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +41 -163
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +65 -142
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +103 -568
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +562 -1289
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +368 -1037
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +34 -80
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +24 -79
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +302 -248
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1292 -773
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +330 -218
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +325 -208
- package/sdk/platform/Content/ContentPlatformClient.d.ts +279 -118
- package/sdk/platform/Content/ContentPlatformClient.js +1617 -492
- package/sdk/platform/Content/ContentPlatformModel.d.ts +2391 -924
- package/sdk/platform/Content/ContentPlatformModel.js +1314 -970
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +272 -134
- package/sdk/platform/Content/ContentPlatformValidator.js +295 -118
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +53 -43
- package/sdk/platform/Discount/DiscountPlatformClient.js +53 -43
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +383 -110
- package/sdk/platform/Discount/DiscountPlatformModel.js +117 -108
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
- package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +4 -163
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +4 -1078
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -141
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -177
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +30 -1123
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +24 -1135
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +17 -17
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +33 -33
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +19 -19
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +14 -14
- package/sdk/platform/Lead/LeadPlatformClient.d.ts +24 -4
- package/sdk/platform/Lead/LeadPlatformClient.js +160 -4
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +60 -140
- package/sdk/platform/Lead/LeadPlatformModel.js +81 -162
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +29 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +28 -2
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +19 -98
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +27 -662
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +91 -118
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +32 -127
- package/sdk/platform/Order/OrderPlatformClient.d.ts +406 -403
- package/sdk/platform/Order/OrderPlatformClient.js +1200 -1343
- package/sdk/platform/Order/OrderPlatformModel.d.ts +8665 -4505
- package/sdk/platform/Order/OrderPlatformModel.js +4088 -3601
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +666 -442
- package/sdk/platform/Order/OrderPlatformValidator.js +353 -312
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +6 -4
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +9 -7
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +67 -19
- package/sdk/platform/Partner/PartnerPlatformModel.js +26 -17
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +135 -382
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +937 -2452
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +100 -306
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +74 -305
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +56 -66
- package/sdk/platform/Payment/PaymentPlatformClient.js +124 -269
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +1307 -3536
- package/sdk/platform/Payment/PaymentPlatformModel.js +1389 -3692
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +35 -64
- package/sdk/platform/Payment/PaymentPlatformValidator.js +34 -60
- package/sdk/platform/PlatformClient.d.ts +0 -2
- package/sdk/platform/PlatformClient.js +0 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +12 -12
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -10
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +64 -136
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +111 -521
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +75 -117
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +50 -105
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +160 -149
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +766 -545
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +6196 -3978
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3181 -3895
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +294 -220
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +205 -149
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +16 -4
- package/sdk/platform/Share/SharePlatformApplicationClient.js +86 -8
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +23 -6
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +16 -3
- package/sdk/platform/Share/SharePlatformModel.d.ts +53 -9
- package/sdk/platform/Share/SharePlatformModel.js +45 -5
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +17 -37
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +66 -204
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +25 -26
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +20 -31
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +8 -18
- package/sdk/platform/Theme/ThemePlatformClient.js +8 -85
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +17 -425
- package/sdk/platform/Theme/ThemePlatformModel.js +23 -329
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +3 -7
- package/sdk/platform/Theme/ThemePlatformValidator.js +2 -9
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +81 -18
- package/sdk/platform/User/UserPlatformApplicationClient.js +491 -27
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +126 -10
- package/sdk/platform/User/UserPlatformApplicationValidator.js +92 -7
- package/sdk/platform/User/UserPlatformModel.d.ts +317 -218
- package/sdk/platform/User/UserPlatformModel.js +253 -210
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +25 -78
- package/sdk/platform/Webhook/WebhookPlatformClient.js +75 -470
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +813 -426
- package/sdk/platform/Webhook/WebhookPlatformModel.js +446 -395
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
- package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
- package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
- package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +4 -14
- package/sdk/public/Configuration/ConfigurationPublicClient.js +10 -113
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +46 -114
- package/sdk/public/Configuration/ConfigurationPublicModel.js +32 -117
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +1 -11
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +0 -12
- package/sdk/public/Content/ContentPublicClient.d.ts +36 -25
- package/sdk/public/Content/ContentPublicClient.js +254 -280
- package/sdk/public/Content/ContentPublicModel.d.ts +151 -38
- package/sdk/public/Content/ContentPublicModel.js +98 -44
- package/sdk/public/Content/ContentPublicValidator.d.ts +18 -17
- package/sdk/public/Content/ContentPublicValidator.js +26 -19
- package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
- package/sdk/public/Partner/PartnerPublicClient.js +6 -11
- package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
- package/sdk/public/Partner/PartnerPublicModel.js +81 -71
- package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
- package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
- package/sdk/public/PublicClient.d.ts +2 -0
- package/sdk/public/PublicClient.js +4 -0
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +9 -48
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +215 -67
- package/sdk/public/Webhook/WebhookPublicModel.js +66 -61
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -0
- package/sdk/public/index.js +2 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +0 -66
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +0 -431
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +0 -231
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +0 -152
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +0 -8
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +0 -39
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +0 -26
- package/sdk/partner/Catalog/CatalogPartnerClient.js +0 -173
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +0 -238
- package/sdk/partner/Catalog/CatalogPartnerModel.js +0 -248
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +0 -5
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +0 -19
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +0 -116
- package/sdk/partner/Payment/PaymentPartnerClient.js +0 -857
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +0 -388
- package/sdk/partner/Payment/PaymentPartnerModel.js +0 -442
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +0 -14
- package/sdk/partner/Payment/PaymentPartnerValidator.js +0 -74
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
- package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2895
- package/sdk/platform/Finance/FinancePlatformModel.js +0 -2150
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
- package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
|
@@ -6,6 +6,7 @@ const {
|
|
|
6
6
|
const PublicAPIClient = require("../PublicAPIClient");
|
|
7
7
|
const constructUrl = require("../constructUrl");
|
|
8
8
|
const Paginator = require("../../common/Paginator");
|
|
9
|
+
const { validateRequiredParams } = require("../../common/Validator");
|
|
9
10
|
|
|
10
11
|
const ContentPublicValidator = require("./ContentPublicValidator");
|
|
11
12
|
const ContentPublicModel = require("./ContentPublicModel");
|
|
@@ -16,7 +17,10 @@ class Content {
|
|
|
16
17
|
constructor(_conf) {
|
|
17
18
|
this._conf = _conf;
|
|
18
19
|
this._relativeUrls = {
|
|
20
|
+
getAllLanguages: "/service/public/content/languages",
|
|
19
21
|
getAllTags: "/service/public/content/tags",
|
|
22
|
+
getAllTranslatableResources:
|
|
23
|
+
"/service/public/content/translatable/resources",
|
|
20
24
|
getAnalyticsTags: "/service/public/content/analytics-tags",
|
|
21
25
|
getBasicDetails: "/service/public/content/basic-details",
|
|
22
26
|
getCredentialsByEntity:
|
|
@@ -24,12 +28,11 @@ class Content {
|
|
|
24
28
|
getCustomPage: "/service/public/content/custom-pages/{slug}",
|
|
25
29
|
getFooterContent: "/service/public/content/footer",
|
|
26
30
|
getHomePageContent: "/service/public/content/home-page",
|
|
31
|
+
getLanguageByLocale: "/service/public/content/languages/{locale}",
|
|
27
32
|
getMenuContent: "/service/public/content/menu",
|
|
28
33
|
getMenuContentByType: "/service/public/content/menu/{type}",
|
|
29
34
|
getNavbar: "/service/public/content/navbar",
|
|
30
35
|
getPricingBanner: "/service/public/content/pricing-banner",
|
|
31
|
-
getSDKDocumentation: "/service/public/content/sdk-readme",
|
|
32
|
-
getSDKDocumentationByType: "/service/public/content/sdk-readme/{type}",
|
|
33
36
|
};
|
|
34
37
|
this._urls = Object.entries(this._relativeUrls).reduce(
|
|
35
38
|
(urls, [method, relativeUrl]) => {
|
|
@@ -47,6 +50,82 @@ class Content {
|
|
|
47
50
|
};
|
|
48
51
|
}
|
|
49
52
|
|
|
53
|
+
/**
|
|
54
|
+
* @param {ContentPublicValidator.GetAllLanguagesParam} arg - Arg object.
|
|
55
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
56
|
+
* @param {import("../PublicAPIClient").Options} - Options
|
|
57
|
+
* @returns {Promise<Object>} - Success response
|
|
58
|
+
* @name getAllLanguages
|
|
59
|
+
* @summary: Get All Languages
|
|
60
|
+
* @description: Fetches complete list of languages supported by the platform with their locale codes and text directions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAllLanguages/).
|
|
61
|
+
*/
|
|
62
|
+
async getAllLanguages(
|
|
63
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
64
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
65
|
+
) {
|
|
66
|
+
const { error } = ContentPublicValidator.getAllLanguages().validate(
|
|
67
|
+
{},
|
|
68
|
+
{ abortEarly: false, allowUnknown: true }
|
|
69
|
+
);
|
|
70
|
+
if (error) {
|
|
71
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Showing warrnings if extra unknown parameters are found
|
|
75
|
+
const {
|
|
76
|
+
error: warrning,
|
|
77
|
+
} = ContentPublicValidator.getAllLanguages().validate(
|
|
78
|
+
{},
|
|
79
|
+
{ abortEarly: false, allowUnknown: false }
|
|
80
|
+
);
|
|
81
|
+
if (warrning) {
|
|
82
|
+
Logger({
|
|
83
|
+
level: "WARN",
|
|
84
|
+
message: `Parameter Validation warrnings for public > Content > getAllLanguages \n ${warrning}`,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const query_params = {};
|
|
89
|
+
|
|
90
|
+
const xHeaders = {};
|
|
91
|
+
|
|
92
|
+
const response = await PublicAPIClient.execute(
|
|
93
|
+
this._conf,
|
|
94
|
+
"get",
|
|
95
|
+
constructUrl({
|
|
96
|
+
url: this._urls["getAllLanguages"],
|
|
97
|
+
params: {},
|
|
98
|
+
}),
|
|
99
|
+
query_params,
|
|
100
|
+
undefined,
|
|
101
|
+
{ ...xHeaders, ...requestHeaders },
|
|
102
|
+
{ responseHeaders }
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
let responseData = response;
|
|
106
|
+
if (responseHeaders) {
|
|
107
|
+
responseData = response[0];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
111
|
+
abortEarly: false,
|
|
112
|
+
allowUnknown: true,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
if (res_error) {
|
|
116
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
117
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
118
|
+
} else {
|
|
119
|
+
Logger({
|
|
120
|
+
level: "WARN",
|
|
121
|
+
message: `Response Validation Warnings for public > Content > getAllLanguages \n ${res_error}`,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return response;
|
|
127
|
+
}
|
|
128
|
+
|
|
50
129
|
/**
|
|
51
130
|
* @param {ContentPublicValidator.GetAllTagsParam} arg - Arg object.
|
|
52
131
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -60,14 +139,6 @@ class Content {
|
|
|
60
139
|
{ requestHeaders } = { requestHeaders: {} },
|
|
61
140
|
{ responseHeaders } = { responseHeaders: false }
|
|
62
141
|
) {
|
|
63
|
-
let invalidInput = [];
|
|
64
|
-
if (invalidInput.length) {
|
|
65
|
-
const error = new Error();
|
|
66
|
-
error.message = "Missing required field";
|
|
67
|
-
error.details = invalidInput;
|
|
68
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
142
|
const { error } = ContentPublicValidator.getAllTags().validate(
|
|
72
143
|
{},
|
|
73
144
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -131,6 +202,84 @@ class Content {
|
|
|
131
202
|
return response;
|
|
132
203
|
}
|
|
133
204
|
|
|
205
|
+
/**
|
|
206
|
+
* @param {ContentPublicValidator.GetAllTranslatableResourcesParam} arg - Arg object.
|
|
207
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
208
|
+
* @param {import("../PublicAPIClient").Options} - Options
|
|
209
|
+
* @returns {Promise<Object>} - Success response
|
|
210
|
+
* @name getAllTranslatableResources
|
|
211
|
+
* @summary: Get Translatable Items
|
|
212
|
+
* @description: Retrieves all resources that can be translated across different languages in the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getAllTranslatableResources/).
|
|
213
|
+
*/
|
|
214
|
+
async getAllTranslatableResources(
|
|
215
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
216
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
217
|
+
) {
|
|
218
|
+
const {
|
|
219
|
+
error,
|
|
220
|
+
} = ContentPublicValidator.getAllTranslatableResources().validate(
|
|
221
|
+
{},
|
|
222
|
+
{ abortEarly: false, allowUnknown: true }
|
|
223
|
+
);
|
|
224
|
+
if (error) {
|
|
225
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Showing warrnings if extra unknown parameters are found
|
|
229
|
+
const {
|
|
230
|
+
error: warrning,
|
|
231
|
+
} = ContentPublicValidator.getAllTranslatableResources().validate(
|
|
232
|
+
{},
|
|
233
|
+
{ abortEarly: false, allowUnknown: false }
|
|
234
|
+
);
|
|
235
|
+
if (warrning) {
|
|
236
|
+
Logger({
|
|
237
|
+
level: "WARN",
|
|
238
|
+
message: `Parameter Validation warrnings for public > Content > getAllTranslatableResources \n ${warrning}`,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const query_params = {};
|
|
243
|
+
|
|
244
|
+
const xHeaders = {};
|
|
245
|
+
|
|
246
|
+
const response = await PublicAPIClient.execute(
|
|
247
|
+
this._conf,
|
|
248
|
+
"get",
|
|
249
|
+
constructUrl({
|
|
250
|
+
url: this._urls["getAllTranslatableResources"],
|
|
251
|
+
params: {},
|
|
252
|
+
}),
|
|
253
|
+
query_params,
|
|
254
|
+
undefined,
|
|
255
|
+
{ ...xHeaders, ...requestHeaders },
|
|
256
|
+
{ responseHeaders }
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
let responseData = response;
|
|
260
|
+
if (responseHeaders) {
|
|
261
|
+
responseData = response[0];
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
const { error: res_error } = Joi.any().validate(responseData, {
|
|
265
|
+
abortEarly: false,
|
|
266
|
+
allowUnknown: true,
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
if (res_error) {
|
|
270
|
+
if (this._conf.options.strictResponseCheck === true) {
|
|
271
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
272
|
+
} else {
|
|
273
|
+
Logger({
|
|
274
|
+
level: "WARN",
|
|
275
|
+
message: `Response Validation Warnings for public > Content > getAllTranslatableResources \n ${res_error}`,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return response;
|
|
281
|
+
}
|
|
282
|
+
|
|
134
283
|
/**
|
|
135
284
|
* @param {ContentPublicValidator.GetAnalyticsTagsParam} arg - Arg object.
|
|
136
285
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -144,14 +293,6 @@ class Content {
|
|
|
144
293
|
{ requestHeaders } = { requestHeaders: {} },
|
|
145
294
|
{ responseHeaders } = { responseHeaders: false }
|
|
146
295
|
) {
|
|
147
|
-
let invalidInput = [];
|
|
148
|
-
if (invalidInput.length) {
|
|
149
|
-
const error = new Error();
|
|
150
|
-
error.message = "Missing required field";
|
|
151
|
-
error.details = invalidInput;
|
|
152
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
296
|
const { error } = ContentPublicValidator.getAnalyticsTags().validate(
|
|
156
297
|
{},
|
|
157
298
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -230,14 +371,6 @@ class Content {
|
|
|
230
371
|
{ requestHeaders } = { requestHeaders: {} },
|
|
231
372
|
{ responseHeaders } = { responseHeaders: false }
|
|
232
373
|
) {
|
|
233
|
-
let invalidInput = [];
|
|
234
|
-
if (invalidInput.length) {
|
|
235
|
-
const error = new Error();
|
|
236
|
-
error.message = "Missing required field";
|
|
237
|
-
error.details = invalidInput;
|
|
238
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
239
|
-
}
|
|
240
|
-
|
|
241
374
|
const { error } = ContentPublicValidator.getBasicDetails().validate(
|
|
242
375
|
{},
|
|
243
376
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -316,18 +449,12 @@ class Content {
|
|
|
316
449
|
{ entityType, requestHeaders } = { requestHeaders: {} },
|
|
317
450
|
{ responseHeaders } = { responseHeaders: false }
|
|
318
451
|
) {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
path: ["entityType"],
|
|
452
|
+
const errors = validateRequiredParams(arguments[0], ["entityType"]);
|
|
453
|
+
if (errors.length > 0) {
|
|
454
|
+
const error = new FDKClientValidationError({
|
|
455
|
+
message: "Missing required field",
|
|
456
|
+
details: errors,
|
|
325
457
|
});
|
|
326
|
-
}
|
|
327
|
-
if (invalidInput.length) {
|
|
328
|
-
const error = new Error();
|
|
329
|
-
error.message = "Missing required field";
|
|
330
|
-
error.details = invalidInput;
|
|
331
458
|
return Promise.reject(new FDKClientValidationError(error));
|
|
332
459
|
}
|
|
333
460
|
|
|
@@ -409,18 +536,12 @@ class Content {
|
|
|
409
536
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
410
537
|
{ responseHeaders } = { responseHeaders: false }
|
|
411
538
|
) {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
path: ["slug"],
|
|
539
|
+
const errors = validateRequiredParams(arguments[0], ["slug"]);
|
|
540
|
+
if (errors.length > 0) {
|
|
541
|
+
const error = new FDKClientValidationError({
|
|
542
|
+
message: "Missing required field",
|
|
543
|
+
details: errors,
|
|
418
544
|
});
|
|
419
|
-
}
|
|
420
|
-
if (invalidInput.length) {
|
|
421
|
-
const error = new Error();
|
|
422
|
-
error.message = "Missing required field";
|
|
423
|
-
error.details = invalidInput;
|
|
424
545
|
return Promise.reject(new FDKClientValidationError(error));
|
|
425
546
|
}
|
|
426
547
|
|
|
@@ -500,14 +621,6 @@ class Content {
|
|
|
500
621
|
{ requestHeaders } = { requestHeaders: {} },
|
|
501
622
|
{ responseHeaders } = { responseHeaders: false }
|
|
502
623
|
) {
|
|
503
|
-
let invalidInput = [];
|
|
504
|
-
if (invalidInput.length) {
|
|
505
|
-
const error = new Error();
|
|
506
|
-
error.message = "Missing required field";
|
|
507
|
-
error.details = invalidInput;
|
|
508
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
509
|
-
}
|
|
510
|
-
|
|
511
624
|
const { error } = ContentPublicValidator.getFooterContent().validate(
|
|
512
625
|
{},
|
|
513
626
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -586,21 +699,6 @@ class Content {
|
|
|
586
699
|
{ pageType, requestHeaders } = { requestHeaders: {} },
|
|
587
700
|
{ responseHeaders } = { responseHeaders: false }
|
|
588
701
|
) {
|
|
589
|
-
let invalidInput = [];
|
|
590
|
-
|
|
591
|
-
if (!pageType) {
|
|
592
|
-
invalidInput.push({
|
|
593
|
-
message: `The 'pageType' field is required.`,
|
|
594
|
-
path: ["pageType"],
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
if (invalidInput.length) {
|
|
598
|
-
const error = new Error();
|
|
599
|
-
error.message = "Missing required field";
|
|
600
|
-
error.details = invalidInput;
|
|
601
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
602
|
-
}
|
|
603
|
-
|
|
604
702
|
const { error } = ContentPublicValidator.getHomePageContent().validate(
|
|
605
703
|
{ pageType },
|
|
606
704
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -668,121 +766,29 @@ class Content {
|
|
|
668
766
|
}
|
|
669
767
|
|
|
670
768
|
/**
|
|
671
|
-
* @param {ContentPublicValidator.
|
|
672
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
673
|
-
* @param {import("../PublicAPIClient").Options} - Options
|
|
674
|
-
* @returns {Promise<ContentPublicModel.MenusSchema>} - Success response
|
|
675
|
-
* @name getMenuContent
|
|
676
|
-
* @summary: Get desktop menu content
|
|
677
|
-
* @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContent/).
|
|
678
|
-
*/
|
|
679
|
-
async getMenuContent(
|
|
680
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
681
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
682
|
-
) {
|
|
683
|
-
let invalidInput = [];
|
|
684
|
-
if (invalidInput.length) {
|
|
685
|
-
const error = new Error();
|
|
686
|
-
error.message = "Missing required field";
|
|
687
|
-
error.details = invalidInput;
|
|
688
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
const { error } = ContentPublicValidator.getMenuContent().validate(
|
|
692
|
-
{},
|
|
693
|
-
{ abortEarly: false, allowUnknown: true }
|
|
694
|
-
);
|
|
695
|
-
if (error) {
|
|
696
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
// Showing warrnings if extra unknown parameters are found
|
|
700
|
-
const {
|
|
701
|
-
error: warrning,
|
|
702
|
-
} = ContentPublicValidator.getMenuContent().validate(
|
|
703
|
-
{},
|
|
704
|
-
{ abortEarly: false, allowUnknown: false }
|
|
705
|
-
);
|
|
706
|
-
if (warrning) {
|
|
707
|
-
Logger({
|
|
708
|
-
level: "WARN",
|
|
709
|
-
message: `Parameter Validation warrnings for public > Content > getMenuContent \n ${warrning}`,
|
|
710
|
-
});
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
const query_params = {};
|
|
714
|
-
|
|
715
|
-
const xHeaders = {};
|
|
716
|
-
|
|
717
|
-
const response = await PublicAPIClient.execute(
|
|
718
|
-
this._conf,
|
|
719
|
-
"get",
|
|
720
|
-
constructUrl({
|
|
721
|
-
url: this._urls["getMenuContent"],
|
|
722
|
-
params: {},
|
|
723
|
-
}),
|
|
724
|
-
query_params,
|
|
725
|
-
undefined,
|
|
726
|
-
{ ...xHeaders, ...requestHeaders },
|
|
727
|
-
{ responseHeaders }
|
|
728
|
-
);
|
|
729
|
-
|
|
730
|
-
let responseData = response;
|
|
731
|
-
if (responseHeaders) {
|
|
732
|
-
responseData = response[0];
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
const {
|
|
736
|
-
error: res_error,
|
|
737
|
-
} = ContentPublicModel.MenusSchema().validate(responseData, {
|
|
738
|
-
abortEarly: false,
|
|
739
|
-
allowUnknown: true,
|
|
740
|
-
});
|
|
741
|
-
|
|
742
|
-
if (res_error) {
|
|
743
|
-
if (this._conf.options.strictResponseCheck === true) {
|
|
744
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
745
|
-
} else {
|
|
746
|
-
Logger({
|
|
747
|
-
level: "WARN",
|
|
748
|
-
message: `Response Validation Warnings for public > Content > getMenuContent \n ${res_error}`,
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
return response;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* @param {ContentPublicValidator.GetMenuContentByTypeParam} arg - Arg object.
|
|
769
|
+
* @param {ContentPublicValidator.GetLanguageByLocaleParam} arg - Arg object.
|
|
758
770
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
759
771
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
760
|
-
* @returns {Promise<ContentPublicModel.
|
|
761
|
-
* @name
|
|
762
|
-
* @summary: Get
|
|
763
|
-
* @description: Retrieves
|
|
772
|
+
* @returns {Promise<ContentPublicModel.Language>} - Success response
|
|
773
|
+
* @name getLanguageByLocale
|
|
774
|
+
* @summary: Get Single Language
|
|
775
|
+
* @description: Retrieves detailed information about a specific language using its locale identifier. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getLanguageByLocale/).
|
|
764
776
|
*/
|
|
765
|
-
async
|
|
766
|
-
{
|
|
777
|
+
async getLanguageByLocale(
|
|
778
|
+
{ locale, requestHeaders } = { requestHeaders: {} },
|
|
767
779
|
{ responseHeaders } = { responseHeaders: false }
|
|
768
780
|
) {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
path: ["type"],
|
|
781
|
+
const errors = validateRequiredParams(arguments[0], ["locale"]);
|
|
782
|
+
if (errors.length > 0) {
|
|
783
|
+
const error = new FDKClientValidationError({
|
|
784
|
+
message: "Missing required field",
|
|
785
|
+
details: errors,
|
|
775
786
|
});
|
|
776
|
-
}
|
|
777
|
-
if (invalidInput.length) {
|
|
778
|
-
const error = new Error();
|
|
779
|
-
error.message = "Missing required field";
|
|
780
|
-
error.details = invalidInput;
|
|
781
787
|
return Promise.reject(new FDKClientValidationError(error));
|
|
782
788
|
}
|
|
783
789
|
|
|
784
|
-
const { error } = ContentPublicValidator.
|
|
785
|
-
{
|
|
790
|
+
const { error } = ContentPublicValidator.getLanguageByLocale().validate(
|
|
791
|
+
{ locale },
|
|
786
792
|
{ abortEarly: false, allowUnknown: true }
|
|
787
793
|
);
|
|
788
794
|
if (error) {
|
|
@@ -792,14 +798,14 @@ class Content {
|
|
|
792
798
|
// Showing warrnings if extra unknown parameters are found
|
|
793
799
|
const {
|
|
794
800
|
error: warrning,
|
|
795
|
-
} = ContentPublicValidator.
|
|
796
|
-
{
|
|
801
|
+
} = ContentPublicValidator.getLanguageByLocale().validate(
|
|
802
|
+
{ locale },
|
|
797
803
|
{ abortEarly: false, allowUnknown: false }
|
|
798
804
|
);
|
|
799
805
|
if (warrning) {
|
|
800
806
|
Logger({
|
|
801
807
|
level: "WARN",
|
|
802
|
-
message: `Parameter Validation warrnings for public > Content >
|
|
808
|
+
message: `Parameter Validation warrnings for public > Content > getLanguageByLocale \n ${warrning}`,
|
|
803
809
|
});
|
|
804
810
|
}
|
|
805
811
|
|
|
@@ -811,8 +817,8 @@ class Content {
|
|
|
811
817
|
this._conf,
|
|
812
818
|
"get",
|
|
813
819
|
constructUrl({
|
|
814
|
-
url: this._urls["
|
|
815
|
-
params: {
|
|
820
|
+
url: this._urls["getLanguageByLocale"],
|
|
821
|
+
params: { locale },
|
|
816
822
|
}),
|
|
817
823
|
query_params,
|
|
818
824
|
undefined,
|
|
@@ -827,7 +833,7 @@ class Content {
|
|
|
827
833
|
|
|
828
834
|
const {
|
|
829
835
|
error: res_error,
|
|
830
|
-
} = ContentPublicModel.
|
|
836
|
+
} = ContentPublicModel.Language().validate(responseData, {
|
|
831
837
|
abortEarly: false,
|
|
832
838
|
allowUnknown: true,
|
|
833
839
|
});
|
|
@@ -838,7 +844,7 @@ class Content {
|
|
|
838
844
|
} else {
|
|
839
845
|
Logger({
|
|
840
846
|
level: "WARN",
|
|
841
|
-
message: `Response Validation Warnings for public > Content >
|
|
847
|
+
message: `Response Validation Warnings for public > Content > getLanguageByLocale \n ${res_error}`,
|
|
842
848
|
});
|
|
843
849
|
}
|
|
844
850
|
}
|
|
@@ -847,27 +853,19 @@ class Content {
|
|
|
847
853
|
}
|
|
848
854
|
|
|
849
855
|
/**
|
|
850
|
-
* @param {ContentPublicValidator.
|
|
856
|
+
* @param {ContentPublicValidator.GetMenuContentParam} arg - Arg object.
|
|
851
857
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
852
858
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
853
|
-
* @returns {Promise<ContentPublicModel.
|
|
854
|
-
* @name
|
|
855
|
-
* @summary: Get
|
|
856
|
-
* @description:
|
|
859
|
+
* @returns {Promise<ContentPublicModel.MenusSchema>} - Success response
|
|
860
|
+
* @name getMenuContent
|
|
861
|
+
* @summary: Get desktop menu content
|
|
862
|
+
* @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContent/).
|
|
857
863
|
*/
|
|
858
|
-
async
|
|
864
|
+
async getMenuContent(
|
|
859
865
|
{ requestHeaders } = { requestHeaders: {} },
|
|
860
866
|
{ responseHeaders } = { responseHeaders: false }
|
|
861
867
|
) {
|
|
862
|
-
|
|
863
|
-
if (invalidInput.length) {
|
|
864
|
-
const error = new Error();
|
|
865
|
-
error.message = "Missing required field";
|
|
866
|
-
error.details = invalidInput;
|
|
867
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
const { error } = ContentPublicValidator.getNavbar().validate(
|
|
868
|
+
const { error } = ContentPublicValidator.getMenuContent().validate(
|
|
871
869
|
{},
|
|
872
870
|
{ abortEarly: false, allowUnknown: true }
|
|
873
871
|
);
|
|
@@ -876,14 +874,16 @@ class Content {
|
|
|
876
874
|
}
|
|
877
875
|
|
|
878
876
|
// Showing warrnings if extra unknown parameters are found
|
|
879
|
-
const {
|
|
877
|
+
const {
|
|
878
|
+
error: warrning,
|
|
879
|
+
} = ContentPublicValidator.getMenuContent().validate(
|
|
880
880
|
{},
|
|
881
881
|
{ abortEarly: false, allowUnknown: false }
|
|
882
882
|
);
|
|
883
883
|
if (warrning) {
|
|
884
884
|
Logger({
|
|
885
885
|
level: "WARN",
|
|
886
|
-
message: `Parameter Validation warrnings for public > Content >
|
|
886
|
+
message: `Parameter Validation warrnings for public > Content > getMenuContent \n ${warrning}`,
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
889
|
|
|
@@ -895,7 +895,7 @@ class Content {
|
|
|
895
895
|
this._conf,
|
|
896
896
|
"get",
|
|
897
897
|
constructUrl({
|
|
898
|
-
url: this._urls["
|
|
898
|
+
url: this._urls["getMenuContent"],
|
|
899
899
|
params: {},
|
|
900
900
|
}),
|
|
901
901
|
query_params,
|
|
@@ -911,7 +911,7 @@ class Content {
|
|
|
911
911
|
|
|
912
912
|
const {
|
|
913
913
|
error: res_error,
|
|
914
|
-
} = ContentPublicModel.
|
|
914
|
+
} = ContentPublicModel.MenusSchema().validate(responseData, {
|
|
915
915
|
abortEarly: false,
|
|
916
916
|
allowUnknown: true,
|
|
917
917
|
});
|
|
@@ -922,7 +922,7 @@ class Content {
|
|
|
922
922
|
} else {
|
|
923
923
|
Logger({
|
|
924
924
|
level: "WARN",
|
|
925
|
-
message: `Response Validation Warnings for public > Content >
|
|
925
|
+
message: `Response Validation Warnings for public > Content > getMenuContent \n ${res_error}`,
|
|
926
926
|
});
|
|
927
927
|
}
|
|
928
928
|
}
|
|
@@ -931,28 +931,29 @@ class Content {
|
|
|
931
931
|
}
|
|
932
932
|
|
|
933
933
|
/**
|
|
934
|
-
* @param {ContentPublicValidator.
|
|
934
|
+
* @param {ContentPublicValidator.GetMenuContentByTypeParam} arg - Arg object.
|
|
935
935
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
936
936
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
937
|
-
* @returns {Promise<ContentPublicModel.
|
|
938
|
-
* @name
|
|
939
|
-
* @summary: Get
|
|
940
|
-
* @description:
|
|
937
|
+
* @returns {Promise<ContentPublicModel.MenuTypeSchema>} - Success response
|
|
938
|
+
* @name getMenuContentByType
|
|
939
|
+
* @summary: Get desktop menu content
|
|
940
|
+
* @description: Retrieves the desktop menu content. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getMenuContentByType/).
|
|
941
941
|
*/
|
|
942
|
-
async
|
|
943
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
942
|
+
async getMenuContentByType(
|
|
943
|
+
{ type, requestHeaders } = { requestHeaders: {} },
|
|
944
944
|
{ responseHeaders } = { responseHeaders: false }
|
|
945
945
|
) {
|
|
946
|
-
|
|
947
|
-
if (
|
|
948
|
-
const error = new
|
|
949
|
-
|
|
950
|
-
|
|
946
|
+
const errors = validateRequiredParams(arguments[0], ["type"]);
|
|
947
|
+
if (errors.length > 0) {
|
|
948
|
+
const error = new FDKClientValidationError({
|
|
949
|
+
message: "Missing required field",
|
|
950
|
+
details: errors,
|
|
951
|
+
});
|
|
951
952
|
return Promise.reject(new FDKClientValidationError(error));
|
|
952
953
|
}
|
|
953
954
|
|
|
954
|
-
const { error } = ContentPublicValidator.
|
|
955
|
-
{},
|
|
955
|
+
const { error } = ContentPublicValidator.getMenuContentByType().validate(
|
|
956
|
+
{ type },
|
|
956
957
|
{ abortEarly: false, allowUnknown: true }
|
|
957
958
|
);
|
|
958
959
|
if (error) {
|
|
@@ -962,14 +963,14 @@ class Content {
|
|
|
962
963
|
// Showing warrnings if extra unknown parameters are found
|
|
963
964
|
const {
|
|
964
965
|
error: warrning,
|
|
965
|
-
} = ContentPublicValidator.
|
|
966
|
-
{},
|
|
966
|
+
} = ContentPublicValidator.getMenuContentByType().validate(
|
|
967
|
+
{ type },
|
|
967
968
|
{ abortEarly: false, allowUnknown: false }
|
|
968
969
|
);
|
|
969
970
|
if (warrning) {
|
|
970
971
|
Logger({
|
|
971
972
|
level: "WARN",
|
|
972
|
-
message: `Parameter Validation warrnings for public > Content >
|
|
973
|
+
message: `Parameter Validation warrnings for public > Content > getMenuContentByType \n ${warrning}`,
|
|
973
974
|
});
|
|
974
975
|
}
|
|
975
976
|
|
|
@@ -981,8 +982,8 @@ class Content {
|
|
|
981
982
|
this._conf,
|
|
982
983
|
"get",
|
|
983
984
|
constructUrl({
|
|
984
|
-
url: this._urls["
|
|
985
|
-
params: {},
|
|
985
|
+
url: this._urls["getMenuContentByType"],
|
|
986
|
+
params: { type },
|
|
986
987
|
}),
|
|
987
988
|
query_params,
|
|
988
989
|
undefined,
|
|
@@ -997,7 +998,7 @@ class Content {
|
|
|
997
998
|
|
|
998
999
|
const {
|
|
999
1000
|
error: res_error,
|
|
1000
|
-
} = ContentPublicModel.
|
|
1001
|
+
} = ContentPublicModel.MenuTypeSchema().validate(responseData, {
|
|
1001
1002
|
abortEarly: false,
|
|
1002
1003
|
allowUnknown: true,
|
|
1003
1004
|
});
|
|
@@ -1008,7 +1009,7 @@ class Content {
|
|
|
1008
1009
|
} else {
|
|
1009
1010
|
Logger({
|
|
1010
1011
|
level: "WARN",
|
|
1011
|
-
message: `Response Validation Warnings for public > Content >
|
|
1012
|
+
message: `Response Validation Warnings for public > Content > getMenuContentByType \n ${res_error}`,
|
|
1012
1013
|
});
|
|
1013
1014
|
}
|
|
1014
1015
|
}
|
|
@@ -1017,27 +1018,19 @@ class Content {
|
|
|
1017
1018
|
}
|
|
1018
1019
|
|
|
1019
1020
|
/**
|
|
1020
|
-
* @param {ContentPublicValidator.
|
|
1021
|
+
* @param {ContentPublicValidator.GetNavbarParam} arg - Arg object.
|
|
1021
1022
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1022
1023
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
1023
|
-
* @returns {Promise<ContentPublicModel.
|
|
1024
|
-
* @name
|
|
1025
|
-
* @summary: Get
|
|
1026
|
-
* @description:
|
|
1024
|
+
* @returns {Promise<ContentPublicModel.NavbarSchema>} - Success response
|
|
1025
|
+
* @name getNavbar
|
|
1026
|
+
* @summary: Get Navbar
|
|
1027
|
+
* @description: Retrieve navbar information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getNavbar/).
|
|
1027
1028
|
*/
|
|
1028
|
-
async
|
|
1029
|
+
async getNavbar(
|
|
1029
1030
|
{ requestHeaders } = { requestHeaders: {} },
|
|
1030
1031
|
{ responseHeaders } = { responseHeaders: false }
|
|
1031
1032
|
) {
|
|
1032
|
-
|
|
1033
|
-
if (invalidInput.length) {
|
|
1034
|
-
const error = new Error();
|
|
1035
|
-
error.message = "Missing required field";
|
|
1036
|
-
error.details = invalidInput;
|
|
1037
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
const { error } = ContentPublicValidator.getSDKDocumentation().validate(
|
|
1033
|
+
const { error } = ContentPublicValidator.getNavbar().validate(
|
|
1041
1034
|
{},
|
|
1042
1035
|
{ abortEarly: false, allowUnknown: true }
|
|
1043
1036
|
);
|
|
@@ -1046,16 +1039,14 @@ class Content {
|
|
|
1046
1039
|
}
|
|
1047
1040
|
|
|
1048
1041
|
// Showing warrnings if extra unknown parameters are found
|
|
1049
|
-
const {
|
|
1050
|
-
error: warrning,
|
|
1051
|
-
} = ContentPublicValidator.getSDKDocumentation().validate(
|
|
1042
|
+
const { error: warrning } = ContentPublicValidator.getNavbar().validate(
|
|
1052
1043
|
{},
|
|
1053
1044
|
{ abortEarly: false, allowUnknown: false }
|
|
1054
1045
|
);
|
|
1055
1046
|
if (warrning) {
|
|
1056
1047
|
Logger({
|
|
1057
1048
|
level: "WARN",
|
|
1058
|
-
message: `Parameter Validation warrnings for public > Content >
|
|
1049
|
+
message: `Parameter Validation warrnings for public > Content > getNavbar \n ${warrning}`,
|
|
1059
1050
|
});
|
|
1060
1051
|
}
|
|
1061
1052
|
|
|
@@ -1067,7 +1058,7 @@ class Content {
|
|
|
1067
1058
|
this._conf,
|
|
1068
1059
|
"get",
|
|
1069
1060
|
constructUrl({
|
|
1070
|
-
url: this._urls["
|
|
1061
|
+
url: this._urls["getNavbar"],
|
|
1071
1062
|
params: {},
|
|
1072
1063
|
}),
|
|
1073
1064
|
query_params,
|
|
@@ -1083,7 +1074,7 @@ class Content {
|
|
|
1083
1074
|
|
|
1084
1075
|
const {
|
|
1085
1076
|
error: res_error,
|
|
1086
|
-
} = ContentPublicModel.
|
|
1077
|
+
} = ContentPublicModel.NavbarSchema().validate(responseData, {
|
|
1087
1078
|
abortEarly: false,
|
|
1088
1079
|
allowUnknown: true,
|
|
1089
1080
|
});
|
|
@@ -1094,7 +1085,7 @@ class Content {
|
|
|
1094
1085
|
} else {
|
|
1095
1086
|
Logger({
|
|
1096
1087
|
level: "WARN",
|
|
1097
|
-
message: `Response Validation Warnings for public > Content >
|
|
1088
|
+
message: `Response Validation Warnings for public > Content > getNavbar \n ${res_error}`,
|
|
1098
1089
|
});
|
|
1099
1090
|
}
|
|
1100
1091
|
}
|
|
@@ -1103,37 +1094,20 @@ class Content {
|
|
|
1103
1094
|
}
|
|
1104
1095
|
|
|
1105
1096
|
/**
|
|
1106
|
-
* @param {ContentPublicValidator.
|
|
1097
|
+
* @param {ContentPublicValidator.GetPricingBannerParam} arg - Arg object.
|
|
1107
1098
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1108
1099
|
* @param {import("../PublicAPIClient").Options} - Options
|
|
1109
|
-
* @returns {Promise<ContentPublicModel.
|
|
1110
|
-
* @name
|
|
1111
|
-
* @summary: Get
|
|
1112
|
-
* @description:
|
|
1100
|
+
* @returns {Promise<ContentPublicModel.PricingBannerSchema>} - Success response
|
|
1101
|
+
* @name getPricingBanner
|
|
1102
|
+
* @summary: Get Pricing Banner
|
|
1103
|
+
* @description: Retrieve pricing banner information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/public/content/getPricingBanner/).
|
|
1113
1104
|
*/
|
|
1114
|
-
async
|
|
1115
|
-
{
|
|
1105
|
+
async getPricingBanner(
|
|
1106
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1116
1107
|
{ responseHeaders } = { responseHeaders: false }
|
|
1117
1108
|
) {
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
if (!type) {
|
|
1121
|
-
invalidInput.push({
|
|
1122
|
-
message: `The 'type' field is required.`,
|
|
1123
|
-
path: ["type"],
|
|
1124
|
-
});
|
|
1125
|
-
}
|
|
1126
|
-
if (invalidInput.length) {
|
|
1127
|
-
const error = new Error();
|
|
1128
|
-
error.message = "Missing required field";
|
|
1129
|
-
error.details = invalidInput;
|
|
1130
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
const {
|
|
1134
|
-
error,
|
|
1135
|
-
} = ContentPublicValidator.getSDKDocumentationByType().validate(
|
|
1136
|
-
{ type },
|
|
1109
|
+
const { error } = ContentPublicValidator.getPricingBanner().validate(
|
|
1110
|
+
{},
|
|
1137
1111
|
{ abortEarly: false, allowUnknown: true }
|
|
1138
1112
|
);
|
|
1139
1113
|
if (error) {
|
|
@@ -1143,14 +1117,14 @@ class Content {
|
|
|
1143
1117
|
// Showing warrnings if extra unknown parameters are found
|
|
1144
1118
|
const {
|
|
1145
1119
|
error: warrning,
|
|
1146
|
-
} = ContentPublicValidator.
|
|
1147
|
-
{
|
|
1120
|
+
} = ContentPublicValidator.getPricingBanner().validate(
|
|
1121
|
+
{},
|
|
1148
1122
|
{ abortEarly: false, allowUnknown: false }
|
|
1149
1123
|
);
|
|
1150
1124
|
if (warrning) {
|
|
1151
1125
|
Logger({
|
|
1152
1126
|
level: "WARN",
|
|
1153
|
-
message: `Parameter Validation warrnings for public > Content >
|
|
1127
|
+
message: `Parameter Validation warrnings for public > Content > getPricingBanner \n ${warrning}`,
|
|
1154
1128
|
});
|
|
1155
1129
|
}
|
|
1156
1130
|
|
|
@@ -1162,8 +1136,8 @@ class Content {
|
|
|
1162
1136
|
this._conf,
|
|
1163
1137
|
"get",
|
|
1164
1138
|
constructUrl({
|
|
1165
|
-
url: this._urls["
|
|
1166
|
-
params: {
|
|
1139
|
+
url: this._urls["getPricingBanner"],
|
|
1140
|
+
params: {},
|
|
1167
1141
|
}),
|
|
1168
1142
|
query_params,
|
|
1169
1143
|
undefined,
|
|
@@ -1178,7 +1152,7 @@ class Content {
|
|
|
1178
1152
|
|
|
1179
1153
|
const {
|
|
1180
1154
|
error: res_error,
|
|
1181
|
-
} = ContentPublicModel.
|
|
1155
|
+
} = ContentPublicModel.PricingBannerSchema().validate(responseData, {
|
|
1182
1156
|
abortEarly: false,
|
|
1183
1157
|
allowUnknown: true,
|
|
1184
1158
|
});
|
|
@@ -1189,7 +1163,7 @@ class Content {
|
|
|
1189
1163
|
} else {
|
|
1190
1164
|
Logger({
|
|
1191
1165
|
level: "WARN",
|
|
1192
|
-
message: `Response Validation Warnings for public > Content >
|
|
1166
|
+
message: `Response Validation Warnings for public > Content > getPricingBanner \n ${res_error}`,
|
|
1193
1167
|
});
|
|
1194
1168
|
}
|
|
1195
1169
|
}
|