@gofynd/fdk-client-javascript 1.6.4 → 3.0.0-beta.1
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 +1 -1
- package/sdk/application/ApplicationClient.d.ts +0 -2
- package/sdk/application/ApplicationClient.js +0 -2
- package/sdk/application/Cart/CartApplicationClient.d.ts +113 -93
- package/sdk/application/Cart/CartApplicationClient.js +270 -139
- package/sdk/application/Catalog/CatalogApplicationClient.d.ts +110 -110
- package/sdk/application/Catalog/CatalogApplicationClient.js +122 -138
- package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
- package/sdk/application/Common/CommonApplicationClient.js +3 -3
- package/sdk/application/Communication/CommunicationApplicationClient.d.ts +43 -3
- package/sdk/application/Communication/CommunicationApplicationClient.js +190 -3
- package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +71 -36
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +103 -29
- package/sdk/application/Content/ContentApplicationClient.d.ts +51 -21
- package/sdk/application/Content/ContentApplicationClient.js +197 -36
- package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -6
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/Lead/LeadApplicationClient.d.ts +3 -3
- package/sdk/application/Lead/LeadApplicationClient.js +3 -3
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +79 -64
- package/sdk/application/Logistic/LogisticApplicationClient.js +246 -264
- package/sdk/application/Order/OrderApplicationClient.d.ts +44 -24
- package/sdk/application/Order/OrderApplicationClient.js +140 -21
- package/sdk/application/Payment/PaymentApplicationClient.d.ts +211 -111
- package/sdk/application/Payment/PaymentApplicationClient.js +610 -109
- package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
- package/sdk/application/Rewards/RewardsApplicationClient.js +7 -7
- package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
- package/sdk/application/Share/ShareApplicationClient.js +14 -14
- package/sdk/application/Theme/ThemeApplicationClient.d.ts +23 -3
- package/sdk/application/Theme/ThemeApplicationClient.js +103 -5
- package/sdk/application/User/UserApplicationClient.d.ts +13 -23
- package/sdk/application/User/UserApplicationClient.js +9 -57
- package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
- package/sdk/application/Webhook/WebhookApplicationClient.js +3 -3
- package/sdk/partner/Authorization/AuthorizationPartnerClient.d.ts +66 -0
- package/sdk/partner/Authorization/AuthorizationPartnerClient.js +431 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.d.ts +231 -0
- package/sdk/partner/Authorization/AuthorizationPartnerModel.js +152 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.d.ts +8 -0
- package/sdk/partner/Authorization/AuthorizationPartnerValidator.js +39 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.d.ts +26 -0
- package/sdk/partner/Catalog/CatalogPartnerClient.js +173 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.d.ts +238 -0
- package/sdk/partner/Catalog/CatalogPartnerModel.js +248 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.d.ts +5 -0
- package/sdk/partner/Catalog/CatalogPartnerValidator.js +19 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -22
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +12 -87
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +33 -99
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +25 -84
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -1
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -10
- package/sdk/partner/Lead/LeadPartnerClient.d.ts +5 -5
- package/sdk/partner/Lead/LeadPartnerClient.js +4 -4
- package/sdk/partner/Lead/LeadPartnerModel.d.ts +100 -49
- package/sdk/partner/Lead/LeadPartnerModel.js +100 -74
- package/sdk/partner/Lead/LeadPartnerValidator.js +1 -1
- package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +33 -160
- package/sdk/partner/Logistics/LogisticsPartnerClient.js +66 -1180
- package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +288 -1685
- package/sdk/partner/Logistics/LogisticsPartnerModel.js +226 -824
- package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +1 -13
- package/sdk/partner/Logistics/LogisticsPartnerValidator.js +14 -141
- package/sdk/partner/PartnerClient.d.ts +6 -0
- package/sdk/partner/PartnerClient.js +9 -0
- package/sdk/partner/Payment/PaymentPartnerClient.d.ts +116 -0
- package/sdk/partner/Payment/PaymentPartnerClient.js +857 -0
- package/sdk/partner/Payment/PaymentPartnerModel.d.ts +388 -0
- package/sdk/partner/Payment/PaymentPartnerModel.js +442 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.d.ts +14 -0
- package/sdk/partner/Payment/PaymentPartnerValidator.js +74 -0
- package/sdk/partner/Theme/ThemePartnerClient.d.ts +63 -21
- package/sdk/partner/Theme/ThemePartnerClient.js +396 -71
- package/sdk/partner/Theme/ThemePartnerModel.d.ts +104 -72
- package/sdk/partner/Theme/ThemePartnerModel.js +101 -75
- package/sdk/partner/Theme/ThemePartnerValidator.d.ts +5 -1
- package/sdk/partner/Theme/ThemePartnerValidator.js +42 -12
- package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -18
- package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -18
- package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +191 -670
- package/sdk/partner/Webhook/WebhookPartnerModel.js +159 -268
- package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -3
- package/sdk/partner/index.d.ts +3 -0
- package/sdk/partner/index.js +6 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +1 -4
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +3 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +145 -49
- package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +171 -20
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
- package/sdk/platform/Billing/BillingPlatformClient.d.ts +406 -15
- package/sdk/platform/Billing/BillingPlatformClient.js +3214 -76
- package/sdk/platform/Billing/BillingPlatformModel.d.ts +3798 -459
- package/sdk/platform/Billing/BillingPlatformModel.js +2577 -342
- package/sdk/platform/Billing/BillingPlatformValidator.d.ts +465 -24
- package/sdk/platform/Billing/BillingPlatformValidator.js +490 -14
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +284 -205
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +671 -553
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +165 -165
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +108 -132
- package/sdk/platform/Cart/CartPlatformModel.d.ts +3136 -4788
- package/sdk/platform/Cart/CartPlatformModel.js +2850 -2031
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +1015 -419
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6450 -2010
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1121 -230
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +919 -127
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +372 -574
- package/sdk/platform/Catalog/CatalogPlatformClient.js +1238 -1317
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +8351 -9825
- package/sdk/platform/Catalog/CatalogPlatformModel.js +9662 -6881
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +288 -235
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +241 -183
- package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -6
- package/sdk/platform/Common/CommonPlatformClient.js +5 -6
- package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
- package/sdk/platform/Common/CommonPlatformModel.js +6 -6
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +374 -234
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +875 -583
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +170 -139
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +145 -126
- package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +56 -3
- package/sdk/platform/Communication/CommunicationPlatformClient.js +307 -4
- package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +424 -252
- package/sdk/platform/Communication/CommunicationPlatformModel.js +540 -320
- package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +62 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +48 -2
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +68 -99
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +84 -140
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +238 -256
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +222 -244
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +20 -20
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +20 -20
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +333 -118
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +1470 -409
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +158 -55
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +163 -41
- package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +151 -61
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +595 -101
- package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +1199 -462
- package/sdk/platform/Configuration/ConfigurationPlatformModel.js +1008 -321
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +80 -34
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +79 -24
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +253 -140
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +1087 -458
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +221 -178
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +220 -157
- package/sdk/platform/Content/ContentPlatformClient.d.ts +124 -123
- package/sdk/platform/Content/ContentPlatformClient.js +459 -379
- package/sdk/platform/Content/ContentPlatformModel.d.ts +833 -1307
- package/sdk/platform/Content/ContentPlatformModel.js +893 -582
- package/sdk/platform/Content/ContentPlatformValidator.d.ts +140 -150
- package/sdk/platform/Content/ContentPlatformValidator.js +131 -135
- package/sdk/platform/Discount/DiscountPlatformClient.d.ts +60 -36
- package/sdk/platform/Discount/DiscountPlatformClient.js +85 -36
- package/sdk/platform/Discount/DiscountPlatformModel.d.ts +46 -47
- package/sdk/platform/Discount/DiscountPlatformModel.js +42 -46
- package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +18 -15
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +24 -22
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +8 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +75 -86
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +60 -74
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
- package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
- package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
- package/sdk/platform/Finance/FinancePlatformModel.d.ts +2895 -0
- package/sdk/platform/Finance/FinancePlatformModel.js +2150 -0
- package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
- package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
- 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 +4 -24
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -160
- package/sdk/platform/Lead/LeadPlatformModel.d.ts +142 -57
- package/sdk/platform/Lead/LeadPlatformModel.js +162 -79
- package/sdk/platform/Lead/LeadPlatformValidator.d.ts +3 -29
- package/sdk/platform/Lead/LeadPlatformValidator.js +2 -28
- package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +94 -25
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +600 -57
- package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +115 -115
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +120 -43
- package/sdk/platform/Order/OrderPlatformClient.d.ts +502 -293
- package/sdk/platform/Order/OrderPlatformClient.js +1466 -913
- package/sdk/platform/Order/OrderPlatformModel.d.ts +4103 -9109
- package/sdk/platform/Order/OrderPlatformModel.js +3198 -4245
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +445 -612
- package/sdk/platform/Order/OrderPlatformValidator.js +316 -326
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
- package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
- package/sdk/platform/Partner/PartnerPlatformModel.js +7 -7
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +382 -135
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +2453 -935
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +306 -93
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +305 -70
- package/sdk/platform/Payment/PaymentPlatformClient.d.ts +66 -56
- package/sdk/platform/Payment/PaymentPlatformClient.js +269 -124
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3525 -1313
- package/sdk/platform/Payment/PaymentPlatformModel.js +3813 -1511
- package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +64 -35
- package/sdk/platform/Payment/PaymentPlatformValidator.js +60 -34
- package/sdk/platform/PlatformClient.d.ts +2 -0
- package/sdk/platform/PlatformClient.js +4 -0
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
- package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +14 -9
- package/sdk/platform/Rewards/RewardsPlatformModel.js +10 -8
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +344 -56
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +2180 -302
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +380 -54
- package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +336 -37
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +127 -213
- package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +538 -1306
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +3429 -2979
- package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3642 -1785
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +218 -392
- package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +151 -290
- package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Share/SharePlatformApplicationClient.js +8 -86
- package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +6 -23
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +3 -16
- package/sdk/platform/Share/SharePlatformModel.d.ts +6 -50
- package/sdk/platform/Share/SharePlatformModel.js +3 -43
- package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -4
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +157 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +21 -10
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +23 -6
- package/sdk/platform/Theme/ThemePlatformClient.d.ts +18 -8
- package/sdk/platform/Theme/ThemePlatformClient.js +85 -8
- package/sdk/platform/Theme/ThemePlatformModel.d.ts +425 -17
- package/sdk/platform/Theme/ThemePlatformModel.js +329 -23
- package/sdk/platform/Theme/ThemePlatformValidator.d.ts +7 -3
- package/sdk/platform/Theme/ThemePlatformValidator.js +9 -2
- package/sdk/platform/User/UserPlatformApplicationClient.d.ts +18 -71
- package/sdk/platform/User/UserPlatformApplicationClient.js +27 -412
- package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +10 -114
- package/sdk/platform/User/UserPlatformApplicationValidator.js +7 -80
- package/sdk/platform/User/UserPlatformModel.d.ts +216 -264
- package/sdk/platform/User/UserPlatformModel.js +209 -216
- package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
- package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
- package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +428 -810
- package/sdk/platform/Webhook/WebhookPlatformModel.js +395 -444
- package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
- package/sdk/platform/index.d.ts +1 -0
- package/sdk/platform/index.js +2 -0
- package/sdk/public/Billing/BillingPublicClient.d.ts +56 -0
- package/sdk/public/Billing/BillingPublicClient.js +397 -0
- package/sdk/public/Billing/BillingPublicModel.d.ts +919 -0
- package/sdk/public/Billing/BillingPublicModel.js +560 -0
- package/sdk/public/Billing/BillingPublicValidator.d.ts +43 -0
- package/sdk/public/Billing/BillingPublicValidator.js +50 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +14 -4
- package/sdk/public/Configuration/ConfigurationPublicClient.js +97 -9
- package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +102 -40
- package/sdk/public/Configuration/ConfigurationPublicModel.js +111 -29
- package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +11 -1
- package/sdk/public/Configuration/ConfigurationPublicValidator.js +12 -0
- package/sdk/public/Content/ContentPublicClient.d.ts +22 -0
- package/sdk/public/Content/ContentPublicClient.js +183 -0
- package/sdk/public/Content/ContentPublicModel.d.ts +38 -1
- package/sdk/public/Content/ContentPublicModel.js +47 -1
- package/sdk/public/Content/ContentPublicValidator.d.ts +17 -1
- package/sdk/public/Content/ContentPublicValidator.js +19 -0
- package/sdk/public/PublicClient.d.ts +2 -2
- package/sdk/public/PublicClient.js +2 -2
- package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
- package/sdk/public/Webhook/WebhookPublicClient.js +8 -8
- package/sdk/public/Webhook/WebhookPublicModel.d.ts +67 -215
- package/sdk/public/Webhook/WebhookPublicModel.js +61 -66
- package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
- package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
- package/sdk/public/index.d.ts +1 -1
- package/sdk/public/index.js +1 -1
- package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
- package/sdk/application/Finance/FinanceApplicationClient.js +0 -126
- package/sdk/public/Catalog/CatalogPublicClient.d.ts +0 -22
- package/sdk/public/Catalog/CatalogPublicClient.js +0 -138
- package/sdk/public/Catalog/CatalogPublicModel.d.ts +0 -155
- package/sdk/public/Catalog/CatalogPublicModel.js +0 -116
- package/sdk/public/Catalog/CatalogPublicValidator.d.ts +0 -55
- package/sdk/public/Catalog/CatalogPublicValidator.js +0 -35
|
@@ -181,7 +181,7 @@ class Content {
|
|
|
181
181
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
182
182
|
* @name addInjectableTag
|
|
183
183
|
* @summary: Create HTML tag
|
|
184
|
-
* @description: Create and add a new injectable tag
|
|
184
|
+
* @description: Create and add a new injectable tag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/addInjectableTag/).
|
|
185
185
|
*/
|
|
186
186
|
async addInjectableTag(
|
|
187
187
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -259,7 +259,7 @@ class Content {
|
|
|
259
259
|
*
|
|
260
260
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
261
261
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
262
|
-
* @returns {Promise<ContentPlatformModel.
|
|
262
|
+
* @returns {Promise<ContentPlatformModel.CreatePathMappingSchema>} - Success response
|
|
263
263
|
* @name addPathRedirectionRules
|
|
264
264
|
* @summary: Create path redirection rules
|
|
265
265
|
* @description: Create and add rules for path redirection. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/addPathRedirectionRules/).
|
|
@@ -315,7 +315,7 @@ class Content {
|
|
|
315
315
|
|
|
316
316
|
const {
|
|
317
317
|
error: res_error,
|
|
318
|
-
} = ContentPlatformModel.
|
|
318
|
+
} = ContentPlatformModel.CreatePathMappingSchema().validate(responseData, {
|
|
319
319
|
abortEarly: false,
|
|
320
320
|
allowUnknown: true,
|
|
321
321
|
});
|
|
@@ -416,6 +416,93 @@ class Content {
|
|
|
416
416
|
return response;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
+
/**
|
|
420
|
+
* @param {ContentPlatformApplicationValidator.CreateAppCustomFieldByResourceIdParam} arg
|
|
421
|
+
* - Arg object
|
|
422
|
+
*
|
|
423
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
424
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
425
|
+
* @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
|
|
426
|
+
* - Success response
|
|
427
|
+
*
|
|
428
|
+
* @name createAppCustomFieldByResourceId
|
|
429
|
+
* @summary: Create custom field entries for gives resource and resource_id
|
|
430
|
+
* @description: You can add a custom field using this endpoint to any resource by providing the resource ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomFieldByResourceId/).
|
|
431
|
+
*/
|
|
432
|
+
async createAppCustomFieldByResourceId(
|
|
433
|
+
{ resource, resourceId, body, requestHeaders } = { requestHeaders: {} },
|
|
434
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
435
|
+
) {
|
|
436
|
+
const {
|
|
437
|
+
error,
|
|
438
|
+
} = ContentPlatformApplicationValidator.createAppCustomFieldByResourceId().validate(
|
|
439
|
+
{
|
|
440
|
+
resource,
|
|
441
|
+
resourceId,
|
|
442
|
+
body,
|
|
443
|
+
},
|
|
444
|
+
{ abortEarly: false, allowUnknown: true }
|
|
445
|
+
);
|
|
446
|
+
if (error) {
|
|
447
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// Showing warrnings if extra unknown parameters are found
|
|
451
|
+
const {
|
|
452
|
+
error: warrning,
|
|
453
|
+
} = ContentPlatformApplicationValidator.createAppCustomFieldByResourceId().validate(
|
|
454
|
+
{
|
|
455
|
+
resource,
|
|
456
|
+
resourceId,
|
|
457
|
+
body,
|
|
458
|
+
},
|
|
459
|
+
{ abortEarly: false, allowUnknown: false }
|
|
460
|
+
);
|
|
461
|
+
if (warrning) {
|
|
462
|
+
Logger({
|
|
463
|
+
level: "WARN",
|
|
464
|
+
message: `Parameter Validation warrnings for platform > Content > createAppCustomFieldByResourceId \n ${warrning}`,
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
const query_params = {};
|
|
469
|
+
|
|
470
|
+
const response = await PlatformAPIClient.execute(
|
|
471
|
+
this.config,
|
|
472
|
+
"post",
|
|
473
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`,
|
|
474
|
+
query_params,
|
|
475
|
+
body,
|
|
476
|
+
requestHeaders,
|
|
477
|
+
{ responseHeaders }
|
|
478
|
+
);
|
|
479
|
+
|
|
480
|
+
let responseData = response;
|
|
481
|
+
if (responseHeaders) {
|
|
482
|
+
responseData = response[0];
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
const {
|
|
486
|
+
error: res_error,
|
|
487
|
+
} = ContentPlatformModel.CustomFieldsResponseByResourceIdSchema().validate(
|
|
488
|
+
responseData,
|
|
489
|
+
{ abortEarly: false, allowUnknown: true }
|
|
490
|
+
);
|
|
491
|
+
|
|
492
|
+
if (res_error) {
|
|
493
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
494
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
495
|
+
} else {
|
|
496
|
+
Logger({
|
|
497
|
+
level: "WARN",
|
|
498
|
+
message: `Response Validation Warnings for platform > Content > createAppCustomFieldByResourceId \n ${res_error}`,
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return response;
|
|
504
|
+
}
|
|
505
|
+
|
|
419
506
|
/**
|
|
420
507
|
* @param {ContentPlatformApplicationValidator.CreateAppCustomFieldDefinitionParam} arg
|
|
421
508
|
* - Arg object
|
|
@@ -426,18 +513,17 @@ class Content {
|
|
|
426
513
|
* - Success response
|
|
427
514
|
*
|
|
428
515
|
* @name createAppCustomFieldDefinition
|
|
429
|
-
* @summary: Create custom field definition
|
|
516
|
+
* @summary: Create custom field definition
|
|
430
517
|
* @description: You can create custom fields definition to any resource so you can extend property of resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomFieldDefinition/).
|
|
431
518
|
*/
|
|
432
519
|
async createAppCustomFieldDefinition(
|
|
433
|
-
{
|
|
520
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
434
521
|
{ responseHeaders } = { responseHeaders: false }
|
|
435
522
|
) {
|
|
436
523
|
const {
|
|
437
524
|
error,
|
|
438
525
|
} = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate(
|
|
439
526
|
{
|
|
440
|
-
resource,
|
|
441
527
|
body,
|
|
442
528
|
},
|
|
443
529
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -451,7 +537,6 @@ class Content {
|
|
|
451
537
|
error: warrning,
|
|
452
538
|
} = ContentPlatformApplicationValidator.createAppCustomFieldDefinition().validate(
|
|
453
539
|
{
|
|
454
|
-
resource,
|
|
455
540
|
body,
|
|
456
541
|
},
|
|
457
542
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -468,7 +553,7 @@ class Content {
|
|
|
468
553
|
const response = await PlatformAPIClient.execute(
|
|
469
554
|
this.config,
|
|
470
555
|
"post",
|
|
471
|
-
`/service/platform/content/
|
|
556
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions`,
|
|
472
557
|
query_params,
|
|
473
558
|
body,
|
|
474
559
|
requestHeaders,
|
|
@@ -502,25 +587,24 @@ class Content {
|
|
|
502
587
|
}
|
|
503
588
|
|
|
504
589
|
/**
|
|
505
|
-
* @param {ContentPlatformApplicationValidator.
|
|
590
|
+
* @param {ContentPlatformApplicationValidator.CreateAppCustomObjectParam} arg
|
|
506
591
|
* - Arg object
|
|
507
592
|
*
|
|
508
593
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
509
594
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
510
595
|
* @returns {Promise<ContentPlatformModel.CustomObjectSchema>} - Success response
|
|
511
|
-
* @name
|
|
596
|
+
* @name createAppCustomObject
|
|
512
597
|
* @summary: Create custom object entries
|
|
513
|
-
* @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/
|
|
598
|
+
* @description: Custom object entries against the custom object definition can be added using this API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObject/).
|
|
514
599
|
*/
|
|
515
|
-
async
|
|
516
|
-
{
|
|
600
|
+
async createAppCustomObject(
|
|
601
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
517
602
|
{ responseHeaders } = { responseHeaders: false }
|
|
518
603
|
) {
|
|
519
604
|
const {
|
|
520
605
|
error,
|
|
521
|
-
} = ContentPlatformApplicationValidator.
|
|
606
|
+
} = ContentPlatformApplicationValidator.createAppCustomObject().validate(
|
|
522
607
|
{
|
|
523
|
-
definitionSlug,
|
|
524
608
|
body,
|
|
525
609
|
},
|
|
526
610
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -532,9 +616,8 @@ class Content {
|
|
|
532
616
|
// Showing warrnings if extra unknown parameters are found
|
|
533
617
|
const {
|
|
534
618
|
error: warrning,
|
|
535
|
-
} = ContentPlatformApplicationValidator.
|
|
619
|
+
} = ContentPlatformApplicationValidator.createAppCustomObject().validate(
|
|
536
620
|
{
|
|
537
|
-
definitionSlug,
|
|
538
621
|
body,
|
|
539
622
|
},
|
|
540
623
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -542,7 +625,7 @@ class Content {
|
|
|
542
625
|
if (warrning) {
|
|
543
626
|
Logger({
|
|
544
627
|
level: "WARN",
|
|
545
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
628
|
+
message: `Parameter Validation warrnings for platform > Content > createAppCustomObject \n ${warrning}`,
|
|
546
629
|
});
|
|
547
630
|
}
|
|
548
631
|
|
|
@@ -551,7 +634,7 @@ class Content {
|
|
|
551
634
|
const response = await PlatformAPIClient.execute(
|
|
552
635
|
this.config,
|
|
553
636
|
"post",
|
|
554
|
-
`/service/platform/content/
|
|
637
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects`,
|
|
555
638
|
query_params,
|
|
556
639
|
body,
|
|
557
640
|
requestHeaders,
|
|
@@ -576,7 +659,7 @@ class Content {
|
|
|
576
659
|
} else {
|
|
577
660
|
Logger({
|
|
578
661
|
level: "WARN",
|
|
579
|
-
message: `Response Validation Warnings for platform > Content >
|
|
662
|
+
message: `Response Validation Warnings for platform > Content > createAppCustomObject \n ${res_error}`,
|
|
580
663
|
});
|
|
581
664
|
}
|
|
582
665
|
}
|
|
@@ -590,9 +673,8 @@ class Content {
|
|
|
590
673
|
*
|
|
591
674
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
592
675
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
593
|
-
* @returns {Promise<ContentPlatformModel.
|
|
594
|
-
*
|
|
595
|
-
*
|
|
676
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
|
|
677
|
+
* Success response
|
|
596
678
|
* @name createAppCustomObjectDefinition
|
|
597
679
|
* @summary: Create custom object definition
|
|
598
680
|
* @description: Create a custom object that will have a collection of custom fields and can be used anywhere in the custom field for any resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createAppCustomObjectDefinition/).
|
|
@@ -634,7 +716,7 @@ class Content {
|
|
|
634
716
|
const response = await PlatformAPIClient.execute(
|
|
635
717
|
this.config,
|
|
636
718
|
"post",
|
|
637
|
-
`/service/platform/content/
|
|
719
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions`,
|
|
638
720
|
query_params,
|
|
639
721
|
body,
|
|
640
722
|
requestHeaders,
|
|
@@ -648,7 +730,7 @@ class Content {
|
|
|
648
730
|
|
|
649
731
|
const {
|
|
650
732
|
error: res_error,
|
|
651
|
-
} = ContentPlatformModel.
|
|
733
|
+
} = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
|
|
652
734
|
responseData,
|
|
653
735
|
{ abortEarly: false, allowUnknown: true }
|
|
654
736
|
);
|
|
@@ -711,7 +793,7 @@ class Content {
|
|
|
711
793
|
const response = await PlatformAPIClient.execute(
|
|
712
794
|
this.config,
|
|
713
795
|
"post",
|
|
714
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs
|
|
796
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs`,
|
|
715
797
|
query_params,
|
|
716
798
|
body,
|
|
717
799
|
requestHeaders,
|
|
@@ -825,6 +907,87 @@ class Content {
|
|
|
825
907
|
return response;
|
|
826
908
|
}
|
|
827
909
|
|
|
910
|
+
/**
|
|
911
|
+
* @param {ContentPlatformApplicationValidator.CreateInjectableTagParam} arg
|
|
912
|
+
* - Arg object
|
|
913
|
+
*
|
|
914
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
915
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
916
|
+
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
917
|
+
* @name createInjectableTag
|
|
918
|
+
* @summary: Create HTML tags
|
|
919
|
+
* @description: Use this API to create HTML tags. This includes a list of tags with name, tag type (css/js), url and position of the tag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createInjectableTag/).
|
|
920
|
+
*/
|
|
921
|
+
async createInjectableTag(
|
|
922
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
923
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
924
|
+
) {
|
|
925
|
+
const {
|
|
926
|
+
error,
|
|
927
|
+
} = ContentPlatformApplicationValidator.createInjectableTag().validate(
|
|
928
|
+
{
|
|
929
|
+
body,
|
|
930
|
+
},
|
|
931
|
+
{ abortEarly: false, allowUnknown: true }
|
|
932
|
+
);
|
|
933
|
+
if (error) {
|
|
934
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
// Showing warrnings if extra unknown parameters are found
|
|
938
|
+
const {
|
|
939
|
+
error: warrning,
|
|
940
|
+
} = ContentPlatformApplicationValidator.createInjectableTag().validate(
|
|
941
|
+
{
|
|
942
|
+
body,
|
|
943
|
+
},
|
|
944
|
+
{ abortEarly: false, allowUnknown: false }
|
|
945
|
+
);
|
|
946
|
+
if (warrning) {
|
|
947
|
+
Logger({
|
|
948
|
+
level: "WARN",
|
|
949
|
+
message: `Parameter Validation warrnings for platform > Content > createInjectableTag \n ${warrning}`,
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
const query_params = {};
|
|
954
|
+
|
|
955
|
+
const response = await PlatformAPIClient.execute(
|
|
956
|
+
this.config,
|
|
957
|
+
"post",
|
|
958
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags`,
|
|
959
|
+
query_params,
|
|
960
|
+
body,
|
|
961
|
+
requestHeaders,
|
|
962
|
+
{ responseHeaders }
|
|
963
|
+
);
|
|
964
|
+
|
|
965
|
+
let responseData = response;
|
|
966
|
+
if (responseHeaders) {
|
|
967
|
+
responseData = response[0];
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
const {
|
|
971
|
+
error: res_error,
|
|
972
|
+
} = ContentPlatformModel.TagsSchema().validate(responseData, {
|
|
973
|
+
abortEarly: false,
|
|
974
|
+
allowUnknown: true,
|
|
975
|
+
});
|
|
976
|
+
|
|
977
|
+
if (res_error) {
|
|
978
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
979
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
980
|
+
} else {
|
|
981
|
+
Logger({
|
|
982
|
+
level: "WARN",
|
|
983
|
+
message: `Response Validation Warnings for platform > Content > createInjectableTag \n ${res_error}`,
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
return response;
|
|
989
|
+
}
|
|
990
|
+
|
|
828
991
|
/**
|
|
829
992
|
* @param {ContentPlatformApplicationValidator.CreateLandingPageParam} arg
|
|
830
993
|
* - Arg object
|
|
@@ -873,7 +1036,7 @@ class Content {
|
|
|
873
1036
|
const response = await PlatformAPIClient.execute(
|
|
874
1037
|
this.config,
|
|
875
1038
|
"post",
|
|
876
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page
|
|
1039
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page`,
|
|
877
1040
|
query_params,
|
|
878
1041
|
body,
|
|
879
1042
|
requestHeaders,
|
|
@@ -952,7 +1115,7 @@ class Content {
|
|
|
952
1115
|
const response = await PlatformAPIClient.execute(
|
|
953
1116
|
this.config,
|
|
954
1117
|
"post",
|
|
955
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations
|
|
1118
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations`,
|
|
956
1119
|
query_params,
|
|
957
1120
|
body,
|
|
958
1121
|
requestHeaders,
|
|
@@ -1020,7 +1183,246 @@ class Content {
|
|
|
1020
1183
|
if (warrning) {
|
|
1021
1184
|
Logger({
|
|
1022
1185
|
level: "WARN",
|
|
1023
|
-
message: `Parameter Validation warrnings for platform > Content > createPage \n ${warrning}`,
|
|
1186
|
+
message: `Parameter Validation warrnings for platform > Content > createPage \n ${warrning}`,
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
const query_params = {};
|
|
1191
|
+
|
|
1192
|
+
const response = await PlatformAPIClient.execute(
|
|
1193
|
+
this.config,
|
|
1194
|
+
"post",
|
|
1195
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/pages`,
|
|
1196
|
+
query_params,
|
|
1197
|
+
body,
|
|
1198
|
+
requestHeaders,
|
|
1199
|
+
{ responseHeaders }
|
|
1200
|
+
);
|
|
1201
|
+
|
|
1202
|
+
let responseData = response;
|
|
1203
|
+
if (responseHeaders) {
|
|
1204
|
+
responseData = response[0];
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
const {
|
|
1208
|
+
error: res_error,
|
|
1209
|
+
} = ContentPlatformModel.PageSchema().validate(responseData, {
|
|
1210
|
+
abortEarly: false,
|
|
1211
|
+
allowUnknown: true,
|
|
1212
|
+
});
|
|
1213
|
+
|
|
1214
|
+
if (res_error) {
|
|
1215
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1216
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1217
|
+
} else {
|
|
1218
|
+
Logger({
|
|
1219
|
+
level: "WARN",
|
|
1220
|
+
message: `Response Validation Warnings for platform > Content > createPage \n ${res_error}`,
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
return response;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* @param {ContentPlatformApplicationValidator.CreatePagePreviewParam} arg
|
|
1230
|
+
* - Arg object
|
|
1231
|
+
*
|
|
1232
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1233
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1234
|
+
* @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
|
|
1235
|
+
* @name createPagePreview
|
|
1236
|
+
* @summary: Create page preview
|
|
1237
|
+
* @description: Generate and add a new page preview. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createPagePreview/).
|
|
1238
|
+
*/
|
|
1239
|
+
async createPagePreview(
|
|
1240
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1241
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1242
|
+
) {
|
|
1243
|
+
const {
|
|
1244
|
+
error,
|
|
1245
|
+
} = ContentPlatformApplicationValidator.createPagePreview().validate(
|
|
1246
|
+
{
|
|
1247
|
+
body,
|
|
1248
|
+
},
|
|
1249
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1250
|
+
);
|
|
1251
|
+
if (error) {
|
|
1252
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1256
|
+
const {
|
|
1257
|
+
error: warrning,
|
|
1258
|
+
} = ContentPlatformApplicationValidator.createPagePreview().validate(
|
|
1259
|
+
{
|
|
1260
|
+
body,
|
|
1261
|
+
},
|
|
1262
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1263
|
+
);
|
|
1264
|
+
if (warrning) {
|
|
1265
|
+
Logger({
|
|
1266
|
+
level: "WARN",
|
|
1267
|
+
message: `Parameter Validation warrnings for platform > Content > createPagePreview \n ${warrning}`,
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
const query_params = {};
|
|
1272
|
+
|
|
1273
|
+
const response = await PlatformAPIClient.execute(
|
|
1274
|
+
this.config,
|
|
1275
|
+
"post",
|
|
1276
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/pages/preview`,
|
|
1277
|
+
query_params,
|
|
1278
|
+
body,
|
|
1279
|
+
requestHeaders,
|
|
1280
|
+
{ responseHeaders }
|
|
1281
|
+
);
|
|
1282
|
+
|
|
1283
|
+
let responseData = response;
|
|
1284
|
+
if (responseHeaders) {
|
|
1285
|
+
responseData = response[0];
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
const {
|
|
1289
|
+
error: res_error,
|
|
1290
|
+
} = ContentPlatformModel.PageSchema().validate(responseData, {
|
|
1291
|
+
abortEarly: false,
|
|
1292
|
+
allowUnknown: true,
|
|
1293
|
+
});
|
|
1294
|
+
|
|
1295
|
+
if (res_error) {
|
|
1296
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1297
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1298
|
+
} else {
|
|
1299
|
+
Logger({
|
|
1300
|
+
level: "WARN",
|
|
1301
|
+
message: `Response Validation Warnings for platform > Content > createPagePreview \n ${res_error}`,
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
return response;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* @param {ContentPlatformApplicationValidator.CreateSEOMarkupSchemaParam} arg
|
|
1311
|
+
* - Arg object
|
|
1312
|
+
*
|
|
1313
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1314
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1315
|
+
* @returns {Promise<ContentPlatformModel.SEOSchemaMarkupTemplate>} - Success response
|
|
1316
|
+
* @name createSEOMarkupSchema
|
|
1317
|
+
* @summary: Create SEO Markup Schema
|
|
1318
|
+
* @description: Use this API to Create SEO Markup Schema - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSEOMarkupSchema/).
|
|
1319
|
+
*/
|
|
1320
|
+
async createSEOMarkupSchema(
|
|
1321
|
+
{ body, requestHeaders } = { requestHeaders: {} },
|
|
1322
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1323
|
+
) {
|
|
1324
|
+
const {
|
|
1325
|
+
error,
|
|
1326
|
+
} = ContentPlatformApplicationValidator.createSEOMarkupSchema().validate(
|
|
1327
|
+
{
|
|
1328
|
+
body,
|
|
1329
|
+
},
|
|
1330
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1331
|
+
);
|
|
1332
|
+
if (error) {
|
|
1333
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1337
|
+
const {
|
|
1338
|
+
error: warrning,
|
|
1339
|
+
} = ContentPlatformApplicationValidator.createSEOMarkupSchema().validate(
|
|
1340
|
+
{
|
|
1341
|
+
body,
|
|
1342
|
+
},
|
|
1343
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1344
|
+
);
|
|
1345
|
+
if (warrning) {
|
|
1346
|
+
Logger({
|
|
1347
|
+
level: "WARN",
|
|
1348
|
+
message: `Parameter Validation warrnings for platform > Content > createSEOMarkupSchema \n ${warrning}`,
|
|
1349
|
+
});
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
const query_params = {};
|
|
1353
|
+
|
|
1354
|
+
const response = await PlatformAPIClient.execute(
|
|
1355
|
+
this.config,
|
|
1356
|
+
"post",
|
|
1357
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema`,
|
|
1358
|
+
query_params,
|
|
1359
|
+
body,
|
|
1360
|
+
requestHeaders,
|
|
1361
|
+
{ responseHeaders }
|
|
1362
|
+
);
|
|
1363
|
+
|
|
1364
|
+
let responseData = response;
|
|
1365
|
+
if (responseHeaders) {
|
|
1366
|
+
responseData = response[0];
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
const {
|
|
1370
|
+
error: res_error,
|
|
1371
|
+
} = ContentPlatformModel.SEOSchemaMarkupTemplate().validate(responseData, {
|
|
1372
|
+
abortEarly: false,
|
|
1373
|
+
allowUnknown: true,
|
|
1374
|
+
});
|
|
1375
|
+
|
|
1376
|
+
if (res_error) {
|
|
1377
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
1378
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
1379
|
+
} else {
|
|
1380
|
+
Logger({
|
|
1381
|
+
level: "WARN",
|
|
1382
|
+
message: `Response Validation Warnings for platform > Content > createSEOMarkupSchema \n ${res_error}`,
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
return response;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* @param {ContentPlatformApplicationValidator.DeleteAllInjectableTagsParam} arg
|
|
1392
|
+
* - Arg object
|
|
1393
|
+
*
|
|
1394
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1395
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1396
|
+
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
1397
|
+
* @name deleteAllInjectableTags
|
|
1398
|
+
* @summary: Delete HTML tags in application
|
|
1399
|
+
* @description: Use this API to delete all the existing tags at once - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAllInjectableTags/).
|
|
1400
|
+
*/
|
|
1401
|
+
async deleteAllInjectableTags(
|
|
1402
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
1403
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
1404
|
+
) {
|
|
1405
|
+
const {
|
|
1406
|
+
error,
|
|
1407
|
+
} = ContentPlatformApplicationValidator.deleteAllInjectableTags().validate(
|
|
1408
|
+
{},
|
|
1409
|
+
{ abortEarly: false, allowUnknown: true }
|
|
1410
|
+
);
|
|
1411
|
+
if (error) {
|
|
1412
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
// Showing warrnings if extra unknown parameters are found
|
|
1416
|
+
const {
|
|
1417
|
+
error: warrning,
|
|
1418
|
+
} = ContentPlatformApplicationValidator.deleteAllInjectableTags().validate(
|
|
1419
|
+
{},
|
|
1420
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1421
|
+
);
|
|
1422
|
+
if (warrning) {
|
|
1423
|
+
Logger({
|
|
1424
|
+
level: "WARN",
|
|
1425
|
+
message: `Parameter Validation warrnings for platform > Content > deleteAllInjectableTags \n ${warrning}`,
|
|
1024
1426
|
});
|
|
1025
1427
|
}
|
|
1026
1428
|
|
|
@@ -1028,10 +1430,10 @@ class Content {
|
|
|
1028
1430
|
|
|
1029
1431
|
const response = await PlatformAPIClient.execute(
|
|
1030
1432
|
this.config,
|
|
1031
|
-
"
|
|
1032
|
-
`/service/platform/content/
|
|
1433
|
+
"delete",
|
|
1434
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags`,
|
|
1033
1435
|
query_params,
|
|
1034
|
-
|
|
1436
|
+
undefined,
|
|
1035
1437
|
requestHeaders,
|
|
1036
1438
|
{ responseHeaders }
|
|
1037
1439
|
);
|
|
@@ -1043,7 +1445,7 @@ class Content {
|
|
|
1043
1445
|
|
|
1044
1446
|
const {
|
|
1045
1447
|
error: res_error,
|
|
1046
|
-
} = ContentPlatformModel.
|
|
1448
|
+
} = ContentPlatformModel.TagsSchema().validate(responseData, {
|
|
1047
1449
|
abortEarly: false,
|
|
1048
1450
|
allowUnknown: true,
|
|
1049
1451
|
});
|
|
@@ -1054,7 +1456,7 @@ class Content {
|
|
|
1054
1456
|
} else {
|
|
1055
1457
|
Logger({
|
|
1056
1458
|
level: "WARN",
|
|
1057
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1459
|
+
message: `Response Validation Warnings for platform > Content > deleteAllInjectableTags \n ${res_error}`,
|
|
1058
1460
|
});
|
|
1059
1461
|
}
|
|
1060
1462
|
}
|
|
@@ -1063,25 +1465,26 @@ class Content {
|
|
|
1063
1465
|
}
|
|
1064
1466
|
|
|
1065
1467
|
/**
|
|
1066
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1468
|
+
* @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg
|
|
1067
1469
|
* - Arg object
|
|
1068
1470
|
*
|
|
1069
1471
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1070
1472
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1071
|
-
* @returns {Promise<ContentPlatformModel.
|
|
1072
|
-
*
|
|
1073
|
-
* @
|
|
1074
|
-
* @
|
|
1473
|
+
* @returns {Promise<ContentPlatformModel.CreateAnnouncementSchema>} -
|
|
1474
|
+
* Success response
|
|
1475
|
+
* @name deleteAnnouncement
|
|
1476
|
+
* @summary: Delete an announcement
|
|
1477
|
+
* @description: Remove a specific announcement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAnnouncement/).
|
|
1075
1478
|
*/
|
|
1076
|
-
async
|
|
1077
|
-
{
|
|
1479
|
+
async deleteAnnouncement(
|
|
1480
|
+
{ announcementId, requestHeaders } = { requestHeaders: {} },
|
|
1078
1481
|
{ responseHeaders } = { responseHeaders: false }
|
|
1079
1482
|
) {
|
|
1080
1483
|
const {
|
|
1081
1484
|
error,
|
|
1082
|
-
} = ContentPlatformApplicationValidator.
|
|
1485
|
+
} = ContentPlatformApplicationValidator.deleteAnnouncement().validate(
|
|
1083
1486
|
{
|
|
1084
|
-
|
|
1487
|
+
announcementId,
|
|
1085
1488
|
},
|
|
1086
1489
|
{ abortEarly: false, allowUnknown: true }
|
|
1087
1490
|
);
|
|
@@ -1092,16 +1495,16 @@ class Content {
|
|
|
1092
1495
|
// Showing warrnings if extra unknown parameters are found
|
|
1093
1496
|
const {
|
|
1094
1497
|
error: warrning,
|
|
1095
|
-
} = ContentPlatformApplicationValidator.
|
|
1498
|
+
} = ContentPlatformApplicationValidator.deleteAnnouncement().validate(
|
|
1096
1499
|
{
|
|
1097
|
-
|
|
1500
|
+
announcementId,
|
|
1098
1501
|
},
|
|
1099
1502
|
{ abortEarly: false, allowUnknown: false }
|
|
1100
1503
|
);
|
|
1101
1504
|
if (warrning) {
|
|
1102
1505
|
Logger({
|
|
1103
1506
|
level: "WARN",
|
|
1104
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1507
|
+
message: `Parameter Validation warrnings for platform > Content > deleteAnnouncement \n ${warrning}`,
|
|
1105
1508
|
});
|
|
1106
1509
|
}
|
|
1107
1510
|
|
|
@@ -1109,10 +1512,10 @@ class Content {
|
|
|
1109
1512
|
|
|
1110
1513
|
const response = await PlatformAPIClient.execute(
|
|
1111
1514
|
this.config,
|
|
1112
|
-
"
|
|
1113
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1515
|
+
"delete",
|
|
1516
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/announcements/${announcementId}`,
|
|
1114
1517
|
query_params,
|
|
1115
|
-
|
|
1518
|
+
undefined,
|
|
1116
1519
|
requestHeaders,
|
|
1117
1520
|
{ responseHeaders }
|
|
1118
1521
|
);
|
|
@@ -1124,7 +1527,7 @@ class Content {
|
|
|
1124
1527
|
|
|
1125
1528
|
const {
|
|
1126
1529
|
error: res_error,
|
|
1127
|
-
} = ContentPlatformModel.
|
|
1530
|
+
} = ContentPlatformModel.CreateAnnouncementSchema().validate(responseData, {
|
|
1128
1531
|
abortEarly: false,
|
|
1129
1532
|
allowUnknown: true,
|
|
1130
1533
|
});
|
|
@@ -1135,7 +1538,7 @@ class Content {
|
|
|
1135
1538
|
} else {
|
|
1136
1539
|
Logger({
|
|
1137
1540
|
level: "WARN",
|
|
1138
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1541
|
+
message: `Response Validation Warnings for platform > Content > deleteAnnouncement \n ${res_error}`,
|
|
1139
1542
|
});
|
|
1140
1543
|
}
|
|
1141
1544
|
}
|
|
@@ -1144,26 +1547,25 @@ class Content {
|
|
|
1144
1547
|
}
|
|
1145
1548
|
|
|
1146
1549
|
/**
|
|
1147
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1550
|
+
* @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldDefinitionParam} arg
|
|
1148
1551
|
* - Arg object
|
|
1149
1552
|
*
|
|
1150
1553
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1151
1554
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1152
|
-
* @returns {Promise<ContentPlatformModel.
|
|
1153
|
-
*
|
|
1154
|
-
* @
|
|
1155
|
-
* @
|
|
1156
|
-
* @description: Remove a specific announcement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAnnouncement/).
|
|
1555
|
+
* @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
|
|
1556
|
+
* @name deleteAppCustomFieldDefinition
|
|
1557
|
+
* @summary: Delete custom fields definition
|
|
1558
|
+
* @description: Custom field definition and its assosiated custom fields value can be deleted using this api on the basis of definition id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomFieldDefinition/).
|
|
1157
1559
|
*/
|
|
1158
|
-
async
|
|
1159
|
-
{
|
|
1560
|
+
async deleteAppCustomFieldDefinition(
|
|
1561
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
1160
1562
|
{ responseHeaders } = { responseHeaders: false }
|
|
1161
1563
|
) {
|
|
1162
1564
|
const {
|
|
1163
1565
|
error,
|
|
1164
|
-
} = ContentPlatformApplicationValidator.
|
|
1566
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinition().validate(
|
|
1165
1567
|
{
|
|
1166
|
-
|
|
1568
|
+
id,
|
|
1167
1569
|
},
|
|
1168
1570
|
{ abortEarly: false, allowUnknown: true }
|
|
1169
1571
|
);
|
|
@@ -1174,16 +1576,16 @@ class Content {
|
|
|
1174
1576
|
// Showing warrnings if extra unknown parameters are found
|
|
1175
1577
|
const {
|
|
1176
1578
|
error: warrning,
|
|
1177
|
-
} = ContentPlatformApplicationValidator.
|
|
1579
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomFieldDefinition().validate(
|
|
1178
1580
|
{
|
|
1179
|
-
|
|
1581
|
+
id,
|
|
1180
1582
|
},
|
|
1181
1583
|
{ abortEarly: false, allowUnknown: false }
|
|
1182
1584
|
);
|
|
1183
1585
|
if (warrning) {
|
|
1184
1586
|
Logger({
|
|
1185
1587
|
level: "WARN",
|
|
1186
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1588
|
+
message: `Parameter Validation warrnings for platform > Content > deleteAppCustomFieldDefinition \n ${warrning}`,
|
|
1187
1589
|
});
|
|
1188
1590
|
}
|
|
1189
1591
|
|
|
@@ -1192,7 +1594,7 @@ class Content {
|
|
|
1192
1594
|
const response = await PlatformAPIClient.execute(
|
|
1193
1595
|
this.config,
|
|
1194
1596
|
"delete",
|
|
1195
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/
|
|
1597
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${id}`,
|
|
1196
1598
|
query_params,
|
|
1197
1599
|
undefined,
|
|
1198
1600
|
requestHeaders,
|
|
@@ -1206,7 +1608,7 @@ class Content {
|
|
|
1206
1608
|
|
|
1207
1609
|
const {
|
|
1208
1610
|
error: res_error,
|
|
1209
|
-
} = ContentPlatformModel.
|
|
1611
|
+
} = ContentPlatformModel.CustomDataDeleteSchema().validate(responseData, {
|
|
1210
1612
|
abortEarly: false,
|
|
1211
1613
|
allowUnknown: true,
|
|
1212
1614
|
});
|
|
@@ -1217,7 +1619,7 @@ class Content {
|
|
|
1217
1619
|
} else {
|
|
1218
1620
|
Logger({
|
|
1219
1621
|
level: "WARN",
|
|
1220
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1622
|
+
message: `Response Validation Warnings for platform > Content > deleteAppCustomFieldDefinition \n ${res_error}`,
|
|
1221
1623
|
});
|
|
1222
1624
|
}
|
|
1223
1625
|
}
|
|
@@ -1226,27 +1628,28 @@ class Content {
|
|
|
1226
1628
|
}
|
|
1227
1629
|
|
|
1228
1630
|
/**
|
|
1229
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1631
|
+
* @param {ContentPlatformApplicationValidator.DeleteAppCustomFieldsByResourceIdParam} arg
|
|
1230
1632
|
* - Arg object
|
|
1231
1633
|
*
|
|
1232
1634
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1233
1635
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1234
|
-
* @returns {Promise<ContentPlatformModel.
|
|
1235
|
-
*
|
|
1236
|
-
* @
|
|
1237
|
-
* @
|
|
1636
|
+
* @returns {Promise<ContentPlatformModel.CustomFieldsDeleteSchema>} -
|
|
1637
|
+
* Success response
|
|
1638
|
+
* @name deleteAppCustomFieldsByResourceId
|
|
1639
|
+
* @summary: delete custom fields of given resource and resource id
|
|
1640
|
+
* @description: Use this API to delete the custom fields for given resource in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomFieldsByResourceId/).
|
|
1238
1641
|
*/
|
|
1239
|
-
async
|
|
1240
|
-
{
|
|
1642
|
+
async deleteAppCustomFieldsByResourceId(
|
|
1643
|
+
{ resource, resourceId, ids, requestHeaders } = { requestHeaders: {} },
|
|
1241
1644
|
{ responseHeaders } = { responseHeaders: false }
|
|
1242
1645
|
) {
|
|
1243
1646
|
const {
|
|
1244
1647
|
error,
|
|
1245
|
-
} = ContentPlatformApplicationValidator.
|
|
1648
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomFieldsByResourceId().validate(
|
|
1246
1649
|
{
|
|
1247
|
-
slug,
|
|
1248
1650
|
resource,
|
|
1249
|
-
|
|
1651
|
+
resourceId,
|
|
1652
|
+
ids,
|
|
1250
1653
|
},
|
|
1251
1654
|
{ abortEarly: false, allowUnknown: true }
|
|
1252
1655
|
);
|
|
@@ -1257,27 +1660,28 @@ class Content {
|
|
|
1257
1660
|
// Showing warrnings if extra unknown parameters are found
|
|
1258
1661
|
const {
|
|
1259
1662
|
error: warrning,
|
|
1260
|
-
} = ContentPlatformApplicationValidator.
|
|
1663
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomFieldsByResourceId().validate(
|
|
1261
1664
|
{
|
|
1262
|
-
slug,
|
|
1263
1665
|
resource,
|
|
1264
|
-
|
|
1666
|
+
resourceId,
|
|
1667
|
+
ids,
|
|
1265
1668
|
},
|
|
1266
1669
|
{ abortEarly: false, allowUnknown: false }
|
|
1267
1670
|
);
|
|
1268
1671
|
if (warrning) {
|
|
1269
1672
|
Logger({
|
|
1270
1673
|
level: "WARN",
|
|
1271
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1674
|
+
message: `Parameter Validation warrnings for platform > Content > deleteAppCustomFieldsByResourceId \n ${warrning}`,
|
|
1272
1675
|
});
|
|
1273
1676
|
}
|
|
1274
1677
|
|
|
1275
1678
|
const query_params = {};
|
|
1679
|
+
query_params["ids"] = ids;
|
|
1276
1680
|
|
|
1277
1681
|
const response = await PlatformAPIClient.execute(
|
|
1278
1682
|
this.config,
|
|
1279
1683
|
"delete",
|
|
1280
|
-
`/service/platform/content/
|
|
1684
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`,
|
|
1281
1685
|
query_params,
|
|
1282
1686
|
undefined,
|
|
1283
1687
|
requestHeaders,
|
|
@@ -1291,7 +1695,7 @@ class Content {
|
|
|
1291
1695
|
|
|
1292
1696
|
const {
|
|
1293
1697
|
error: res_error,
|
|
1294
|
-
} = ContentPlatformModel.
|
|
1698
|
+
} = ContentPlatformModel.CustomFieldsDeleteSchema().validate(responseData, {
|
|
1295
1699
|
abortEarly: false,
|
|
1296
1700
|
allowUnknown: true,
|
|
1297
1701
|
});
|
|
@@ -1302,7 +1706,7 @@ class Content {
|
|
|
1302
1706
|
} else {
|
|
1303
1707
|
Logger({
|
|
1304
1708
|
level: "WARN",
|
|
1305
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1709
|
+
message: `Response Validation Warnings for platform > Content > deleteAppCustomFieldsByResourceId \n ${res_error}`,
|
|
1306
1710
|
});
|
|
1307
1711
|
}
|
|
1308
1712
|
}
|
|
@@ -1311,26 +1715,25 @@ class Content {
|
|
|
1311
1715
|
}
|
|
1312
1716
|
|
|
1313
1717
|
/**
|
|
1314
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1718
|
+
* @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectParam} arg
|
|
1315
1719
|
* - Arg object
|
|
1316
1720
|
*
|
|
1317
1721
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1318
1722
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1319
1723
|
* @returns {Promise<ContentPlatformModel.CustomDataDeleteSchema>} - Success response
|
|
1320
|
-
* @name
|
|
1724
|
+
* @name deleteAppCustomObject
|
|
1321
1725
|
* @summary: Delete custom object
|
|
1322
|
-
* @description:
|
|
1726
|
+
* @description: Custom object entries can be deleted by providing the delete ID using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObject/).
|
|
1323
1727
|
*/
|
|
1324
|
-
async
|
|
1325
|
-
{
|
|
1728
|
+
async deleteAppCustomObject(
|
|
1729
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
1326
1730
|
{ responseHeaders } = { responseHeaders: false }
|
|
1327
1731
|
) {
|
|
1328
1732
|
const {
|
|
1329
1733
|
error,
|
|
1330
|
-
} = ContentPlatformApplicationValidator.
|
|
1734
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomObject().validate(
|
|
1331
1735
|
{
|
|
1332
|
-
|
|
1333
|
-
slug,
|
|
1736
|
+
id,
|
|
1334
1737
|
},
|
|
1335
1738
|
{ abortEarly: false, allowUnknown: true }
|
|
1336
1739
|
);
|
|
@@ -1341,17 +1744,16 @@ class Content {
|
|
|
1341
1744
|
// Showing warrnings if extra unknown parameters are found
|
|
1342
1745
|
const {
|
|
1343
1746
|
error: warrning,
|
|
1344
|
-
} = ContentPlatformApplicationValidator.
|
|
1747
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomObject().validate(
|
|
1345
1748
|
{
|
|
1346
|
-
|
|
1347
|
-
slug,
|
|
1749
|
+
id,
|
|
1348
1750
|
},
|
|
1349
1751
|
{ abortEarly: false, allowUnknown: false }
|
|
1350
1752
|
);
|
|
1351
1753
|
if (warrning) {
|
|
1352
1754
|
Logger({
|
|
1353
1755
|
level: "WARN",
|
|
1354
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1756
|
+
message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObject \n ${warrning}`,
|
|
1355
1757
|
});
|
|
1356
1758
|
}
|
|
1357
1759
|
|
|
@@ -1360,7 +1762,7 @@ class Content {
|
|
|
1360
1762
|
const response = await PlatformAPIClient.execute(
|
|
1361
1763
|
this.config,
|
|
1362
1764
|
"delete",
|
|
1363
|
-
`/service/platform/content/
|
|
1765
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${id}`,
|
|
1364
1766
|
query_params,
|
|
1365
1767
|
undefined,
|
|
1366
1768
|
requestHeaders,
|
|
@@ -1385,7 +1787,7 @@ class Content {
|
|
|
1385
1787
|
} else {
|
|
1386
1788
|
Logger({
|
|
1387
1789
|
level: "WARN",
|
|
1388
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1790
|
+
message: `Response Validation Warnings for platform > Content > deleteAppCustomObject \n ${res_error}`,
|
|
1389
1791
|
});
|
|
1390
1792
|
}
|
|
1391
1793
|
}
|
|
@@ -1394,7 +1796,7 @@ class Content {
|
|
|
1394
1796
|
}
|
|
1395
1797
|
|
|
1396
1798
|
/**
|
|
1397
|
-
* @param {ContentPlatformApplicationValidator.
|
|
1799
|
+
* @param {ContentPlatformApplicationValidator.DeleteAppCustomObjectDefinitionParam} arg
|
|
1398
1800
|
* - Arg object
|
|
1399
1801
|
*
|
|
1400
1802
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1402,19 +1804,19 @@ class Content {
|
|
|
1402
1804
|
* @returns {Promise<ContentPlatformModel.CustomObjectDefinitionDeleteResponseSchema>}
|
|
1403
1805
|
* - Success response
|
|
1404
1806
|
*
|
|
1405
|
-
* @name
|
|
1807
|
+
* @name deleteAppCustomObjectDefinition
|
|
1406
1808
|
* @summary: Delete custom object definition
|
|
1407
|
-
* @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/
|
|
1809
|
+
* @description: Custom object definitions can be deleted using this endpoint by providing the definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAppCustomObjectDefinition/).
|
|
1408
1810
|
*/
|
|
1409
|
-
async
|
|
1410
|
-
{
|
|
1811
|
+
async deleteAppCustomObjectDefinition(
|
|
1812
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
1411
1813
|
{ responseHeaders } = { responseHeaders: false }
|
|
1412
1814
|
) {
|
|
1413
1815
|
const {
|
|
1414
1816
|
error,
|
|
1415
|
-
} = ContentPlatformApplicationValidator.
|
|
1817
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinition().validate(
|
|
1416
1818
|
{
|
|
1417
|
-
|
|
1819
|
+
id,
|
|
1418
1820
|
},
|
|
1419
1821
|
{ abortEarly: false, allowUnknown: true }
|
|
1420
1822
|
);
|
|
@@ -1425,16 +1827,16 @@ class Content {
|
|
|
1425
1827
|
// Showing warrnings if extra unknown parameters are found
|
|
1426
1828
|
const {
|
|
1427
1829
|
error: warrning,
|
|
1428
|
-
} = ContentPlatformApplicationValidator.
|
|
1830
|
+
} = ContentPlatformApplicationValidator.deleteAppCustomObjectDefinition().validate(
|
|
1429
1831
|
{
|
|
1430
|
-
|
|
1832
|
+
id,
|
|
1431
1833
|
},
|
|
1432
1834
|
{ abortEarly: false, allowUnknown: false }
|
|
1433
1835
|
);
|
|
1434
1836
|
if (warrning) {
|
|
1435
1837
|
Logger({
|
|
1436
1838
|
level: "WARN",
|
|
1437
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
1839
|
+
message: `Parameter Validation warrnings for platform > Content > deleteAppCustomObjectDefinition \n ${warrning}`,
|
|
1438
1840
|
});
|
|
1439
1841
|
}
|
|
1440
1842
|
|
|
@@ -1443,7 +1845,7 @@ class Content {
|
|
|
1443
1845
|
const response = await PlatformAPIClient.execute(
|
|
1444
1846
|
this.config,
|
|
1445
1847
|
"delete",
|
|
1446
|
-
`/service/platform/content/
|
|
1848
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${id}`,
|
|
1447
1849
|
query_params,
|
|
1448
1850
|
undefined,
|
|
1449
1851
|
requestHeaders,
|
|
@@ -1468,7 +1870,7 @@ class Content {
|
|
|
1468
1870
|
} else {
|
|
1469
1871
|
Logger({
|
|
1470
1872
|
level: "WARN",
|
|
1471
|
-
message: `Response Validation Warnings for platform > Content >
|
|
1873
|
+
message: `Response Validation Warnings for platform > Content > deleteAppCustomObjectDefinition \n ${res_error}`,
|
|
1472
1874
|
});
|
|
1473
1875
|
}
|
|
1474
1876
|
}
|
|
@@ -1718,7 +2120,7 @@ class Content {
|
|
|
1718
2120
|
*
|
|
1719
2121
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1720
2122
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1721
|
-
* @returns {Promise<ContentPlatformModel.
|
|
2123
|
+
* @returns {Promise<ContentPlatformModel.CreateFaqCategorySchema>} - Success response
|
|
1722
2124
|
* @name deleteFaqCategory
|
|
1723
2125
|
* @summary: Delete FAQ category
|
|
1724
2126
|
* @description: Remove a specific FAQ category. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteFaqCategory/).
|
|
@@ -1774,7 +2176,7 @@ class Content {
|
|
|
1774
2176
|
|
|
1775
2177
|
const {
|
|
1776
2178
|
error: res_error,
|
|
1777
|
-
} = ContentPlatformModel.
|
|
2179
|
+
} = ContentPlatformModel.CreateFaqCategorySchema().validate(responseData, {
|
|
1778
2180
|
abortEarly: false,
|
|
1779
2181
|
allowUnknown: true,
|
|
1780
2182
|
});
|
|
@@ -2036,7 +2438,7 @@ class Content {
|
|
|
2036
2438
|
*
|
|
2037
2439
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2038
2440
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2039
|
-
* @returns {Promise<
|
|
2441
|
+
* @returns {Promise<ContentPlatformModel.DeletPathMappingSchema>} - Success response
|
|
2040
2442
|
* @name deletePathRedirectionRules
|
|
2041
2443
|
* @summary: Delete path redirection rule
|
|
2042
2444
|
* @description: Remove specific path redirection rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deletePathRedirectionRules/).
|
|
@@ -2090,7 +2492,9 @@ class Content {
|
|
|
2090
2492
|
responseData = response[0];
|
|
2091
2493
|
}
|
|
2092
2494
|
|
|
2093
|
-
const {
|
|
2495
|
+
const {
|
|
2496
|
+
error: res_error,
|
|
2497
|
+
} = ContentPlatformModel.DeletPathMappingSchema().validate(responseData, {
|
|
2094
2498
|
abortEarly: false,
|
|
2095
2499
|
allowUnknown: true,
|
|
2096
2500
|
});
|
|
@@ -2121,14 +2525,14 @@ class Content {
|
|
|
2121
2525
|
* @description: Use this API to Delete SEO Markup Schema - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteSEOMarkupSchema/).
|
|
2122
2526
|
*/
|
|
2123
2527
|
async deleteSEOMarkupSchema(
|
|
2124
|
-
{
|
|
2528
|
+
{ schemaId, requestHeaders } = { requestHeaders: {} },
|
|
2125
2529
|
{ responseHeaders } = { responseHeaders: false }
|
|
2126
2530
|
) {
|
|
2127
2531
|
const {
|
|
2128
2532
|
error,
|
|
2129
2533
|
} = ContentPlatformApplicationValidator.deleteSEOMarkupSchema().validate(
|
|
2130
2534
|
{
|
|
2131
|
-
|
|
2535
|
+
schemaId,
|
|
2132
2536
|
},
|
|
2133
2537
|
{ abortEarly: false, allowUnknown: true }
|
|
2134
2538
|
);
|
|
@@ -2141,7 +2545,7 @@ class Content {
|
|
|
2141
2545
|
error: warrning,
|
|
2142
2546
|
} = ContentPlatformApplicationValidator.deleteSEOMarkupSchema().validate(
|
|
2143
2547
|
{
|
|
2144
|
-
|
|
2548
|
+
schemaId,
|
|
2145
2549
|
},
|
|
2146
2550
|
{ abortEarly: false, allowUnknown: false }
|
|
2147
2551
|
);
|
|
@@ -2157,7 +2561,7 @@ class Content {
|
|
|
2157
2561
|
const response = await PlatformAPIClient.execute(
|
|
2158
2562
|
this.config,
|
|
2159
2563
|
"delete",
|
|
2160
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema/${
|
|
2564
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema/${schemaId}`,
|
|
2161
2565
|
query_params,
|
|
2162
2566
|
undefined,
|
|
2163
2567
|
requestHeaders,
|
|
@@ -2281,7 +2685,7 @@ class Content {
|
|
|
2281
2685
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
2282
2686
|
* @name editInjectableTag
|
|
2283
2687
|
* @summary: Update HTML tag
|
|
2284
|
-
* @description: Modify
|
|
2688
|
+
* @description: Modify an injectable tag - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/editInjectableTag/).
|
|
2285
2689
|
*/
|
|
2286
2690
|
async editInjectableTag(
|
|
2287
2691
|
{ tagId, body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -2363,18 +2767,18 @@ class Content {
|
|
|
2363
2767
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2364
2768
|
* @returns {Promise<ContentPlatformModel.SEOSchemaMarkupTemplate>} - Success response
|
|
2365
2769
|
* @name editSEOMarkupSchema
|
|
2366
|
-
* @summary:
|
|
2367
|
-
* @description: Use this API to
|
|
2770
|
+
* @summary: Edit SEO Markup Schema
|
|
2771
|
+
* @description: Use this API to edit SEO Markup Schema - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/editSEOMarkupSchema/).
|
|
2368
2772
|
*/
|
|
2369
2773
|
async editSEOMarkupSchema(
|
|
2370
|
-
{
|
|
2774
|
+
{ schemaId, body, requestHeaders } = { requestHeaders: {} },
|
|
2371
2775
|
{ responseHeaders } = { responseHeaders: false }
|
|
2372
2776
|
) {
|
|
2373
2777
|
const {
|
|
2374
2778
|
error,
|
|
2375
2779
|
} = ContentPlatformApplicationValidator.editSEOMarkupSchema().validate(
|
|
2376
2780
|
{
|
|
2377
|
-
|
|
2781
|
+
schemaId,
|
|
2378
2782
|
body,
|
|
2379
2783
|
},
|
|
2380
2784
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -2388,7 +2792,7 @@ class Content {
|
|
|
2388
2792
|
error: warrning,
|
|
2389
2793
|
} = ContentPlatformApplicationValidator.editSEOMarkupSchema().validate(
|
|
2390
2794
|
{
|
|
2391
|
-
|
|
2795
|
+
schemaId,
|
|
2392
2796
|
body,
|
|
2393
2797
|
},
|
|
2394
2798
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -2405,7 +2809,7 @@ class Content {
|
|
|
2405
2809
|
const response = await PlatformAPIClient.execute(
|
|
2406
2810
|
this.config,
|
|
2407
2811
|
"put",
|
|
2408
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema/${
|
|
2812
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema/${schemaId}`,
|
|
2409
2813
|
query_params,
|
|
2410
2814
|
body,
|
|
2411
2815
|
requestHeaders,
|
|
@@ -2439,7 +2843,7 @@ class Content {
|
|
|
2439
2843
|
}
|
|
2440
2844
|
|
|
2441
2845
|
/**
|
|
2442
|
-
* @param {ContentPlatformApplicationValidator.
|
|
2846
|
+
* @param {ContentPlatformApplicationValidator.ExportAppCustomObjectEntriesParam} arg
|
|
2443
2847
|
* - Arg object
|
|
2444
2848
|
*
|
|
2445
2849
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -2447,19 +2851,19 @@ class Content {
|
|
|
2447
2851
|
* @returns {Promise<ContentPlatformModel.CustomObjectBulkEntryInitiateDownload>}
|
|
2448
2852
|
* - Success response
|
|
2449
2853
|
*
|
|
2450
|
-
* @name
|
|
2854
|
+
* @name exportAppCustomObjectEntries
|
|
2451
2855
|
* @summary: Initiate download for bulk custom object entries
|
|
2452
|
-
* @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/
|
|
2856
|
+
* @description: Custom object bulk export of bulk entries can be perform using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/exportAppCustomObjectEntries/).
|
|
2453
2857
|
*/
|
|
2454
|
-
async
|
|
2455
|
-
{
|
|
2858
|
+
async exportAppCustomObjectEntries(
|
|
2859
|
+
{ definitionId, requestHeaders } = { requestHeaders: {} },
|
|
2456
2860
|
{ responseHeaders } = { responseHeaders: false }
|
|
2457
2861
|
) {
|
|
2458
2862
|
const {
|
|
2459
2863
|
error,
|
|
2460
|
-
} = ContentPlatformApplicationValidator.
|
|
2864
|
+
} = ContentPlatformApplicationValidator.exportAppCustomObjectEntries().validate(
|
|
2461
2865
|
{
|
|
2462
|
-
|
|
2866
|
+
definitionId,
|
|
2463
2867
|
},
|
|
2464
2868
|
{ abortEarly: false, allowUnknown: true }
|
|
2465
2869
|
);
|
|
@@ -2470,16 +2874,16 @@ class Content {
|
|
|
2470
2874
|
// Showing warrnings if extra unknown parameters are found
|
|
2471
2875
|
const {
|
|
2472
2876
|
error: warrning,
|
|
2473
|
-
} = ContentPlatformApplicationValidator.
|
|
2877
|
+
} = ContentPlatformApplicationValidator.exportAppCustomObjectEntries().validate(
|
|
2474
2878
|
{
|
|
2475
|
-
|
|
2879
|
+
definitionId,
|
|
2476
2880
|
},
|
|
2477
2881
|
{ abortEarly: false, allowUnknown: false }
|
|
2478
2882
|
);
|
|
2479
2883
|
if (warrning) {
|
|
2480
2884
|
Logger({
|
|
2481
2885
|
level: "WARN",
|
|
2482
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
2886
|
+
message: `Parameter Validation warrnings for platform > Content > exportAppCustomObjectEntries \n ${warrning}`,
|
|
2483
2887
|
});
|
|
2484
2888
|
}
|
|
2485
2889
|
|
|
@@ -2488,7 +2892,7 @@ class Content {
|
|
|
2488
2892
|
const response = await PlatformAPIClient.execute(
|
|
2489
2893
|
this.config,
|
|
2490
2894
|
"get",
|
|
2491
|
-
`/service/platform/content/
|
|
2895
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/download`,
|
|
2492
2896
|
query_params,
|
|
2493
2897
|
undefined,
|
|
2494
2898
|
requestHeaders,
|
|
@@ -2513,7 +2917,7 @@ class Content {
|
|
|
2513
2917
|
} else {
|
|
2514
2918
|
Logger({
|
|
2515
2919
|
level: "WARN",
|
|
2516
|
-
message: `Response Validation Warnings for platform > Content >
|
|
2920
|
+
message: `Response Validation Warnings for platform > Content > exportAppCustomObjectEntries \n ${res_error}`,
|
|
2517
2921
|
});
|
|
2518
2922
|
}
|
|
2519
2923
|
}
|
|
@@ -2770,41 +3174,117 @@ class Content {
|
|
|
2770
3174
|
}
|
|
2771
3175
|
|
|
2772
3176
|
/**
|
|
2773
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3177
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionParam} arg
|
|
2774
3178
|
* - Arg object
|
|
2775
3179
|
*
|
|
2776
3180
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2777
3181
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2778
|
-
* @returns {Promise<ContentPlatformModel.
|
|
2779
|
-
* Success response
|
|
2780
|
-
*
|
|
2781
|
-
* @
|
|
2782
|
-
* @
|
|
3182
|
+
* @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
|
|
3183
|
+
* - Success response
|
|
3184
|
+
*
|
|
3185
|
+
* @name getAppCustomFieldDefinition
|
|
3186
|
+
* @summary: Get custom fields definition by id
|
|
3187
|
+
* @description: Use this API to retrieve the definitions of custom fields using definition_id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinition/).
|
|
2783
3188
|
*/
|
|
2784
|
-
async
|
|
2785
|
-
{
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
3189
|
+
async getAppCustomFieldDefinition(
|
|
3190
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
3191
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
3192
|
+
) {
|
|
3193
|
+
const {
|
|
3194
|
+
error,
|
|
3195
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinition().validate(
|
|
3196
|
+
{
|
|
3197
|
+
id,
|
|
3198
|
+
},
|
|
3199
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3200
|
+
);
|
|
3201
|
+
if (error) {
|
|
3202
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
3203
|
+
}
|
|
3204
|
+
|
|
3205
|
+
// Showing warrnings if extra unknown parameters are found
|
|
3206
|
+
const {
|
|
3207
|
+
error: warrning,
|
|
3208
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinition().validate(
|
|
3209
|
+
{
|
|
3210
|
+
id,
|
|
3211
|
+
},
|
|
3212
|
+
{ abortEarly: false, allowUnknown: false }
|
|
3213
|
+
);
|
|
3214
|
+
if (warrning) {
|
|
3215
|
+
Logger({
|
|
3216
|
+
level: "WARN",
|
|
3217
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinition \n ${warrning}`,
|
|
3218
|
+
});
|
|
3219
|
+
}
|
|
3220
|
+
|
|
3221
|
+
const query_params = {};
|
|
3222
|
+
|
|
3223
|
+
const response = await PlatformAPIClient.execute(
|
|
3224
|
+
this.config,
|
|
3225
|
+
"get",
|
|
3226
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${id}`,
|
|
3227
|
+
query_params,
|
|
3228
|
+
undefined,
|
|
2793
3229
|
requestHeaders,
|
|
2794
|
-
|
|
3230
|
+
{ responseHeaders }
|
|
3231
|
+
);
|
|
3232
|
+
|
|
3233
|
+
let responseData = response;
|
|
3234
|
+
if (responseHeaders) {
|
|
3235
|
+
responseData = response[0];
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
const {
|
|
3239
|
+
error: res_error,
|
|
3240
|
+
} = ContentPlatformModel.CustomFieldDefinitionDetailResSchema().validate(
|
|
3241
|
+
responseData,
|
|
3242
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3243
|
+
);
|
|
3244
|
+
|
|
3245
|
+
if (res_error) {
|
|
3246
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
3247
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
3248
|
+
} else {
|
|
3249
|
+
Logger({
|
|
3250
|
+
level: "WARN",
|
|
3251
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinition \n ${res_error}`,
|
|
3252
|
+
});
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
return response;
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
/**
|
|
3260
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldDefinitionsParam} arg
|
|
3261
|
+
* - Arg object
|
|
3262
|
+
*
|
|
3263
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3264
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3265
|
+
* @returns {Promise<ContentPlatformModel.ApplicationCustomFieldDefinitionsSchema>}
|
|
3266
|
+
* - Success response
|
|
3267
|
+
*
|
|
3268
|
+
* @name getAppCustomFieldDefinitions
|
|
3269
|
+
* @summary: Get custom fields definitions
|
|
3270
|
+
* @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitions/).
|
|
3271
|
+
*/
|
|
3272
|
+
async getAppCustomFieldDefinitions(
|
|
3273
|
+
{ pageNo, pageSize, resources, types, search, slugs, requestHeaders } = {
|
|
3274
|
+
requestHeaders: {},
|
|
3275
|
+
},
|
|
2795
3276
|
{ responseHeaders } = { responseHeaders: false }
|
|
2796
3277
|
) {
|
|
2797
3278
|
const {
|
|
2798
3279
|
error,
|
|
2799
|
-
} = ContentPlatformApplicationValidator.
|
|
3280
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate(
|
|
2800
3281
|
{
|
|
2801
3282
|
pageNo,
|
|
2802
3283
|
pageSize,
|
|
2803
|
-
|
|
3284
|
+
resources,
|
|
2804
3285
|
types,
|
|
2805
3286
|
search,
|
|
2806
3287
|
slugs,
|
|
2807
|
-
namespaces,
|
|
2808
3288
|
},
|
|
2809
3289
|
{ abortEarly: false, allowUnknown: true }
|
|
2810
3290
|
);
|
|
@@ -2815,37 +3295,36 @@ class Content {
|
|
|
2815
3295
|
// Showing warrnings if extra unknown parameters are found
|
|
2816
3296
|
const {
|
|
2817
3297
|
error: warrning,
|
|
2818
|
-
} = ContentPlatformApplicationValidator.
|
|
3298
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldDefinitions().validate(
|
|
2819
3299
|
{
|
|
2820
3300
|
pageNo,
|
|
2821
3301
|
pageSize,
|
|
2822
|
-
|
|
3302
|
+
resources,
|
|
2823
3303
|
types,
|
|
2824
3304
|
search,
|
|
2825
3305
|
slugs,
|
|
2826
|
-
namespaces,
|
|
2827
3306
|
},
|
|
2828
3307
|
{ abortEarly: false, allowUnknown: false }
|
|
2829
3308
|
);
|
|
2830
3309
|
if (warrning) {
|
|
2831
3310
|
Logger({
|
|
2832
3311
|
level: "WARN",
|
|
2833
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3312
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldDefinitions \n ${warrning}`,
|
|
2834
3313
|
});
|
|
2835
3314
|
}
|
|
2836
3315
|
|
|
2837
3316
|
const query_params = {};
|
|
2838
3317
|
query_params["page_no"] = pageNo;
|
|
2839
3318
|
query_params["page_size"] = pageSize;
|
|
3319
|
+
query_params["resources"] = resources;
|
|
2840
3320
|
query_params["types"] = types;
|
|
2841
3321
|
query_params["search"] = search;
|
|
2842
3322
|
query_params["slugs"] = slugs;
|
|
2843
|
-
query_params["namespaces"] = namespaces;
|
|
2844
3323
|
|
|
2845
3324
|
const response = await PlatformAPIClient.execute(
|
|
2846
3325
|
this.config,
|
|
2847
3326
|
"get",
|
|
2848
|
-
`/service/platform/content/
|
|
3327
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions`,
|
|
2849
3328
|
query_params,
|
|
2850
3329
|
undefined,
|
|
2851
3330
|
requestHeaders,
|
|
@@ -2859,7 +3338,7 @@ class Content {
|
|
|
2859
3338
|
|
|
2860
3339
|
const {
|
|
2861
3340
|
error: res_error,
|
|
2862
|
-
} = ContentPlatformModel.
|
|
3341
|
+
} = ContentPlatformModel.ApplicationCustomFieldDefinitionsSchema().validate(
|
|
2863
3342
|
responseData,
|
|
2864
3343
|
{ abortEarly: false, allowUnknown: true }
|
|
2865
3344
|
);
|
|
@@ -2870,7 +3349,7 @@ class Content {
|
|
|
2870
3349
|
} else {
|
|
2871
3350
|
Logger({
|
|
2872
3351
|
level: "WARN",
|
|
2873
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3352
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldDefinitions \n ${res_error}`,
|
|
2874
3353
|
});
|
|
2875
3354
|
}
|
|
2876
3355
|
}
|
|
@@ -2879,29 +3358,27 @@ class Content {
|
|
|
2879
3358
|
}
|
|
2880
3359
|
|
|
2881
3360
|
/**
|
|
2882
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3361
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldJobsParam} arg
|
|
2883
3362
|
* - Arg object
|
|
2884
3363
|
*
|
|
2885
3364
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2886
3365
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2887
|
-
* @returns {Promise<ContentPlatformModel.
|
|
2888
|
-
*
|
|
2889
|
-
*
|
|
2890
|
-
* @
|
|
2891
|
-
* @summary: Get custom fields definition by resource, slug and namespace
|
|
2892
|
-
* @description: Custom field definitions can be retrived from this using its slug, namespace and resource - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitionBySlug/).
|
|
3366
|
+
* @returns {Promise<ContentPlatformModel.CustomFieldBulkEntry>} - Success response
|
|
3367
|
+
* @name getAppCustomFieldJobs
|
|
3368
|
+
* @summary: Fetch bulk import and export job list.
|
|
3369
|
+
* @description: Use this api to get list of jobs of bulk import and exports - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldJobs/).
|
|
2893
3370
|
*/
|
|
2894
|
-
async
|
|
2895
|
-
{
|
|
3371
|
+
async getAppCustomFieldJobs(
|
|
3372
|
+
{ page, pageSize, actionType, requestHeaders } = { requestHeaders: {} },
|
|
2896
3373
|
{ responseHeaders } = { responseHeaders: false }
|
|
2897
3374
|
) {
|
|
2898
3375
|
const {
|
|
2899
3376
|
error,
|
|
2900
|
-
} = ContentPlatformApplicationValidator.
|
|
3377
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldJobs().validate(
|
|
2901
3378
|
{
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
3379
|
+
page,
|
|
3380
|
+
pageSize,
|
|
3381
|
+
actionType,
|
|
2905
3382
|
},
|
|
2906
3383
|
{ abortEarly: false, allowUnknown: true }
|
|
2907
3384
|
);
|
|
@@ -2912,27 +3389,30 @@ class Content {
|
|
|
2912
3389
|
// Showing warrnings if extra unknown parameters are found
|
|
2913
3390
|
const {
|
|
2914
3391
|
error: warrning,
|
|
2915
|
-
} = ContentPlatformApplicationValidator.
|
|
3392
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldJobs().validate(
|
|
2916
3393
|
{
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
3394
|
+
page,
|
|
3395
|
+
pageSize,
|
|
3396
|
+
actionType,
|
|
2920
3397
|
},
|
|
2921
3398
|
{ abortEarly: false, allowUnknown: false }
|
|
2922
3399
|
);
|
|
2923
3400
|
if (warrning) {
|
|
2924
3401
|
Logger({
|
|
2925
3402
|
level: "WARN",
|
|
2926
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3403
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldJobs \n ${warrning}`,
|
|
2927
3404
|
});
|
|
2928
3405
|
}
|
|
2929
3406
|
|
|
2930
3407
|
const query_params = {};
|
|
3408
|
+
query_params["page"] = page;
|
|
3409
|
+
query_params["page_size"] = pageSize;
|
|
3410
|
+
query_params["action_type"] = actionType;
|
|
2931
3411
|
|
|
2932
3412
|
const response = await PlatformAPIClient.execute(
|
|
2933
3413
|
this.config,
|
|
2934
3414
|
"get",
|
|
2935
|
-
`/service/platform/content/
|
|
3415
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/jobs`,
|
|
2936
3416
|
query_params,
|
|
2937
3417
|
undefined,
|
|
2938
3418
|
requestHeaders,
|
|
@@ -2946,10 +3426,10 @@ class Content {
|
|
|
2946
3426
|
|
|
2947
3427
|
const {
|
|
2948
3428
|
error: res_error,
|
|
2949
|
-
} = ContentPlatformModel.
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
);
|
|
3429
|
+
} = ContentPlatformModel.CustomFieldBulkEntry().validate(responseData, {
|
|
3430
|
+
abortEarly: false,
|
|
3431
|
+
allowUnknown: true,
|
|
3432
|
+
});
|
|
2953
3433
|
|
|
2954
3434
|
if (res_error) {
|
|
2955
3435
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -2957,7 +3437,7 @@ class Content {
|
|
|
2957
3437
|
} else {
|
|
2958
3438
|
Logger({
|
|
2959
3439
|
level: "WARN",
|
|
2960
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3440
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldJobs \n ${res_error}`,
|
|
2961
3441
|
});
|
|
2962
3442
|
}
|
|
2963
3443
|
}
|
|
@@ -2966,42 +3446,24 @@ class Content {
|
|
|
2966
3446
|
}
|
|
2967
3447
|
|
|
2968
3448
|
/**
|
|
2969
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3449
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldTypesParam} arg
|
|
2970
3450
|
* - Arg object
|
|
2971
3451
|
*
|
|
2972
3452
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
2973
3453
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
2974
|
-
* @returns {Promise<ContentPlatformModel.
|
|
2975
|
-
*
|
|
2976
|
-
* @
|
|
2977
|
-
* @
|
|
2978
|
-
* @description: Custom field definitions enable you to include data validation for custom fields, and enable sellers to add custom fields values for resources. With the help of this seller can retrive list of custom field definitions list. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldDefinitions/).
|
|
3454
|
+
* @returns {Promise<ContentPlatformModel.MetafieldTypesSchema>} - Success response
|
|
3455
|
+
* @name getAppCustomFieldTypes
|
|
3456
|
+
* @summary: Get custom field types
|
|
3457
|
+
* @description: Each custom field and custom field definition has a type, which defines the type of information that it can store. The custom field types have built-in validation. This api will give list of supported custom fields types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldTypes/).
|
|
2979
3458
|
*/
|
|
2980
|
-
async
|
|
2981
|
-
{
|
|
2982
|
-
pageNo,
|
|
2983
|
-
pageSize,
|
|
2984
|
-
resources,
|
|
2985
|
-
types,
|
|
2986
|
-
search,
|
|
2987
|
-
slugs,
|
|
2988
|
-
namespaces,
|
|
2989
|
-
requestHeaders,
|
|
2990
|
-
} = { requestHeaders: {} },
|
|
3459
|
+
async getAppCustomFieldTypes(
|
|
3460
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
2991
3461
|
{ responseHeaders } = { responseHeaders: false }
|
|
2992
3462
|
) {
|
|
2993
3463
|
const {
|
|
2994
3464
|
error,
|
|
2995
|
-
} = ContentPlatformApplicationValidator.
|
|
2996
|
-
{
|
|
2997
|
-
pageNo,
|
|
2998
|
-
pageSize,
|
|
2999
|
-
resources,
|
|
3000
|
-
types,
|
|
3001
|
-
search,
|
|
3002
|
-
slugs,
|
|
3003
|
-
namespaces,
|
|
3004
|
-
},
|
|
3465
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate(
|
|
3466
|
+
{},
|
|
3005
3467
|
{ abortEarly: false, allowUnknown: true }
|
|
3006
3468
|
);
|
|
3007
3469
|
if (error) {
|
|
@@ -3011,38 +3473,23 @@ class Content {
|
|
|
3011
3473
|
// Showing warrnings if extra unknown parameters are found
|
|
3012
3474
|
const {
|
|
3013
3475
|
error: warrning,
|
|
3014
|
-
} = ContentPlatformApplicationValidator.
|
|
3015
|
-
{
|
|
3016
|
-
pageNo,
|
|
3017
|
-
pageSize,
|
|
3018
|
-
resources,
|
|
3019
|
-
types,
|
|
3020
|
-
search,
|
|
3021
|
-
slugs,
|
|
3022
|
-
namespaces,
|
|
3023
|
-
},
|
|
3476
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldTypes().validate(
|
|
3477
|
+
{},
|
|
3024
3478
|
{ abortEarly: false, allowUnknown: false }
|
|
3025
3479
|
);
|
|
3026
3480
|
if (warrning) {
|
|
3027
3481
|
Logger({
|
|
3028
3482
|
level: "WARN",
|
|
3029
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3483
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldTypes \n ${warrning}`,
|
|
3030
3484
|
});
|
|
3031
3485
|
}
|
|
3032
3486
|
|
|
3033
|
-
const query_params = {};
|
|
3034
|
-
query_params["page_no"] = pageNo;
|
|
3035
|
-
query_params["page_size"] = pageSize;
|
|
3036
|
-
query_params["resources"] = resources;
|
|
3037
|
-
query_params["types"] = types;
|
|
3038
|
-
query_params["search"] = search;
|
|
3039
|
-
query_params["slugs"] = slugs;
|
|
3040
|
-
query_params["namespaces"] = namespaces;
|
|
3487
|
+
const query_params = {};
|
|
3041
3488
|
|
|
3042
3489
|
const response = await PlatformAPIClient.execute(
|
|
3043
3490
|
this.config,
|
|
3044
3491
|
"get",
|
|
3045
|
-
`/service/platform/content/
|
|
3492
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/types`,
|
|
3046
3493
|
query_params,
|
|
3047
3494
|
undefined,
|
|
3048
3495
|
requestHeaders,
|
|
@@ -3056,10 +3503,10 @@ class Content {
|
|
|
3056
3503
|
|
|
3057
3504
|
const {
|
|
3058
3505
|
error: res_error,
|
|
3059
|
-
} = ContentPlatformModel.
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
);
|
|
3506
|
+
} = ContentPlatformModel.MetafieldTypesSchema().validate(responseData, {
|
|
3507
|
+
abortEarly: false,
|
|
3508
|
+
allowUnknown: true,
|
|
3509
|
+
});
|
|
3063
3510
|
|
|
3064
3511
|
if (res_error) {
|
|
3065
3512
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3067,7 +3514,7 @@ class Content {
|
|
|
3067
3514
|
} else {
|
|
3068
3515
|
Logger({
|
|
3069
3516
|
level: "WARN",
|
|
3070
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3517
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldTypes \n ${res_error}`,
|
|
3071
3518
|
});
|
|
3072
3519
|
}
|
|
3073
3520
|
}
|
|
@@ -3076,24 +3523,27 @@ class Content {
|
|
|
3076
3523
|
}
|
|
3077
3524
|
|
|
3078
3525
|
/**
|
|
3079
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3526
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldsParam} arg
|
|
3080
3527
|
* - Arg object
|
|
3081
3528
|
*
|
|
3082
3529
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3083
3530
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3084
|
-
* @returns {Promise<ContentPlatformModel.
|
|
3085
|
-
*
|
|
3086
|
-
* @
|
|
3087
|
-
* @
|
|
3531
|
+
* @returns {Promise<ContentPlatformModel.CustomFieldsResponseSchema>} -
|
|
3532
|
+
* Success response
|
|
3533
|
+
* @name getAppCustomFields
|
|
3534
|
+
* @summary: Get list of custom fields of gives resource
|
|
3535
|
+
* @description: Retrieves a list of custom fields attached to a particular resource by using the resource. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFields/).
|
|
3088
3536
|
*/
|
|
3089
|
-
async
|
|
3090
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
3537
|
+
async getAppCustomFields(
|
|
3538
|
+
{ resource, requestHeaders } = { requestHeaders: {} },
|
|
3091
3539
|
{ responseHeaders } = { responseHeaders: false }
|
|
3092
3540
|
) {
|
|
3093
3541
|
const {
|
|
3094
3542
|
error,
|
|
3095
|
-
} = ContentPlatformApplicationValidator.
|
|
3096
|
-
{
|
|
3543
|
+
} = ContentPlatformApplicationValidator.getAppCustomFields().validate(
|
|
3544
|
+
{
|
|
3545
|
+
resource,
|
|
3546
|
+
},
|
|
3097
3547
|
{ abortEarly: false, allowUnknown: true }
|
|
3098
3548
|
);
|
|
3099
3549
|
if (error) {
|
|
@@ -3103,14 +3553,16 @@ class Content {
|
|
|
3103
3553
|
// Showing warrnings if extra unknown parameters are found
|
|
3104
3554
|
const {
|
|
3105
3555
|
error: warrning,
|
|
3106
|
-
} = ContentPlatformApplicationValidator.
|
|
3107
|
-
{
|
|
3556
|
+
} = ContentPlatformApplicationValidator.getAppCustomFields().validate(
|
|
3557
|
+
{
|
|
3558
|
+
resource,
|
|
3559
|
+
},
|
|
3108
3560
|
{ abortEarly: false, allowUnknown: false }
|
|
3109
3561
|
);
|
|
3110
3562
|
if (warrning) {
|
|
3111
3563
|
Logger({
|
|
3112
3564
|
level: "WARN",
|
|
3113
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3565
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFields \n ${warrning}`,
|
|
3114
3566
|
});
|
|
3115
3567
|
}
|
|
3116
3568
|
|
|
@@ -3119,7 +3571,7 @@ class Content {
|
|
|
3119
3571
|
const response = await PlatformAPIClient.execute(
|
|
3120
3572
|
this.config,
|
|
3121
3573
|
"get",
|
|
3122
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields
|
|
3574
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}`,
|
|
3123
3575
|
query_params,
|
|
3124
3576
|
undefined,
|
|
3125
3577
|
requestHeaders,
|
|
@@ -3133,10 +3585,10 @@ class Content {
|
|
|
3133
3585
|
|
|
3134
3586
|
const {
|
|
3135
3587
|
error: res_error,
|
|
3136
|
-
} = ContentPlatformModel.
|
|
3137
|
-
|
|
3138
|
-
allowUnknown: true
|
|
3139
|
-
|
|
3588
|
+
} = ContentPlatformModel.CustomFieldsResponseSchema().validate(
|
|
3589
|
+
responseData,
|
|
3590
|
+
{ abortEarly: false, allowUnknown: true }
|
|
3591
|
+
);
|
|
3140
3592
|
|
|
3141
3593
|
if (res_error) {
|
|
3142
3594
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -3144,7 +3596,7 @@ class Content {
|
|
|
3144
3596
|
} else {
|
|
3145
3597
|
Logger({
|
|
3146
3598
|
level: "WARN",
|
|
3147
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3599
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFields \n ${res_error}`,
|
|
3148
3600
|
});
|
|
3149
3601
|
}
|
|
3150
3602
|
}
|
|
@@ -3153,7 +3605,7 @@ class Content {
|
|
|
3153
3605
|
}
|
|
3154
3606
|
|
|
3155
3607
|
/**
|
|
3156
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3608
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomFieldsByResourceIdParam} arg
|
|
3157
3609
|
* - Arg object
|
|
3158
3610
|
*
|
|
3159
3611
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -3161,20 +3613,20 @@ class Content {
|
|
|
3161
3613
|
* @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
|
|
3162
3614
|
* - Success response
|
|
3163
3615
|
*
|
|
3164
|
-
* @name
|
|
3165
|
-
* @summary: Get list of custom fields of given resource and resource
|
|
3166
|
-
* @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource
|
|
3616
|
+
* @name getAppCustomFieldsByResourceId
|
|
3617
|
+
* @summary: Get list of custom fields of given resource and resource id
|
|
3618
|
+
* @description: Retrieves a list of custom fields attached to a particular resource by using the resource and resource id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomFieldsByResourceId/).
|
|
3167
3619
|
*/
|
|
3168
|
-
async
|
|
3169
|
-
{ resource,
|
|
3620
|
+
async getAppCustomFieldsByResourceId(
|
|
3621
|
+
{ resource, resourceId, requestHeaders } = { requestHeaders: {} },
|
|
3170
3622
|
{ responseHeaders } = { responseHeaders: false }
|
|
3171
3623
|
) {
|
|
3172
3624
|
const {
|
|
3173
3625
|
error,
|
|
3174
|
-
} = ContentPlatformApplicationValidator.
|
|
3626
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceId().validate(
|
|
3175
3627
|
{
|
|
3176
3628
|
resource,
|
|
3177
|
-
|
|
3629
|
+
resourceId,
|
|
3178
3630
|
},
|
|
3179
3631
|
{ abortEarly: false, allowUnknown: true }
|
|
3180
3632
|
);
|
|
@@ -3185,17 +3637,17 @@ class Content {
|
|
|
3185
3637
|
// Showing warrnings if extra unknown parameters are found
|
|
3186
3638
|
const {
|
|
3187
3639
|
error: warrning,
|
|
3188
|
-
} = ContentPlatformApplicationValidator.
|
|
3640
|
+
} = ContentPlatformApplicationValidator.getAppCustomFieldsByResourceId().validate(
|
|
3189
3641
|
{
|
|
3190
3642
|
resource,
|
|
3191
|
-
|
|
3643
|
+
resourceId,
|
|
3192
3644
|
},
|
|
3193
3645
|
{ abortEarly: false, allowUnknown: false }
|
|
3194
3646
|
);
|
|
3195
3647
|
if (warrning) {
|
|
3196
3648
|
Logger({
|
|
3197
3649
|
level: "WARN",
|
|
3198
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3650
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomFieldsByResourceId \n ${warrning}`,
|
|
3199
3651
|
});
|
|
3200
3652
|
}
|
|
3201
3653
|
|
|
@@ -3204,7 +3656,7 @@ class Content {
|
|
|
3204
3656
|
const response = await PlatformAPIClient.execute(
|
|
3205
3657
|
this.config,
|
|
3206
3658
|
"get",
|
|
3207
|
-
`/service/platform/content/
|
|
3659
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`,
|
|
3208
3660
|
query_params,
|
|
3209
3661
|
undefined,
|
|
3210
3662
|
requestHeaders,
|
|
@@ -3229,7 +3681,7 @@ class Content {
|
|
|
3229
3681
|
} else {
|
|
3230
3682
|
Logger({
|
|
3231
3683
|
level: "WARN",
|
|
3232
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3684
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomFieldsByResourceId \n ${res_error}`,
|
|
3233
3685
|
});
|
|
3234
3686
|
}
|
|
3235
3687
|
}
|
|
@@ -3238,27 +3690,25 @@ class Content {
|
|
|
3238
3690
|
}
|
|
3239
3691
|
|
|
3240
3692
|
/**
|
|
3241
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3693
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomObjectParam} arg
|
|
3242
3694
|
* - Arg object
|
|
3243
3695
|
*
|
|
3244
3696
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3245
3697
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3246
|
-
* @returns {Promise<ContentPlatformModel.
|
|
3247
|
-
*
|
|
3248
|
-
* @name getAppCustomObjectBySlug
|
|
3698
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectByIdSchema>} - Success response
|
|
3699
|
+
* @name getAppCustomObject
|
|
3249
3700
|
* @summary: Get custom object details
|
|
3250
|
-
* @description: Details of
|
|
3701
|
+
* @description: Details of custom objects, their field details, definitions, and references can be obtained using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObject/).
|
|
3251
3702
|
*/
|
|
3252
|
-
async
|
|
3253
|
-
{
|
|
3703
|
+
async getAppCustomObject(
|
|
3704
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
3254
3705
|
{ responseHeaders } = { responseHeaders: false }
|
|
3255
3706
|
) {
|
|
3256
3707
|
const {
|
|
3257
3708
|
error,
|
|
3258
|
-
} = ContentPlatformApplicationValidator.
|
|
3709
|
+
} = ContentPlatformApplicationValidator.getAppCustomObject().validate(
|
|
3259
3710
|
{
|
|
3260
|
-
|
|
3261
|
-
slug,
|
|
3711
|
+
id,
|
|
3262
3712
|
},
|
|
3263
3713
|
{ abortEarly: false, allowUnknown: true }
|
|
3264
3714
|
);
|
|
@@ -3269,17 +3719,16 @@ class Content {
|
|
|
3269
3719
|
// Showing warrnings if extra unknown parameters are found
|
|
3270
3720
|
const {
|
|
3271
3721
|
error: warrning,
|
|
3272
|
-
} = ContentPlatformApplicationValidator.
|
|
3722
|
+
} = ContentPlatformApplicationValidator.getAppCustomObject().validate(
|
|
3273
3723
|
{
|
|
3274
|
-
|
|
3275
|
-
slug,
|
|
3724
|
+
id,
|
|
3276
3725
|
},
|
|
3277
3726
|
{ abortEarly: false, allowUnknown: false }
|
|
3278
3727
|
);
|
|
3279
3728
|
if (warrning) {
|
|
3280
3729
|
Logger({
|
|
3281
3730
|
level: "WARN",
|
|
3282
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3731
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomObject \n ${warrning}`,
|
|
3283
3732
|
});
|
|
3284
3733
|
}
|
|
3285
3734
|
|
|
@@ -3288,7 +3737,7 @@ class Content {
|
|
|
3288
3737
|
const response = await PlatformAPIClient.execute(
|
|
3289
3738
|
this.config,
|
|
3290
3739
|
"get",
|
|
3291
|
-
`/service/platform/content/
|
|
3740
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${id}`,
|
|
3292
3741
|
query_params,
|
|
3293
3742
|
undefined,
|
|
3294
3743
|
requestHeaders,
|
|
@@ -3302,7 +3751,7 @@ class Content {
|
|
|
3302
3751
|
|
|
3303
3752
|
const {
|
|
3304
3753
|
error: res_error,
|
|
3305
|
-
} = ContentPlatformModel.
|
|
3754
|
+
} = ContentPlatformModel.CustomObjectByIdSchema().validate(responseData, {
|
|
3306
3755
|
abortEarly: false,
|
|
3307
3756
|
allowUnknown: true,
|
|
3308
3757
|
});
|
|
@@ -3313,7 +3762,7 @@ class Content {
|
|
|
3313
3762
|
} else {
|
|
3314
3763
|
Logger({
|
|
3315
3764
|
level: "WARN",
|
|
3316
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3765
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomObject \n ${res_error}`,
|
|
3317
3766
|
});
|
|
3318
3767
|
}
|
|
3319
3768
|
}
|
|
@@ -3322,27 +3771,26 @@ class Content {
|
|
|
3322
3771
|
}
|
|
3323
3772
|
|
|
3324
3773
|
/**
|
|
3325
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3774
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomObjectDefinitionParam} arg
|
|
3326
3775
|
* - Arg object
|
|
3327
3776
|
*
|
|
3328
3777
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3329
3778
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3330
|
-
* @returns {Promise<ContentPlatformModel.
|
|
3331
|
-
*
|
|
3332
|
-
*
|
|
3333
|
-
* @name getAppCustomObjectDefinitionBySlug
|
|
3779
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
|
|
3780
|
+
* Success response
|
|
3781
|
+
* @name getAppCustomObjectDefinition
|
|
3334
3782
|
* @summary: Get custom object definition
|
|
3335
|
-
* @description: Custom object definitions can be fetched using their
|
|
3783
|
+
* @description: Custom object definitions can be fetched using their definition ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjectDefinition/).
|
|
3336
3784
|
*/
|
|
3337
|
-
async
|
|
3338
|
-
{
|
|
3785
|
+
async getAppCustomObjectDefinition(
|
|
3786
|
+
{ id, requestHeaders } = { requestHeaders: {} },
|
|
3339
3787
|
{ responseHeaders } = { responseHeaders: false }
|
|
3340
3788
|
) {
|
|
3341
3789
|
const {
|
|
3342
3790
|
error,
|
|
3343
|
-
} = ContentPlatformApplicationValidator.
|
|
3791
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjectDefinition().validate(
|
|
3344
3792
|
{
|
|
3345
|
-
|
|
3793
|
+
id,
|
|
3346
3794
|
},
|
|
3347
3795
|
{ abortEarly: false, allowUnknown: true }
|
|
3348
3796
|
);
|
|
@@ -3353,16 +3801,16 @@ class Content {
|
|
|
3353
3801
|
// Showing warrnings if extra unknown parameters are found
|
|
3354
3802
|
const {
|
|
3355
3803
|
error: warrning,
|
|
3356
|
-
} = ContentPlatformApplicationValidator.
|
|
3804
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjectDefinition().validate(
|
|
3357
3805
|
{
|
|
3358
|
-
|
|
3806
|
+
id,
|
|
3359
3807
|
},
|
|
3360
3808
|
{ abortEarly: false, allowUnknown: false }
|
|
3361
3809
|
);
|
|
3362
3810
|
if (warrning) {
|
|
3363
3811
|
Logger({
|
|
3364
3812
|
level: "WARN",
|
|
3365
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3813
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomObjectDefinition \n ${warrning}`,
|
|
3366
3814
|
});
|
|
3367
3815
|
}
|
|
3368
3816
|
|
|
@@ -3371,7 +3819,7 @@ class Content {
|
|
|
3371
3819
|
const response = await PlatformAPIClient.execute(
|
|
3372
3820
|
this.config,
|
|
3373
3821
|
"get",
|
|
3374
|
-
`/service/platform/content/
|
|
3822
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${id}`,
|
|
3375
3823
|
query_params,
|
|
3376
3824
|
undefined,
|
|
3377
3825
|
requestHeaders,
|
|
@@ -3385,7 +3833,7 @@ class Content {
|
|
|
3385
3833
|
|
|
3386
3834
|
const {
|
|
3387
3835
|
error: res_error,
|
|
3388
|
-
} = ContentPlatformModel.
|
|
3836
|
+
} = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
|
|
3389
3837
|
responseData,
|
|
3390
3838
|
{ abortEarly: false, allowUnknown: true }
|
|
3391
3839
|
);
|
|
@@ -3396,7 +3844,7 @@ class Content {
|
|
|
3396
3844
|
} else {
|
|
3397
3845
|
Logger({
|
|
3398
3846
|
level: "WARN",
|
|
3399
|
-
message: `Response Validation Warnings for platform > Content >
|
|
3847
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomObjectDefinition \n ${res_error}`,
|
|
3400
3848
|
});
|
|
3401
3849
|
}
|
|
3402
3850
|
}
|
|
@@ -3460,7 +3908,7 @@ class Content {
|
|
|
3460
3908
|
const response = await PlatformAPIClient.execute(
|
|
3461
3909
|
this.config,
|
|
3462
3910
|
"get",
|
|
3463
|
-
`/service/platform/content/
|
|
3911
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions`,
|
|
3464
3912
|
query_params,
|
|
3465
3913
|
undefined,
|
|
3466
3914
|
requestHeaders,
|
|
@@ -3494,29 +3942,27 @@ class Content {
|
|
|
3494
3942
|
}
|
|
3495
3943
|
|
|
3496
3944
|
/**
|
|
3497
|
-
* @param {ContentPlatformApplicationValidator.
|
|
3945
|
+
* @param {ContentPlatformApplicationValidator.GetAppCustomObjectsParam} arg
|
|
3498
3946
|
* - Arg object
|
|
3499
3947
|
*
|
|
3500
3948
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3501
3949
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3502
3950
|
* @returns {Promise<ContentPlatformModel.CustomObjectsSchema>} - Success response
|
|
3503
|
-
* @name
|
|
3951
|
+
* @name getAppCustomObjects
|
|
3504
3952
|
* @summary: Get list of custom objects
|
|
3505
|
-
* @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/
|
|
3953
|
+
* @description: Custom object entries can fetch using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getAppCustomObjects/).
|
|
3506
3954
|
*/
|
|
3507
|
-
async
|
|
3508
|
-
{ pageNo, pageSize,
|
|
3509
|
-
requestHeaders: {},
|
|
3510
|
-
},
|
|
3955
|
+
async getAppCustomObjects(
|
|
3956
|
+
{ pageNo, pageSize, definitionId, requestHeaders } = { requestHeaders: {} },
|
|
3511
3957
|
{ responseHeaders } = { responseHeaders: false }
|
|
3512
3958
|
) {
|
|
3513
3959
|
const {
|
|
3514
3960
|
error,
|
|
3515
|
-
} = ContentPlatformApplicationValidator.
|
|
3961
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjects().validate(
|
|
3516
3962
|
{
|
|
3517
3963
|
pageNo,
|
|
3518
3964
|
pageSize,
|
|
3519
|
-
|
|
3965
|
+
definitionId,
|
|
3520
3966
|
},
|
|
3521
3967
|
{ abortEarly: false, allowUnknown: true }
|
|
3522
3968
|
);
|
|
@@ -3527,29 +3973,30 @@ class Content {
|
|
|
3527
3973
|
// Showing warrnings if extra unknown parameters are found
|
|
3528
3974
|
const {
|
|
3529
3975
|
error: warrning,
|
|
3530
|
-
} = ContentPlatformApplicationValidator.
|
|
3976
|
+
} = ContentPlatformApplicationValidator.getAppCustomObjects().validate(
|
|
3531
3977
|
{
|
|
3532
3978
|
pageNo,
|
|
3533
3979
|
pageSize,
|
|
3534
|
-
|
|
3980
|
+
definitionId,
|
|
3535
3981
|
},
|
|
3536
3982
|
{ abortEarly: false, allowUnknown: false }
|
|
3537
3983
|
);
|
|
3538
3984
|
if (warrning) {
|
|
3539
3985
|
Logger({
|
|
3540
3986
|
level: "WARN",
|
|
3541
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
3987
|
+
message: `Parameter Validation warrnings for platform > Content > getAppCustomObjects \n ${warrning}`,
|
|
3542
3988
|
});
|
|
3543
3989
|
}
|
|
3544
3990
|
|
|
3545
3991
|
const query_params = {};
|
|
3992
|
+
query_params["definition_id"] = definitionId;
|
|
3546
3993
|
query_params["page_no"] = pageNo;
|
|
3547
3994
|
query_params["page_size"] = pageSize;
|
|
3548
3995
|
|
|
3549
3996
|
const response = await PlatformAPIClient.execute(
|
|
3550
3997
|
this.config,
|
|
3551
3998
|
"get",
|
|
3552
|
-
`/service/platform/content/
|
|
3999
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects`,
|
|
3553
4000
|
query_params,
|
|
3554
4001
|
undefined,
|
|
3555
4002
|
requestHeaders,
|
|
@@ -3574,7 +4021,7 @@ class Content {
|
|
|
3574
4021
|
} else {
|
|
3575
4022
|
Logger({
|
|
3576
4023
|
level: "WARN",
|
|
3577
|
-
message: `Response Validation Warnings for platform > Content >
|
|
4024
|
+
message: `Response Validation Warnings for platform > Content > getAppCustomObjects \n ${res_error}`,
|
|
3578
4025
|
});
|
|
3579
4026
|
}
|
|
3580
4027
|
}
|
|
@@ -3747,7 +4194,7 @@ class Content {
|
|
|
3747
4194
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3748
4195
|
* @returns {Promise<ContentPlatformModel.BlogSchema>} - Success response
|
|
3749
4196
|
* @name getBlogBySlug
|
|
3750
|
-
* @summary: Get blog by slug
|
|
4197
|
+
* @summary: Get blog by slug.
|
|
3751
4198
|
* @description: Retrieve detailed information about a specific blog using its slug. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogBySlug/).
|
|
3752
4199
|
*/
|
|
3753
4200
|
async getBlogBySlug(
|
|
@@ -3824,7 +4271,7 @@ class Content {
|
|
|
3824
4271
|
* @param {ContentPlatformApplicationValidator.GetBlogsParam} arg - Arg object
|
|
3825
4272
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
3826
4273
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
3827
|
-
* @returns {Promise<ContentPlatformModel.
|
|
4274
|
+
* @returns {Promise<ContentPlatformModel.BlogGetResponse>} - Success response
|
|
3828
4275
|
* @name getBlogs
|
|
3829
4276
|
* @summary: List blogs
|
|
3830
4277
|
* @description: List all blogs - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getBlogs/).
|
|
@@ -3885,7 +4332,7 @@ class Content {
|
|
|
3885
4332
|
const response = await PlatformAPIClient.execute(
|
|
3886
4333
|
this.config,
|
|
3887
4334
|
"get",
|
|
3888
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs
|
|
4335
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs`,
|
|
3889
4336
|
query_params,
|
|
3890
4337
|
undefined,
|
|
3891
4338
|
requestHeaders,
|
|
@@ -3899,7 +4346,7 @@ class Content {
|
|
|
3899
4346
|
|
|
3900
4347
|
const {
|
|
3901
4348
|
error: res_error,
|
|
3902
|
-
} = ContentPlatformModel.
|
|
4349
|
+
} = ContentPlatformModel.BlogGetResponse().validate(responseData, {
|
|
3903
4350
|
abortEarly: false,
|
|
3904
4351
|
allowUnknown: true,
|
|
3905
4352
|
});
|
|
@@ -3918,6 +4365,168 @@ class Content {
|
|
|
3918
4365
|
return response;
|
|
3919
4366
|
}
|
|
3920
4367
|
|
|
4368
|
+
/**
|
|
4369
|
+
* @param {ContentPlatformApplicationValidator.GetComponentByIdParam} arg - Arg object
|
|
4370
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4371
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4372
|
+
* @returns {Promise<ContentPlatformModel.BlogSchema>} - Success response
|
|
4373
|
+
* @name getComponentById
|
|
4374
|
+
* @summary: Get component
|
|
4375
|
+
* @description: Retrieve detailed information about a specific component. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getComponentById/).
|
|
4376
|
+
*/
|
|
4377
|
+
async getComponentById(
|
|
4378
|
+
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
4379
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4380
|
+
) {
|
|
4381
|
+
const {
|
|
4382
|
+
error,
|
|
4383
|
+
} = ContentPlatformApplicationValidator.getComponentById().validate(
|
|
4384
|
+
{
|
|
4385
|
+
slug,
|
|
4386
|
+
},
|
|
4387
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4388
|
+
);
|
|
4389
|
+
if (error) {
|
|
4390
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4391
|
+
}
|
|
4392
|
+
|
|
4393
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4394
|
+
const {
|
|
4395
|
+
error: warrning,
|
|
4396
|
+
} = ContentPlatformApplicationValidator.getComponentById().validate(
|
|
4397
|
+
{
|
|
4398
|
+
slug,
|
|
4399
|
+
},
|
|
4400
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4401
|
+
);
|
|
4402
|
+
if (warrning) {
|
|
4403
|
+
Logger({
|
|
4404
|
+
level: "WARN",
|
|
4405
|
+
message: `Parameter Validation warrnings for platform > Content > getComponentById \n ${warrning}`,
|
|
4406
|
+
});
|
|
4407
|
+
}
|
|
4408
|
+
|
|
4409
|
+
const query_params = {};
|
|
4410
|
+
|
|
4411
|
+
const response = await PlatformAPIClient.execute(
|
|
4412
|
+
this.config,
|
|
4413
|
+
"get",
|
|
4414
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/blogs/${slug}`,
|
|
4415
|
+
query_params,
|
|
4416
|
+
undefined,
|
|
4417
|
+
requestHeaders,
|
|
4418
|
+
{ responseHeaders }
|
|
4419
|
+
);
|
|
4420
|
+
|
|
4421
|
+
let responseData = response;
|
|
4422
|
+
if (responseHeaders) {
|
|
4423
|
+
responseData = response[0];
|
|
4424
|
+
}
|
|
4425
|
+
|
|
4426
|
+
const {
|
|
4427
|
+
error: res_error,
|
|
4428
|
+
} = ContentPlatformModel.BlogSchema().validate(responseData, {
|
|
4429
|
+
abortEarly: false,
|
|
4430
|
+
allowUnknown: true,
|
|
4431
|
+
});
|
|
4432
|
+
|
|
4433
|
+
if (res_error) {
|
|
4434
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4435
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4436
|
+
} else {
|
|
4437
|
+
Logger({
|
|
4438
|
+
level: "WARN",
|
|
4439
|
+
message: `Response Validation Warnings for platform > Content > getComponentById \n ${res_error}`,
|
|
4440
|
+
});
|
|
4441
|
+
}
|
|
4442
|
+
}
|
|
4443
|
+
|
|
4444
|
+
return response;
|
|
4445
|
+
}
|
|
4446
|
+
|
|
4447
|
+
/**
|
|
4448
|
+
* @param {ContentPlatformApplicationValidator.GetDataLoaderApiSpecsParam} arg
|
|
4449
|
+
* - Arg object
|
|
4450
|
+
*
|
|
4451
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4452
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4453
|
+
* @returns {Promise<ContentPlatformModel.DataLoadersApiSpecSchema>} -
|
|
4454
|
+
* Success response
|
|
4455
|
+
* @name getDataLoaderApiSpecs
|
|
4456
|
+
* @summary: Get data loaders api specs.
|
|
4457
|
+
* @description: Retrieve a list of data loaders api specs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getDataLoaderApiSpecs/).
|
|
4458
|
+
*/
|
|
4459
|
+
async getDataLoaderApiSpecs(
|
|
4460
|
+
{ dataLoader, requestHeaders } = { requestHeaders: {} },
|
|
4461
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
4462
|
+
) {
|
|
4463
|
+
const {
|
|
4464
|
+
error,
|
|
4465
|
+
} = ContentPlatformApplicationValidator.getDataLoaderApiSpecs().validate(
|
|
4466
|
+
{
|
|
4467
|
+
dataLoader,
|
|
4468
|
+
},
|
|
4469
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4470
|
+
);
|
|
4471
|
+
if (error) {
|
|
4472
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
4473
|
+
}
|
|
4474
|
+
|
|
4475
|
+
// Showing warrnings if extra unknown parameters are found
|
|
4476
|
+
const {
|
|
4477
|
+
error: warrning,
|
|
4478
|
+
} = ContentPlatformApplicationValidator.getDataLoaderApiSpecs().validate(
|
|
4479
|
+
{
|
|
4480
|
+
dataLoader,
|
|
4481
|
+
},
|
|
4482
|
+
{ abortEarly: false, allowUnknown: false }
|
|
4483
|
+
);
|
|
4484
|
+
if (warrning) {
|
|
4485
|
+
Logger({
|
|
4486
|
+
level: "WARN",
|
|
4487
|
+
message: `Parameter Validation warrnings for platform > Content > getDataLoaderApiSpecs \n ${warrning}`,
|
|
4488
|
+
});
|
|
4489
|
+
}
|
|
4490
|
+
|
|
4491
|
+
const query_params = {};
|
|
4492
|
+
query_params["data_loader"] = dataLoader;
|
|
4493
|
+
|
|
4494
|
+
const response = await PlatformAPIClient.execute(
|
|
4495
|
+
this.config,
|
|
4496
|
+
"get",
|
|
4497
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/data-loader/api-spec`,
|
|
4498
|
+
query_params,
|
|
4499
|
+
undefined,
|
|
4500
|
+
requestHeaders,
|
|
4501
|
+
{ responseHeaders }
|
|
4502
|
+
);
|
|
4503
|
+
|
|
4504
|
+
let responseData = response;
|
|
4505
|
+
if (responseHeaders) {
|
|
4506
|
+
responseData = response[0];
|
|
4507
|
+
}
|
|
4508
|
+
|
|
4509
|
+
const {
|
|
4510
|
+
error: res_error,
|
|
4511
|
+
} = ContentPlatformModel.DataLoadersApiSpecSchema().validate(responseData, {
|
|
4512
|
+
abortEarly: false,
|
|
4513
|
+
allowUnknown: true,
|
|
4514
|
+
});
|
|
4515
|
+
|
|
4516
|
+
if (res_error) {
|
|
4517
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
4518
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
4519
|
+
} else {
|
|
4520
|
+
Logger({
|
|
4521
|
+
level: "WARN",
|
|
4522
|
+
message: `Response Validation Warnings for platform > Content > getDataLoaderApiSpecs \n ${res_error}`,
|
|
4523
|
+
});
|
|
4524
|
+
}
|
|
4525
|
+
}
|
|
4526
|
+
|
|
4527
|
+
return response;
|
|
4528
|
+
}
|
|
4529
|
+
|
|
3921
4530
|
/**
|
|
3922
4531
|
* @param {ContentPlatformApplicationValidator.GetDataLoadersParam} arg - Arg object
|
|
3923
4532
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -3999,7 +4608,7 @@ class Content {
|
|
|
3999
4608
|
*
|
|
4000
4609
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4001
4610
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4002
|
-
* @returns {Promise<ContentPlatformModel.
|
|
4611
|
+
* @returns {Promise<ContentPlatformModel.DataLoaderItemsResponseSchema>} -
|
|
4003
4612
|
* Success response
|
|
4004
4613
|
* @name getDataLoadersByService
|
|
4005
4614
|
* @summary: List all data loaders
|
|
@@ -4056,10 +4665,10 @@ class Content {
|
|
|
4056
4665
|
|
|
4057
4666
|
const {
|
|
4058
4667
|
error: res_error,
|
|
4059
|
-
} = ContentPlatformModel.
|
|
4060
|
-
|
|
4061
|
-
allowUnknown: true
|
|
4062
|
-
|
|
4668
|
+
} = ContentPlatformModel.DataLoaderItemsResponseSchema().validate(
|
|
4669
|
+
responseData,
|
|
4670
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4671
|
+
);
|
|
4063
4672
|
|
|
4064
4673
|
if (res_error) {
|
|
4065
4674
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4081,7 +4690,7 @@ class Content {
|
|
|
4081
4690
|
*
|
|
4082
4691
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4083
4692
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4084
|
-
* @returns {Promise<ContentPlatformModel.
|
|
4693
|
+
* @returns {Promise<ContentPlatformModel.DefaultNavigationResponse>} -
|
|
4085
4694
|
* Success response
|
|
4086
4695
|
* @name getDefaultNavigations
|
|
4087
4696
|
* @summary: Get default navigations
|
|
@@ -4134,10 +4743,10 @@ class Content {
|
|
|
4134
4743
|
|
|
4135
4744
|
const {
|
|
4136
4745
|
error: res_error,
|
|
4137
|
-
} = ContentPlatformModel.
|
|
4138
|
-
|
|
4139
|
-
allowUnknown: true
|
|
4140
|
-
|
|
4746
|
+
} = ContentPlatformModel.DefaultNavigationResponse().validate(
|
|
4747
|
+
responseData,
|
|
4748
|
+
{ abortEarly: false, allowUnknown: true }
|
|
4749
|
+
);
|
|
4141
4750
|
|
|
4142
4751
|
if (res_error) {
|
|
4143
4752
|
if (this.config.options.strictResponseCheck === true) {
|
|
@@ -4560,19 +5169,17 @@ class Content {
|
|
|
4560
5169
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4561
5170
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
4562
5171
|
* @name getInjectableTags
|
|
4563
|
-
* @summary: Get all
|
|
4564
|
-
* @description:
|
|
5172
|
+
* @summary: Get all the tags in an application
|
|
5173
|
+
* @description: Use this API to retrieve all HTML Tags - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getInjectableTags/).
|
|
4565
5174
|
*/
|
|
4566
5175
|
async getInjectableTags(
|
|
4567
|
-
{
|
|
5176
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
4568
5177
|
{ responseHeaders } = { responseHeaders: false }
|
|
4569
5178
|
) {
|
|
4570
5179
|
const {
|
|
4571
5180
|
error,
|
|
4572
5181
|
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
|
|
4573
|
-
{
|
|
4574
|
-
all,
|
|
4575
|
-
},
|
|
5182
|
+
{},
|
|
4576
5183
|
{ abortEarly: false, allowUnknown: true }
|
|
4577
5184
|
);
|
|
4578
5185
|
if (error) {
|
|
@@ -4583,9 +5190,7 @@ class Content {
|
|
|
4583
5190
|
const {
|
|
4584
5191
|
error: warrning,
|
|
4585
5192
|
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
|
|
4586
|
-
{
|
|
4587
|
-
all,
|
|
4588
|
-
},
|
|
5193
|
+
{},
|
|
4589
5194
|
{ abortEarly: false, allowUnknown: false }
|
|
4590
5195
|
);
|
|
4591
5196
|
if (warrning) {
|
|
@@ -4596,7 +5201,6 @@ class Content {
|
|
|
4596
5201
|
}
|
|
4597
5202
|
|
|
4598
5203
|
const query_params = {};
|
|
4599
|
-
query_params["all"] = all;
|
|
4600
5204
|
|
|
4601
5205
|
const response = await PlatformAPIClient.execute(
|
|
4602
5206
|
this.config,
|
|
@@ -4638,7 +5242,7 @@ class Content {
|
|
|
4638
5242
|
* @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object
|
|
4639
5243
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4640
5244
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4641
|
-
* @returns {Promise<ContentPlatformModel.
|
|
5245
|
+
* @returns {Promise<ContentPlatformModel.LandingPageGetResponse>} - Success response
|
|
4642
5246
|
* @name getLandingPages
|
|
4643
5247
|
* @summary: Get landing pages
|
|
4644
5248
|
* @description: Lists a list landing pages as per device types - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getLandingPages/).
|
|
@@ -4684,7 +5288,7 @@ class Content {
|
|
|
4684
5288
|
const response = await PlatformAPIClient.execute(
|
|
4685
5289
|
this.config,
|
|
4686
5290
|
"get",
|
|
4687
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page
|
|
5291
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/landing-page`,
|
|
4688
5292
|
query_params,
|
|
4689
5293
|
undefined,
|
|
4690
5294
|
requestHeaders,
|
|
@@ -4698,7 +5302,7 @@ class Content {
|
|
|
4698
5302
|
|
|
4699
5303
|
const {
|
|
4700
5304
|
error: res_error,
|
|
4701
|
-
} = ContentPlatformModel.
|
|
5305
|
+
} = ContentPlatformModel.LandingPageGetResponse().validate(responseData, {
|
|
4702
5306
|
abortEarly: false,
|
|
4703
5307
|
allowUnknown: true,
|
|
4704
5308
|
});
|
|
@@ -4882,7 +5486,7 @@ class Content {
|
|
|
4882
5486
|
* @param {ContentPlatformApplicationValidator.GetNavigationsParam} arg - Arg object
|
|
4883
5487
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
4884
5488
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4885
|
-
* @returns {Promise<ContentPlatformModel.
|
|
5489
|
+
* @returns {Promise<ContentPlatformModel.NavigationGetResponse>} - Success response
|
|
4886
5490
|
* @name getNavigations
|
|
4887
5491
|
* @summary: Get navigation items
|
|
4888
5492
|
* @description: Retrieve a list of navigational elements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getNavigations/).
|
|
@@ -4933,7 +5537,7 @@ class Content {
|
|
|
4933
5537
|
const response = await PlatformAPIClient.execute(
|
|
4934
5538
|
this.config,
|
|
4935
5539
|
"get",
|
|
4936
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations
|
|
5540
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/navigations`,
|
|
4937
5541
|
query_params,
|
|
4938
5542
|
undefined,
|
|
4939
5543
|
requestHeaders,
|
|
@@ -4947,7 +5551,7 @@ class Content {
|
|
|
4947
5551
|
|
|
4948
5552
|
const {
|
|
4949
5553
|
error: res_error,
|
|
4950
|
-
} = ContentPlatformModel.
|
|
5554
|
+
} = ContentPlatformModel.NavigationGetResponse().validate(responseData, {
|
|
4951
5555
|
abortEarly: false,
|
|
4952
5556
|
allowUnknown: true,
|
|
4953
5557
|
});
|
|
@@ -4973,7 +5577,7 @@ class Content {
|
|
|
4973
5577
|
* @returns {Promise<ContentPlatformModel.PageSchema>} - Success response
|
|
4974
5578
|
* @name getPageBySlug
|
|
4975
5579
|
* @summary: Get page by slug
|
|
4976
|
-
* @description: Get detailed information about a specific page using its slug
|
|
5580
|
+
* @description: Get detailed information about a specific page using its slug - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPageBySlug/).
|
|
4977
5581
|
*/
|
|
4978
5582
|
async getPageBySlug(
|
|
4979
5583
|
{ slug, requestHeaders } = { requestHeaders: {} },
|
|
@@ -5199,9 +5803,9 @@ class Content {
|
|
|
5199
5803
|
* @param {ContentPlatformApplicationValidator.GetPagesParam} arg - Arg object
|
|
5200
5804
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5201
5805
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5202
|
-
* @returns {Promise<ContentPlatformModel.
|
|
5806
|
+
* @returns {Promise<ContentPlatformModel.PageGetResponse>} - Success response
|
|
5203
5807
|
* @name getPages
|
|
5204
|
-
* @summary: Get pages
|
|
5808
|
+
* @summary: Get pages.
|
|
5205
5809
|
* @description: Retrieve a list of available pages. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPages/).
|
|
5206
5810
|
*/
|
|
5207
5811
|
async getPages(
|
|
@@ -5243,7 +5847,7 @@ class Content {
|
|
|
5243
5847
|
const response = await PlatformAPIClient.execute(
|
|
5244
5848
|
this.config,
|
|
5245
5849
|
"get",
|
|
5246
|
-
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/pages
|
|
5850
|
+
`/service/platform/content/v2.0/company/${this.config.companyId}/application/${this.applicationId}/pages`,
|
|
5247
5851
|
query_params,
|
|
5248
5852
|
undefined,
|
|
5249
5853
|
requestHeaders,
|
|
@@ -5257,7 +5861,7 @@ class Content {
|
|
|
5257
5861
|
|
|
5258
5862
|
const {
|
|
5259
5863
|
error: res_error,
|
|
5260
|
-
} = ContentPlatformModel.
|
|
5864
|
+
} = ContentPlatformModel.PageGetResponse().validate(responseData, {
|
|
5261
5865
|
abortEarly: false,
|
|
5262
5866
|
allowUnknown: true,
|
|
5263
5867
|
});
|
|
@@ -5276,13 +5880,47 @@ class Content {
|
|
|
5276
5880
|
return response;
|
|
5277
5881
|
}
|
|
5278
5882
|
|
|
5883
|
+
/**
|
|
5884
|
+
* @param {Object} arg - Arg object.
|
|
5885
|
+
* @param {string} arg.companyId - Numeric ID allotted to a business account
|
|
5886
|
+
* on Fynd Platform
|
|
5887
|
+
* @param {string} arg.applicationId - Numeric ID allotted to an application
|
|
5888
|
+
* created within a business account.
|
|
5889
|
+
* @param {number} [arg.pageSize] - The number of items to retrieve in each
|
|
5890
|
+
* page. Default value is 10.
|
|
5891
|
+
* @returns {Paginator<ContentPlatformModel.PageGetResponse>}
|
|
5892
|
+
* @summary: Get pages.
|
|
5893
|
+
* @description: Retrieve a list of available pages.
|
|
5894
|
+
*/
|
|
5895
|
+
getPagesPaginator({ companyId, applicationId, pageSize } = {}) {
|
|
5896
|
+
const paginator = new Paginator();
|
|
5897
|
+
const callback = async () => {
|
|
5898
|
+
const pageId = paginator.nextId;
|
|
5899
|
+
const pageNo = paginator.pageNo;
|
|
5900
|
+
const pageType = "number";
|
|
5901
|
+
const data = await this.getPages({
|
|
5902
|
+
companyId: companyId,
|
|
5903
|
+
applicationId: applicationId,
|
|
5904
|
+
pageNo: pageNo,
|
|
5905
|
+
pageSize: pageSize,
|
|
5906
|
+
});
|
|
5907
|
+
paginator.setPaginator({
|
|
5908
|
+
hasNext: data.page.has_next ? true : false,
|
|
5909
|
+
nextId: data.page.next_id,
|
|
5910
|
+
});
|
|
5911
|
+
return data;
|
|
5912
|
+
};
|
|
5913
|
+
paginator.setCallback(callback.bind(this));
|
|
5914
|
+
return paginator;
|
|
5915
|
+
}
|
|
5916
|
+
|
|
5279
5917
|
/**
|
|
5280
5918
|
* @param {ContentPlatformApplicationValidator.GetPathRedirectionRuleParam} arg
|
|
5281
5919
|
* - Arg object
|
|
5282
5920
|
*
|
|
5283
5921
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5284
5922
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5285
|
-
* @returns {Promise<ContentPlatformModel.
|
|
5923
|
+
* @returns {Promise<ContentPlatformModel.DeletPathMappingSchema>} - Success response
|
|
5286
5924
|
* @name getPathRedirectionRule
|
|
5287
5925
|
* @summary: Get Path Redirection Rule
|
|
5288
5926
|
* @description: Use this API to Get detailed information about a specific path redirection rule - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPathRedirectionRule/).
|
|
@@ -5338,7 +5976,7 @@ class Content {
|
|
|
5338
5976
|
|
|
5339
5977
|
const {
|
|
5340
5978
|
error: res_error,
|
|
5341
|
-
} = ContentPlatformModel.
|
|
5979
|
+
} = ContentPlatformModel.DeletPathMappingSchema().validate(responseData, {
|
|
5342
5980
|
abortEarly: false,
|
|
5343
5981
|
allowUnknown: true,
|
|
5344
5982
|
});
|
|
@@ -5363,7 +6001,7 @@ class Content {
|
|
|
5363
6001
|
*
|
|
5364
6002
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5365
6003
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5366
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6004
|
+
* @returns {Promise<ContentPlatformModel.GetAllPathMappingSchema>} - Success response
|
|
5367
6005
|
* @name getPathRedirectionRules
|
|
5368
6006
|
* @summary: List Path Redirection Rules
|
|
5369
6007
|
* @description: Use this API to List Path Redirection Rules - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getPathRedirectionRules/).
|
|
@@ -5423,7 +6061,7 @@ class Content {
|
|
|
5423
6061
|
|
|
5424
6062
|
const {
|
|
5425
6063
|
error: res_error,
|
|
5426
|
-
} = ContentPlatformModel.
|
|
6064
|
+
} = ContentPlatformModel.GetAllPathMappingSchema().validate(responseData, {
|
|
5427
6065
|
abortEarly: false,
|
|
5428
6066
|
allowUnknown: true,
|
|
5429
6067
|
});
|
|
@@ -5531,14 +6169,14 @@ class Content {
|
|
|
5531
6169
|
* @description: Use this API to Get SEO Markup Schema - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getSEOMarkupSchema/).
|
|
5532
6170
|
*/
|
|
5533
6171
|
async getSEOMarkupSchema(
|
|
5534
|
-
{
|
|
6172
|
+
{ schemaId, requestHeaders } = { requestHeaders: {} },
|
|
5535
6173
|
{ responseHeaders } = { responseHeaders: false }
|
|
5536
6174
|
) {
|
|
5537
6175
|
const {
|
|
5538
6176
|
error,
|
|
5539
6177
|
} = ContentPlatformApplicationValidator.getSEOMarkupSchema().validate(
|
|
5540
6178
|
{
|
|
5541
|
-
|
|
6179
|
+
schemaId,
|
|
5542
6180
|
},
|
|
5543
6181
|
{ abortEarly: false, allowUnknown: true }
|
|
5544
6182
|
);
|
|
@@ -5551,7 +6189,7 @@ class Content {
|
|
|
5551
6189
|
error: warrning,
|
|
5552
6190
|
} = ContentPlatformApplicationValidator.getSEOMarkupSchema().validate(
|
|
5553
6191
|
{
|
|
5554
|
-
|
|
6192
|
+
schemaId,
|
|
5555
6193
|
},
|
|
5556
6194
|
{ abortEarly: false, allowUnknown: false }
|
|
5557
6195
|
);
|
|
@@ -5567,7 +6205,7 @@ class Content {
|
|
|
5567
6205
|
const response = await PlatformAPIClient.execute(
|
|
5568
6206
|
this.config,
|
|
5569
6207
|
"get",
|
|
5570
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema/${
|
|
6208
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/seo/schema/${schemaId}`,
|
|
5571
6209
|
query_params,
|
|
5572
6210
|
undefined,
|
|
5573
6211
|
requestHeaders,
|
|
@@ -5771,27 +6409,27 @@ class Content {
|
|
|
5771
6409
|
}
|
|
5772
6410
|
|
|
5773
6411
|
/**
|
|
5774
|
-
* @param {ContentPlatformApplicationValidator.
|
|
6412
|
+
* @param {ContentPlatformApplicationValidator.ImportAppCustomObjectEntriesParam} arg
|
|
5775
6413
|
* - Arg object
|
|
5776
6414
|
*
|
|
5777
6415
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5778
6416
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5779
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6417
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectEntryBulkUploadResponse>}
|
|
5780
6418
|
* - Success response
|
|
5781
6419
|
*
|
|
5782
|
-
* @name
|
|
6420
|
+
* @name importAppCustomObjectEntries
|
|
5783
6421
|
* @summary: Bulk custom object entries upload
|
|
5784
|
-
* @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/
|
|
6422
|
+
* @description: Custom object bulk import of bulk entries can be performed using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/importAppCustomObjectEntries/).
|
|
5785
6423
|
*/
|
|
5786
|
-
async
|
|
5787
|
-
{
|
|
6424
|
+
async importAppCustomObjectEntries(
|
|
6425
|
+
{ definitionId, body, requestHeaders } = { requestHeaders: {} },
|
|
5788
6426
|
{ responseHeaders } = { responseHeaders: false }
|
|
5789
6427
|
) {
|
|
5790
6428
|
const {
|
|
5791
6429
|
error,
|
|
5792
|
-
} = ContentPlatformApplicationValidator.
|
|
6430
|
+
} = ContentPlatformApplicationValidator.importAppCustomObjectEntries().validate(
|
|
5793
6431
|
{
|
|
5794
|
-
|
|
6432
|
+
definitionId,
|
|
5795
6433
|
body,
|
|
5796
6434
|
},
|
|
5797
6435
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -5803,9 +6441,9 @@ class Content {
|
|
|
5803
6441
|
// Showing warrnings if extra unknown parameters are found
|
|
5804
6442
|
const {
|
|
5805
6443
|
error: warrning,
|
|
5806
|
-
} = ContentPlatformApplicationValidator.
|
|
6444
|
+
} = ContentPlatformApplicationValidator.importAppCustomObjectEntries().validate(
|
|
5807
6445
|
{
|
|
5808
|
-
|
|
6446
|
+
definitionId,
|
|
5809
6447
|
body,
|
|
5810
6448
|
},
|
|
5811
6449
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -5813,7 +6451,7 @@ class Content {
|
|
|
5813
6451
|
if (warrning) {
|
|
5814
6452
|
Logger({
|
|
5815
6453
|
level: "WARN",
|
|
5816
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
6454
|
+
message: `Parameter Validation warrnings for platform > Content > importAppCustomObjectEntries \n ${warrning}`,
|
|
5817
6455
|
});
|
|
5818
6456
|
}
|
|
5819
6457
|
|
|
@@ -5822,7 +6460,7 @@ class Content {
|
|
|
5822
6460
|
const response = await PlatformAPIClient.execute(
|
|
5823
6461
|
this.config,
|
|
5824
6462
|
"post",
|
|
5825
|
-
`/service/platform/content/
|
|
6463
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/upload`,
|
|
5826
6464
|
query_params,
|
|
5827
6465
|
body,
|
|
5828
6466
|
requestHeaders,
|
|
@@ -5836,7 +6474,7 @@ class Content {
|
|
|
5836
6474
|
|
|
5837
6475
|
const {
|
|
5838
6476
|
error: res_error,
|
|
5839
|
-
} = ContentPlatformModel.
|
|
6477
|
+
} = ContentPlatformModel.CustomObjectEntryBulkUploadResponse().validate(
|
|
5840
6478
|
responseData,
|
|
5841
6479
|
{ abortEarly: false, allowUnknown: true }
|
|
5842
6480
|
);
|
|
@@ -5847,7 +6485,7 @@ class Content {
|
|
|
5847
6485
|
} else {
|
|
5848
6486
|
Logger({
|
|
5849
6487
|
level: "WARN",
|
|
5850
|
-
message: `Response Validation Warnings for platform > Content >
|
|
6488
|
+
message: `Response Validation Warnings for platform > Content > importAppCustomObjectEntries \n ${res_error}`,
|
|
5851
6489
|
});
|
|
5852
6490
|
}
|
|
5853
6491
|
}
|
|
@@ -5861,7 +6499,8 @@ class Content {
|
|
|
5861
6499
|
*
|
|
5862
6500
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
5863
6501
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
5864
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6502
|
+
* @returns {Promise<ContentPlatformModel.TagDeleteSuccessResponse>} -
|
|
6503
|
+
* Success response
|
|
5865
6504
|
* @name removeInjectableTag
|
|
5866
6505
|
* @summary: Remove HTML tag
|
|
5867
6506
|
* @description: Delete a specific injectable tag. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/removeInjectableTag/).
|
|
@@ -5917,7 +6556,7 @@ class Content {
|
|
|
5917
6556
|
|
|
5918
6557
|
const {
|
|
5919
6558
|
error: res_error,
|
|
5920
|
-
} = ContentPlatformModel.
|
|
6559
|
+
} = ContentPlatformModel.TagDeleteSuccessResponse().validate(responseData, {
|
|
5921
6560
|
abortEarly: false,
|
|
5922
6561
|
allowUnknown: true,
|
|
5923
6562
|
});
|
|
@@ -6019,25 +6658,25 @@ class Content {
|
|
|
6019
6658
|
}
|
|
6020
6659
|
|
|
6021
6660
|
/**
|
|
6022
|
-
* @param {ContentPlatformApplicationValidator.
|
|
6661
|
+
* @param {ContentPlatformApplicationValidator.SampleAppCustomObjectBulkEntryParam} arg
|
|
6023
6662
|
* - Arg object
|
|
6024
6663
|
*
|
|
6025
6664
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6026
6665
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6027
6666
|
* @returns {Promise<string>} - Success response
|
|
6028
|
-
* @name
|
|
6667
|
+
* @name sampleAppCustomObjectBulkEntry
|
|
6029
6668
|
* @summary: Download sample for custom object bulk entry
|
|
6030
|
-
* @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/
|
|
6669
|
+
* @description: Sample files for custom object bulk import can be obtained from this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/sampleAppCustomObjectBulkEntry/).
|
|
6031
6670
|
*/
|
|
6032
|
-
async
|
|
6033
|
-
{
|
|
6671
|
+
async sampleAppCustomObjectBulkEntry(
|
|
6672
|
+
{ definitionId, requestHeaders } = { requestHeaders: {} },
|
|
6034
6673
|
{ responseHeaders } = { responseHeaders: false }
|
|
6035
6674
|
) {
|
|
6036
6675
|
const {
|
|
6037
6676
|
error,
|
|
6038
|
-
} = ContentPlatformApplicationValidator.
|
|
6677
|
+
} = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntry().validate(
|
|
6039
6678
|
{
|
|
6040
|
-
|
|
6679
|
+
definitionId,
|
|
6041
6680
|
},
|
|
6042
6681
|
{ abortEarly: false, allowUnknown: true }
|
|
6043
6682
|
);
|
|
@@ -6048,16 +6687,16 @@ class Content {
|
|
|
6048
6687
|
// Showing warrnings if extra unknown parameters are found
|
|
6049
6688
|
const {
|
|
6050
6689
|
error: warrning,
|
|
6051
|
-
} = ContentPlatformApplicationValidator.
|
|
6690
|
+
} = ContentPlatformApplicationValidator.sampleAppCustomObjectBulkEntry().validate(
|
|
6052
6691
|
{
|
|
6053
|
-
|
|
6692
|
+
definitionId,
|
|
6054
6693
|
},
|
|
6055
6694
|
{ abortEarly: false, allowUnknown: false }
|
|
6056
6695
|
);
|
|
6057
6696
|
if (warrning) {
|
|
6058
6697
|
Logger({
|
|
6059
6698
|
level: "WARN",
|
|
6060
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
6699
|
+
message: `Parameter Validation warrnings for platform > Content > sampleAppCustomObjectBulkEntry \n ${warrning}`,
|
|
6061
6700
|
});
|
|
6062
6701
|
}
|
|
6063
6702
|
|
|
@@ -6066,7 +6705,7 @@ class Content {
|
|
|
6066
6705
|
const response = await PlatformAPIClient.execute(
|
|
6067
6706
|
this.config,
|
|
6068
6707
|
"get",
|
|
6069
|
-
`/service/platform/content/
|
|
6708
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/bulk/${definitionId}/sample`,
|
|
6070
6709
|
query_params,
|
|
6071
6710
|
undefined,
|
|
6072
6711
|
requestHeaders,
|
|
@@ -6088,7 +6727,7 @@ class Content {
|
|
|
6088
6727
|
} else {
|
|
6089
6728
|
Logger({
|
|
6090
6729
|
level: "WARN",
|
|
6091
|
-
message: `Response Validation Warnings for platform > Content >
|
|
6730
|
+
message: `Response Validation Warnings for platform > Content > sampleAppCustomObjectBulkEntry \n ${res_error}`,
|
|
6092
6731
|
});
|
|
6093
6732
|
}
|
|
6094
6733
|
}
|
|
@@ -6345,7 +6984,7 @@ class Content {
|
|
|
6345
6984
|
}
|
|
6346
6985
|
|
|
6347
6986
|
/**
|
|
6348
|
-
* @param {ContentPlatformApplicationValidator.
|
|
6987
|
+
* @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldByResourceIdParam} arg
|
|
6349
6988
|
* - Arg object
|
|
6350
6989
|
*
|
|
6351
6990
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -6353,20 +6992,20 @@ class Content {
|
|
|
6353
6992
|
* @returns {Promise<ContentPlatformModel.CustomFieldsResponseByResourceIdSchema>}
|
|
6354
6993
|
* - Success response
|
|
6355
6994
|
*
|
|
6356
|
-
* @name
|
|
6357
|
-
* @summary: Create custom field entries for gives resource and
|
|
6358
|
-
* @description:
|
|
6995
|
+
* @name updateAppCustomFieldByResourceId
|
|
6996
|
+
* @summary: Create custom field entries for gives resource and resource_id
|
|
6997
|
+
* @description: Use this API to create the custom field entry for given resource and resource_id in param. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldByResourceId/).
|
|
6359
6998
|
*/
|
|
6360
|
-
async
|
|
6361
|
-
{ resource,
|
|
6999
|
+
async updateAppCustomFieldByResourceId(
|
|
7000
|
+
{ resource, resourceId, body, requestHeaders } = { requestHeaders: {} },
|
|
6362
7001
|
{ responseHeaders } = { responseHeaders: false }
|
|
6363
7002
|
) {
|
|
6364
7003
|
const {
|
|
6365
7004
|
error,
|
|
6366
|
-
} = ContentPlatformApplicationValidator.
|
|
7005
|
+
} = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceId().validate(
|
|
6367
7006
|
{
|
|
6368
7007
|
resource,
|
|
6369
|
-
|
|
7008
|
+
resourceId,
|
|
6370
7009
|
body,
|
|
6371
7010
|
},
|
|
6372
7011
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6378,10 +7017,10 @@ class Content {
|
|
|
6378
7017
|
// Showing warrnings if extra unknown parameters are found
|
|
6379
7018
|
const {
|
|
6380
7019
|
error: warrning,
|
|
6381
|
-
} = ContentPlatformApplicationValidator.
|
|
7020
|
+
} = ContentPlatformApplicationValidator.updateAppCustomFieldByResourceId().validate(
|
|
6382
7021
|
{
|
|
6383
7022
|
resource,
|
|
6384
|
-
|
|
7023
|
+
resourceId,
|
|
6385
7024
|
body,
|
|
6386
7025
|
},
|
|
6387
7026
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6389,7 +7028,7 @@ class Content {
|
|
|
6389
7028
|
if (warrning) {
|
|
6390
7029
|
Logger({
|
|
6391
7030
|
level: "WARN",
|
|
6392
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7031
|
+
message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldByResourceId \n ${warrning}`,
|
|
6393
7032
|
});
|
|
6394
7033
|
}
|
|
6395
7034
|
|
|
@@ -6398,7 +7037,7 @@ class Content {
|
|
|
6398
7037
|
const response = await PlatformAPIClient.execute(
|
|
6399
7038
|
this.config,
|
|
6400
7039
|
"put",
|
|
6401
|
-
`/service/platform/content/
|
|
7040
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/${resource}/${resourceId}`,
|
|
6402
7041
|
query_params,
|
|
6403
7042
|
body,
|
|
6404
7043
|
requestHeaders,
|
|
@@ -6423,7 +7062,7 @@ class Content {
|
|
|
6423
7062
|
} else {
|
|
6424
7063
|
Logger({
|
|
6425
7064
|
level: "WARN",
|
|
6426
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7065
|
+
message: `Response Validation Warnings for platform > Content > updateAppCustomFieldByResourceId \n ${res_error}`,
|
|
6427
7066
|
});
|
|
6428
7067
|
}
|
|
6429
7068
|
}
|
|
@@ -6432,7 +7071,7 @@ class Content {
|
|
|
6432
7071
|
}
|
|
6433
7072
|
|
|
6434
7073
|
/**
|
|
6435
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7074
|
+
* @param {ContentPlatformApplicationValidator.UpdateAppCustomFieldDefinitionParam} arg
|
|
6436
7075
|
* - Arg object
|
|
6437
7076
|
*
|
|
6438
7077
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -6440,23 +7079,19 @@ class Content {
|
|
|
6440
7079
|
* @returns {Promise<ContentPlatformModel.CustomFieldDefinitionDetailResSchema>}
|
|
6441
7080
|
* - Success response
|
|
6442
7081
|
*
|
|
6443
|
-
* @name
|
|
7082
|
+
* @name updateAppCustomFieldDefinition
|
|
6444
7083
|
* @summary: Update custom field definition
|
|
6445
|
-
* @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/
|
|
7084
|
+
* @description: Custom fields definition can be update using this api, You can update custom field definition name and description. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomFieldDefinition/).
|
|
6446
7085
|
*/
|
|
6447
|
-
async
|
|
6448
|
-
{
|
|
6449
|
-
requestHeaders: {},
|
|
6450
|
-
},
|
|
7086
|
+
async updateAppCustomFieldDefinition(
|
|
7087
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
6451
7088
|
{ responseHeaders } = { responseHeaders: false }
|
|
6452
7089
|
) {
|
|
6453
7090
|
const {
|
|
6454
7091
|
error,
|
|
6455
|
-
} = ContentPlatformApplicationValidator.
|
|
7092
|
+
} = ContentPlatformApplicationValidator.updateAppCustomFieldDefinition().validate(
|
|
6456
7093
|
{
|
|
6457
|
-
|
|
6458
|
-
resource,
|
|
6459
|
-
namespace,
|
|
7094
|
+
id,
|
|
6460
7095
|
body,
|
|
6461
7096
|
},
|
|
6462
7097
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6468,11 +7103,9 @@ class Content {
|
|
|
6468
7103
|
// Showing warrnings if extra unknown parameters are found
|
|
6469
7104
|
const {
|
|
6470
7105
|
error: warrning,
|
|
6471
|
-
} = ContentPlatformApplicationValidator.
|
|
7106
|
+
} = ContentPlatformApplicationValidator.updateAppCustomFieldDefinition().validate(
|
|
6472
7107
|
{
|
|
6473
|
-
|
|
6474
|
-
resource,
|
|
6475
|
-
namespace,
|
|
7108
|
+
id,
|
|
6476
7109
|
body,
|
|
6477
7110
|
},
|
|
6478
7111
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6480,7 +7113,7 @@ class Content {
|
|
|
6480
7113
|
if (warrning) {
|
|
6481
7114
|
Logger({
|
|
6482
7115
|
level: "WARN",
|
|
6483
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7116
|
+
message: `Parameter Validation warrnings for platform > Content > updateAppCustomFieldDefinition \n ${warrning}`,
|
|
6484
7117
|
});
|
|
6485
7118
|
}
|
|
6486
7119
|
|
|
@@ -6489,7 +7122,7 @@ class Content {
|
|
|
6489
7122
|
const response = await PlatformAPIClient.execute(
|
|
6490
7123
|
this.config,
|
|
6491
7124
|
"put",
|
|
6492
|
-
`/service/platform/content/
|
|
7125
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metafields/definitions/${id}`,
|
|
6493
7126
|
query_params,
|
|
6494
7127
|
body,
|
|
6495
7128
|
requestHeaders,
|
|
@@ -6514,7 +7147,7 @@ class Content {
|
|
|
6514
7147
|
} else {
|
|
6515
7148
|
Logger({
|
|
6516
7149
|
level: "WARN",
|
|
6517
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7150
|
+
message: `Response Validation Warnings for platform > Content > updateAppCustomFieldDefinition \n ${res_error}`,
|
|
6518
7151
|
});
|
|
6519
7152
|
}
|
|
6520
7153
|
}
|
|
@@ -6523,27 +7156,25 @@ class Content {
|
|
|
6523
7156
|
}
|
|
6524
7157
|
|
|
6525
7158
|
/**
|
|
6526
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7159
|
+
* @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectParam} arg
|
|
6527
7160
|
* - Arg object
|
|
6528
7161
|
*
|
|
6529
7162
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6530
7163
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6531
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6532
|
-
*
|
|
6533
|
-
* @name updateAppCustomObjectBySlug
|
|
7164
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectSchema>} - Success response
|
|
7165
|
+
* @name updateAppCustomObject
|
|
6534
7166
|
* @summary: Update custom object details
|
|
6535
|
-
* @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/
|
|
7167
|
+
* @description: Custom object entries can be updated using this endpoint. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObject/).
|
|
6536
7168
|
*/
|
|
6537
|
-
async
|
|
6538
|
-
{
|
|
7169
|
+
async updateAppCustomObject(
|
|
7170
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
6539
7171
|
{ responseHeaders } = { responseHeaders: false }
|
|
6540
7172
|
) {
|
|
6541
7173
|
const {
|
|
6542
7174
|
error,
|
|
6543
|
-
} = ContentPlatformApplicationValidator.
|
|
7175
|
+
} = ContentPlatformApplicationValidator.updateAppCustomObject().validate(
|
|
6544
7176
|
{
|
|
6545
|
-
|
|
6546
|
-
slug,
|
|
7177
|
+
id,
|
|
6547
7178
|
body,
|
|
6548
7179
|
},
|
|
6549
7180
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6555,10 +7186,9 @@ class Content {
|
|
|
6555
7186
|
// Showing warrnings if extra unknown parameters are found
|
|
6556
7187
|
const {
|
|
6557
7188
|
error: warrning,
|
|
6558
|
-
} = ContentPlatformApplicationValidator.
|
|
7189
|
+
} = ContentPlatformApplicationValidator.updateAppCustomObject().validate(
|
|
6559
7190
|
{
|
|
6560
|
-
|
|
6561
|
-
slug,
|
|
7191
|
+
id,
|
|
6562
7192
|
body,
|
|
6563
7193
|
},
|
|
6564
7194
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6566,7 +7196,7 @@ class Content {
|
|
|
6566
7196
|
if (warrning) {
|
|
6567
7197
|
Logger({
|
|
6568
7198
|
level: "WARN",
|
|
6569
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7199
|
+
message: `Parameter Validation warrnings for platform > Content > updateAppCustomObject \n ${warrning}`,
|
|
6570
7200
|
});
|
|
6571
7201
|
}
|
|
6572
7202
|
|
|
@@ -6575,7 +7205,7 @@ class Content {
|
|
|
6575
7205
|
const response = await PlatformAPIClient.execute(
|
|
6576
7206
|
this.config,
|
|
6577
7207
|
"put",
|
|
6578
|
-
`/service/platform/content/
|
|
7208
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/${id}`,
|
|
6579
7209
|
query_params,
|
|
6580
7210
|
body,
|
|
6581
7211
|
requestHeaders,
|
|
@@ -6589,7 +7219,7 @@ class Content {
|
|
|
6589
7219
|
|
|
6590
7220
|
const {
|
|
6591
7221
|
error: res_error,
|
|
6592
|
-
} = ContentPlatformModel.
|
|
7222
|
+
} = ContentPlatformModel.CustomObjectSchema().validate(responseData, {
|
|
6593
7223
|
abortEarly: false,
|
|
6594
7224
|
allowUnknown: true,
|
|
6595
7225
|
});
|
|
@@ -6600,7 +7230,7 @@ class Content {
|
|
|
6600
7230
|
} else {
|
|
6601
7231
|
Logger({
|
|
6602
7232
|
level: "WARN",
|
|
6603
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7233
|
+
message: `Response Validation Warnings for platform > Content > updateAppCustomObject \n ${res_error}`,
|
|
6604
7234
|
});
|
|
6605
7235
|
}
|
|
6606
7236
|
}
|
|
@@ -6609,27 +7239,26 @@ class Content {
|
|
|
6609
7239
|
}
|
|
6610
7240
|
|
|
6611
7241
|
/**
|
|
6612
|
-
* @param {ContentPlatformApplicationValidator.
|
|
7242
|
+
* @param {ContentPlatformApplicationValidator.UpdateAppCustomObjectDefinitionParam} arg
|
|
6613
7243
|
* - Arg object
|
|
6614
7244
|
*
|
|
6615
7245
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
6616
7246
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6617
|
-
* @returns {Promise<ContentPlatformModel.
|
|
6618
|
-
*
|
|
6619
|
-
*
|
|
6620
|
-
* @name updateAppCustomObjectDefinitionBySlug
|
|
7247
|
+
* @returns {Promise<ContentPlatformModel.CustomObjectDefinitionSchema>} -
|
|
7248
|
+
* Success response
|
|
7249
|
+
* @name updateAppCustomObjectDefinition
|
|
6621
7250
|
* @summary: Update custom object definition
|
|
6622
|
-
* @description:
|
|
7251
|
+
* @description: Use this API to update a custom object definition for your application. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateAppCustomObjectDefinition/).
|
|
6623
7252
|
*/
|
|
6624
|
-
async
|
|
6625
|
-
{
|
|
7253
|
+
async updateAppCustomObjectDefinition(
|
|
7254
|
+
{ id, body, requestHeaders } = { requestHeaders: {} },
|
|
6626
7255
|
{ responseHeaders } = { responseHeaders: false }
|
|
6627
7256
|
) {
|
|
6628
7257
|
const {
|
|
6629
7258
|
error,
|
|
6630
|
-
} = ContentPlatformApplicationValidator.
|
|
7259
|
+
} = ContentPlatformApplicationValidator.updateAppCustomObjectDefinition().validate(
|
|
6631
7260
|
{
|
|
6632
|
-
|
|
7261
|
+
id,
|
|
6633
7262
|
body,
|
|
6634
7263
|
},
|
|
6635
7264
|
{ abortEarly: false, allowUnknown: true }
|
|
@@ -6641,9 +7270,9 @@ class Content {
|
|
|
6641
7270
|
// Showing warrnings if extra unknown parameters are found
|
|
6642
7271
|
const {
|
|
6643
7272
|
error: warrning,
|
|
6644
|
-
} = ContentPlatformApplicationValidator.
|
|
7273
|
+
} = ContentPlatformApplicationValidator.updateAppCustomObjectDefinition().validate(
|
|
6645
7274
|
{
|
|
6646
|
-
|
|
7275
|
+
id,
|
|
6647
7276
|
body,
|
|
6648
7277
|
},
|
|
6649
7278
|
{ abortEarly: false, allowUnknown: false }
|
|
@@ -6651,7 +7280,7 @@ class Content {
|
|
|
6651
7280
|
if (warrning) {
|
|
6652
7281
|
Logger({
|
|
6653
7282
|
level: "WARN",
|
|
6654
|
-
message: `Parameter Validation warrnings for platform > Content >
|
|
7283
|
+
message: `Parameter Validation warrnings for platform > Content > updateAppCustomObjectDefinition \n ${warrning}`,
|
|
6655
7284
|
});
|
|
6656
7285
|
}
|
|
6657
7286
|
|
|
@@ -6660,7 +7289,7 @@ class Content {
|
|
|
6660
7289
|
const response = await PlatformAPIClient.execute(
|
|
6661
7290
|
this.config,
|
|
6662
7291
|
"put",
|
|
6663
|
-
`/service/platform/content/
|
|
7292
|
+
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/metaobjects/definitions/${id}`,
|
|
6664
7293
|
query_params,
|
|
6665
7294
|
body,
|
|
6666
7295
|
requestHeaders,
|
|
@@ -6674,7 +7303,7 @@ class Content {
|
|
|
6674
7303
|
|
|
6675
7304
|
const {
|
|
6676
7305
|
error: res_error,
|
|
6677
|
-
} = ContentPlatformModel.
|
|
7306
|
+
} = ContentPlatformModel.CustomObjectDefinitionSchema().validate(
|
|
6678
7307
|
responseData,
|
|
6679
7308
|
{ abortEarly: false, allowUnknown: true }
|
|
6680
7309
|
);
|
|
@@ -6685,7 +7314,7 @@ class Content {
|
|
|
6685
7314
|
} else {
|
|
6686
7315
|
Logger({
|
|
6687
7316
|
level: "WARN",
|
|
6688
|
-
message: `Response Validation Warnings for platform > Content >
|
|
7317
|
+
message: `Response Validation Warnings for platform > Content > updateAppCustomObjectDefinition \n ${res_error}`,
|
|
6689
7318
|
});
|
|
6690
7319
|
}
|
|
6691
7320
|
}
|
|
@@ -6944,8 +7573,8 @@ class Content {
|
|
|
6944
7573
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
6945
7574
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
6946
7575
|
* @name updateInjectableTag
|
|
6947
|
-
* @summary: Update HTML
|
|
6948
|
-
* @description:
|
|
7576
|
+
* @summary: Update HTML Tags
|
|
7577
|
+
* @description: Use this API to edit all HTML Tags present - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateInjectableTag/).
|
|
6949
7578
|
*/
|
|
6950
7579
|
async updateInjectableTag(
|
|
6951
7580
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -7430,7 +8059,7 @@ class Content {
|
|
|
7430
8059
|
*
|
|
7431
8060
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
7432
8061
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
7433
|
-
* @returns {Promise<ContentPlatformModel.
|
|
8062
|
+
* @returns {Promise<ContentPlatformModel.CreatePathMappingSchema>} - Success response
|
|
7434
8063
|
* @name updatePathRedirectionRules
|
|
7435
8064
|
* @summary: Update path redirection rule
|
|
7436
8065
|
* @description: Modify settings for path redirection rules. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updatePathRedirectionRules/).
|
|
@@ -7488,7 +8117,7 @@ class Content {
|
|
|
7488
8117
|
|
|
7489
8118
|
const {
|
|
7490
8119
|
error: res_error,
|
|
7491
|
-
} = ContentPlatformModel.
|
|
8120
|
+
} = ContentPlatformModel.CreatePathMappingSchema().validate(responseData, {
|
|
7492
8121
|
abortEarly: false,
|
|
7493
8122
|
allowUnknown: true,
|
|
7494
8123
|
});
|