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